diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 12:26:56 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 14:52:23 +0100 |
commit | 93ab45b6b5c4f8e0619e963156c983009d399a9d (patch) | |
tree | 80e55993f29ad7bf502ef7388eef78114b2dc4ab | |
parent | 78e90ac60b81f17fdf8c319357f16962e92e6106 (diff) |
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.
306 files changed, 1890 insertions, 1536 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 6e7caffda9..a77385faa6 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1978,7 +1978,7 @@ void _Directory::_bind_methods() { ClassDB::bind_method(_MD("make_dir_recursive:Error","path"),&_Directory::make_dir_recursive); ClassDB::bind_method(_MD("file_exists","path"),&_Directory::file_exists); ClassDB::bind_method(_MD("dir_exists","path"),&_Directory::dir_exists); -// ClassDB::bind_method(_MD("get_modified_time","file"),&_Directory::get_modified_time); + //ClassDB::bind_method(_MD("get_modified_time","file"),&_Directory::get_modified_time); ClassDB::bind_method(_MD("get_space_left"),&_Directory::get_space_left); ClassDB::bind_method(_MD("copy:Error","from","to"),&_Directory::copy); ClassDB::bind_method(_MD("rename:Error","from","to"),&_Directory::rename); diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp index 71f810422a..1e3a51fede 100644 --- a/core/compressed_translation.cpp +++ b/core/compressed_translation.cpp @@ -467,7 +467,7 @@ StringName PHashTranslation::get_message(const StringName& p_src_text) const { //print_line("Hash: "+itos(p)); if (p==0xFFFFFFFF) { -// print_line("GETMSG: Nothing!"); + //print_line("GETMSG: Nothing!"); return StringName(); //nothing } @@ -489,7 +489,7 @@ StringName PHashTranslation::get_message(const StringName& p_src_text) const { //print_line("bucket pos: "+itos(idx)); if (idx==-1) { -// print_line("GETMSG: Not in Bucket!"); + //print_line("GETMSG: Not in Bucket!"); return StringName(); } @@ -497,8 +497,8 @@ StringName PHashTranslation::get_message(const StringName& p_src_text) const { String rstr; rstr.parse_utf8(&sptr[ bucket.elem[idx].str_offset ], bucket.elem[idx].uncomp_size ); -// print_line("Uncompressed, size: "+itos(bucket.elem[idx].comp_size)); -// print_line("Return: "+rstr); + //print_line("Uncompressed, size: "+itos(bucket.elem[idx].comp_size)); + //print_line("Return: "+rstr); return rstr; } else { @@ -508,8 +508,8 @@ StringName PHashTranslation::get_message(const StringName& p_src_text) const { smaz_decompress(&sptr[ bucket.elem[idx].str_offset ], bucket.elem[idx].comp_size,uncomp.ptr(),bucket.elem[idx].uncomp_size ); String rstr; rstr.parse_utf8(uncomp.get_data()); -// print_line("Compressed, size: "+itos(bucket.elem[idx].comp_size)); -// print_line("Return: "+rstr); + //print_line("Compressed, size: "+itos(bucket.elem[idx].comp_size)); + //print_line("Return: "+rstr); return rstr; } diff --git a/core/globals.cpp b/core/globals.cpp index b89303b728..a4c24a6cc8 100644 --- a/core/globals.cpp +++ b/core/globals.cpp @@ -1011,7 +1011,7 @@ GlobalConfig::GlobalConfig() { GLOBAL_DEF("input/ui_page_down",va); input_presets.push_back("input/ui_page_down"); -// GLOBAL_DEF("display/handheld/orientation", "landscape"); + //GLOBAL_DEF("display/handheld/orientation", "landscape"); custom_prop_info["display/handheld/orientation"]=PropertyInfo(Variant::STRING,"display/handheld/orientation",PROPERTY_HINT_ENUM,"landscape,portrait,reverse_landscape,reverse_portrait,sensor_landscape,sensor_portrait,sensor"); diff --git a/core/hash_map.h b/core/hash_map.h index fba12b55ec..0d55206935 100644 --- a/core/hash_map.h +++ b/core/hash_map.h @@ -61,7 +61,7 @@ public: static _FORCE_INLINE_ uint32_t hash(const uint8_t p_int) { return p_int; } static _FORCE_INLINE_ uint32_t hash(const int8_t p_int) { return (uint32_t)p_int; } static _FORCE_INLINE_ uint32_t hash(const wchar_t p_wchar) { return (uint32_t)p_wchar; } -// static _FORCE_INLINE_ uint32_t hash(const void* p_ptr) { return uint32_t(uint64_t(p_ptr))*(0x9e3779b1L); } + //static _FORCE_INLINE_ uint32_t hash(const void* p_ptr) { return uint32_t(uint64_t(p_ptr))*(0x9e3779b1L); } }; /** diff --git a/core/image.cpp b/core/image.cpp index 174c840c23..d769e6a0b3 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -363,7 +363,7 @@ void Image::convert( Format p_new_format ){ Image new_img(width,height,0,p_new_format); -// int len=data.size(); + //int len=data.size(); PoolVector<uint8_t>::Read r = data.read(); PoolVector<uint8_t>::Write w = new_img.data.write(); @@ -414,7 +414,7 @@ void Image::convert( Format p_new_format ){ bool gen_mipmaps=mipmaps; -// mipmaps=false; + //mipmaps=false; *this=new_img; @@ -1240,7 +1240,7 @@ void Image::create( const char ** p_xpm ) { uint8_t col_r; uint8_t col_g; uint8_t col_b; -// uint8_t col_a=255; + //uint8_t col_a=255; for (int i=0;i<6;i++) { diff --git a/core/input_map.cpp b/core/input_map.cpp index 0379131dd3..bcae630c76 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -324,7 +324,7 @@ void InputMap::load_default() { key.key.scancode=KEY_PAGEDOWN; action_add_event("ui_page_down",key); -// set("display/handheld/orientation", "landscape"); + //set("display/handheld/orientation", "landscape"); } diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h index 884d40a266..000c2b45f3 100644 --- a/core/io/file_access_buffered_fa.h +++ b/core/io/file_access_buffered_fa.h @@ -127,10 +127,11 @@ public: set_error(OK); }; -// static void make_default() { - - //FileAccess::create_func = FileAccessBufferedFA<T>::create; -// }; + /* + static void make_default() { + FileAccess::create_func = FileAccessBufferedFA<T>::create; + }; + */ virtual uint64_t _get_modified_time(const String& p_file) { diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index a9dbf56c15..32eb003228 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -68,7 +68,7 @@ FileAccess* FileAccessMemory::create() { bool FileAccessMemory::file_exists(const String& p_name) { String name = fix_path(p_name); -// name = DirAccess::normalize_path(name); + //name = DirAccess::normalize_path(name); return files && (files->find(name) != NULL); } @@ -87,7 +87,7 @@ Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) { ERR_FAIL_COND_V(!files, ERR_FILE_NOT_FOUND); String name = fix_path(p_path); -// name = DirAccess::normalize_path(name); + //name = DirAccess::normalize_path(name); Map<String, Vector<uint8_t> >::Element* E = files->find(name); ERR_FAIL_COND_V(!E, ERR_FILE_NOT_FOUND); diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp index 19076b57be..662902281b 100644 --- a/core/io/file_access_network.cpp +++ b/core/io/file_access_network.cpp @@ -325,7 +325,7 @@ Error FileAccessNetwork::_open(const String& p_path, int p_mode_flags) { last_page=-1; last_page_buff=NULL; -// buffers.clear(); + //buffers.clear(); nc->unlock_mutex(); DEBUG_PRINT("OPEN POST"); DEBUG_TIME("open_post"); @@ -437,7 +437,7 @@ int FileAccessNetwork::get_buffer(uint8_t *p_dst, int p_length) const{ p_length=total_size-pos; } -// FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton; + //FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton; uint8_t *buff=last_page_buff; diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index c093b087b8..4af3503434 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1059,7 +1059,7 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(cons Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); ria->open(f); @@ -1114,7 +1114,7 @@ Error ResourceFormatLoaderBinary::load_import_metadata(const String &p_path, Ref Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); ria->recognize(f); if(ria->error!=OK) return ERR_FILE_UNRECOGNIZED; @@ -1159,14 +1159,14 @@ void ResourceFormatLoaderBinary::get_dependencies(const String& p_path,List<Stri Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); ria->get_dependencies(f,p_dependencies,p_add_types); } Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path,const Map<String,String>& p_map) { -// Error error=OK; + //Error error=OK; FileAccess *f=FileAccess::open(p_path,FileAccess::READ); @@ -1250,7 +1250,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path,const ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; ria->remaps=p_map; - // ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); ria->open(f); err = ria->poll(); @@ -1384,7 +1384,7 @@ String ResourceFormatLoaderBinary::get_resource_type(const String &p_path) const Ref<ResourceInteractiveLoaderBinary> ria = memnew( ResourceInteractiveLoaderBinary ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( Globals::get_singleton()->localize_path(p_path) ); String r = ria->recognize(f); return r; @@ -1708,8 +1708,10 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant& p_property, 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(d[E->get()]); @@ -2150,7 +2152,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_ } Vector<uint64_t> ofs_table; -// int saved_idx=0; + //int saved_idx=0; //now actually save the resources for(List<ResourceData>::Element *E=resources.front();E;E=E->next()) { diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 777c57a6a6..354efaa83f 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -391,8 +391,10 @@ void ResourceLoader::get_dependencies(const String& p_path, List<String> *p_depe if (!loader[i]->recognize(extension)) 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); @@ -416,8 +418,10 @@ Error ResourceLoader::rename_dependencies(const String &p_path,const Map<String, if (!loader[i]->recognize(extension)) 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); diff --git a/core/io/zip.c b/core/io/zip.c index 44c79195d9..27a3d3cdc1 100644 --- a/core/io/zip.c +++ b/core/io/zip.c @@ -855,7 +855,7 @@ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* gl ziinit.z_filefunc.zseek32_file = NULL; ziinit.z_filefunc.ztell32_file = NULL; if (pzlib_filefunc64_32_def==NULL) { -// fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); + //fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); } else ziinit.z_filefunc = *pzlib_filefunc64_32_def; diff --git a/core/map.h b/core/map.h index af35fec332..9448389169 100644 --- a/core/map.h +++ b/core/map.h @@ -149,7 +149,7 @@ private: #ifdef GLOBALNIL_DISABLED memdelete_allocator<Element,A>(_nil); #endif -// memdelete_allocator<Element,A>(_root); + //memdelete_allocator<Element,A>(_root); } }; diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp index b888b6b56c..e2526f5134 100644 --- a/core/math/bsp_tree.cpp +++ b/core/math/bsp_tree.cpp @@ -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] ]; - //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 under_count=0; @@ -546,7 +548,7 @@ BSP_Tree::BSP_Tree(const Variant& p_variant) { error_radius = d["error"]; aabb = d["aabb"]; -// int node_count = src_nodes.size(); + //int node_count = src_nodes.size(); nodes.resize(src_nodes.size()/3); PoolVector<int>::Read r = src_nodes.read(); diff --git a/core/math/geometry.h b/core/math/geometry.h index 9800e5513c..d5b3a3068c 100644 --- a/core/math/geometry.h +++ b/core/math/geometry.h @@ -750,9 +750,7 @@ public: return Vector<Vector3>(); //empty } -// long count = 0; long previous = polygon.size() - 1; - Vector<Vector3> clipped; for (int index = 0; index < polygon.size(); index++) { diff --git a/core/math/octree.h b/core/math/octree.h index 1a41413a76..483ba1d510 100644 --- a/core/math/octree.h +++ b/core/math/octree.h @@ -130,8 +130,10 @@ private: ~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().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 { 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; 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) o->pairable_elements.erase( E->get().E ); diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index ab81a068d4..756e48d0b4 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -483,7 +483,7 @@ Error QuickHull::build(const Vector<Vector3>& p_points, Geometry::MeshData &r_me //fill mesh r_mesh.faces.clear(); r_mesh.faces.resize(ret_faces.size()); -// print_line("FACECOUNT: "+itos(r_mesh.faces.size())); + //print_line("FACECOUNT: "+itos(r_mesh.faces.size())); int idx=0; for (List<Geometry::MeshData::Face>::Element *E=ret_faces.front();E;E=E->next()) { diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp index fc5f55066b..74c4656771 100644 --- a/core/math/triangle_mesh.cpp +++ b/core/math/triangle_mesh.cpp @@ -320,7 +320,7 @@ bool TriangleMesh::intersect_segment(const Vector3& p_begin,const Vector3& p_end bool valid = b.aabb.intersects_segment(p_begin,p_end); -// bool valid = b.aabb.intersects(ray_aabb); + //bool valid = b.aabb.intersects(ray_aabb); if (!valid) { diff --git a/core/math/triangulator.cpp b/core/math/triangulator.cpp index 8f82d76823..75b2b064c4 100644 --- a/core/math/triangulator.cpp +++ b/core/math/triangulator.cpp @@ -1128,7 +1128,7 @@ int TriangulatorPartition::MonotonePartition(List<TriangulatorPoly> *inpolys, Li //this makes deleting existing edges much faster Set<ScanLineEdge>::Element **edgeTreeIterators,*edgeIter; edgeTreeIterators = new Set<ScanLineEdge>::Element*[maxnumvertices]; -// Pair<Set<ScanLineEdge>::Element*,bool> edgeTreeRet; + //Pair<Set<ScanLineEdge>::Element*,bool> edgeTreeRet; for(i = 0; i<numvertices; i++) edgeTreeIterators[i] = NULL; //for each vertex diff --git a/core/object.cpp b/core/object.cpp index 3bb917bd38..8af088122e 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -369,8 +369,10 @@ void Object::set(const String& p_name, const Variant& p_value) { _setv(p_name,p_value); - //if (!_use_builtin_script()) -// return; + /* + if (!_use_builtin_script()) + return; + */ bool 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 { if (ClassDB::set_property(this,p_name,p_value,r_valid)) { - //if (r_valid) - // *r_valid=true; + /* + if (r_valid) + *r_valid=true; + */ return; } } @@ -1689,12 +1693,12 @@ void Object::_bind_methods() { //todo reimplement this per language so all 5 arguments can be called -// ClassDB::bind_method(_MD("call","method","arg1","arg2","arg3","arg4"),&Object::_call_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant())); -// ClassDB::bind_method(_MD("call_deferred","method","arg1","arg2","arg3","arg4"),&Object::_call_deferred_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant())); + //ClassDB::bind_method(_MD("call","method","arg1","arg2","arg3","arg4"),&Object::_call_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant())); + //ClassDB::bind_method(_MD("call_deferred","method","arg1","arg2","arg3","arg4"),&Object::_call_deferred_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant())); ClassDB::bind_method(_MD("add_user_signal","signal","arguments"),&Object::_add_user_signal,DEFVAL(Array())); ClassDB::bind_method(_MD("has_user_signal","signal"),&Object::_has_user_signal); -// ClassDB::bind_method(_MD("emit_signal","signal","arguments"),&Object::_emit_signal,DEFVAL(Array())); + //ClassDB::bind_method(_MD("emit_signal","signal","arguments"),&Object::_emit_signal,DEFVAL(Array())); { diff --git a/core/object.h b/core/object.h index a54693eab6..6ce579ea99 100644 --- a/core/object.h +++ b/core/object.h @@ -579,8 +579,8 @@ public: } /* IAPI */ -// void set(const String& p_name, const Variant& p_value); -// Variant get(const String& p_name) const; + //void set(const String& p_name, const Variant& p_value); + //Variant get(const String& p_name) const; void set(const StringName& p_name, const Variant& p_value, bool *r_valid=NULL); Variant get(const StringName& p_name, bool *r_valid=NULL) const; diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp index f3bb37421f..3139ea9511 100644 --- a/core/object_type_db.cpp +++ b/core/object_type_db.cpp @@ -897,7 +897,7 @@ bool ClassDB::set_property(Object* p_object,const StringName& p_property, const if (psg->index>=0) { Variant index=psg->index; const Variant* arg[2]={&index,&p_value}; -// p_object->call(psg->setter,arg,2,ce); + //p_object->call(psg->setter,arg,2,ce); if (psg->_setptr) { psg->_setptr->call(p_object,arg,2,ce); } else { diff --git a/core/os/memory.h b/core/os/memory.h index 0e6dea48d3..49424037ff 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -97,8 +97,8 @@ _ALWAYS_INLINE_ T *_post_initialize(T *p_obj) { #define memnew(m_class) _post_initialize(new("") m_class) _ALWAYS_INLINE_ void * operator new(size_t p_size,void *p_pointer,size_t check, const char *p_description) { -// void *failptr=0; -// ERR_FAIL_COND_V( check < p_size , failptr); /** bug, or strange compiler, most likely */ + //void *failptr=0; + //ERR_FAIL_COND_V( check < p_size , failptr); /** bug, or strange compiler, most likely */ return p_pointer; } diff --git a/core/os/os.cpp b/core/os/os.cpp index f4c13dabcc..3a8e15a692 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -166,7 +166,7 @@ const char *OS::get_last_error() const { void OS::dump_memory_to_file(const char* p_file) { -// Memory::dump_static_mem_to_file(p_file); + //Memory::dump_static_mem_to_file(p_file); } static FileAccess *_OSPRF=NULL; diff --git a/core/path_remap.cpp b/core/path_remap.cpp index fd5b38fa79..42383e212d 100644 --- a/core/path_remap.cpp +++ b/core/path_remap.cpp @@ -142,7 +142,7 @@ void PathRemap::load_remaps() { // platform remaps second, so override remaps = GlobalConfig::get_singleton()->get("remap/"+OS::get_singleton()->get_name()); -// remaps = Globals::get_singleton()->get("remap/PSP"); + //remaps = Globals::get_singleton()->get("remap/PSP"); { int rlen = remaps.size(); @@ -152,7 +152,7 @@ void PathRemap::load_remaps() { String from = r[i*2+0]; String to = r[i*2+1]; -// print_line("add remap: "+from+" -> "+to); + //print_line("add remap: "+from+" -> "+to); add_remap(from,to); } } diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index d97323a95e..85fa5d27c0 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -123,7 +123,7 @@ void register_core_types() { ClassDB::register_virtual_class<PacketPeer>(); ClassDB::register_class<PacketPeerStream>(); ClassDB::register_class<MainLoop>(); -// ClassDB::register_type<OptimizedSaver>(); + //ClassDB::register_type<OptimizedSaver>(); ClassDB::register_class<Translation>(); ClassDB::register_class<PHashTranslation>(); ClassDB::register_class<UndoRedo>(); diff --git a/core/resource.cpp b/core/resource.cpp index db4d2ec0db..3369e4a5a2 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -522,11 +522,12 @@ void ResourceCache::clear() { void ResourceCache::reload_externals() { - //const String *K=NULL; - //while ((K=resources.next(K))) { -// resources[*K]->reload_external_data(); -// } - + /* + const String *K=NULL; + while ((K=resources.next(K))) { + resources[*K]->reload_external_data(); + } + */ } bool ResourceCache::has(const String& p_path) { diff --git a/core/set.h b/core/set.h index 9da2887671..13c2b3a4f6 100644 --- a/core/set.h +++ b/core/set.h @@ -141,7 +141,7 @@ private: #ifdef GLOBALNIL_DISABLED memdelete_allocator<Element,A>(_nil); #endif -// memdelete_allocator<Element,A>(_root); + //memdelete_allocator<Element,A>(_root); } }; @@ -307,7 +307,7 @@ private: new_node->right=_data._nil; new_node->left=_data._nil; new_node->value=p_value; -// new_node->data=_data; + //new_node->data=_data; if (new_parent==_data._root || less(p_value,new_parent->value)) { new_parent->left=new_node; diff --git a/core/ustring.cpp b/core/ustring.cpp index cce355afd5..9dec7895c1 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -560,7 +560,7 @@ String String::get_slice(String p_splitter, int p_slice) const { int pos=0; int prev_pos=0; -// int slices=1; + //int slices=1; if (p_slice<0) return ""; if (find(p_splitter)==-1) @@ -574,7 +574,7 @@ String String::get_slice(String p_splitter, int p_slice) const { pos=length(); //reached end int from=prev_pos; - // int to=pos; + //int to=pos; if (p_slice==i) { @@ -1420,7 +1420,7 @@ bool String::parse_utf8(const char* p_utf8,int p_len) { } } -// printf("char %i, len %i\n",unichar,len); + //printf("char %i, len %i\n",unichar,len); if (sizeof(wchar_t)==2 && unichar>0xFFFF) { unichar=' '; //too long for windows diff --git a/core/variant_call.cpp b/core/variant_call.cpp index f51abe7289..1ddb8dbf88 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -146,7 +146,7 @@ struct _VariantCall { Arg(Variant::Type p_type,const StringName &p_name) { name=p_name; type=p_type; } }; -// void addfunc(Variant::Type p_type, const StringName& p_name,VariantFunc p_func); + //void addfunc(Variant::Type p_type, const StringName& p_name,VariantFunc p_func); static void make_func_return_variant(Variant::Type p_type,const StringName& p_name) { @@ -354,7 +354,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM1R(Vector2,slide); VCALL_LOCALMEM1R(Vector2,reflect); VCALL_LOCALMEM0R(Vector2,angle); -// VCALL_LOCALMEM1R(Vector2,cross); + //VCALL_LOCALMEM1R(Vector2,cross); VCALL_LOCALMEM0R(Vector2,abs); VCALL_LOCALMEM1R(Vector2,clamped); diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 402c8d41da..ca748b7fd3 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -2094,8 +2094,10 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str p_store_string_func(p_store_string_ud,"{ "); 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); 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); diff --git a/drivers/convex_decomp/b2Glue.h b/drivers/convex_decomp/b2Glue.h index 7ec6d7f181..425486356e 100644 --- a/drivers/convex_decomp/b2Glue.h +++ b/drivers/convex_decomp/b2Glue.h @@ -134,11 +134,13 @@ struct b2Vec2 return length; } - ///// Does this vector contain finite coordinates? - //bool IsValid() const - //{ - // return b2IsValid(x) && b2IsValid(y); - //} + /* + /// Does this vector contain finite coordinates? + bool IsValid() const + { + return b2IsValid(x) && b2IsValid(y); + } + */ float32 x, y; }; diff --git a/drivers/convex_decomp/b2Polygon.cpp b/drivers/convex_decomp/b2Polygon.cpp index 73955d3573..f45d98250a 100644 --- a/drivers/convex_decomp/b2Polygon.cpp +++ b/drivers/convex_decomp/b2Polygon.cpp @@ -189,7 +189,7 @@ void b2Polygon::MergeParallelEdges(float32 tolerance) { x = newx; y = newy; nVertices = newNVertices; -// printf("%d \n", newNVertices); + //printf("%d \n", newNVertices); } /* @@ -436,7 +436,6 @@ bool b2Polygon::IsSimple() { * For internal use. */ b2Polygon* b2Polygon::Add(b2Triangle& t) { -// float32 equalTol = .001f; // First, find vertices that connect int32 firstP = -1; int32 firstT = -1; @@ -963,7 +962,7 @@ int32 DecomposeConvex(b2Polygon* p, b2Polygon* results, int32 maxPolys) { tempP.Set(*p); ReversePolygon(tempP.x, tempP.y, tempP.nVertices); nTri = TriangulatePolygon(tempP.x, tempP.y, tempP.nVertices, triangulated); -// ReversePolygon(p->x, p->y, p->nVertices); //reset orientation + //ReversePolygon(p->x, p->y, p->nVertices); //reset orientation } else { //printf("It is not ccw \n"); nTri = TriangulatePolygon(p->x, p->y, p->nVertices, triangulated); @@ -997,7 +996,7 @@ void DecomposeConvexAndAddTo(b2Polygon* p, b2Body* bd, b2FixtureDef* prototype) if (p->nVertices < 3) return; b2Polygon* decomposed = new b2Polygon[p->nVertices - 2]; //maximum number of polys int32 nPolys = DecomposeConvex(p, decomposed, p->nVertices - 2); -// printf("npolys: %d",nPolys); + //printf("npolys: %d",nPolys); b2FixtureDef* pdarray = new b2FixtureDef[2*p->nVertices];//extra space in case of splits int32 extra = 0; for (int32 i = 0; i < nPolys; ++i) { @@ -1362,14 +1361,15 @@ b2Polygon TraceEdge(b2Polygon* p){ //printf("knode %d on node %d now has %d connections\n",k,j,knode->nConnected); //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){ jnode->RemoveConnectionByIndex(k); - }*/ + } + */ jnode->nConnected = 0; } } diff --git a/drivers/convex_decomp/b2Polygon.h b/drivers/convex_decomp/b2Polygon.h index 36af2fd9d0..c466e28f7e 100644 --- a/drivers/convex_decomp/b2Polygon.h +++ b/drivers/convex_decomp/b2Polygon.h @@ -74,9 +74,11 @@ public: void print(){ 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(){ diff --git a/drivers/convex_decomp/b2d_decompose.cpp b/drivers/convex_decomp/b2d_decompose.cpp index 82eade5b69..f84faaf586 100644 --- a/drivers/convex_decomp/b2d_decompose.cpp +++ b/drivers/convex_decomp/b2d_decompose.cpp @@ -144,7 +144,7 @@ static Vector< Vector<Vector2> > _b2d_decompose(const Vector<Vector2>& p_polygon Skip: ; } -// delete[] pdarray; + //delete[] pdarray; delete[] decomposed; delete p; return res;// pdarray; //needs to be deleted after body is created diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 2673c79232..fd3e5e508e 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -915,7 +915,7 @@ void RasterizerGLES2::texture_allocate(RID p_texture,int p_width, int p_height,I if (scale_textures) { texture->alloc_width = po2_width; texture->alloc_height = po2_height; - // print_line("scale because npo2: "+itos(npo2_textures_available)+" mm: "+itos(p_format&VS::TEXTURE_FLAG_MIPMAPS)+" "+itos(p_mipmap_count) ); + //print_line("scale because npo2: "+itos(npo2_textures_available)+" mm: "+itos(p_format&VS::TEXTURE_FLAG_MIPMAPS)+" "+itos(p_mipmap_count) ); } else { texture->alloc_width = texture->width; @@ -1910,7 +1910,7 @@ void RasterizerGLES2::mesh_add_surface(RID p_mesh,VS::PrimitiveType p_primitive, use_VBO=false; } -// surface->packed=pack_arrays && use_VBO; + //surface->packed=pack_arrays && use_VBO; int total_elem_size=0; @@ -3917,7 +3917,7 @@ void RasterizerGLES2::light_instance_set_shadow_transform(RID p_light_instance, ERR_FAIL_COND(!lighti); ERR_FAIL_COND(lighti->base->type!=VS::LIGHT_DIRECTIONAL); -// ERR_FAIL_INDEX(p_index,1); + //ERR_FAIL_INDEX(p_index,1); lighti->custom_projection[p_index]=p_camera; lighti->custom_transform[p_index]=p_transform; @@ -4043,8 +4043,10 @@ RID RasterizerGLES2::viewport_data_create() { 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_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, format_luminance_components, format_luminance_type, NULL); @@ -4295,11 +4297,11 @@ void RasterizerGLES2::begin_frame() { draw_next_frame=false; -// material_shader.set_uniform_default(MaterialShaderGLES2::SCREENZ_SCALE, Math::fmod(time, 3600.0)); + //material_shader.set_uniform_default(MaterialShaderGLES2::SCREENZ_SCALE, Math::fmod(time, 3600.0)); /* nehe ?*/ -// glClearColor(0,0,1,1); -// glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared.. + //glClearColor(0,0,1,1); + //glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared.. } void RasterizerGLES2::capture_viewport(Image* r_capture) { @@ -4329,7 +4331,7 @@ void RasterizerGLES2::capture_viewport(Image* r_capture) { PoolVector<uint8_t>::Write w = pixels.write(); glPixelStorei(GL_PACK_ALIGNMENT, 4); -// uint64_t time = OS::get_singleton()->get_ticks_usec(); + //uint64_t time = OS::get_singleton()->get_ticks_usec(); if (current_rt) { #ifdef GLEW_ENABLED @@ -4456,7 +4458,7 @@ void RasterizerGLES2::begin_shadow_map( RID p_light_instance, int p_shadow_pass opaque_render_list.clear(); alpha_render_list.clear(); -// pre_zpass_render_list.clear(); + //pre_zpass_render_list.clear(); light_instance_count=0; glCullFace(GL_FRONT); @@ -4614,7 +4616,7 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const { //print_line("compiled fragment: "+fragment_code); - // ("compiled fragment globals: "+fragment_globals); + //("compiled fragment globals: "+fragment_globals); //print_line("UCF: "+itos(p_shader->uniforms.size())); @@ -5128,9 +5130,11 @@ _FORCE_INLINE_ void RasterizerGLES2::_update_material_shader_params(Material *p_ ud.value=E->value().default_value; 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(" told "+Variant::get_type_name(old_mparams[E->key()].value.get_type())+" tnew "+Variant::get_type_name(E->value().default_value.get_type())); + /* + print_line("NEW: "+String(E->key())+" because: hasold-"+itos(old_mparams.has(E->key()))); + 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,12 +5220,14 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material if (p_material->shader_cache && p_material->shader_cache->valid) { - // // reduce amount of conditional compilations - // for(int i=0;i<_tex_version_count;i++) - // material_shader.set_conditional((MaterialShaderGLES2::Conditionals)_tex_version[i],false); + /* + // reduce amount of conditional compilations + 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); if (p_material->shader_version!=p_material->shader_cache->version) { //shader changed somehow, must update uniforms @@ -5241,7 +5247,7 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material if (E->get().index<0) continue; -// print_line(String(E->key())+": "+E->get().value); + //print_line(String(E->key())+": "+E->get().value); if (E->get().istexture) { //clearly a texture.. RID rid = E->get().value; @@ -5418,13 +5424,7 @@ void RasterizerGLES2::_setup_light(uint16_t p_light) { if (li->near_shadow_buffer) { glActiveTexture(GL_TEXTURE0+max_texture_units-1); - //if (read_depth_supported) { - - glBindTexture(GL_TEXTURE_2D,li->near_shadow_buffer->depth); - //} else { - - - //} + glBindTexture(GL_TEXTURE_2D,li->near_shadow_buffer->depth); 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); @@ -5944,8 +5944,10 @@ Error RasterizerGLES2::_setup_geometry(const Geometry *p_geometry, const Materia 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) { glDisableVertexAttribArray(i); @@ -5957,7 +5959,7 @@ Error RasterizerGLES2::_setup_geometry(const Geometry *p_geometry, const Materia } glEnableVertexAttribArray(i); -// print_line("set: "+itos(i)+" - count: "+itos(ad.count)+" datatype: "+itos(ad.datatype)+" ofs: "+itos(ad.ofs)+" stride: "+itos(stride)+" total len: "+itos(surf->array_len)); + //print_line("set: "+itos(i)+" - count: "+itos(ad.count)+" datatype: "+itos(ad.datatype)+" ofs: "+itos(ad.ofs)+" stride: "+itos(stride)+" total len: "+itos(surf->array_len)); glVertexAttribPointer(i, ad.count, ad.datatype, ad.normalize, stride, &base[ad.ofs]); } @@ -6015,7 +6017,7 @@ void RasterizerGLES2::_render(const Geometry *p_geometry,const Material *p_mater glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len>(1<<16))?GL_UNSIGNED_INT:GL_UNSIGNED_SHORT, s->index_array_local); } else { - // print_line("indices: "+itos(s->index_array_local) ); + //print_line("indices: "+itos(s->index_array_local) ); //print_line("VBO F: "+itos(s->format)+" C: "+itos(s->index_array_len)+" VC: "+itos(s->array_len)); @@ -6405,7 +6407,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans material_shader.set_conditional(MaterialShaderGLES2::SHADELESS,false); material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_OCTREE,false); material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_LIGHTMAP,false); -// material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_TEXTURE,false); + //material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_TEXTURE,false); } @@ -6956,7 +6958,7 @@ void RasterizerGLES2::_process_glow_bloom() { glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::HDR_SOURCE),2); copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_EXPOSURE,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE])); copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_WHITE])); -// copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE,1.0); + //copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE,1.0); copy_shader.set_uniform(CopyShaderGLES2::HDR_GLOW_TRESHOLD,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_GLOW_TRESHOLD])); copy_shader.set_uniform(CopyShaderGLES2::HDR_GLOW_SCALE,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_GLOW_SCALE])); @@ -7040,7 +7042,7 @@ void RasterizerGLES2::_process_hdr() { _copy_screen_quad(); copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_COPY,false); -// int passes = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES]; + //int passes = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES]; copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_REDUCE,true); copy_shader.bind(); @@ -7345,7 +7347,7 @@ void RasterizerGLES2::end_scene() { print_line(String("setting camera to ")+camera_transform_inverse); */ -// material_shader.set_uniform_default(MaterialShaderGLES2::CAMERA_INVERSE, camera_transform_inverse); + //material_shader.set_uniform_default(MaterialShaderGLES2::CAMERA_INVERSE, camera_transform_inverse); current_depth_test=true; @@ -7391,7 +7393,7 @@ void RasterizerGLES2::end_scene() { _render_list_forward(&alpha_render_list,camera_transform,camera_transform_inverse,camera_projection,false,fragment_lighting,true); glColorMask(1,1,1,1); -// material_shader.set_conditional( MaterialShaderGLES2::USE_FOG,false); + //material_shader.set_conditional( MaterialShaderGLES2::USE_FOG,false); DEBUG_TEST_ERROR("Drawing Scene"); @@ -7534,8 +7536,8 @@ void RasterizerGLES2::end_scene() { if (GLOBAL_DEF("rasterizer/debug_shadow_maps",false)) { _debug_shadows(); } -// _debug_luminances(); -// _debug_samplers(); + //_debug_luminances(); + //_debug_samplers(); if (using_canvas_bg) { using_canvas_bg=false; @@ -7884,7 +7886,7 @@ void RasterizerGLES2::_debug_draw_shadows_type(Vector<ShadowBuffer>& p_shadows,P Size2 debug_size(128,128); -// Size2 debug_size(512,512); + //Size2 debug_size(512,512); int useblur=shadow_filter==SHADOW_FILTER_ESM?1:0; @@ -7989,7 +7991,7 @@ void RasterizerGLES2::_debug_shadows() { _debug_draw_shadows_type(near_shadow_buffers,ofs); -// _debug_draw_shadows_type(far_shadow_buffers,ofs); + //_debug_draw_shadows_type(far_shadow_buffers,ofs); } @@ -8841,11 +8843,11 @@ RID RasterizerGLES2::canvas_light_shadow_buffer_create(int p_width) { } else { // We'll use a RGBA texture into which we pack the depth info glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, cls->size, cls->height, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + GL_RGBA, GL_UNSIGNED_BYTE, NULL); // Attach the RGBA texture to FBO color attachment point glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, cls->depth, 0); + GL_TEXTURE_2D, cls->depth, 0); cls->rgba=cls->depth; // Allocate 16-bit depth buffer @@ -8853,7 +8855,7 @@ RID RasterizerGLES2::canvas_light_shadow_buffer_create(int p_width) { // Attach the render buffer as depth buffer - will be ignored glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, cls->rbo); + GL_RENDERBUFFER, cls->rbo); } @@ -8922,7 +8924,7 @@ void RasterizerGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Matr //light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1)); - /// p_near=1; + / //p_near=1; CameraMatrix projection; { real_t fov = 90; @@ -9121,10 +9123,10 @@ void RasterizerGLES2::canvas_debug_viewport_shadows(CanvasLight* p_lights_with_s //print_line(" debug lights "); while(light) { - // print_line("debug light"); + //print_line("debug light"); if (light->shadow_buffer.is_valid()) { - // print_line("sb is valid"); + //print_line("sb is valid"); CanvasLightShadow * sb = canvas_light_shadow_owner.get(light->shadow_buffer); if (sb) { glActiveTexture(GL_TEXTURE0); @@ -9172,7 +9174,7 @@ void RasterizerGLES2::_canvas_item_render_commands(CanvasItem *p_item,CanvasItem case CanvasItem::Command::TYPE_RECT: { CanvasItem::CommandRect* rect = static_cast<CanvasItem::CommandRect*>(c); -// canvas_draw_rect(rect->rect,rect->region,rect->source,rect->flags&CanvasItem::CommandRect::FLAG_TILE,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V,rect->texture,rect->modulate); + //canvas_draw_rect(rect->rect,rect->region,rect->source,rect->flags&CanvasItem::CommandRect::FLAG_TILE,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V,rect->texture,rect->modulate); #if 0 int flags=0; @@ -9344,9 +9346,6 @@ void RasterizerGLES2::_canvas_item_setup_shader_params(CanvasItemMaterial *mater } else { glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height); } -// if (current_clip) { -// // print_line(" a clip "); -// } canvas_texscreen_used=true; } @@ -9925,8 +9924,8 @@ RID RasterizerGLES2::sampled_light_dp_create(int p_width,int p_height) { glGenTextures(1,&slight->texture); glBindTexture(GL_TEXTURE_2D, slight->texture); // for debug, but glitchy -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -10046,7 +10045,7 @@ void RasterizerGLES2::free(const RID& p_rid) { // delete the texture Texture *texture = texture_owner.get(p_rid); -// glDeleteTextures( 1,&texture->tex_id ); + //glDeleteTextures( 1,&texture->tex_id ); _rinfo.texture_mem-=texture->total_data_size; texture_owner.free(p_rid); memdelete(texture); @@ -10232,9 +10231,11 @@ void RasterizerGLES2::free(const RID& p_rid) { glDeleteFramebuffers(1,&cls->fbo); glDeleteRenderbuffers(1,&cls->rbo); 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); memdelete(cls); @@ -10286,18 +10287,18 @@ bool RasterizerGLES2::ShadowBuffer::init(int p_size,bool p_use_depth) { } else { // We'll use a RGBA texture into which we pack the depth info glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + GL_RGBA, GL_UNSIGNED_BYTE, NULL); // Attach the RGBA texture to FBO color attachment point glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, depth, 0); + GL_TEXTURE_2D, depth, 0); // Allocate 16-bit depth buffer glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size,size); // Attach the render buffer as depth buffer - will be ignored glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, rbo); + GL_RENDERBUFFER, rbo); } @@ -10332,8 +10333,8 @@ bool RasterizerGLES2::ShadowBuffer::init(int p_size,bool p_use_depth) { } else { -// glGenRenderbuffers(1, &rbo); -// glBindRenderbuffer(GL_RENDERBUFFER, rbo); + //glGenRenderbuffers(1, &rbo); + //glBindRenderbuffer(GL_RENDERBUFFER, rbo); glGenTextures(1, &depth); glBindTexture(GL_TEXTURE_2D, depth); @@ -10383,20 +10384,21 @@ bool RasterizerGLES2::ShadowBuffer::init(int p_size,bool p_use_depth) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); -// glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, size, size, 0, -// GL_DEPTH_COMPONENT16, GL_UNSIGNED_SHORT, NULL); + //glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, size, size, 0, + //GL_DEPTH_COMPONENT16, GL_UNSIGNED_SHORT, NULL); - // Attach the RGBA texture to FBO color attachment point - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, blur, 0); + // Attach the RGBA texture to FBO color attachment point + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, blur, 0); - // Allocate 16-bit depth buffer - /* glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size); + // Allocate 16-bit depth buffer + /* + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size); - // Attach the render buffer as depth buffer - will be ignored - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, rbo_blur); -*/ + // Attach the render buffer as depth buffer - will be ignored + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, rbo_blur); + */ status = glCheckFramebufferStatus(GL_FRAMEBUFFER); OS::get_singleton()->print("Status: %x\n",status); glBindFramebuffer(GL_FRAMEBUFFER, 0); @@ -10502,7 +10504,7 @@ void RasterizerGLES2::_update_framebuffer() { #endif //color -// GLuint format_rgba = use_fp16_fb?_GL_RGBA16F_EXT:GL_RGBA; + //GLuint format_rgba = use_fp16_fb?_GL_RGBA16F_EXT:GL_RGBA; GLuint format_rgba = GL_RGBA; GLuint format_type = use_fp16_fb?_GL_HALF_FLOAT_OES:GL_UNSIGNED_BYTE; GLuint format_internal=GL_RGBA; @@ -10528,8 +10530,8 @@ void RasterizerGLES2::_update_framebuffer() { glTexImage2D(GL_TEXTURE_2D, 0, format_rgba, framebuffer.width, framebuffer.height, 0, format_internal, format_type, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.color, 0); @@ -10562,8 +10564,8 @@ void RasterizerGLES2::_update_framebuffer() { glTexImage2D(GL_TEXTURE_2D, 0, format_rgba, framebuffer.width, framebuffer.height, 0, format_internal, format_type, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.sample_color, 0); @@ -10730,9 +10732,9 @@ void RasterizerGLES2::_update_blur_buffer() { glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + GL_RGBA, GL_UNSIGNED_BYTE, NULL); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, framebuffer.blur[i].color, 0); + GL_TEXTURE_2D, framebuffer.blur[i].color, 0); GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); @@ -10915,9 +10917,9 @@ void RasterizerGLES2::init() { framebuffer.fbo=0; framebuffer.width=0; framebuffer.height=0; -// framebuffer.buff16=false; -// framebuffer.blur[0].fbo=false; -// framebuffer.blur[1].fbo=false; + //framebuffer.buff16=false; + //framebuffer.blur[0].fbo=false; + //framebuffer.blur[1].fbo=false; framebuffer.active=false; @@ -10945,8 +10947,8 @@ void RasterizerGLES2::init() { use_depth24 =true; s3tc_supported = true; atitc_supported = false; -// use_texture_instancing=false; -// use_attribute_instancing=true; + //use_texture_instancing=false; + //use_attribute_instancing=true; use_texture_instancing=false; use_attribute_instancing=true; full_float_fb_supported=true; @@ -11017,8 +11019,10 @@ void RasterizerGLES2::init() { use_hw_skeleton_xform=vtf>0 && float_supported; 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; glGetIntegerv(GL_MAX_VERTEX_ATTRIBS,&mva); if (vtf==0 && mva>8) { @@ -11195,7 +11199,7 @@ void RasterizerGLES2::set_extensions(const char *p_strings) { for(int i=0;i<strings.size();i++) { extensions.insert(strings[i]); -// print_line(strings[i]); + //print_line(strings[i]); } } diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index adb9fe0e83..247a35141e 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -435,7 +435,7 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a //create the call to sample the screen, and clamp it uses_texpos=true; code="get_texpos("+dump_node_code(onode->arguments[1],p_level)+""; -// code="get_texpos(gl_ProjectionMatrixInverse * texture2D( depth_texture, clamp(("+dump_node_code(onode->arguments[1],p_level)+").xy,vec2(0.0),vec2(1.0))*gl_LightSource[5].specular.zw+gl_LightSource[5].specular.xy)"; + //code="get_texpos(gl_ProjectionMatrixInverse * texture2D( depth_texture, clamp(("+dump_node_code(onode->arguments[1],p_level)+").xy,vec2(0.0),vec2(1.0))*gl_LightSource[5].specular.zw+gl_LightSource[5].specular.xy)"; //code="(texture2D( screen_texture, ("+dump_node_code(onode->arguments[1],p_level)+").xy).rgb"; break; } else if (custom_h && callfunc=="cosh_custom") { @@ -571,12 +571,13 @@ Error ShaderCompilerGLES2::compile_node(SL::ProgramNode *p_program) { global_code+=uline; if (uniforms) { - //if (uniforms->has(E->key())) { - // //repeated uniform, error - // ERR_EXPLAIN("Uniform already exists from other shader: "+String(E->key())); - // ERR_FAIL_COND_V(uniforms->has(E->key()),ERR_ALREADY_EXISTS); -// -// } + /* + if (uniforms->has(E->key())) { + //repeated uniform, error + 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(); u.order+=ubase; uniforms->insert(E->key(),u); @@ -812,8 +813,8 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VAR1"]="var1_interp"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VAR2"]="var2_interp"; -// mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_POS"]="SCREEN_POS"; -// mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_SIZE"]="SCREEN_SIZE"; + //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_POS"]="SCREEN_POS"; + //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_SIZE"]="SCREEN_SIZE"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["INSTANCE_ID"]="instance_id"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["TIME"]="time"; diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp index 2ee89e9895..97c31dfc1c 100644 --- a/drivers/gles2/shader_gles2.cpp +++ b/drivers/gles2/shader_gles2.cpp @@ -561,7 +561,7 @@ ShaderGLES2::Version* ShaderGLES2::get_current_version() { v.uniform_location[j]=glGetUniformLocation(v.id,uniform_names[j]); - // print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); + //print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); } // set texture uniforms diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index eeab42ee64..4bcebbd69d 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -392,7 +392,7 @@ LIGHT_SHADER_CODE //use lighting #endif -// color.rgb*=color.a; + //color.rgb*=color.a; gl_FragColor = color; diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index e5be25757d..704a22c5d1 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -820,7 +820,7 @@ void main() { vec3 binormal = normalize(binormal_interp)*side; vec3 tangent = normalize(tangent_interp)*side; #endif -// vec3 normal = abs(normalize(normal_interp))*side; + //vec3 normal = abs(normalize(normal_interp))*side; vec3 normal = normalize(normal_interp)*side; #if defined(ENABLE_SCREEN_UV) vec2 screen_uv = gl_FragCoord.xy*screen_uv_mult; @@ -989,7 +989,7 @@ FRAGMENT_SHADER_CODE #ifdef LIGHT_USE_PSSM -// if (vertex_interp.z > light_pssm_split) { + //if (vertex_interp.z > light_pssm_split) { #if 0 highp vec3 splane = vec3(0.0,0.0,0.0); @@ -1261,12 +1261,12 @@ LIGHT_SHADER_CODE vec3 ambient = const_light_mult*ambient_light*diffuse.rgb; # if defined(LIGHT_TYPE_OMNI) || defined (LIGHT_TYPE_SPOT) -// ambient*=diffuse_interp.a; //attenuation affects ambient too + //ambient*=diffuse_interp.a; //attenuation affects ambient too # endif -// diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient; -// diffuse.rgb+=emission * const_light_mult; + //diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient; + //diffuse.rgb+=emission * const_light_mult; diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient; diffuse.rgb+=emission * const_light_mult; diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 3c3768be67..e658fbbe88 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -147,7 +147,7 @@ void RasterizerCanvasGLES3::canvas_begin(){ -// state.canvas_shader.set_uniform(CanvasShaderGLES3::PROJECTION_MATRIX,state.vp); + //state.canvas_shader.set_uniform(CanvasShaderGLES3::PROJECTION_MATRIX,state.vp); //state.canvas_shader.set_uniform(CanvasShaderGLES3::MODELVIEW_MATRIX,Transform()); //state.canvas_shader.set_uniform(CanvasShaderGLES3::EXTRA_MATRIX,Transform()); @@ -743,9 +743,6 @@ void RasterizerGLES2::_canvas_item_setup_shader_params(CanvasItemMaterial *mater } else { glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height); } -// if (current_clip) { -// // print_line(" a clip "); -// } canvas_texscreen_used=true; } @@ -1193,10 +1190,10 @@ void RasterizerCanvasGLES3::canvas_debug_viewport_shadows(Light* p_lights_with_s while(light) { - // print_line("debug light"); + //print_line("debug light"); if (light->shadow_buffer.is_valid()) { - // print_line("sb is valid"); + //print_line("sb is valid"); RasterizerStorageGLES3::CanvasLightShadow * sb = storage->canvas_light_shadow_owner.get(light->shadow_buffer); if (sb) { glBindTexture(GL_TEXTURE_2D,sb->distance); @@ -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)); - /// p_near=1; + //p_near=1; CameraMatrix projection; { real_t fov = 90; diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index efad6c7e55..b7616db8b1 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -300,9 +300,9 @@ void RasterizerGLES3::end_frame(){ glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, vtx ); -// glBindBuffer(GL_ARRAY_BUFFER,canvas->data.canvas_quad_vertices); -// glEnableVertexAttribArray(VS::ARRAY_VERTEX); -// glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, 0 ); + //glBindBuffer(GL_ARRAY_BUFFER,canvas->data.canvas_quad_vertices); + //glEnableVertexAttribArray(VS::ARRAY_VERTEX); + //glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, 0 ); glBindVertexArray(canvas->data.canvas_quad_array); diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 5e0f439e3e..a026199bc7 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1102,10 +1102,10 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material* p_m glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); else glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); - */ - //if (p_material->line_width) - // glLineWidth(p_material->line_width); + if (p_material->line_width) + glLineWidth(p_material->line_width); + */ #if 0 //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) { @@ -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 (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); } @@ -3963,7 +3966,7 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C //_render_list_forward(&alpha_render_list,camera_transform,camera_transform_inverse,camera_projection,false,fragment_lighting,true); //glColorMask(1,1,1,1); -// state.scene_shader.set_conditional( SceneShaderGLES3::USE_FOG,false); + //state.scene_shader.set_conditional( SceneShaderGLES3::USE_FOG,false); if (use_mrt) { @@ -4016,7 +4019,7 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C storage->canvas->canvas_begin(); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D,exposure_shrink[4].color); -// glBindTexture(GL_TEXTURE_2D,storage->frame.current_rt->exposure.color); + //glBindTexture(GL_TEXTURE_2D,storage->frame.current_rt->exposure.color); storage->canvas->draw_generic_textured_rect(Rect2(0,0,storage->frame.current_rt->width/16,storage->frame.current_rt->height/16),Rect2(0,0,1,1)); } @@ -4189,8 +4192,8 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C if (GLOBAL_DEF("rasterizer/debug_shadow_maps",false)) { _debug_shadows(); } -// _debug_luminances(); -// _debug_samplers(); + //_debug_luminances(); + //_debug_samplers(); if (using_canvas_bg) { using_canvas_bg=false; diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 26b9aeada4..97872226a4 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -676,7 +676,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() { actions[VS::SHADER_SPATIAL].renames["AO"]="ao"; actions[VS::SHADER_SPATIAL].renames["EMISSION"]="emission"; actions[VS::SHADER_SPATIAL].renames["DISCARD"]="_discard"; -// actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"]=ShaderLanguage::TYPE_VEC2; + //actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"]=ShaderLanguage::TYPE_VEC2; actions[VS::SHADER_SPATIAL].renames["POINT_COORD"]="gl_PointCoord"; diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 13b2160ec6..42a9f19671 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -573,7 +573,7 @@ ShaderGLES3::Version* ShaderGLES3::get_current_version() { v.uniform_location[j]=glGetUniformLocation(v.id,uniform_names[j]); - // print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); + //print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); } // set texture uniforms @@ -720,7 +720,7 @@ void ShaderGLES3::setup(const char** p_conditional_defines, int p_conditional_co } else { fragment_code3=code3.substr(0,cpos).ascii(); - // print_line("CODE3:\n"+String(fragment_code3.get_data())); + //print_line("CODE3:\n"+String(fragment_code3.get_data())); fragment_code4 = code3.substr(cpos+light_code_tag.length(),code3.length()).ascii(); //print_line("CODE4:\n"+String(fragment_code4.get_data())); } diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl index cf2e0f776f..e6c72da8f1 100644 --- a/drivers/gles3/shaders/canvas.glsl +++ b/drivers/gles3/shaders/canvas.glsl @@ -449,7 +449,7 @@ LIGHT_SHADER_CODE //use lighting #endif -// color.rgb*=color.a; + //color.rgb*=color.a; frag_color = color; } diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index c5af010c96..66123193e6 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -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; - //if (clamp_rect.z<clamp_rect.w) { - // clamp_rect.x+=clamp_rect.z; - //} else { - // clamp_rect.y+=clamp_rect.w; - //} + /* + if (clamp_rect.z<clamp_rect.w) { + clamp_rect.x+=clamp_rect.z; + } else { + clamp_rect.y+=clamp_rect.w; + } + */ } diff --git a/drivers/gles3/shaders/ssao_blur.glsl b/drivers/gles3/shaders/ssao_blur.glsl index 31f3841a2a..ff852487c0 100644 --- a/drivers/gles3/shaders/ssao_blur.glsl +++ b/drivers/gles3/shaders/ssao_blur.glsl @@ -69,9 +69,11 @@ void main() { 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; diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index de095c20ac..51429f3416 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -134,7 +134,7 @@ Error ImageLoaderPNG::_load_image(void *rf_up,png_rw_ptr p_func,Image *p_image) } if (png_get_valid(png,info,PNG_INFO_tRNS)) { -// png_set_expand_gray_1_2_4_to_8(png); + //png_set_expand_gray_1_2_4_to_8(png); png_set_tRNS_to_alpha(png); update_info=true; } diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp index a798990449..850e5ab053 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.cpp +++ b/drivers/rtaudio/audio_driver_rtaudio.cpp @@ -104,11 +104,11 @@ Error AudioDriverRtAudio::init() { unsigned int target_number_of_buffers = 4; options.numberOfBuffers = target_number_of_buffers; -// options. -// RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE). */// -// unsigned int numberOfBuffers; /*!< Number of stream buffers. */ -// std::string streamName; /*!< A stream name (currently used only in Jack). */ -// int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */ + //options. + //RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE). */// + //unsigned int numberOfBuffers; /*!< Number of stream buffers. */ + //std::string streamName; /*!< A stream name (currently used only in Jack). */ + //int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */ parameters.firstChannel = 0; mix_rate = GLOBAL_DEF("audio/mix_rate",44100); diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 890b6b17bc..a09cf80e6c 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -49,7 +49,7 @@ Error DirAccessUnix::list_dir_begin() { list_dir_end(); //close any previous dir opening! -// char real_current_dir_name[2048]; //is this enough?! + //char real_current_dir_name[2048]; //is this enough?! //getcwd(real_current_dir_name,2048); //chdir(curent_path.utf8().get_data()); dir_stream = opendir(current_dir.utf8().get_data()); diff --git a/main/input_default.cpp b/main/input_default.cpp index a4023b23d2..50b0006438 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -307,7 +307,7 @@ void InputDefault::parse_input_event(const InputEvent& p_event) { if (p_event.key.scancode==0) break; - // print_line(p_event); + //print_line(p_event); if (p_event.key.pressed) keys_pressed.insert(p_event.key.scancode); diff --git a/main/main.cpp b/main/main.cpp index fa5fee782c..e535da3e28 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -239,7 +239,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas while (I) { I->get()=unescape_cmdline(I->get().strip_escapes()); -// print_line("CMD: "+I->get()); + //print_line("CMD: "+I->get()); I=I->next(); } @@ -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 2: PackedData::~PackedData destroy this. -//#ifdef MINIZIP_ENABLED -// if (zip_packed_data) -// memdelete( zip_packed_data ); -//#endif +/* +#ifdef MINIZIP_ENABLED + if (zip_packed_data) + memdelete( zip_packed_data ); +#endif +*/ unregister_core_driver_types(); unregister_core_types(); @@ -955,7 +957,7 @@ Error Main::setup2() { VisualServer::get_singleton()->set_boot_image(boot_logo, boot_bg,boot_logo_scale); #ifndef TOOLS_ENABLED //no tools, so free the boot logo (no longer needed) - // GlobalConfig::get_singleton()->set("application/boot_logo",Image()); + //GlobalConfig::get_singleton()->set("application/boot_logo",Image()); #endif } else { @@ -1009,7 +1011,7 @@ Error Main::setup2() { //print_line("use custom cursor"); Ref<Texture> cursor=ResourceLoader::load(GlobalConfig::get_singleton()->get("display/mouse_cursor/custom_image")); if (cursor.is_valid()) { - // print_line("loaded ok"); + //print_line("loaded ok"); Vector2 hotspot = GlobalConfig::get_singleton()->get("display/mouse_cursor/custom_image_hotspot"); Input::get_singleton()->set_custom_mouse_cursor(cursor,hotspot); } @@ -1587,9 +1589,10 @@ bool Main::iteration() { double step=(double)ticks_elapsed / 1000000.0; 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 idle_process_ticks=0; @@ -1635,8 +1638,10 @@ bool Main::iteration() { time_accum-=frame_slice; 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_max=MAX(OS::get_singleton()->get_ticks_usec()-fixed_begin,fixed_process_max); @@ -1692,7 +1697,7 @@ bool Main::iteration() { } - // x11_delay_usec(10000); + //x11_delay_usec(10000); frames++; Engine::get_singleton()->_idle_frames++; diff --git a/main/tests/test_containers.cpp b/main/tests/test_containers.cpp index 4bc297d0ba..2711d107e4 100644 --- a/main/tests/test_containers.cpp +++ b/main/tests/test_containers.cpp @@ -55,7 +55,6 @@ MainLoop * test() { { -// static const int size = 16; Image img; img.create(default_mouse_cursor_xpm); @@ -78,7 +77,7 @@ MainLoop * test() { for (int i=0;i<1100;i++) { int num=i;//(int)Math::random(0,1024); - // print_line("inserting "+itos(num)); + //print_line("inserting "+itos(num)); set.insert( num ); } diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp index da0ff5d1ca..b0ebc20180 100644 --- a/main/tests/test_gui.cpp +++ b/main/tests/test_gui.cpp @@ -97,7 +97,7 @@ public: Sprite *sp = memnew( Sprite ); sp->set_texture( vp->get_render_target_texture() ); -// sp->set_texture( ResourceLoader::load("res://ball.png") ); + //sp->set_texture( ResourceLoader::load("res://ball.png") ); sp->set_pos(Point2(300,300)); get_root()->add_child(sp); diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp index f3d9ddba87..89513b81d9 100644 --- a/main/tests/test_math.cpp +++ b/main/tests/test_math.cpp @@ -596,7 +596,7 @@ MainLoop* test() { { - // print_line("NUM: "+itos(237641278346127)); + //print_line("NUM: "+itos(237641278346127)); print_line("NUM: "+itos(-128)); return NULL; diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp index ea5b1cae85..ea98da34ca 100644 --- a/main/tests/test_physics.cpp +++ b/main/tests/test_physics.cpp @@ -358,9 +358,9 @@ public: gxf.basis.scale(Vector3(1.4,0.4,1.4)); gxf.origin=Vector3(-2,1,-2); make_grid(5,5,2.5,1,gxf); - // create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,gxf); + //create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,gxf); //create_static_plane( Plane( Vector3(0,1,0), -2) ); -// test_joint(); + //test_joint(); test_fall(); //test_joint(); diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp index 2074d532b1..8a6a8c78f9 100644 --- a/main/tests/test_physics_2d.cpp +++ b/main/tests/test_physics_2d.cpp @@ -218,8 +218,10 @@ class TestPhysics2DMainLoop : public MainLoop { 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); + */ } @@ -273,7 +275,7 @@ protected: ps->body_set_continuous_collision_detection_mode(body,Physics2DServer::CCD_MODE_CAST_SHAPE); ps->body_set_state(body,Physics2DServer::BODY_STATE_TRANSFORM,p_xform); -// print_line("add body with xform: "+p_xform); + //print_line("add body with xform: "+p_xform); RID sprite = vs->canvas_item_create(); vs->canvas_item_set_parent(sprite,canvas); vs->canvas_item_set_transform(sprite,p_xform); @@ -281,8 +283,8 @@ protected: vs->canvas_item_add_texture_rect(sprite,Rect2(-imgsize/2.0,imgsize),body_shape_data[p_shape].image); ps->body_set_force_integration_callback(body,this,"_body_moved",sprite); -// RID q = ps->query_create(this,"_body_moved",sprite); -// ps->query_body_state(q,body); + //RID q = ps->query_create(this,"_body_moved",sprite); + //ps->query_body_state(q,body); return body; } @@ -409,10 +411,12 @@ public: }; 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))); - //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))); diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp index 3049ba7d45..7380c1ff6a 100644 --- a/main/tests/test_render.cpp +++ b/main/tests/test_render.cpp @@ -192,7 +192,6 @@ public: */ RID lightaux; - //* 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, Color(1.0,1.0,1.0) ); @@ -203,17 +202,14 @@ public: lla.set_look_at(Vector3(),Vector3(-0.000000,-0.836026,-0.548690),Vector3(0,1,0)); vs->instance_set_transform( light, lla ); - // */ - //* 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_param( lightaux, VisualServer::LIGHT_PARAM_RANGE, 4 ); vs->light_set_param( lightaux, VisualServer::LIGHT_PARAM_ENERGY, 8 ); //vs->light_set_shadow( lightaux, true ); //light = vs->instance_create( lightaux ); - // */ ofs=0; quit=false; diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp index d99ad4476f..a4a8ceb072 100644 --- a/main/tests/test_string.cpp +++ b/main/tests/test_string.cpp @@ -252,7 +252,7 @@ bool test_13() { /* how can i embed UTF in here? */ static const CharType ustr[] = { 0x304A , 0x360F, 0x3088, 0x3046, 0 }; -// static const wchar_t ustr[] = { 'P', 0xCE, 'p',0xD3, 0 }; + //static const wchar_t ustr[] = { 'P', 0xCE, 'p',0xD3, 0 }; String s=ustr; OS::get_singleton()->print("\tUnicode: %ls\n",ustr); diff --git a/modules/chibi/cp_loader_it_samples.cpp b/modules/chibi/cp_loader_it_samples.cpp index 60db9b7f74..c736c99c0f 100644 --- a/modules/chibi/cp_loader_it_samples.cpp +++ b/modules/chibi/cp_loader_it_samples.cpp @@ -147,7 +147,7 @@ CPLoader::Error CPLoader_IT::load_sample(CPSample *p_sample) { p_sample->set_sample_data(samp_id); if (!samp_id.is_null()) { - // printf("Loaded ID: stereo: %i len %i 16bit %i\n",CPSampleManager::get_singleton()->is_stereo(samp_id), CPSampleManager::get_singleton()->get_size( samp_id), CPSampleManager::get_singleton()->is_16bits( samp_id) ); + //printf("Loaded ID: stereo: %i len %i 16bit %i\n",CPSampleManager::get_singleton()->is_stereo(samp_id), CPSampleManager::get_singleton()->get_size( samp_id), CPSampleManager::get_singleton()->is_16bits( samp_id) ); } CP_ERR_COND_V( file->eof_reached(),FILE_CORRUPTED ); diff --git a/modules/chibi/cp_loader_mod.cpp b/modules/chibi/cp_loader_mod.cpp index 4a47ce5c43..cfa3e34736 100644 --- a/modules/chibi/cp_loader_mod.cpp +++ b/modules/chibi/cp_loader_mod.cpp @@ -208,7 +208,7 @@ CPLoader::Error CPLoader_MOD::load_song(const char *p_file,CPSong *p_song,bool p uint8_t order_count=file->get_byte(); -// uint8_t loop_to=file->get_byte(); + //uint8_t loop_to=file->get_byte(); int pattern_count=0; diff --git a/modules/chibi/cp_loader_s3m.cpp b/modules/chibi/cp_loader_s3m.cpp index eb5fad12e1..4943e6d86c 100644 --- a/modules/chibi/cp_loader_s3m.cpp +++ b/modules/chibi/cp_loader_s3m.cpp @@ -102,7 +102,7 @@ void CPLoader_S3M::set_header() { song->set_name( header.songname ); -// song->variables.filename= + //song->variables.filename= song->set_row_highlight_minor( 4 ); song->set_row_highlight_major( 16 ); @@ -135,7 +135,7 @@ CPLoader::Error CPLoader_S3M::load_sample(CPSample *p_sample) { uint32_t samplepos=(uint32_t)file->get_byte() << 16; samplepos|=file->get_word(); samplepos*=16; -// printf("sample at %i\n",samplepos); + //printf("sample at %i\n",samplepos); /**/ int sample_size=file->get_dword(); @@ -178,7 +178,7 @@ CPLoader::Error CPLoader_S3M::load_sample(CPSample *p_sample) { if ((type!=1) || scrs[0]!='S' || scrs[1]!='C' || scrs[2]!='R' || scrs[3]!='S' ) { -// printf("type: %i, %c%c%c%c\n",type,scrs[0],scrs[1],scrs[2],scrs[3]); + //printf("type: %i, %c%c%c%c\n",type,scrs[0],scrs[1],scrs[2],scrs[3]); CP_PRINTERR("Not an S3M CPSample!"); return FILE_CORRUPTED; } diff --git a/modules/chibi/cp_loader_xm.cpp b/modules/chibi/cp_loader_xm.cpp index 65c7bc7ee1..cbd883642c 100644 --- a/modules/chibi/cp_loader_xm.cpp +++ b/modules/chibi/cp_loader_xm.cpp @@ -399,7 +399,7 @@ CPLoader::Error CPLoader_XM::load_song(const char *p_file,CPSong *p_song,bool p_ instrument.set_name( instrname ); -// printf("Header Len: %i, CPInstrument %i, %i samples , name: s,\n",hsize,i,sampnum,instrname); + //printf("Header Len: %i, CPInstrument %i, %i samples , name: s,\n",hsize,i,sampnum,instrname); if (sampnum==0) { //aux=file->get_dword(); //Why is this for? -- for nothing, skipped diff --git a/modules/chibi/cp_player_data.h b/modules/chibi/cp_player_data.h index c59df5f0d9..2157319855 100644 --- a/modules/chibi/cp_player_data.h +++ b/modules/chibi/cp_player_data.h @@ -124,7 +124,7 @@ class CPPlayer { CPInstrument* instrument_ptr; CPSample* sample_ptr; -// Sample_Data *sample_data; + //Sample_Data *sample_data; int32_t period; diff --git a/modules/chibi/cp_player_data_effects.cpp b/modules/chibi/cp_player_data_effects.cpp index 6c774afb16..56fb7a2905 100644 --- a/modules/chibi/cp_player_data_effects.cpp +++ b/modules/chibi/cp_player_data_effects.cpp @@ -615,7 +615,7 @@ void CPPlayer::do_effect_S(int p_track) { break; case 8: {/* S8x set panning position */ -// if (pf->panflag) { + //if (pf->panflag) { if (inf<=8) inf<<=4; else inf*=17; control.channel[p_track].panning=control.channel[p_track].channel_panning=inf; diff --git a/modules/chibi/cp_player_data_events.cpp b/modules/chibi/cp_player_data_events.cpp index 7ec3f1931c..94a048ab2f 100644 --- a/modules/chibi/cp_player_data_events.cpp +++ b/modules/chibi/cp_player_data_events.cpp @@ -194,7 +194,7 @@ void CPPlayer::Voice_Control::update_info_from_master_channel() { reverb_send=master_channel->reverb_send; chorus_send=master_channel->chorus_send; -// last_note_type=master_channel->last_note_type; + //last_note_type=master_channel->last_note_type; sample_start_index=master_channel->sample_start_index; filter=master_channel->filter; @@ -262,7 +262,7 @@ void CPPlayer::update_mixer() { /* Start Envelopes */ if ( song->has_instruments() && ((v.kick==KICK_NOTE)||(v.kick==KICK_ENVELOPE))) { -// Voice_Control *carry=0; + //Voice_Control *carry=0; if (v.has_master_channel && v.master_channel->carry.maybe) { @@ -462,7 +462,7 @@ void CPPlayer::update_mixer() { } else { filter_env=pe_value+32; //max 64 -// printf("pitch envelope at %i",filter_env); + //printf("pitch envelope at %i",filter_env); } } @@ -602,17 +602,19 @@ void CPPlayer::handle_tick() { /* process pattern-delay. pf->patdly2 is the counter and pf->patdly is the command memory. */ -// if (control.pattern_delay_1) { - -// control.pattern_delay_2=control.pattern_delay_1; -// control.pattern_delay_1=0; -// } -// if (control.pattern_delay_2) { -// patterndelay active -// if (--control.pattern_delay_2) -// so turn back pf->patpos by 1 -// if (pf->patpos) pf->patpos--; -// } + /* + if (control.pattern_delay_1) { + + control.pattern_delay_2=control.pattern_delay_1; + control.pattern_delay_1=0; + } + if (control.pattern_delay_2) { + patterndelay active + if (--control.pattern_delay_2) + // so turn back pf->patpos by 1 + if (pf->patpos) pf->patpos--; + } + */ if (control.play_mode!=PLAY_NOTHING) { diff --git a/modules/chibi/cp_player_data_notes.cpp b/modules/chibi/cp_player_data_notes.cpp index 1bfe24bc20..189403343c 100644 --- a/modules/chibi/cp_player_data_notes.cpp +++ b/modules/chibi/cp_player_data_notes.cpp @@ -67,7 +67,7 @@ void CPPlayer::process_new_note(int p_track,uint8_t p_note) { // if there's real bool CPPlayer::process_new_instrument(int p_track,uint8_t p_instrument) { -// bool different_instrument=false; + //bool different_instrument=false; ERR_FAIL_INDEX_V(p_instrument,CPSong::MAX_INSTRUMENTS,false); if ( song->has_instruments() ) { diff --git a/modules/chibi/cp_player_data_utils.cpp b/modules/chibi/cp_player_data_utils.cpp index 1ee3f30b33..b99dbfcb99 100644 --- a/modules/chibi/cp_player_data_utils.cpp +++ b/modules/chibi/cp_player_data_utils.cpp @@ -111,8 +111,10 @@ int CPPlayer::find_empty_voice() { for (i=0;i<control.max_voices;i++) { /* 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)) { diff --git a/modules/chibi/event_stream_chibi.cpp b/modules/chibi/event_stream_chibi.cpp index 8bccdb3102..ab34080525 100644 --- a/modules/chibi/event_stream_chibi.cpp +++ b/modules/chibi/event_stream_chibi.cpp @@ -408,8 +408,8 @@ void CPMixerImpl::set_voice_chorus_send(int p_voice_index,int p_chorus){ void CPMixerImpl::set_reverb_mode(ReverbMode p_mode){ -// Voice &v=voices[p_voice_index]; -// ERR_FAIL_COND(v.channel==AudioMixer::INVALID_CHANNEL); + //Voice &v=voices[p_voice_index]; + //ERR_FAIL_COND(v.channel==AudioMixer::INVALID_CHANNEL); switch(p_mode) { case CPMixer::REVERB_MODE_STUDIO_SMALL: reverb_type=AudioMixer::REVERB_SMALL; break; case CPMixer::REVERB_MODE_STUDIO_MEDIUM: reverb_type=AudioMixer::REVERB_MEDIUM; break; @@ -422,8 +422,8 @@ void CPMixerImpl::set_reverb_mode(ReverbMode p_mode){ void CPMixerImpl::set_chorus_params(unsigned int p_delay_ms,unsigned int p_separation_ms,unsigned int p_depth_ms10,unsigned int p_speed_hz10){ -// Voice &v=voices[p_voice_index]; -// ERR_FAIL_COND(v.channel==AudioMixer::INVALID_CHANNEL); + //Voice &v=voices[p_voice_index]; + //ERR_FAIL_COND(v.channel==AudioMixer::INVALID_CHANNEL); } diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 82deae9630..5295183c35 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -221,7 +221,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String& p_original_path, if (!(flags&DDSD_MIPMAPCOUNT)) mipmaps=1; -// print_line("found format: "+String(dds_format_info[dds_format].name)); + //print_line("found format: "+String(dds_format_info[dds_format].name)); PoolVector<uint8_t> src_data; diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 43d9988de1..d10634e9ea 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -506,8 +506,10 @@ uint32_t NetworkedMultiplayerENet::_gen_unique_id() const { (uint32_t)OS::get_singleton()->get_unix_time(), hash ); hash = hash_djb2_one_32( (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( (uint32_t)((uint64_t)this), hash ); //rely on aslr heap hash = hash_djb2_one_32( diff --git a/modules/etc1/image_etc.cpp b/modules/etc1/image_etc.cpp index 845084fef7..36ff1b86df 100644 --- a/modules/etc1/image_etc.cpp +++ b/modules/etc1/image_etc.cpp @@ -138,13 +138,13 @@ static void _compress_etc(Image *p_img) { uint8_t *dst = &w[dst_data.size()-mmsize]; -// print_line("bh: "+itos(bh)+" bw: "+itos(bw)); + //print_line("bh: "+itos(bh)+" bw: "+itos(bw)); for(int y=0;y<bh;y++) { for(int x=0;x<bw;x++) { -// print_line("x: "+itos(x)+" y: "+itos(y)); + //print_line("x: "+itos(x)+" y: "+itos(y)); uint8_t block[4*4*4]; zeromem(block,4*4*4); diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 17a9c549b4..8e9e94cc48 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1420,9 +1420,10 @@ Error GDCompiler::_parse_function(GDScript *p_script,const GDParser::ClassNode * 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 p_script->member_functions[func_name]=memnew(GDFunction); gdfunc = p_script->member_functions[func_name]; diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index ab917fc869..19472d3d46 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -364,10 +364,12 @@ static GDCompletionIdentifier _get_type_from_variant(const Variant& p_variant) { if (p_variant.get_type()==Variant::OBJECT) { Object *obj = p_variant; if (obj) { - //if (obj->cast_to<GDNativeClass>()) { - // t.obj_type=obj->cast_to<GDNativeClass>()->get_name(); - // t.value=Variant(); - //} else { + /* + if (obj->cast_to<GDNativeClass>()) { + t.obj_type=obj->cast_to<GDNativeClass>()->get_name(); + t.value=Variant(); + } else { + */ t.obj_type=obj->get_class(); //} } @@ -1771,7 +1773,7 @@ static void _find_type_arguments(GDCompletionContext& context,const GDParser::No String s = E->get().name; if (!s.begins_with("autoload/")) continue; - // print_line("found "+s); + //print_line("found "+s); String name = s.get_slice("/",1); result.insert("\"/root/"+name+"\""); } @@ -1998,10 +2000,10 @@ static void _find_call_arguments(GDCompletionContext& context,const GDParser::No List<MethodInfo> methods; ClassDB::get_method_list(type,&methods); for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) { - //if (E->get().arguments.size()) - // result.insert(E->get().name+"("); - //else - // result.insert(E->get().name+"()"); + if (E->get().arguments.size()) + result.insert(E->get().name+"("); + else + result.insert(E->get().name+"()"); }*/ } break; diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 6aed7c9491..bd0704fff9 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -225,8 +225,8 @@ bool GDParser::_get_completable_identifier(CompletionType p_type,StringName& ide GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_allow_assign,bool p_parsing_constant) { -// Vector<Node*> expressions; -// Vector<OperatorNode::Operator> operators; + //Vector<Node*> expressions; + //Vector<OperatorNode::Operator> operators; Vector<Expression> expression; diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 6ff29072c7..b216ef42b9 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -358,9 +358,11 @@ bool GDScript::get_property_default_value(const StringName& p_property, Variant #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); if (E) { r_value=E->get(); @@ -1862,7 +1864,7 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script>& p_script,bool p_sof void GDScriptLanguage::frame() { - // print_line("calls: "+itos(calls)); + //print_line("calls: "+itos(calls)); calls=0; #ifdef DEBUG_ENABLED diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h index 960b06f3ff..4d3baa5bc0 100644 --- a/modules/gdscript/gd_script.h +++ b/modules/gdscript/gd_script.h @@ -139,7 +139,7 @@ protected: void _get_property_list(List<PropertyInfo> *p_properties) const; Variant call(const StringName& p_method,const Variant** p_args,int p_argcount,Variant::CallError &r_error); -// void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount); + //void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount); static void _bind_methods(); public: diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index 30ac988295..5dabf50ba1 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -513,9 +513,11 @@ void GDTokenizerText::_advance() { if (GETCHAR(1)=='=') { _make_token(TK_OP_ASSIGN_ADD); INCPOS(1); - //} else if (GETCHAR(1)=='+') { - // _make_token(TK_OP_PLUS_PLUS); - // INCPOS(1); + /* + } else if (GETCHAR(1)=='+') { + _make_token(TK_OP_PLUS_PLUS); + INCPOS(1); + */ } else { _make_token(TK_OP_ADD); } @@ -526,9 +528,11 @@ void GDTokenizerText::_advance() { if (GETCHAR(1)=='=') { _make_token(TK_OP_ASSIGN_SUB); INCPOS(1); - //} else if (GETCHAR(1)=='-') { - // _make_token(TK_OP_MINUS_MINUS); - // INCPOS(1); + /* + } else if (GETCHAR(1)=='-') { + _make_token(TK_OP_MINUS_MINUS); + INCPOS(1); + */ } else { _make_token(TK_OP_SUB); } diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 8bd346d7bb..271db4babc 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -731,7 +731,7 @@ void GridMap::_octant_update(const OctantKey &p_key) { ii.shape->add_vertices_to_array(col_debug,xform); } - // print_line("PHIS x: "+xform); + //print_line("PHIS x: "+xform); } // add the item's navmesh at given xform to GridMap's Navigation ancestor @@ -796,7 +796,7 @@ void GridMap::_octant_exit_world(const OctantKey &p_key) { for(Map<int,Octant::ItemInstances>::Element *E=g.items.front();E;E=E->next()) { VS::get_singleton()->instance_set_scenario(E->get().multimesh_instance,RID()); - // VS::get_singleton()->instance_set_transform(E->get().multimesh_instance,get_global_transform()); + //VS::get_singleton()->instance_set_transform(E->get().multimesh_instance,get_global_transform()); VS::get_singleton()->instance_set_room(E->get().multimesh_instance,RID()); } @@ -1001,8 +1001,8 @@ void GridMap::_notification(int p_what) { _update_area_instances(); for(Map<OctantKey,Octant*>::Element *E=octant_map.front();E;E=E->next()) { -// IndexKey ik; -// ik.key = E->key().indexkey; + //IndexKey ik; + //ik.key = E->key().indexkey; _octant_enter_world(E->key()); _octant_update(E->key()); } @@ -1201,7 +1201,7 @@ void GridMap::_bind_methods() { ClassDB::bind_method(_MD("get_cell_item","x","y","z"),&GridMap::get_cell_item); ClassDB::bind_method(_MD("get_cell_item_orientation","x","y","z"),&GridMap::get_cell_item_orientation); -// ClassDB::bind_method(_MD("_recreate_octants"),&GridMap::_recreate_octants); + //ClassDB::bind_method(_MD("_recreate_octants"),&GridMap::_recreate_octants); ClassDB::bind_method(_MD("_update_dirty_map_callback"),&GridMap::_update_dirty_map_callback); ClassDB::bind_method(_MD("resource_changed","resource"),&GridMap::resource_changed); @@ -1706,10 +1706,12 @@ void GridMap::bake_geometry() { void GridMap::_baked_light_changed() { -// if (!baked_light_instance) -// VS::get_singleton()->instance_geometry_set_baked_light(get_instance(),RID()); -// else -// VS::get_singleton()->instance_geometry_set_baked_light(get_instance(),baked_light_instance->get_baked_light_instance()); + /* + if (!baked_light_instance) + VS::get_singleton()->instance_geometry_set_baked_light(get_instance(),RID()); + 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<int,Octant::ItemInstances>::Element *F=E->get()->items.front();F;F=F->next()) { diff --git a/modules/openssl/stream_peer_openssl.cpp b/modules/openssl/stream_peer_openssl.cpp index 140ea1b9e7..8095b76100 100644 --- a/modules/openssl/stream_peer_openssl.cpp +++ b/modules/openssl/stream_peer_openssl.cpp @@ -35,8 +35,8 @@ bool StreamPeerOpenSSL::_match_host_name(const char *name, const char *hostname) { return Tool_Curl_cert_hostcheck(name,hostname)==CURL_HOST_MATCH; -// print_line("MATCH: "+String(name)+" vs "+String(hostname)); -// return true; + //print_line("MATCH: "+String(name)+" vs "+String(hostname)); + //return true; } Error StreamPeerOpenSSL::_match_common_name(const char *hostname, const X509 *server_cert) { diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index 564cd6687c..0d8cabb331 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -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 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); @@ -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()); - //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(); r=PoolVector<uint8_t>::Read(); diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 5fe11c8d4c..9d2dfc7f56 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -81,6 +81,9 @@ void VideoStreamPlaybackTheora::video_write(void){ th_ycbcr_buffer 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; y_offset=(ti.pic_x&~1)+yuv[0].stride*(ti.pic_y&~1); @@ -105,7 +108,7 @@ void VideoStreamPlaybackTheora::video_write(void){ } format = Image::FORMAT_RGBA8; } - // */ + //*/ //* @@ -228,7 +231,7 @@ void VideoStreamPlaybackTheora::video_write(void){ format = Image::FORMAT_YUV_422; }; }; - // */ + //*/ frames_pending = 1; } @@ -598,7 +601,7 @@ void VideoStreamPlaybackTheora::update(float p_delta) { if (vd.granulepos>=0) { - // print_line("wrote: "+itos(audio_frames_wrote)+" gpos: "+itos(vd.granulepos)); + //print_line("wrote: "+itos(audio_frames_wrote)+" gpos: "+itos(vd.granulepos)); } //print_line("mix audio!"); diff --git a/modules/visual_script/register_types.cpp b/modules/visual_script/register_types.cpp index 79bf3d50b2..5fe87a4956 100644 --- a/modules/visual_script/register_types.cpp +++ b/modules/visual_script/register_types.cpp @@ -82,7 +82,7 @@ void register_visual_script_types() { ClassDB::register_class<VisualScriptFunctionCall>(); ClassDB::register_class<VisualScriptPropertySet>(); ClassDB::register_class<VisualScriptPropertyGet>(); -// ClassDB::register_type<VisualScriptScriptCall>(); + //ClassDB::register_type<VisualScriptScriptCall>(); ClassDB::register_class<VisualScriptEmitSignal>(); ClassDB::register_class<VisualScriptReturn>(); diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 08796b3868..e1e180432a 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -2631,7 +2631,7 @@ void VisualScriptLanguage::debug_get_stack_level_locals(int p_level,List<String> const StringName *f = _call_stack[l].function; ERR_FAIL_COND(!_call_stack[l].instance->functions.has(*f)); -// VisualScriptInstance::Function *func = &_call_stack[l].instance->functions[*f]; + //VisualScriptInstance::Function *func = &_call_stack[l].instance->functions[*f]; VisualScriptNodeInstance *node =_call_stack[l].instance->instances[*_call_stack[l].current_id]; ERR_FAIL_COND(!node); diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 8a1385e113..37ee225aeb 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -822,7 +822,7 @@ void VisualScriptEditor::_member_selected() { selected=ti->get_metadata(0); -// print_line("selected: "+String(selected)); + //print_line("selected: "+String(selected)); if (ti->get_parent()==members->get_root()->get_children()) { @@ -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); } - //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_undo_method(this,"_update_members"); undo_redo->add_do_method(this,"_update_graph"); diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 9f3ba8a8cb..a8d78b9298 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -396,7 +396,7 @@ void VisualScriptFunctionCall::_update_method_cache() { } -// print_line("BASE: "+String(type)+" FUNC: "+String(function)); + //print_line("BASE: "+String(type)+" FUNC: "+String(function)); MethodBind *mb = ClassDB::get_method(type,function); if (mb) { use_default_args=mb->get_default_argument_count(); @@ -2508,7 +2508,7 @@ void register_visual_script_func_nodes() { VisualScriptLanguage::singleton->add_register_func("functions/get",create_node_generic<VisualScriptPropertyGet>); //VisualScriptLanguage::singleton->add_register_func("functions/call_script/call_self",create_script_call_node<VisualScriptScriptCall::CALL_MODE_SELF>); -// VisualScriptLanguage::singleton->add_register_func("functions/call_script/call_node",create_script_call_node<VisualScriptScriptCall::CALL_MODE_NODE_PATH>); + //VisualScriptLanguage::singleton->add_register_func("functions/call_script/call_node",create_script_call_node<VisualScriptScriptCall::CALL_MODE_NODE_PATH>); VisualScriptLanguage::singleton->add_register_func("functions/emit_signal",create_node_generic<VisualScriptEmitSignal>); diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 4a18e88060..2b05daca16 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -78,7 +78,7 @@ int AudioStreamPlaybackOGGVorbis::_ov_seek_func(void *_f,ogg_int64_t offs, int w } int AudioStreamPlaybackOGGVorbis::_ov_close_func(void *_f) { -// printf("close %p\n",_f); + //printf("close %p\n",_f); if (!_f) return 0; FileAccess *fa=(FileAccess*)_f; diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp index 8c57eaaab6..d9e40a5913 100644 --- a/platform/android/audio_driver_jandroid.cpp +++ b/platform/android/audio_driver_jandroid.cpp @@ -71,7 +71,7 @@ Error AudioDriverAndroid::init(){ } */ -// Android_JNI_SetupThread(); + //Android_JNI_SetupThread(); // __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device"); diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp index 5e3cfcbbab..7aec2b174e 100644 --- a/platform/android/audio_driver_opensl.cpp +++ b/platform/android/audio_driver_opensl.cpp @@ -108,7 +108,7 @@ void AudioDriverOpenSL::_buffer_callbacks( AudioDriverOpenSL *ad = (AudioDriverOpenSL*)pContext; -// ad->_buffer_callback(queueItf,eventFlags,pBuffer,bufferSize,dataUsed); + //ad->_buffer_callback(queueItf,eventFlags,pBuffer,bufferSize,dataUsed); ad->_buffer_callback(queueItf); } @@ -271,8 +271,8 @@ void AudioDriverOpenSL::start(){ ERR_FAIL_COND( res !=SL_RESULT_SUCCESS ); SLDataLocator_AndroidSimpleBufferQueue loc_bufq = {SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, BUFFER_COUNT}; -// bufferQueue.locatorType = SL_DATALOCATOR_BUFFERQUEUE; -// bufferQueue.numBuffers = BUFFER_COUNT; /* Four buffers in our buffer queue */ + //bufferQueue.locatorType = SL_DATALOCATOR_BUFFERQUEUE; + //bufferQueue.numBuffers = BUFFER_COUNT; /* Four buffers in our buffer queue */ /* Setup the format of the content in the buffer queue */ pcm.formatType = SL_DATAFORMAT_PCM; pcm.numChannels = 2; @@ -295,7 +295,7 @@ void AudioDriverOpenSL::start(){ audioSink.pLocator = (void *)&locator_outputmix; audioSink.pFormat = NULL; /* Initialize the context for Buffer queue callbacks */ -// cntxt.pDataBase = (void*)&pcmData; + //cntxt.pDataBase = (void*)&pcmData; //cntxt.pData = cntxt.pDataBase; //cntxt.size = sizeof(pcmData); /* Set arrays required[] and iidArray[] for SEEK interface diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp index b6d4f757f9..2528b18248 100644 --- a/platform/android/dir_access_jandroid.cpp +++ b/platform/android/dir_access_jandroid.cpp @@ -257,7 +257,7 @@ void DirAccessJAndroid::setup( jobject p_io) { __android_log_print(ANDROID_LOG_INFO,"godot","*******GOT METHOD _dir_is_dir ok!!"); } -// (*env)->CallVoidMethod(env,obj,aMethodID, myvar); + //(*env)->CallVoidMethod(env,obj,aMethodID, myvar); } diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index e836258e04..204bf684b7 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -729,17 +729,17 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool } -// print_line("String "+itos(i)+": "+string_table[i]); + //print_line("String "+itos(i)+": "+string_table[i]); } for(uint32_t i=string_end;i<(ofs+size);i++) { stable_extra.push_back(p_manifest[i]); } -// printf("stable extra: %i\n",int(stable_extra.size())); + //printf("stable extra: %i\n",int(stable_extra.size())); string_table_ends=ofs+size; -// print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends)); + //print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends)); } break; case CHUNK_XML_START_TAG: { @@ -752,7 +752,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool String tname=string_table[name]; -// printf("NSPACE: %i\n",nspace); + //printf("NSPACE: %i\n",nspace); //printf("NAME: %i (%s)\n",name,tname.utf8().get_data()); //printf("CHECK: %x\n",check); uint32_t attrcount=decode_uint32(&p_manifest[iofs+20]); @@ -1523,7 +1523,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) { if (dpos==-1) continue; d=d.substr(0,dpos).strip_edges(); - // print_line("found devuce: "+d); + //print_line("found devuce: "+d); ldevices.push_back(d); } @@ -1602,8 +1602,8 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) { } d.name=vendor+" "+device; - // print_line("name: "+d.name); - // print_line("description: "+d.description); + //print_line("name: "+d.name); + //print_line("description: "+d.description); } @@ -1864,10 +1864,12 @@ bool EditorExportPlatformAndroid::can_export(String *r_error) const { if (apk_expansion) { - //if (apk_expansion_salt=="") { - // valid=false; - // err+="Invalid SALT for apk expansion.\n"; - //} + /* + if (apk_expansion_salt=="") { + valid=false; + err+="Invalid SALT for apk expansion.\n"; + } + */ if (apk_expansion_pkey=="") { valid=false; err+="Invalid public key for apk expansion.\n"; diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp index 4755f1d029..a4e9c191e9 100644 --- a/platform/android/file_access_jandroid.cpp +++ b/platform/android/file_access_jandroid.cpp @@ -236,7 +236,7 @@ void FileAccessJAndroid::setup( jobject p_io) { __android_log_print(ANDROID_LOG_INFO,"godot","*******GOT METHOD _file_close ok!!"); } -// (*env)->CallVoidMethod(env,obj,aMethodID, myvar); + //(*env)->CallVoidMethod(env,obj,aMethodID, myvar); } diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp index 52b59b2dc1..bbf9bd5b0b 100644 --- a/platform/android/globals/global_defaults.cpp +++ b/platform/android/globals/global_defaults.cpp @@ -35,7 +35,7 @@ void register_android_global_defaults() { /* GLOBAL_DEF("rasterizer.Android/use_fragment_lighting",false); GLOBAL_DEF("rasterizer.Android/fp16_framebuffer",false); GLOBAL_DEF("display.Android/driver","GLES2"); -// GLOBAL_DEF("rasterizer.Android/trilinear_mipmap_filter",false); + //GLOBAL_DEF("rasterizer.Android/trilinear_mipmap_filter",false); GlobalConfig::get_singleton()->set_custom_property_info("display.Android/driver",PropertyInfo(Variant::STRING,"display.Android/driver",PROPERTY_HINT_ENUM,"GLES2")); */ diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp index c4d1a85c5f..3c7f7f5854 100644 --- a/platform/android/godot_android.cpp +++ b/platform/android/godot_android.cpp @@ -535,29 +535,33 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event) case AMOTION_EVENT_ACTION_DOWN: { engine->os->process_touch(0,0,touchvec); - //System.out.printf("action down at: %f,%f\n", event.getX(),event.getY()); + //System.out.printf("action down at: %f,%f\n", event.getX(),event.getY()); } break; case AMOTION_EVENT_ACTION_MOVE: { 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; case AMOTION_EVENT_ACTION_POINTER_UP: { engine->os->process_touch(4,pidx,touchvec); - //System.out.printf("%d - s.up at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); + //System.out.printf("%d - s.up at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); } break; case AMOTION_EVENT_ACTION_POINTER_DOWN: { engine->os->process_touch(3,pidx,touchvec); - //System.out.printf("%d - s.down at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); + //System.out.printf("%d - s.down at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); } break; case AMOTION_EVENT_ACTION_CANCEL: case AMOTION_EVENT_ACTION_UP: { 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; } @@ -638,8 +642,8 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) { } break; case APP_CMD_INIT_WINDOW: - //The window is being shown, get it ready. - // LOGI("INIT WINDOW"); + //The window is being shown, get it ready. + //LOGI("INIT WINDOW"); if (engine->app->window != NULL) { if (engine->os==NULL) { @@ -647,7 +651,7 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) { //do initialization here, when there's OpenGL! hackish but the only way engine->os = new OS_Android(_gfx_init,engine); - // char *args[]={"-test","gui",NULL}; + //char *args[]={"-test","gui",NULL}; __android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup..."); #if 0 Error err = Main::setup("apk",2,args); @@ -722,15 +726,15 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) { engine->animating=1; engine_draw_frame(engine); } - break; + break; case APP_CMD_TERM_WINDOW: - // The window is being hidden or closed, clean it up. - // LOGI("TERM WINDOW"); - engine_term_display(engine); - break; + // The window is being hidden or closed, clean it up. + //LOGI("TERM WINDOW"); + engine_term_display(engine); + break; case APP_CMD_GAINED_FOCUS: - // When our app gains focus, we start monitoring the accelerometer. - if (engine->accelerometerSensor != NULL) { + // When our app gains focus, we start monitoring the accelerometer. + if (engine->accelerometerSensor != NULL) { ASensorEventQueue_enableSensor(engine->sensorEventQueue, engine->accelerometerSensor); // We'd like to get 60 events per second (in us). @@ -833,7 +837,7 @@ void android_main(struct android_app* state) { // Process this event. if (source != NULL) { - // LOGI("process\n"); + // LOGI("process\n"); source->process(state, source); } else { nullmax--; @@ -883,12 +887,12 @@ void android_main(struct android_app* state) { return; } -// LOGI("end\n"); + // LOGI("end\n"); } -// LOGI("engine animating? %i\n",engine.animating); + // LOGI("engine animating? %i\n",engine.animating); if (engine.animating) { //do os render diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index 94d29a3350..610f707b47 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -257,8 +257,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC public void onVideoInit(boolean use_gl2) { -// mView = new GodotView(getApplication(),io,use_gl2); -// setContentView(mView); + //mView = new GodotView(getApplication(),io,use_gl2); + //setContentView(mView); layout = new FrameLayout(this); layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT)); @@ -582,7 +582,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC initializeGodot(); - // instanceSingleton( new GodotFacebook(this) ); + //instanceSingleton( new GodotFacebook(this) ); } @@ -804,9 +804,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC } break; case MotionEvent.ACTION_MOVE: { 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; case MotionEvent.ACTION_POINTER_UP: { final int indexPointUp = event.getActionIndex(); @@ -822,9 +824,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: { 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; } @@ -866,9 +870,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC return mPaymentsManager; } -// public void setPaymentsManager(PaymentsManager mPaymentsManager) { -// this.mPaymentsManager = mPaymentsManager; -// }; + /* + public void setPaymentsManager(PaymentsManager mPaymentsManager) { + this.mPaymentsManager = mPaymentsManager; + } + */ // Audio diff --git a/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java index 878528f7c7..fba082e80d 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java +++ b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java @@ -57,7 +57,7 @@ public class GodotDownloaderService extends DownloaderService { Log.d("GODOT", "getting public key:" + prefs.getString("store_public_key", null)); return prefs.getString("store_public_key", null); -// return BASE64_PUBLIC_KEY; + //return BASE64_PUBLIC_KEY; } /** diff --git a/platform/android/java/src/org/godotengine/godot/GodotView.java b/platform/android/java/src/org/godotengine/godot/GodotView.java index db67144bcc..4cfe295835 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotView.java +++ b/platform/android/java/src/org/godotengine/godot/GodotView.java @@ -265,7 +265,7 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener { if (keyCode == KeyEvent.KEYCODE_BACK) { GodotLib.quit(); // press 'back' button should not terminate program - // normal handle 'back' event in game logic + //normal handle 'back' event in game logic return true; } diff --git a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java index 13a24994f8..67293df2a8 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java @@ -47,19 +47,19 @@ abstract public class ConsumeTask { public void consume(final String sku){ -// Log.d("XXX", "Consuming product " + sku); + //Log.d("XXX", "Consuming product " + sku); PaymentsCache pc = new PaymentsCache(context); Boolean isBlocked = pc.getConsumableFlag("block", sku); String _token = pc.getConsumableValue("token", sku); -// Log.d("XXX", "token " + _token); + //Log.d("XXX", "token " + _token); if(!isBlocked && _token == null){ -// _token = "inapp:"+context.getPackageName()+":android.test.purchased"; -// Log.d("XXX", "Consuming product " + sku + " with token " + _token); + //_token = "inapp:"+context.getPackageName()+":android.test.purchased"; + //Log.d("XXX", "Consuming product " + sku + " with token " + _token); }else if(!isBlocked){ -// Log.d("XXX", "It is not blocked ¿?"); + //Log.d("XXX", "It is not blocked ¿?"); return; }else if(_token == null){ -// Log.d("XXX", "No token available"); + //Log.d("XXX", "No token available"); this.error("No token for sku:" + sku); return; } @@ -69,9 +69,9 @@ abstract public class ConsumeTask { @Override protected String doInBackground(String... params) { try { -// Log.d("XXX", "Requesting to release item."); + //Log.d("XXX", "Requesting to release item."); int response = mService.consumePurchase(3, context.getPackageName(), token); -// Log.d("XXX", "release response code: " + response); + //Log.d("XXX", "release response code: " + response); if(response == 0 || response == 8){ return null; } diff --git a/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java b/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java index 20feaef581..dfa363ed75 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java @@ -60,9 +60,9 @@ abstract public class GenericConsumeTask extends AsyncTask<String, String, Strin @Override protected String doInBackground(String... params) { try { -// Log.d("godot", "Requesting to consume an item with token ." + token); + //Log.d("godot", "Requesting to consume an item with token ." + token); int response = mService.consumePurchase(3, context.getPackageName(), token); -// Log.d("godot", "consumePurchase response: " + response); + //Log.d("godot", "consumePurchase response: " + response); if(response == 0 || response == 8){ return null; } diff --git a/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java b/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java index 1aa210265d..3850453a77 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java @@ -56,29 +56,29 @@ abstract public class HandlePurchaseTask { public void handlePurchaseRequest(int resultCode, Intent data){ -// Log.d("XXX", "Handling purchase response"); -// int responseCode = data.getIntExtra("RESPONSE_CODE", 0); + //Log.d("XXX", "Handling purchase response"); + //int responseCode = data.getIntExtra("RESPONSE_CODE", 0); PaymentsCache pc = new PaymentsCache(context); String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA"); -// Log.d("XXX", "Purchase data:" + purchaseData); + //Log.d("XXX", "Purchase data:" + purchaseData); String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE"); //Log.d("XXX", "Purchase signature:" + dataSignature); if (resultCode == Activity.RESULT_OK) { try { -// Log.d("SARLANGA", purchaseData); + //Log.d("SARLANGA", purchaseData); JSONObject jo = new JSONObject(purchaseData); -// String sku = jo.getString("productId"); -// alert("You have bought the " + sku + ". Excellent choice, aventurer!"); -// String orderId = jo.getString("orderId"); -// String packageName = jo.getString("packageName"); + //String sku = jo.getString("productId"); + //alert("You have bought the " + sku + ". Excellent choice, aventurer!"); + //String orderId = jo.getString("orderId"); + //String packageName = jo.getString("packageName"); String productId = jo.getString("productId"); -// Long purchaseTime = jo.getLong("purchaseTime"); -// Integer state = jo.getInt("purchaseState"); + //Long purchaseTime = jo.getLong("purchaseTime"); + //Integer state = jo.getInt("purchaseState"); String developerPayload = jo.getString("developerPayload"); String purchaseToken = jo.getString("purchaseToken"); @@ -86,7 +86,7 @@ abstract public class HandlePurchaseTask { error("Untrusted callback"); return; } -// Log.d("XXX", "Este es el product ID:" + productId); + //Log.d("XXX", "Este es el product ID:" + productId); pc.setConsumableValue("ticket_signautre", productId, dataSignature); pc.setConsumableValue("ticket", productId, purchaseData); pc.setConsumableFlag("block", productId, true); diff --git a/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java b/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java index 88fd1a0fe4..4678dae1b3 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java +++ b/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java @@ -59,14 +59,14 @@ public class PaymentsCache { SharedPreferences sharedPref = context.getSharedPreferences("consumables_" + set, Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(sku, value); -// Log.d("XXX", "Setting asset: consumables_" + set + ":" + sku); + //Log.d("XXX", "Setting asset: consumables_" + set + ":" + sku); editor.commit(); } public String getConsumableValue(String set, String sku){ SharedPreferences sharedPref = context.getSharedPreferences( "consumables_" + set, Context.MODE_PRIVATE); -// Log.d("XXX", "Getting asset: consumables_" + set + ":" + sku); + //Log.d("XXX", "Getting asset: consumables_" + set + ":" + sku); return sharedPref.getString(sku, null); } diff --git a/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java b/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java index d154ef0c78..5ad96b35ee 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java @@ -63,18 +63,20 @@ abstract public class PurchaseTask { Log.d("XXX", "Starting purchase for: " + sku); PaymentsCache pc = new PaymentsCache(context); Boolean isBlocked = pc.getConsumableFlag("block", sku); -// if(isBlocked){ -// Log.d("XXX", "Is awaiting payment confirmation"); -// error("Awaiting payment confirmation"); -// return; -// } + /* + if(isBlocked){ + Log.d("XXX", "Is awaiting payment confirmation"); + error("Awaiting payment confirmation"); + return; + } + */ final String hash = transactionId; Bundle buyIntentBundle; try { buyIntentBundle = mService.getBuyIntent(3, context.getApplicationContext().getPackageName(), sku, "inapp", hash ); } catch (RemoteException e) { -// Log.d("XXX", "Error: " + e.getMessage()); + //Log.d("XXX", "Error: " + e.getMessage()); error(e.getMessage()); return; } @@ -87,7 +89,7 @@ abstract public class PurchaseTask { }else if( rc instanceof Long){ responseCode = (int)((Long)rc).longValue(); } -// Log.d("XXX", "Buy intent response code: " + responseCode); + //Log.d("XXX", "Buy intent response code: " + responseCode); if(responseCode == 1 || responseCode == 3 || responseCode == 4){ canceled(); return; @@ -102,12 +104,12 @@ abstract public class PurchaseTask { pc.setConsumableValue("validation_hash", sku, hash); try { if(context == null){ -// Log.d("XXX", "No context!"); + //Log.d("XXX", "No context!"); } if(pendingIntent == null){ -// Log.d("XXX", "No pending intent"); + //Log.d("XXX", "No pending intent"); } -// Log.d("XXX", "Starting activity for purchase!"); + //Log.d("XXX", "Starting activity for purchase!"); context.startIntentSenderForResult( pendingIntent.getIntentSender(), PaymentsManager.REQUEST_CODE_FOR_PURCHASE, diff --git a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java index c74269890d..60a43a9070 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java @@ -56,13 +56,13 @@ abstract public class ReleaseAllConsumablesTask { public void consumeItAll(){ try{ -// Log.d("godot", "consumeItall for " + context.getPackageName()); + //Log.d("godot", "consumeItall for " + context.getPackageName()); Bundle bundle = mService.getPurchases(3, context.getPackageName(), "inapp",null); for (String key : bundle.keySet()) { - Object value = bundle.get(key); -// Log.d("godot", String.format("%s %s (%s)", key, -// value.toString(), value.getClass().getName())); + Object value = bundle.get(key); + //Log.d("godot", String.format("%s %s (%s)", key, + //value.toString(), value.getClass().getName())); } @@ -73,13 +73,13 @@ abstract public class ReleaseAllConsumablesTask { if (myPurchases == null || myPurchases.size() == 0){ -// Log.d("godot", "No purchases!"); + //Log.d("godot", "No purchases!"); notRequired(); return; } -// Log.d("godot", "# products to be consumed:" + myPurchases.size()); + //Log.d("godot", "# products to be consumed:" + myPurchases.size()); for (int i=0;i<myPurchases.size();i++) { @@ -89,7 +89,7 @@ abstract public class ReleaseAllConsumablesTask { String sku = inappPurchaseData.getString("productId"); String token = inappPurchaseData.getString("purchaseToken"); String signature = mySignatures.get(i); -// Log.d("godot", "A punto de consumir un item con token:" + token + "\n" + receipt); + //Log.d("godot", "A punto de consumir un item con token:" + token + "\n" + receipt); new GenericConsumeTask(context, mService, sku, receipt,signature, token) { @Override diff --git a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java index dafab13ad7..f09bcbf9a4 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java @@ -79,14 +79,14 @@ abstract public class ValidateTask { param.put("ticket", pc.getConsumableValue("ticket", sku)); param.put("purchaseToken", pc.getConsumableValue("token", sku)); param.put("sku", sku); -// Log.d("XXX", "Haciendo request a " + url); -// Log.d("XXX", "ticket: " + pc.getConsumableValue("ticket", sku)); -// Log.d("XXX", "purchaseToken: " + pc.getConsumableValue("token", sku)); -// Log.d("XXX", "sku: " + sku); + //Log.d("XXX", "Haciendo request a " + url); + //Log.d("XXX", "ticket: " + pc.getConsumableValue("ticket", sku)); + //Log.d("XXX", "purchaseToken: " + pc.getConsumableValue("token", sku)); + //Log.d("XXX", "sku: " + sku); param.put("package", context.getApplicationContext().getPackageName()); HttpRequester requester = new HttpRequester(); String jsonResponse = requester.post(param); -// Log.d("XXX", "Validation response:\n"+jsonResponse); + //Log.d("XXX", "Validation response:\n"+jsonResponse); return jsonResponse; } diff --git a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java index 9dd08a9563..faefbbd2c6 100644 --- a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java +++ b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java @@ -78,12 +78,12 @@ public class HttpRequester { private long cttl=0; public HttpRequester(){ -// Log.d("XXX", "Creando http request sin contexto"); + //Log.d("XXX", "Creando http request sin contexto"); } public HttpRequester(Context context){ this.context=context; -// Log.d("XXX", "Creando http request con contexto"); + //Log.d("XXX", "Creando http request con contexto"); } public String post(RequestParams params){ @@ -99,7 +99,7 @@ public class HttpRequester { public String get(RequestParams params){ String response = getResponseFromCache(params.getUrl()); if(response == null){ -// Log.d("XXX", "Cache miss!"); + //Log.d("XXX", "Cache miss!"); HttpGet httpget = new HttpGet(params.getUrl()); long timeInit = new Date().getTime(); response = request(httpget); @@ -117,7 +117,7 @@ public class HttpRequester { } private String request(HttpUriRequest request){ -// Log.d("XXX", "Haciendo request a: " + request.getURI() ); + //Log.d("XXX", "Haciendo request a: " + request.getURI() ); Log.d("PPP", "Haciendo request a: " + request.getURI() ); long init = new Date().getTime(); HttpClient httpclient = getNewHttpClient(); @@ -128,10 +128,10 @@ public class HttpRequester { try { HttpResponse response = httpclient.execute(request); Log.d("PPP", "Fin de request (" + (new Date().getTime() - init) + ") a: " + request.getURI() ); -// Log.d("XXX1", "Status:" + response.getStatusLine().toString()); + //Log.d("XXX1", "Status:" + response.getStatusLine().toString()); if(response.getStatusLine().getStatusCode() == 200){ String strResponse = EntityUtils.toString(response.getEntity()); -// Log.d("XXX2", strResponse); + //Log.d("XXX2", strResponse); return strResponse; }else{ Log.d("XXX3", "Response status code:" + response.getStatusLine().getStatusCode() + "\n" + EntityUtils.toString(response.getEntity())); @@ -192,7 +192,7 @@ public class HttpRequester { public void saveResponseIntoCache(String request, String response){ if(context == null){ -// Log.d("XXX", "No context, cache failed!"); + //Log.d("XXX", "No context, cache failed!"); return; } SharedPreferences sharedPref = context.getSharedPreferences("http_get_cache", Context.MODE_PRIVATE); diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index 296ac0a831..9acda005f1 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -1240,7 +1240,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String& p_class) { //args[i] = _jobject_to_variant(env, obj); -// print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); + //print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); }; diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index a691e60575..dfbb437344 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -802,7 +802,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv * e env->GetJavaVM(&jvm); _godot_instance=env->NewGlobalRef(activity); -// _godot_instance=activity; + //_godot_instance=activity; __android_log_print(ANDROID_LOG_INFO,"godot","***************** HELLO FROM JNI!!!!!!!!"); @@ -879,7 +879,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv * e if (!rawString) { __android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is null\n",i); } else { - // __android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString); + //__android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString); if (strcmp(rawString,"-main_pack")==0) use_apk_expansion=true; @@ -1151,8 +1151,10 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv * env, j pointer_events.push_back(jpe); input_mutex->unlock(); - //if (os_android) -// os_android->process_touch(ev,pointer,points); + /* + if (os_android) + os_android->process_touch(ev,pointer,points); + */ } @@ -1753,7 +1755,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv * args[i] = _jobject_to_variant(env, obj); env->DeleteLocalRef(obj); -// print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); + //print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); }; diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 3fcb6949ac..562666b679 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -399,7 +399,7 @@ void OS_Android::process_event(InputEvent p_event) { void OS_Android::process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points) { -// print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size())); + //print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size())); switch(p_what) { case 0: { //gesture begin diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp index 3913c31320..ea2e326b05 100644 --- a/platform/bb10/os_bb10.cpp +++ b/platform/bb10/os_bb10.cpp @@ -190,9 +190,11 @@ void OSBB10::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - //if (debugger_connection_console) { -// memdelete(debugger_connection_console); -//} + /* + if (debugger_connection_console) { + memdelete(debugger_connection_console); + } + */ memdelete(sample_manager); diff --git a/platform/bb10/os_bb10.h b/platform/bb10/os_bb10.h index 8011550987..5c484cd120 100644 --- a/platform/bb10/os_bb10.h +++ b/platform/bb10/os_bb10.h @@ -58,7 +58,7 @@ class OSBB10 : public OS_Unix { Rasterizer *rasterizer; VisualServer *visual_server; -// AudioDriverPSP audio_driver_psp; + //AudioDriverPSP audio_driver_psp; AudioServerSW *audio_server; SampleManagerMallocSW *sample_manager; SpatialSoundServerSW *spatial_sound_server; diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp index 2a8310b858..e7ff65e3ba 100644 --- a/platform/haiku/haiku_direct_window.cpp +++ b/platform/haiku/haiku_direct_window.cpp @@ -145,10 +145,12 @@ void HaikuDirectWindow::HandleMouseButton(BMessage* message) { last_buttons_state = buttons; // TODO: implement the mouse_mode checks - //if (mouse_mode == MOUSE_MODE_CAPTURED) { - // event.xbutton.x=last_mouse_pos.x; - // event.xbutton.y=last_mouse_pos.y; - //} + /* + if (mouse_mode == MOUSE_MODE_CAPTURED) { + event.xbutton.x=last_mouse_pos.x; + event.xbutton.y=last_mouse_pos.y; + } + */ InputEvent mouse_event; mouse_event.ID = ++event_id; diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 10e1b055be..176e1b0fbc 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -119,9 +119,11 @@ void OS_Haiku::initialize(const VideoMode& p_desired, int p_video_driver, int p_ ERR_FAIL_COND(!visual_server); // 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); window->SetInput(input); diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp index 579cbaed3c..af9f28169b 100644 --- a/platform/javascript/audio_driver_javascript.cpp +++ b/platform/javascript/audio_driver_javascript.cpp @@ -68,14 +68,18 @@ AudioDriverSW::OutputFormat AudioDriverJavaScript::get_output_format() const{ } void AudioDriverJavaScript::lock(){ - //if (active && mutex) - // mutex->lock(); + /* + if (active && mutex) + mutex->lock(); + */ } void AudioDriverJavaScript::unlock() { - //if (active && mutex) - // mutex->unlock(); + /* + if (active && mutex) + mutex->unlock(); + */ } void AudioDriverJavaScript::finish(){ diff --git a/platform/javascript/audio_server_javascript.cpp b/platform/javascript/audio_server_javascript.cpp index d1fba030a5..5489f179eb 100644 --- a/platform/javascript/audio_server_javascript.cpp +++ b/platform/javascript/audio_server_javascript.cpp @@ -617,9 +617,11 @@ void AudioServerJavascript::mix_to_js(int p_frames) { 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); diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp index 4c47594810..6ec7f1ec3d 100644 --- a/platform/javascript/javascript_main.cpp +++ b/platform/javascript/javascript_main.cpp @@ -159,8 +159,8 @@ int main(int argc, char *argv[]) { char *args[]={"-test","gui","-v",NULL}; Error err = Main::setup("apk",3,args); #else -// char *args[]={"-v",NULL};// -// Error err = Main::setup("",1,args); + //char *args[]={"-v",NULL};// + //Error err = Main::setup("",1,args); Error err = Main::setup("",0,NULL); #endif diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index a6be77340f..18bf8f6a86 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -243,7 +243,7 @@ void OS_JavaScript::initialize(const VideoMode& p_desired,int p_video_driver,int rasterizer_gles22->set_extensions(gl_extensions); rasterizer = rasterizer_gles22; } else { -// rasterizer = memnew( RasterizerGLES1(true, false) ); + //rasterizer = memnew( RasterizerGLES1(true, false) ); } print_line("Init VS"); @@ -561,7 +561,7 @@ void OS_JavaScript::push_input(const InputEvent& p_ev) { void OS_JavaScript::process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points) { -// print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size())); + //print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size())); switch(p_what) { case 0: { //gesture begin @@ -804,8 +804,10 @@ String OS_JavaScript::get_resource_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 GlobalConfig::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir"); }; diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index fc64c2b867..f6559f1f7a 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -59,7 +59,7 @@ class OS_OSX : public OS_Unix { public: bool force_quit; // rasterizer seems to no longer be given to visual server, its using GLES3 directly? -// Rasterizer *rasterizer; + //Rasterizer *rasterizer; VisualServer *visual_server; List<String> args; diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index a66f6abba5..5750e19c87 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -148,36 +148,36 @@ static int button_mask=0; - (void)applicationDidHide:(NSNotification *)notification { - /* _Godotwindow* window; - - for (window = _Godot.windowListHead; window; window = window->next) - _GodotInputWindowVisibility(window, GL_FALSE); + /* + _Godotwindow* window; + for (window = _Godot.windowListHead; window; window = window->next) + _GodotInputWindowVisibility(window, GL_FALSE); */ } - (void)applicationDidUnhide:(NSNotification *)notification { /* - _Godotwindow* window; + _Godotwindow* window; - for (window = _Godot.windowListHead; window; window = window->next) - { + for (window = _Godot.windowListHead; window; window = window->next) + { if ([window_object isVisible]) _GodotInputWindowVisibility(window, GL_TRUE); - } - */ + } + */ } - (void)applicationDidChangeScreenParameters:(NSNotification *) notification { - //_GodotInputMonitorChange(); + //_GodotInputMonitorChange(); } @end @interface GodotWindowDelegate : NSObject { - // _Godotwindow* window; + //_Godotwindow* window; } @end @@ -187,7 +187,7 @@ static int button_mask=0; - (BOOL)windowShouldClose:(id)sender { - //_GodotInputWindowCloseRequest(window); + //_GodotInputWindowCloseRequest(window); if (OS_OSX::singleton->get_main_loop()) OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_QUIT_REQUEST); return NO; @@ -207,38 +207,42 @@ static int button_mask=0; 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); - //_GodotInputWindowDamage(window); + /* + _GodotInputFramebufferSize(window, fbRect.size.width, fbRect.size.height); + _GodotInputWindowSize(window, contentRect.size.width, contentRect.size.height); + _GodotInputWindowDamage(window); - //if (window->cursorMode == Godot_CURSOR_DISABLED) - // centerCursor(window); + if (window->cursorMode == Godot_CURSOR_DISABLED) + centerCursor(window); + */ } - (void)windowDidMove:(NSNotification *)notification { - // [window->nsgl.context update]; + /* + [window->nsgl.context update]; - // int x, y; - // _GodotPlatformGetWindowPos(window, &x, &y); - // _GodotInputWindowPos(window, x, y); + int x, y; + _GodotPlatformGetWindowPos(window, &x, &y); + _GodotInputWindowPos(window, x, y); - //if (window->cursorMode == Godot_CURSOR_DISABLED) - // centerCursor(window); + if (window->cursorMode == Godot_CURSOR_DISABLED) + centerCursor(window); + */ } - (void)windowDidBecomeKey:(NSNotification *)notification { - // _GodotInputWindowFocus(window, GL_TRUE); - // _GodotPlatformSetCursorMode(window, window->cursorMode); + //_GodotInputWindowFocus(window, GL_TRUE); + //_GodotPlatformSetCursorMode(window, window->cursorMode); if (OS_OSX::singleton->get_main_loop()) OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN); } - (void)windowDidResignKey:(NSNotification *)notification { - // _GodotInputWindowFocus(window, GL_FALSE); - // _GodotPlatformSetCursorMode(window, Godot_CURSOR_NORMAL); + //_GodotInputWindowFocus(window, GL_FALSE); + //_GodotPlatformSetCursorMode(window, Godot_CURSOR_NORMAL); if (OS_OSX::singleton->get_main_loop()) OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT); } @@ -273,16 +277,18 @@ static int button_mask=0; + (void)initialize { - if (self == [GodotContentView class]) - { - /* if (_glfw.ns.cursor == nil) + if (self == [GodotContentView class]) { - NSImage* data = [[NSImage alloc] initWithSize:NSMakeSize(1, 1)]; - _glfw.ns.cursor = [[NSCursor alloc] initWithImage:data - hotSpot:NSZeroPoint]; - [data release]; - }*/ - } + /* + if (_glfw.ns.cursor == nil) + { + NSImage* data = [[NSImage alloc] initWithSize:NSMakeSize(1, 1)]; + _glfw.ns.cursor = [[NSCursor alloc] initWithImage:data + hotSpot:NSZeroPoint]; + [data release]; + } + */ + } } - (id)init @@ -993,7 +999,7 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi [window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; } -// [window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]]; + //[window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]]; [window_object setContentView:window_view]; [window_object setDelegate:window_delegate]; [window_object setAcceptsMouseMovedEvents:YES]; @@ -1019,7 +1025,7 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi ADD_ATTR(NSOpenGLPFADoubleBuffer); ADD_ATTR(NSOpenGLPFAClosestPolicy); -// we now need OpenGL 3 or better, maybe even change this to 3_3Core ? + //we now need OpenGL 3 or better, maybe even change this to 3_3Core ? ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); ADD_ATTR2(NSOpenGLPFAColorSize, colorBits); @@ -1083,15 +1089,16 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi RasterizerGLES3::register_config(); RasterizerGLES3::make_current(); -// rasterizer = instance_RasterizerGLES2(); -// visual_server = memnew( VisualServerRaster(rasterizer) ); + //rasterizer = instance_RasterizerGLES2(); + //visual_server = memnew( VisualServerRaster(rasterizer) ); visual_server = memnew( VisualServerRaster ); // FIXME: Reimplement threaded rendering? Or remove? -// 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)); + } + */ visual_server->init(); visual_server->cursor_set_visible(false, 0); @@ -1175,7 +1182,7 @@ void OS_OSX::finalize() { visual_server->finish(); memdelete(visual_server); -// memdelete(rasterizer); + //memdelete(rasterizer); physics_server->finish(); memdelete(physics_server); @@ -1730,10 +1737,10 @@ void OS_OSX::run() { set_window_fullscreen(true); } -// uint64_t last_ticks=get_ticks_usec(); + //uint64_t last_ticks=get_ticks_usec(); -// int frames=0; -// uint64_t frame=0; + //int frames=0; + //uint64_t frame=0; while (!force_quit) { diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index e35ad1adf8..6b91a5ce77 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -103,9 +103,11 @@ void OS_Server::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - //if (debugger_connection_console) { -// memdelete(debugger_connection_console); -//} + /* + if (debugger_connection_console) { + memdelete(debugger_connection_console); + } + */ memdelete(sample_manager); diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 6aa1b9e14b..f7fe586b1b 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -51,7 +51,7 @@ class OS_Server : public OS_Unix { -// Rasterizer *rasterizer; + //Rasterizer *rasterizer; VisualServer *visual_server; VideoMode current_videomode; List<String> args; diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 34977bc048..9dd745716e 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -412,9 +412,11 @@ void OSUWP::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - //if (debugger_connection_console) { -// memdelete(debugger_connection_console); -//} + /* + if (debugger_connection_console) { + memdelete(debugger_connection_console); + } + */ memdelete(sample_manager); diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp index 6b60ade5f0..7a81dfef77 100644 --- a/platform/windows/context_gl_win.cpp +++ b/platform/windows/context_gl_win.cpp @@ -199,7 +199,7 @@ Error ContextGL_Win::initialize() { } wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress ("wglSwapIntervalEXT"); -// glWrapperInit(wrapper_get_proc_address); + //glWrapperInit(wrapper_get_proc_address); return OK; } diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index d88a545b5e..8910b23a2e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -635,8 +635,10 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) { 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 @@ -1085,12 +1087,12 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ visual_server = memnew( VisualServerRaster ); // FIXME: Reimplement threaded rendering? Or remove? -// 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)); + } + */ - // physics_server = memnew( PhysicsServerSW ); physics_server->init(); @@ -1274,9 +1276,11 @@ void OS_Windows::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - //if (debugger_connection_console) { -// memdelete(debugger_connection_console); -//} + /* + if (debugger_connection_console) { + memdelete(debugger_connection_console); + } + */ memdelete(sample_manager); @@ -1608,7 +1612,7 @@ void OS_Windows::set_window_fullscreen(bool p_enabled){ */ } -// MoveWindow(hWnd,r.left,r.top,p_size.x,p_size.y,TRUE); + //MoveWindow(hWnd,r.left,r.top,p_size.x,p_size.y,TRUE); } @@ -1986,7 +1990,7 @@ Error OS_Windows::execute(const String& p_path, const List<String>& p_arguments, argss+=String(" \"")+p_arguments[i]+"\""; } -// print_line("ARGS: "+argss); + //print_line("ARGS: "+argss); //argss+"\""; //argss+=" 2>nul"; diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp index 4adb47938c..39b704d2c4 100644 --- a/platform/x11/context_gl_x11.cpp +++ b/platform/x11/context_gl_x11.cpp @@ -88,7 +88,7 @@ Error ContextGL_X11::initialize() { GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = NULL; -// const char *extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display)); + //const char *extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display)); glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); diff --git a/platform/x11/context_gl_x11.h b/platform/x11/context_gl_x11.h index efe377ad92..efea700224 100644 --- a/platform/x11/context_gl_x11.h +++ b/platform/x11/context_gl_x11.h @@ -48,7 +48,7 @@ class ContextGL_X11 : public ContextGL { ContextGL_X11_Private *p; OS::VideoMode default_video_mode; -// ::Colormap x11_colormap; + //::Colormap x11_colormap; ::Display *x11_display; ::Window& x11_window; bool double_buffer; diff --git a/platform/x11/key_mapping_x11.cpp b/platform/x11/key_mapping_x11.cpp index 7b92ed95de..d25fe40c4d 100644 --- a/platform/x11/key_mapping_x11.cpp +++ b/platform/x11/key_mapping_x11.cpp @@ -90,8 +90,8 @@ static _XTranslatePair _xkeysym_to_keycode[]={ { XK_Begin, KEY_CLEAR }, { XK_Insert, KEY_INSERT }, { XK_Delete, KEY_DELETE }, -// { XK_KP_Equal, KEY_EQUAL }, -// { XK_KP_Separator, KEY_COMMA }, + //{ XK_KP_Equal, KEY_EQUAL }, + //{ XK_KP_Separator, KEY_COMMA }, { XK_KP_Decimal, KEY_KP_PERIOD }, { XK_KP_Delete, KEY_KP_PERIOD }, { XK_KP_Enter, KEY_KP_ENTER }, diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index c1eb550949..13e01ab6ac 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -474,9 +474,11 @@ void OS_X11::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - //if (debugger_connection_console) { -// memdelete(debugger_connection_console); -//} + /* + if (debugger_connection_console) { + memdelete(debugger_connection_console); + } + */ #ifdef JOYDEV_ENABLED memdelete(joypad); @@ -1923,10 +1925,10 @@ void OS_X11::run() { main_loop->init(); -// uint64_t last_ticks=get_ticks_usec(); + //uint64_t last_ticks=get_ticks_usec(); -// int frames=0; -// uint64_t frame=0; + //int frames=0; + //uint64_t frame=0; while (!force_quit) { diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index ac24e4ee97..64d6ef5560 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -429,7 +429,7 @@ void AnimatedSprite::_notification(int p_what) { //texture->draw_rect(ci,dst_rect,false,modulate); texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size())); -// VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); + //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; } diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index adeaa34c3e..882ae69a2b 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -145,7 +145,7 @@ Transform2D Camera2D::get_camera_transform() { float c = smoothing*get_fixed_process_delta_time(); smoothed_camera_pos = ((camera_pos-smoothed_camera_pos)*c)+smoothed_camera_pos; ret_camera_pos=smoothed_camera_pos; - // camera_pos=camera_pos*(1.0-smoothing)+new_camera_pos*smoothing; + //camera_pos=camera_pos*(1.0-smoothing)+new_camera_pos*smoothing; } else { ret_camera_pos=smoothed_camera_pos=camera_pos; diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 550b01c2f2..809469c3a3 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1115,7 +1115,7 @@ CanvasItem::CanvasItem() : xform_change(this) { drawing=false; behind=false; block_transform_notify=false; -// viewport=NULL; + //viewport=NULL; canvas_layer=NULL; use_parent_material=false; global_invalid=true; diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index e90bf8b96e..3668963251 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -282,7 +282,7 @@ void CollisionObject2D::set_shape(int p_shape_idx, const Ref<Shape2D>& p_shape) else Physics2DServer::get_singleton()->body_set_shape(get_rid(),p_shape_idx,p_shape->get_rid()); -// _update_shapes(); + //_update_shapes(); } void CollisionObject2D::set_shape_transform(int p_shape_idx, const Transform2D& p_transform) { @@ -295,7 +295,7 @@ void CollisionObject2D::set_shape_transform(int p_shape_idx, const Transform2D& else Physics2DServer::get_singleton()->body_set_shape_transform(get_rid(),p_shape_idx,p_transform); -// _update_shapes(); + //_update_shapes(); } Ref<Shape2D> CollisionObject2D::get_shape(int p_shape_idx) const { diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index 2d0fbf1cfc..03c2c698eb 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -432,7 +432,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect while(!found_route) { if (open_list.size()==0) { - // print_line("NOU OPEN LIST"); + //print_line("NOU OPEN LIST"); break; } //check open list diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index b91b2d4f56..012120d023 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -310,7 +310,7 @@ void NavigationPolygonInstance::set_enabled(bool p_enabled) { if (get_tree()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) update(); -// update_gizmo(); + //update_gizmo(); } bool NavigationPolygonInstance::is_enabled() const { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 46a345f1cb..feecbd9e20 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -375,7 +375,7 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap if (!E) { E = contact_monitor->body_map.insert(objid,BodyState()); -// E->get().rc=0; + //E->get().rc=0; E->get().in_scene=node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid)); @@ -494,7 +494,7 @@ void RigidBody2D::_direct_state_changed(Object *p_state) { int local_shape = state->get_contact_local_shape(i); int shape = state->get_contact_collider_shape(i); -// bool found=false; + //bool found=false; Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj); if (!E) { @@ -1141,8 +1141,10 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) { float d = a.distance_to(b); - //if (d<margin) - /// continue; + /* + if (d<margin) + continue; + */ recover_motion+=(b-a)*0.4; } diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index 99147b0a39..20db63b66f 100644 --- a/scene/2d/screen_button.cpp +++ b/scene/2d/screen_button.cpp @@ -307,8 +307,10 @@ Rect2 TouchScreenButton::get_item_rect() const { if (texture.is_null()) 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()); } diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 01aa99c6a4..bea45aae4e 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -255,8 +255,10 @@ Rect2 Sprite::get_item_rect() const { if (texture.is_null()) 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; @@ -510,8 +512,10 @@ Rect2 ViewportSprite::get_item_rect() const { if (texture.is_null()) 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; diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 26f9f7b879..a7bb53bf63 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -610,7 +610,7 @@ Map<TileMap::PosKey,TileMap::Quadrant>::Element *TileMap::_create_quadrant(const xform.set_origin( q.pos ); -// q.canvas_item = VisualServer::get_singleton()->canvas_item_create(); + //q.canvas_item = VisualServer::get_singleton()->canvas_item_create(); q.body=Physics2DServer::get_singleton()->body_create(use_kinematic?Physics2DServer::BODY_MODE_KINEMATIC:Physics2DServer::BODY_MODE_STATIC); Physics2DServer::get_singleton()->body_attach_object_instance_ID(q.body,get_instance_ID()); Physics2DServer::get_singleton()->body_set_layer_mask(q.body,collision_layer); @@ -849,8 +849,10 @@ void TileMap::_set_tile_data(const PoolVector<int>& p_data) { bool transpose = v&(1<<31); 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); } diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp index 59d8d7ecac..e42439bf3b 100644 --- a/scene/3d/baked_light_instance.cpp +++ b/scene/3d/baked_light_instance.cpp @@ -1524,7 +1524,7 @@ void BakedLight::set_cell_subdiv(int p_subdiv) { cell_subdiv=p_subdiv; -// VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); + //VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); } int BakedLight::get_cell_subdiv() const { @@ -1745,7 +1745,7 @@ void BakedLight::_bind_methods() { BakedLight::BakedLight() { -// baked_light=VisualServer::get_singleton()->baked_light_create(); + //baked_light=VisualServer::get_singleton()->baked_light_create(); VS::get_singleton()->instance_set_base(get_instance(),baked_light); cell_subdiv=8; @@ -1815,7 +1815,7 @@ void BakedLightSampler::_bind_methods() { ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/strength",PROPERTY_HINT_RANGE,"0.01,16,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_STRENGTH); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/attenuation",PROPERTY_HINT_EXP_EASING),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0.01,1.0,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); -// ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); + //ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); ADD_PROPERTY( PropertyInfo(Variant::REAL,"params/resolution",PROPERTY_HINT_RANGE,"4,32,1"),_SCS("set_resolution"),_SCS("get_resolution")); } diff --git a/scene/3d/body_shape.cpp b/scene/3d/body_shape.cpp index ff8b0f15bf..f6ec8639d3 100644 --- a/scene/3d/body_shape.cpp +++ b/scene/3d/body_shape.cpp @@ -96,7 +96,7 @@ void CollisionShape::_update_indicator() { pt = VS::PRIMITIVE_LINES; } else if (shape->cast_to<SphereShape>()) { -// VisualServer *vs=VisualServer::get_singleton(); + //VisualServer *vs=VisualServer::get_singleton(); SphereShape *shapeptr=shape->cast_to<SphereShape>(); @@ -337,7 +337,7 @@ void CollisionShape::_notification(int p_what) { //indicator_instance = VisualServer::get_singleton()->instance_create2(indicator,get_world()->get_scenario()); } break; case NOTIFICATION_TRANSFORM_CHANGED: { - // VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); + //VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); if (can_update_body && updating_body) { _update_body(); } diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 8499542850..3f36caf62c 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -190,9 +190,11 @@ void Camera::_update_camera() { tr.origin+=tr.basis.get_axis(0)*h_offset; VisualServer::get_singleton()->camera_set_transform( camera, tr ); -// here goes listener stuff -// if (viewport_ptr && is_inside_scene() && is_current()) -// get_viewport()->_camera_transform_changed_notify(); + // here goes listener stuff + /* + if (viewport_ptr && is_inside_scene() && is_current()) + get_viewport()->_camera_transform_changed_notify(); + */ if (is_inside_tree() && is_current()) { get_viewport()->_camera_transform_changed_notify(); @@ -400,7 +402,7 @@ Vector3 Camera::project_ray_origin(const Point2& p_pos) const { #endif ERR_FAIL_COND_V( viewport_size.y == 0, Vector3() ); -// float aspect = viewport_size.x / viewport_size.y; + //float aspect = viewport_size.x / viewport_size.y; if (mode == PROJECTION_PERSPECTIVE) { diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 96d8d13a29..7bba382db0 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -339,7 +339,7 @@ CollisionObject::CollisionObject(RID p_rid, bool p_area) { } else { PhysicsServer::get_singleton()->body_attach_object_instance_ID(rid,get_instance_ID()); } -// set_transform_notify(true); + //set_transform_notify(true); } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 13e7c175ed..54d7cb6b9e 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1182,7 +1182,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug){ if (p_create_visual_debug) { - // _create_debug_mesh(&baker); + //_create_debug_mesh(&baker); } diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 40666a60dc..9bb19880bf 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -368,7 +368,7 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3& p_start, const Vector while(!found_route) { if (open_list.size()==0) { - // print_line("NOU OPEN LIST"); + //print_line("NOU OPEN LIST"); break; } //check open list diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 9e37658cd9..72fab4cccc 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -325,7 +325,7 @@ RES Particles::_get_gizmo_geometry() const { mat->set_parameter( FixedSpatialMaterial::PARAM_EMISSION,Color(0.5,0.7,0.8) ); mat->set_blend_mode( Material::BLEND_MODE_ADD ); mat->set_flag(Material::FLAG_DOUBLE_SIDED,true); -// mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); + //mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); surface_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -334,7 +334,7 @@ RES Particles::_get_gizmo_geometry() const { int sides=16; int sections=24; -// float len=1; + //float len=1; float deg=Math::deg2rad(var[VAR_SPREAD]*180); if (deg==180) deg=179.5; diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 9235eae643..0a44ad9c3d 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -437,7 +437,7 @@ void RigidBody::_direct_state_changed(Object *p_state) { int local_shape = state->get_contact_local_shape(i); int shape = state->get_contact_collider_shape(i); -// bool found=false; + //bool found=false; Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj); if (!E) { @@ -1000,7 +1000,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { if (collide_character) mask|=PhysicsDirectSpaceState::TYPE_MASK_CHARACTER_BODY; -// print_line("motion: "+p_motion+" margin: "+rtos(margin)); + //print_line("motion: "+p_motion+" margin: "+rtos(margin)); //print_line("margin: "+rtos(margin)); @@ -1038,10 +1038,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { #if 0 float d = a.distance_to(b); - //if (d<margin) - /// continue; - /// - /// + /* + if (d<margin) + continue; + */ recover_motion+=(b-a)*0.2; #else float dist = a.distance_to(b); @@ -1144,7 +1144,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { colliding=false; } - // print_line("Rest Travel: "+rest.normal); + //print_line("Rest Travel: "+rest.normal); } @@ -1159,8 +1159,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { } Vector3 motion=p_motion*safe; - //if (colliding) - // motion+=normal*0.001; + /* + if (colliding) + motion+=normal*0.001; + */ Transform gt = get_global_transform(); gt.origin+=motion; set_global_transform(gt); diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index 5e576b4960..f2e339604e 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -482,7 +482,7 @@ Transform Skeleton::get_bone_pose(int p_bone) const { void Skeleton::set_bone_custom_pose(int p_bone, const Transform& p_custom_pose) { ERR_FAIL_INDEX( p_bone, bones.size() ); -// ERR_FAIL_COND( !is_inside_scene() ); + //ERR_FAIL_COND( !is_inside_scene() ); bones[p_bone].custom_pose_enable=(p_custom_pose!=Transform()); diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 788ef7f935..63a27f3554 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -95,8 +95,10 @@ void Spatial::_propagate_transform_changed(Spatial *p_origin) { return; } -// if (data.dirty&DIRTY_GLOBAL) -// return; //already dirty + /* + if (data.dirty&DIRTY_GLOBAL) + return; //already dirty + */ data.children_lock++; @@ -179,7 +181,7 @@ void Spatial::_notification(int p_what) { #ifdef TOOLS_ENABLED if (get_tree()->is_editor_hint()) { -// get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); + //get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); get_tree()->call_group_flags(0,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); if (!data.gizmo_disabled) { diff --git a/scene/3d/spatial_stream_player.cpp b/scene/3d/spatial_stream_player.cpp index 087e60b48b..1f9765c1d3 100644 --- a/scene/3d/spatial_stream_player.cpp +++ b/scene/3d/spatial_stream_player.cpp @@ -153,10 +153,12 @@ void SpatialStreamPlayer::play(float p_from_offset) { 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); -// if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) -// set_idle_process(true); + /* + AudioServer::get_singleton()->stream_set_active(stream_rid,true); + AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); + 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) { 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 { diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index a2a96d7d0e..9f0c91c4b8 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -563,8 +563,10 @@ Rect2 Sprite3D::get_item_rect() const { if (texture.is_null()) 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; @@ -1130,7 +1132,7 @@ void AnimatedSprite3D::_notification(int p_what) { //texture->draw_rect(ci,dst_rect,false,modulate); texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size()),modulate); -// VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); + //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; #endif diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index f5d3957370..a14ce40495 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -185,7 +185,7 @@ public: virtual Rect2 get_item_rect() const; Sprite3D(); -// ~Sprite3D(); + //~Sprite3D(); }; #if 0 @@ -215,7 +215,7 @@ public: virtual Rect2 get_item_rect() const; AnimatedSprite3D(); -// ~AnimatedSprite3D(); + //~AnimatedSprite3D(); }; #endif diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 1cb443225c..a3f05f719d 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -340,10 +340,11 @@ void VehicleBody::_update_wheel_transform(VehicleWheel& wheel ,PhysicsDirectBody wheel.m_raycastInfo.m_isInContact = false; Transform chassisTrans = s->get_transform(); - //if (interpolatedTransform && (getRigidBody()->getMotionState())) - //{ - // getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); - //} + /* + if (interpolatedTransform && (getRigidBody()->getMotionState())) { + getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); + } + */ wheel.m_raycastInfo.m_hardPointWS = chassisTrans.xform( wheel.m_chassisConnectionPointCS ); //wheel.m_raycastInfo.m_hardPointWS+=s->get_linear_velocity()*s->get_step(); @@ -360,8 +361,8 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) { const Vector3& right = wheel.m_raycastInfo.m_wheelAxleWS; Vector3 fwd = up.cross(right); fwd = fwd.normalized(); -// up = right.cross(fwd); -// up.normalize(); + //up = right.cross(fwd); + //up.normalize(); //rotate around steering over de wheelAxleWS real_t steering = wheel.steers?m_steeringValue:0.0; @@ -371,8 +372,10 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) { Basis rotatingMat(right,-wheel.m_rotation); -// if (p_idx==1) -// print_line("steeringMat " +steeringMat); + /* + if (p_idx==1) + print_line("steeringMat " +steeringMat); + */ Basis basis2( right[0],up[0],fwd[0], @@ -502,7 +505,7 @@ void VehicleBody::_update_suspension(PhysicsDirectBodyState *s) if ( wheel_info.m_raycastInfo.m_isInContact ) { real_t force; - // Spring + //Spring { real_t susp_length = wheel_info.m_suspensionRestLength; real_t current_length = wheel_info.m_raycastInfo.m_suspensionLength; diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h index cd627f8998..273e63d741 100644 --- a/scene/3d/vehicle_body.h +++ b/scene/3d/vehicle_body.h @@ -63,7 +63,7 @@ friend class VehicleBody; VehicleBody *body; -// btVector3 m_wheelAxleCS; // const or modified by steering ? + //btVector3 m_wheelAxleCS; // const or modified by steering ? real_t m_steering; real_t m_rotation; diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index ca78f8e21f..ec37aa2bc4 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -102,7 +102,7 @@ void VisualInstance::_notification(int p_what) { VisualServer::get_singleton()->instance_set_scenario( instance, RID() ); VisualServer::get_singleton()->instance_set_room(instance,RID()); VisualServer::get_singleton()->instance_attach_skeleton( instance, RID() ); - // VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); + //VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); } break; case NOTIFICATION_VISIBILITY_CHANGED: { @@ -368,7 +368,7 @@ void GeometryInstance::_bind_methods() { ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_distance"), _SCS("get_lod_max_distance")); ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_hysteresis"), _SCS("get_lod_max_hysteresis")); -// ADD_SIGNAL( MethodInfo("visibility_changed")); + //ADD_SIGNAL( MethodInfo("visibility_changed")); BIND_CONSTANT(FLAG_CAST_SHADOW ); BIND_CONSTANT(FLAG_BILLBOARD ); @@ -399,7 +399,7 @@ GeometryInstance::GeometryInstance() { shadow_casting_setting=SHADOW_CASTING_SETTING_ON; extra_cull_margin=0; -// VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); + //VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); } diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 7fc2234d86..8b81c45597 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -426,8 +426,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData* p_anim,float p Variant value=a->value_track_interpolate(i,p_time); //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) { ERR_CONTINUE( cache_update_prop_size >= NODE_CACHE_UPDATE_MAX ); cache_update_prop[cache_update_prop_size++]=pa; @@ -713,7 +715,7 @@ void AnimationPlayer::_animation_process(float p_delta) { -// bool any_active=false; + //bool any_active=false; if (playback.current.from) { diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index dbcdb284be..26c82fe1ae 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -506,10 +506,10 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode float rem = 0; if (!an->animation.is_null()) { - // float pos = an->time; -// float delta = p_time; + //float pos = an->time; + //float delta = p_time; - // const Animation *a = an->animation.operator->(); + //const Animation *a = an->animation.operator->(); if (p_seek) { an->time=p_time; @@ -1502,11 +1502,11 @@ Error AnimationTreePlayer::connect(const StringName& p_src_node,const StringName ERR_FAIL_COND_V( !node_map.has(p_dst_node) , ERR_INVALID_PARAMETER); ERR_FAIL_COND_V( p_src_node==p_dst_node , ERR_INVALID_PARAMETER); -// NodeBase *src = node_map[p_src_node]; + //NodeBase *src = node_map[p_src_node]; NodeBase *dst = node_map[p_dst_node]; ERR_FAIL_INDEX_V( p_dst_input, dst->inputs.size(), ERR_INVALID_PARAMETER); -// int oldval = dst->inputs[p_dst_input].node; + //int oldval = dst->inputs[p_dst_input].node; for(Map<StringName,NodeBase*>::Element *E=node_map.front();E;E=E->next()) { diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp index 2f53dc239f..9e506034a6 100644 --- a/scene/audio/stream_player.cpp +++ b/scene/audio/stream_player.cpp @@ -167,8 +167,10 @@ void StreamPlayer::play(float p_from_offset) { sp_update(); AudioServer::get_singleton()->stream_set_active(stream_rid,true); 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) { 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 { diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 8949a080c1..0b40983ddf 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -108,7 +108,7 @@ void BaseButton::_gui_input(InputEvent p_event) { emit_signal("button_up"); /* this is pointless if (status.press_attempt && status.pressing_inside) { -// released(); + //released(); emit_signal("released"); } */ diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index 600b6141c5..7ca44ac27b 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -296,7 +296,7 @@ BoxContainer::BoxContainer(bool p_vertical) { vertical=p_vertical; align = ALIGN_BEGIN; -// set_ignore_mouse(true); + //set_ignore_mouse(true); set_mouse_filter(MOUSE_FILTER_PASS); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 2e6dd48442..533d24f998 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -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; - // notification(NOTIFICATION_THEME_CHANGED); - //} + /* + if (data.theme.is_null() && data.parent && data.parent->data.theme_owner) { + data.theme_owner=data.parent->data.theme_owner; + notification(NOTIFICATION_THEME_CHANGED); + } + */ } break; case NOTIFICATION_EXIT_CANVAS: { @@ -503,10 +505,12 @@ void Control::_notification(int p_notification) { data.parent=NULL; data.parent_canvas_item=NULL; - //if (data.theme_owner && data.theme.is_null()) { - // data.theme_owner=NULL; - //notification(NOTIFICATION_THEME_CHANGED); - //} + /* + if (data.theme_owner && data.theme.is_null()) { + data.theme_owner=NULL; + notification(NOTIFICATION_THEME_CHANGED); + } + */ } break; case NOTIFICATION_MOVED_IN_PARENT: { @@ -2444,7 +2448,7 @@ bool Control::is_clipping_contents() { void Control::_bind_methods() { -// ClassDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event); + //ClassDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event); ClassDB::bind_method(_MD("_size_changed"),&Control::_size_changed); ClassDB::bind_method(_MD("_update_minimum_size"),&Control::_update_minimum_size); diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index c7beeea7a3..6650c5eb5d 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -94,7 +94,7 @@ class AcceptDialog : public WindowDialog { HBoxContainer *hbc; Label *label; Button *ok; -// Button *cancel; no more cancel (there is X on tht titlebar) + //Button *cancel; no more cancel (there is X on tht titlebar) bool hide_on_ok; diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 2a73e32864..ba1ab1afa8 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -295,7 +295,7 @@ void GraphEdit::_notification(int p_what) { zoom_reset->set_icon(get_icon("reset")); zoom_plus->set_icon(get_icon("more")); snap_button->set_icon(get_icon("snap")); -// zoom_icon->set_texture( get_icon("Zoom", "EditorIcons")); + //zoom_icon->set_texture( get_icon("Zoom", "EditorIcons")); } if (p_what==NOTIFICATION_DRAW) { diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index 7c67d443af..597169ca83 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -70,7 +70,7 @@ void GridContainer::_notification(int p_what) { else row_minh[row]=ms.height; - // print_line("store row "+itos(row)+" mw "+itos(ms.height)); + //print_line("store row "+itos(row)+" mw "+itos(ms.height)); if (c->get_h_size_flags()&SIZE_EXPAND) col_expanded.insert(col); @@ -136,7 +136,7 @@ void GridContainer::_notification(int p_what) { Point2 p(col_ofs,row_ofs); -// print_line("col: "+itos(col)+" row: "+itos(row)+" col_ofs: "+itos(col_ofs)+" row_ofs: "+itos(row_ofs)); + //print_line("col: "+itos(col)+" row: "+itos(row)+" col_ofs: "+itos(col_ofs)+" row_ofs: "+itos(row_ofs)); fit_child_in_rect(c,Rect2(p,s)); //print_line("col: "+itos(col)+" row: "+itos(row)+" rect: "+Rect2(p,s)); diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 89a937a301..3a72e0e445 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -96,8 +96,6 @@ void LineEdit::_gui_input(InputEvent p_event) { } } - // if (!editable) - // non_editable_clicked_signal.call(); update(); } else { @@ -873,7 +871,7 @@ void LineEdit::delete_char() { if (cursor_pos==window_pos) { - // set_window_pos(cursor_pos-get_window_length()); + //set_window_pos(cursor_pos-get_window_length()); } _text_changed(); diff --git a/scene/gui/patch_9_rect.cpp b/scene/gui/patch_9_rect.cpp index 698d4aaf29..4e1856778e 100644 --- a/scene/gui/patch_9_rect.cpp +++ b/scene/gui/patch_9_rect.cpp @@ -40,7 +40,7 @@ void NinePatchRect::_notification(int p_what) { Size2 s=get_size(); RID ci = get_canvas_item(); VS::get_singleton()->canvas_item_add_nine_patch(ci,Rect2(Point2(),s),region_rect,texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),VS::NINE_PATCH_STRETCH,VS::NINE_PATCH_STRETCH,draw_center); -// draw_texture_rect(texture,Rect2(Point2(),s),false,modulate); + //draw_texture_rect(texture,Rect2(Point2(),s),false,modulate); /* Vector<Point2> points; @@ -98,8 +98,10 @@ void NinePatchRect::set_texture(const Ref<Texture>& p_tex) { return; texture=p_tex; 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(); emit_signal("texture_changed"); } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index c5ac6778a9..65e7c3ab39 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -136,7 +136,7 @@ int PopupMenu::_get_mouse_over(const Point2& p_over) const { Ref<Font> font = get_font("font"); int vseparation = get_constant("vseparation"); -// int hseparation = get_constant("hseparation"); + //int hseparation = get_constant("hseparation"); float font_h=font->get_height(); diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index da267b9f27..fc406ff0f5 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -51,9 +51,11 @@ void ScrollBar::_gui_input(InputEvent p_event) { if (b.button_index==5 && b.pressed) { - //if (orientation==VERTICAL) - // set_val( get_val() + get_page() / 4.0 ); - //else + /* + if (orientation==VERTICAL) + set_val( get_val() + get_page() / 4.0 ); + else + */ set_value( get_value() + get_page() / 4.0 ); accept_event(); @@ -61,9 +63,11 @@ void ScrollBar::_gui_input(InputEvent p_event) { if (b.button_index==4 && b.pressed) { - //if (orientation==HORIZONTAL) - // set_val( get_val() - get_page() / 4.0 ); - //else + /* + if (orientation==HORIZONTAL) + set_val( get_val() - get_page() / 4.0 ); + else + */ set_value( get_value() - get_page() / 4.0 ); accept_event(); } @@ -425,8 +429,10 @@ double ScrollBar::get_grabber_size() const { return 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 grabber_size = page / range * area_size; @@ -620,12 +626,16 @@ void ScrollBar::_drag_slave_input(const InputEvent& p_input) { if (orientation==HORIZONTAL) set_value(diff.x); - //else - // drag_slave_accum.x=0; + /* + else + drag_slave_accum.x=0; + */ if (orientation==VERTICAL) set_value(diff.y); - //else - // drag_slave_accum.y=0; + /* + else + drag_slave_accum.y=0; + */ time_since_motion=0; } diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index a7cc38846d..ad6e8786d7 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -164,8 +164,10 @@ void Slider::_notification(int p_what) { if (orientation==VERTICAL) { 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; if (ticks>1) { 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)); } else { 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; if (ticks>1) { diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 070f9fc72e..ec6be0d19d 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -49,8 +49,10 @@ void SpinBox::_value_changed(double) { void SpinBox::_text_entered(const String& p_string) { - //if (!p_string.is_numeric()) - // return; + /* + if (!p_string.is_numeric()) + return; + */ String value = p_string; if (prefix!="" && p_string.begins_with(prefix)) value = p_string.substr(prefix.length(), p_string.length()-prefix.length()); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 46939765b0..8efff21fc9 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4357,7 +4357,7 @@ void TextEdit::_update_completion_candidates() { if (completion_options.size()==1) { //one option to complete, just complete it automagically _confirm_completion(); - // insert_text_at_cursor(completion_options[0].substr(s.length(),completion_options[0].length()-s.length())); + //insert_text_at_cursor(completion_options[0].substr(s.length(),completion_options[0].length()-s.length())); _cancel_completion(); return; @@ -4732,8 +4732,8 @@ TextEdit::TextEdit() { tab_size=4; text.set_tab_size(tab_size); text.clear(); - // text.insert(1,"Mongolia.."); - // text.insert(2,"PAIS GENEROSO!!"); + //text.insert(1,"Mongolia.."); + //text.insert(2,"PAIS GENEROSO!!"); text.set_color_regions(&color_regions); h_scroll = memnew( HScrollBar ); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index c7467f9b13..6113fd72c2 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -294,7 +294,7 @@ class TextEdit : public Control { void _scroll_lines_up(); void _scroll_lines_down(); -// void mouse_motion(const Point& p_pos, const Point& p_rel, int p_button_mask); + //void mouse_motion(const Point& p_pos, const Point& p_rel, int p_button_mask); Size2 get_minimum_size() const; int get_row_height() const; diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp index 68755c0ac2..cbb077ef5d 100644 --- a/scene/gui/texture_rect.cpp +++ b/scene/gui/texture_rect.cpp @@ -121,8 +121,10 @@ void TextureRect::set_texture(const Ref<Texture>& p_tex) { texture=p_tex; 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(); } diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index b50ecc58ef..58c829690f 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -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; @@ -1029,7 +1031,7 @@ int Tree::draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& } //draw separation. -// if (p_item->get_parent()!=root || !hide_root) + //if (p_item->get_parent()!=root || !hide_root) Ref<Font> font = cache.font; @@ -1262,7 +1264,7 @@ int Tree::draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& } break; case TreeItem::CELL_MODE_CUSTOM: { - // int option = (int)p_item->cells[i].val; + //int option = (int)p_item->cells[i].val; @@ -1414,8 +1416,10 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c emit_signal("item_selected"); 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) { @@ -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(); } @@ -1997,7 +2003,7 @@ void Tree::_gui_input(InputEvent p_event) { } break; case KEY_LEFT: { -// TreeItem *next = NULL; + //TreeItem *next = NULL; if (!selected_item) break; if (select_mode==SELECT_ROW) @@ -2027,7 +2033,7 @@ void Tree::_gui_input(InputEvent p_event) { next=selected_item->get_next_visible(); -// if (diff < uint64_t(GLOBAL_DEF("gui/incr_search_max_interval_msec",2000))) { + //if (diff < uint64_t(GLOBAL_DEF("gui/incr_search_max_interval_msec",2000))) { if (last_keypress!=0) { //incr search next int col; @@ -2470,7 +2476,7 @@ void Tree::_gui_input(InputEvent p_event) { if (!click_handled) { drag_speed=0; drag_accum=0; -// last_drag_accum=0; + //last_drag_accum=0; drag_from=v_scroll->get_value(); drag_touching=OS::get_singleton()->has_touchscreen_ui_hint(); drag_touching_deaccel=false; @@ -2787,13 +2793,10 @@ void Tree::_notification(int p_what) { } 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++) { 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) { @@ -3016,8 +3019,10 @@ int Tree::get_edited_column() const { TreeItem* Tree::get_next_selected( TreeItem* p_item) { - //if (!p_item) - // return NULL; + /* + if (!p_item) + return NULL; + */ if (!root) return NULL; diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 8327e356b3..d715ff4772 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -334,7 +334,7 @@ friend class TreeItem; int compute_item_height(TreeItem *p_item) const; int get_item_height(TreeItem *p_item) const; -// void draw_item_text(String p_text,const Ref<Texture>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color); + //void draw_item_text(String p_text,const Ref<Texture>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color); void draw_item_rect(const TreeItem::Cell& p_cell,const Rect2i& p_rect,const Color& p_color); int draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& p_draw_size,TreeItem *p_item); void select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col,TreeItem *p_prev=NULL,bool *r_in_range=NULL,bool p_force_deselect=false); diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index f7d2ad1c63..4c177ea53c 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -394,7 +394,7 @@ void VideoPlayer::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::INT, "audio_track",PROPERTY_HINT_RANGE,"0,128,1"), _SCS("set_audio_track"), _SCS("get_audio_track") ); ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE,"VideoStream"), _SCS("set_stream"), _SCS("get_stream") ); -// ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") ); + //ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") ); ADD_PROPERTY( PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL, "autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL, "paused"), _SCS("set_paused"), _SCS("is_paused") ); diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 2e2e1d6c80..43092c3d64 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -285,7 +285,7 @@ void CanvasLayer::_bind_methods() { ClassDB::bind_method(_MD("get_custom_viewport:Viewport"),&CanvasLayer::get_custom_viewport); ClassDB::bind_method(_MD("get_world_2d:World2D"),&CanvasLayer::get_world_2d); -// ClassDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport); + //ClassDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport); ADD_PROPERTY( PropertyInfo(Variant::INT,"layer",PROPERTY_HINT_RANGE,"-128,128,1"),_SCS("set_layer"),_SCS("get_layer") ); //ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"transform",PROPERTY_HINT_RANGE),_SCS("set_transform"),_SCS("get_transform") ); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index ebf61994ed..86b78f60f6 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2734,7 +2734,7 @@ void Node::_set_tree(SceneTree *p_tree) { SceneTree *tree_changed_a=NULL; SceneTree *tree_changed_b=NULL; -// ERR_FAIL_COND(p_scene && data.parent && !data.parent->data.scene); //nobug if both are null + //ERR_FAIL_COND(p_scene && data.parent && !data.parent->data.scene); //nobug if both are null if (data.tree) { _propagate_exit_tree(); @@ -3062,8 +3062,8 @@ void Node::_bind_methods() { ADD_SIGNAL( MethodInfo("tree_entered") ); ADD_SIGNAL( MethodInfo("tree_exited") ); -// ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),_SCS("set_process"),_SCS("is_processing") ); -// ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), _SCS("set_fixed_process"),_SCS("is_fixed_processing") ); + //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),_SCS("set_process"),_SCS("is_processing") ); + //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), _SCS("set_fixed_process"),_SCS("is_fixed_processing") ); //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/input" ), _SCS("set_process_input"),_SCS("is_processing_input" ) ); //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/unhandled_input" ), _SCS("set_process_unhandled_input"),_SCS("is_processing_unhandled_input" ) ); ADD_GROUP("Pause","pause_"); diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index bc5f99b2f2..147409a862 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -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); - /*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("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 #else @@ -557,9 +558,9 @@ bool SceneTree::iteration(float p_time) { bool SceneTree::idle(float p_time){ -// print_line("ram: "+itos(OS::get_singleton()->get_static_memory_usage())+" sram: "+itos(OS::get_singleton()->get_dynamic_memory_usage())); -// print_line("node count: "+itos(get_node_count())); -// print_line("TEXTURE RAM: "+itos(VS::get_singleton()->get_render_info(VS::INFO_TEXTURE_MEM_USED))); + //print_line("ram: "+itos(OS::get_singleton()->get_static_memory_usage())+" sram: "+itos(OS::get_singleton()->get_dynamic_memory_usage())); + //print_line("node count: "+itos(get_node_count())); + //print_line("TEXTURE RAM: "+itos(VS::get_singleton()->get_render_info(VS::INFO_TEXTURE_MEM_USED))); root_lock++; @@ -1237,8 +1238,8 @@ void SceneTree::_update_root_rect() { VisualServer::get_singleton()->black_bars_set_margins(0,0,0,0); } -// print_line("VP SIZE: "+viewport_size+" OFFSET: "+offset+" = "+(offset*2+viewport_size)); -// print_line("SS: "+video_mode); + //print_line("VP SIZE: "+viewport_size+" OFFSET: "+offset+" = "+(offset*2+viewport_size)); + //print_line("SS: "+video_mode); switch (stretch_mode) { case STRETCH_MODE_2D: { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 319f1c9467..ddda90c3fa 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -293,12 +293,12 @@ void Viewport::_vp_enter_tree() { VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,parent_ci); VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,false); -// VisualServer::get_singleton()->canvas_item_attach_viewport(canvas_item,viewport); + //VisualServer::get_singleton()->canvas_item_attach_viewport(canvas_item,viewport); parent_control->connect("resized",this,"_parent_resized"); parent_control->connect("visibility_changed",this,"_parent_visibility_changed"); } else if (!parent){ -// VisualServer::get_singleton()->viewport_attach_to_screen(viewport,0); + //VisualServer::get_singleton()->viewport_attach_to_screen(viewport,0); } */ @@ -462,8 +462,10 @@ void Viewport::_notification(int p_what) { if (world_2d.is_valid()) 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()); SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID()); @@ -1309,7 +1311,7 @@ void Viewport::queue_screen_capture(){ } Image Viewport::get_screen_capture() const { -// return VS::get_singleton()->viewport_get_screen_capture(viewport); + //return VS::get_singleton()->viewport_get_screen_capture(viewport); return Image(); } @@ -1379,7 +1381,7 @@ Viewport::ShadowAtlasQuadrantSubdiv Viewport::get_shadow_atlas_quadrant_subdiv(i void Viewport::clear() { //clear=true; -// VisualServer::get_singleton()->viewport_clear(viewport); + //VisualServer::get_singleton()->viewport_clear(viewport); } @@ -1399,9 +1401,11 @@ Transform2D Viewport::_get_input_pre_xform() 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(); } @@ -1521,8 +1525,10 @@ void Viewport::_vp_unhandled_input(const InputEvent& p_ev) { } #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()) return; //if render target, can't get input events @@ -1647,7 +1653,7 @@ void Viewport::_gui_show_tooltip() { void Viewport::_gui_call_input(Control *p_control,const InputEvent& p_input) { -// _block(); + //_block(); InputEvent ev = p_input; @@ -1745,7 +1751,7 @@ Control* Viewport::_gui_find_control_at_pos(CanvasItem* p_node,const Point2& p_g Control *c=p_node->cast_to<Control>(); if (c) { - // print_line("at "+String(c->get_path())+" POS "+c->get_pos()+" bt "+p_xform); + //print_line("at "+String(c->get_path())+" POS "+c->get_pos()+" bt "+p_xform); } //subwindows first!! @@ -1798,9 +1804,11 @@ void Viewport::_gui_input_event(InputEvent p_event) { return; } //? -// if (!is_visible()) { -// return; //simple and plain -// } + /* + if (!is_visible()) { + return; //simple and plain + } + */ switch(p_event.type) { @@ -1849,10 +1857,10 @@ void Viewport::_gui_input_event(InputEvent p_event) { //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); //print_line("has mf "+itos(gui.mouse_focus!=NULL)); @@ -2788,7 +2796,7 @@ void Viewport::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::RECT2,"size"), _SCS("set_size"), _SCS("get_size") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"own_world"), _SCS("set_use_own_world"), _SCS("is_using_own_world") ); ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world",PROPERTY_HINT_RESOURCE_TYPE,"World"), _SCS("set_world"), _SCS("get_world") ); -// ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world_2d",PROPERTY_HINT_RESOURCE_TYPE,"World2D"), _SCS("set_world_2d"), _SCS("get_world_2d") ); + //ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world_2d",PROPERTY_HINT_RESOURCE_TYPE,"World2D"), _SCS("set_world_2d"), _SCS("get_world_2d") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"transparent_bg"), _SCS("set_transparent_background"), _SCS("has_transparent_background") ); ADD_GROUP("Rendering",""); ADD_PROPERTY( PropertyInfo(Variant::INT,"msaa",PROPERTY_HINT_ENUM,"Disabled,2x,4x,8x,16x"), _SCS("set_msaa"), _SCS("get_msaa") ); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 3e5af50b36..f68e5ca959 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -319,7 +319,7 @@ void register_scene_types() { ClassDB::register_class<ShortCut>(); ClassDB::register_class<Control>(); -// ClassDB::register_type<EmptyControl>(); + //ClassDB::register_type<EmptyControl>(); ClassDB::register_class<Button>(); ClassDB::register_class<Label>(); ClassDB::register_class<HScrollBar>(); @@ -494,7 +494,7 @@ void register_scene_types() { ClassDB::register_class<Particles2D>(); ClassDB::register_class<ParticleAttractor2D>(); ClassDB::register_class<Sprite>(); -// ClassDB::register_type<ViewportSprite>(); + //ClassDB::register_type<ViewportSprite>(); ClassDB::register_class<SpriteFrames>(); ClassDB::register_class<AnimatedSprite>(); ClassDB::register_class<Position2D>(); @@ -537,9 +537,9 @@ void register_scene_types() { /* REGISTER RESOURCES */ ClassDB::register_virtual_class<Shader>(); -// ClassDB::register_virtual_type<ShaderGraph>(); + //ClassDB::register_virtual_type<ShaderGraph>(); ClassDB::register_class<CanvasItemShader>(); -// ClassDB::register_type<CanvasItemShaderGraph>(); + //ClassDB::register_type<CanvasItemShaderGraph>(); #ifndef _3D_DISABLED ClassDB::register_class<Mesh>(); @@ -547,9 +547,9 @@ void register_scene_types() { ClassDB::register_class<FixedSpatialMaterial>(); SceneTree::add_idle_callback(FixedSpatialMaterial::flush_changes); FixedSpatialMaterial::init_shaders(); -// ClassDB::register_type<ShaderMaterial>(); + //ClassDB::register_type<ShaderMaterial>(); ClassDB::register_class<RoomBounds>(); -// ClassDB::register_type<MaterialShaderGraph>(); + //ClassDB::register_type<MaterialShaderGraph>(); ClassDB::register_class<SpatialShader>(); ClassDB::register_class<ParticlesShader>(); ClassDB::register_class<MultiMesh>(); @@ -605,7 +605,7 @@ void register_scene_types() { ClassDB::register_virtual_class<AudioStream>(); ClassDB::register_virtual_class<AudioStreamPlayback>(); //TODO: Adapt to the new AudioStream API or drop (GH-3307) -// ClassDB::register_type<AudioStreamGibberish>(); + //ClassDB::register_type<AudioStreamGibberish>(); ClassDB::register_virtual_class<VideoStream>(); OS::get_singleton()->yield(); //may take time to init diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 1fbb149bf3..5b9baa6a67 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2005,11 +2005,6 @@ void Animation::_transform_track_optimize(int p_idx,float p_alowed_linear_err,fl prev_erased=false; norm=Vector3(); } - - - - // print_line(itos(i)+" could be eliminated: "+rtos(tr)); - //} } diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index da8fbafde3..50c6a6c725 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -125,7 +125,7 @@ static Ref<Texture> make_icon(T p_src) { static Ref<Shader> make_shader(const char*vertex_code,const char*fragment_code,const char*lighting_code) { Ref<Shader> shader = (memnew( Shader(Shader::MODE_CANVAS_ITEM) )); -// shader->set_code(vertex_code, fragment_code, lighting_code); + //shader->set_code(vertex_code, fragment_code, lighting_code); return shader; } diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index bb1552e2d6..63a7829d26 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -511,7 +511,7 @@ void DynamicFontAtSize::_update_char(CharType p_char) { break; } -// print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); + //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); if (tex_index==-1) { //could not find texture to fit, create one diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp index a25667d85a..cbbca49f0f 100644 --- a/scene/resources/dynamic_font_stb.cpp +++ b/scene/resources/dynamic_font_stb.cpp @@ -260,7 +260,7 @@ void DynamicFontAtSize::_update_char(CharType p_char) { break; } -// print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); + //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); if (tex_index==-1) { //could not find texture to fit, create one diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 3373478336..b1d0611f48 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -252,8 +252,10 @@ Error BitmapFont::create_from_fnt(const String& p_string) { if (keys.has("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") { diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 625cc6a596..5cefca348b 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -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()); -// 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) 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; for (List<PackState>::Element *F=pack_state_stack.front();F;F=F->next()) { @@ -1166,7 +1170,7 @@ void SceneState::set_bundled_scene(const Dictionary& d) { ERR_FAIL_COND( !d.has("nodes")); ERR_FAIL_COND( !d.has("conn_count")); ERR_FAIL_COND( !d.has("conns")); -// ERR_FAIL_COND( !d.has("path")); + //ERR_FAIL_COND( !d.has("path")); int version=1; if (d.has("version")) @@ -1277,7 +1281,7 @@ void SceneState::set_bundled_scene(const Dictionary& d) { editable_instances[i]=ei[i]; } -// path=d["path"]; + //path=d["path"]; } @@ -1362,7 +1366,7 @@ Dictionary SceneState::get_bundled_scene() const { d["version"]=PACK_VERSION; -// d["path"]=path; + //d["path"]=path; return d; diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp index 448e18ce39..a913687e7f 100644 --- a/scene/resources/scene_format_text.cpp +++ b/scene/resources/scene_format_text.cpp @@ -397,7 +397,7 @@ Error ResourceInteractiveLoaderText::poll() { int type=-1; int name=-1; int instance=-1; -// int base_scene=-1; + //int base_scene=-1; if (next_tag.fields.has("name")) { name=packed_scene->get_state()->add_name(next_tag.fields["name"]); @@ -950,7 +950,7 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); ria->open(f); return ria; @@ -1001,7 +1001,7 @@ String ResourceFormatLoaderText::get_resource_type(const String &p_path) const{ Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); String r = ria->recognize(f); return r; } @@ -1018,7 +1018,7 @@ void ResourceFormatLoaderText::get_dependencies(const String& p_path,List<String Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); ria->get_dependencies(f,p_dependencies,p_add_types); @@ -1035,7 +1035,7 @@ Error ResourceFormatLoaderText::rename_dependencies(const String &p_path,const M Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); return ria->rename_dependencies(f,p_path,p_map); } @@ -1208,10 +1208,12 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re if (packed_scene.is_null()) title+="type=\""+p_resource->get_class()+"\" "; 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 + */ if (load_steps>1) { title+="load_steps="+itos(load_steps)+" "; @@ -1299,7 +1301,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re List<PropertyInfo> property_list; res->get_property_list(&property_list); -// property_list.sort(); + //property_list.sort(); for(List<PropertyInfo>::Element *PE = property_list.front();PE;PE=PE->next()) { diff --git a/scene/resources/scene_format_text.h b/scene/resources/scene_format_text.h index 58660fa639..ce18f6a702 100644 --- a/scene/resources/scene_format_text.h +++ b/scene/resources/scene_format_text.h @@ -58,7 +58,7 @@ class ResourceInteractiveLoaderText : public ResourceInteractiveLoader { bool ignore_resource_parsing; -// Map<String,String> remaps; + //Map<String,String> remaps; Map<int,ExtResource> ext_resources; diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp index 37b019e369..10f852f17c 100644 --- a/scene/resources/shader_graph.cpp +++ b/scene/resources/shader_graph.cpp @@ -192,7 +192,7 @@ void ShaderGraph::_bind_methods() { ClassDB::bind_method(_MD("xform_const_node_get_value","shader_type","id"),&ShaderGraph::xform_const_node_get_value); -// void get_node_list(ShaderType p_which,List<int> *p_node_list) const; + //void get_node_list(ShaderType p_which,List<int> *p_node_list) const; ClassDB::bind_method(_MD("texture_node_set_filter_size","shader_type","id","filter_size"),&ShaderGraph::texture_node_set_filter_size); ClassDB::bind_method(_MD("texture_node_get_filter_size","shader_type","id"),&ShaderGraph::texture_node_get_filter_size); diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 066062f302..e5e32ba4e9 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -75,8 +75,8 @@ void StyleBox::_bind_methods() { ClassDB::bind_method(_MD("set_default_margin","margin","offset"),&StyleBox::set_default_margin); ClassDB::bind_method(_MD("get_default_margin","margin"),&StyleBox::get_default_margin); -// ClassDB::bind_method(_MD("set_default_margin"),&StyleBox::set_default_margin); -// ClassDB::bind_method(_MD("get_default_margin"),&StyleBox::get_default_margin); + //ClassDB::bind_method(_MD("set_default_margin"),&StyleBox::set_default_margin); + //ClassDB::bind_method(_MD("get_default_margin"),&StyleBox::get_default_margin); ClassDB::bind_method(_MD("get_margin","margin"),&StyleBox::get_margin); ClassDB::bind_method(_MD("get_minimum_size"),&StyleBox::get_minimum_size); diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index cc13c0ff11..27cc7e131b 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -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()) { 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); } if (index_array.size()%3) diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 0ddc907aa0..d950407f54 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -267,7 +267,7 @@ void Theme::set_default_font( const Ref<Font>& p_font ) { void Theme::set_icon(const StringName& p_name,const StringName& p_type,const Ref<Texture>& p_icon) { -// ERR_FAIL_COND(p_icon.is_null()); + //ERR_FAIL_COND(p_icon.is_null()); bool new_value=!icon_map.has(p_type) || !icon_map[p_type].has(p_name); @@ -367,7 +367,7 @@ void Theme::get_shader_list(const StringName &p_type, List<StringName> *p_list) void Theme::set_stylebox(const StringName& p_name,const StringName& p_type,const Ref<StyleBox>& p_style) { -// ERR_FAIL_COND(p_style.is_null()); + //ERR_FAIL_COND(p_style.is_null()); bool new_value=!style_map.has(p_type) || !style_map[p_type].has(p_name); @@ -430,7 +430,7 @@ void Theme::get_stylebox_types(List<StringName> *p_list) const { void Theme::set_font(const StringName& p_name,const StringName& p_type,const Ref<Font>& p_font) { -// ERR_FAIL_COND(p_font.is_null()); + //ERR_FAIL_COND(p_font.is_null()); bool new_value=!font_map.has(p_type) || !font_map[p_type].has(p_name); @@ -999,7 +999,7 @@ RES ResourceFormatLoaderTheme::load(const String &p_path, const String& p_origin ERR_FAIL_V(RES()); } -// int margin = params[i+ccodes+1].to_int(); + //int margin = params[i+ccodes+1].to_int(); //sbflat->set_margin_size(Margin(i),margin); } } else if (params.size()!=ccodes+1) { diff --git a/servers/audio/audio_mixer_sw.cpp b/servers/audio/audio_mixer_sw.cpp index faed6905ea..0123b66430 100644 --- a/servers/audio/audio_mixer_sw.cpp +++ b/servers/audio/audio_mixer_sw.cpp @@ -271,7 +271,7 @@ void AudioMixerSW::mix_channel(Channel& c) { bool is_stereo=sample_manager->sample_is_stereo(c.sample); int32_t todo=mix_chunk_size; -// int mixed=0; + //int mixed=0; bool use_filter=false; ResamplerState rstate; diff --git a/servers/audio/reverb_sw.cpp b/servers/audio/reverb_sw.cpp index 0050dbedeb..5e02f37679 100644 --- a/servers/audio/reverb_sw.cpp +++ b/servers/audio/reverb_sw.cpp @@ -100,145 +100,145 @@ struct ReverbParamsSW { static ReverbParamsSW reverb_params_Room = { 0x26C0/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x6D80, 0x54B8, -0x4130, 0x0000, 0x0000, -0x4580, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x5800, 0x5300, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x01B4 - 0x007D, 0x0136 - 0x007D, 0x00B8 - 0x005B, 0x005C - 0x005B, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x04D6, 0x0333, 0x03F0, 0x0227, 0x0374, 0x01EF, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x0334, 0x01B5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x0000, 0x0000, 0x01B4, 0x0136, 0x00B8, 0x005C }; static ReverbParamsSW reverb_params_StudioSmall = { 0x1F40/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x70F0, 0x4FA8, -0x4320, 0x4410, -0x3F10, -0x6400, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x5280, 0x4EC0, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x00B4 - 0x0033, 0x0080 - 0x0033, 0x004C - 0x0025, 0x0026 - 0x0025, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x03E4, 0x031B, 0x03A4, 0x02AF, 0x0372, 0x0266, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x031C, 0x025D, 0x025C, 0x018E, 0x022F, 0x0135, 0x01D2, 0x00B7, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x018F, 0x00B5, 0x00B4, 0x0080, 0x004C, 0x0026 }; static ReverbParamsSW reverb_params_StudioMedium = { 0x4840/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x70F0, 0x4FA8, -0x4320, 0x4510, -0x4110, -0x4B40, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x5280, 0x4EC0, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x0264 - 0x00B1, 0x01B2 - 0x00B1, 0x0100 - 0x007F, 0x0080 - 0x007F, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x0904, 0x076B, 0x0824, 0x065F, 0x07A2, 0x0616, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x076C, 0x05ED, 0x05EC, 0x042E, 0x050F, 0x0305, 0x0462, 0x02B7, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x042F, 0x0265, 0x0264, 0x01B2, 0x0100, 0x0080 }; static ReverbParamsSW reverb_params_StudioLarge = { 0x6FE0/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x6F60, 0x4FA8, -0x4320, 0x4510, -0x4110, -0x5980, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x5680, 0x52C0, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x031C - 0x00E3, 0x0238 - 0x00E3, 0x0154 - 0x00A9, 0x00AA - 0x00A9, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x0DFB, 0x0B58, 0x0D09, 0x0A3C, 0x0BD9, 0x0973, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x0B59, 0x08DA, 0x08D9, 0x05E9, 0x07EC, 0x04B0, 0x06EF, 0x03D2, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x05EA, 0x031D, 0x031C, 0x0238, 0x0154, 0x00AA }; static ReverbParamsSW reverb_params_Hall = { 0xADE0/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x6000, 0x5000, 0x4C00, -0x4800, -0x4400, -0x4000, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x6000, 0x5C00, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x05C0 - 0x01A5, 0x041A - 0x01A5, 0x0274 - 0x0139, 0x013A - 0x0139, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x15BA, 0x11BB, 0x14C2, 0x10BD, 0x11BC, 0x0DC1, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x11C0, 0x0DC3, 0x0DC0, 0x09C1, 0x0BC4, 0x07C1, 0x0A00, 0x06CD, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x09C2, 0x05C1, 0x05C0, 0x041A, 0x0274, 0x013A }; static ReverbParamsSW reverb_params_SpaceEcho = { 0xF6C0/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x7E00, 0x5000, -0x4C00, -0x5000, 0x4C00, -0x5000, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x6000, 0x5400, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x0AE0 - 0x033D, 0x07A2 - 0x033D, 0x0464 - 0x0231, 0x0232 - 0x0231, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x1ED6, 0x1A31, 0x1D14, 0x183B, 0x1BC2, 0x16B2, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x1A32, 0x15EF, 0x15EE, 0x1055, 0x1334, 0x0F2D, 0x11F6, 0x0C5D, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x1056, 0x0AE1, 0x0AE0, 0x07A2, 0x0464, 0x0232 }; static ReverbParamsSW reverb_params_Echo = { 0x18040/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x7FFF, 0x7FFF, 0x0000, 0x0000, 0x0000, -0x7F00, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x0000, 0x0000, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x1004 - 0x0001, 0x1002 - 0x0001, 0x0004 - 0x0001, 0x0002 - 0x0001, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x1FFF, 0x0FFF, 0x1005, 0x0005, 0x0000, 0x0000, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x1005, 0x0005, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x0000, 0x0000, 0x1004, 0x1002, 0x0004, 0x0002 }; static ReverbParamsSW reverb_params_Delay = { 0x18040/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x7FFF, 0x7FFF, 0x0000, 0x0000, 0x0000, 0x0000, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x0000, 0x0000, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x1004 - 0x0001, 0x1002 - 0x0001, 0x0004 - 0x0001, 0x0002 - 0x0001, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x1FFF, 0x0FFF, 0x1005, 0x0005, 0x0000, 0x0000, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x1005, 0x0005, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x0000, 0x0000, 0x1004, 0x1002, 0x0004, 0x0002 }; static ReverbParamsSW reverb_params_HalfEcho = { 0x3C00/2, -// gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall + //gLPF gEcho0 gEcho1 gEcho2 gEcho3 gWall 0x70F0, 0x4FA8, -0x4320, 0x4510, -0x4110, -0x7B00, -// gReva gRevb gInputL gInputR + //gReva gRevb gInputL gInputR 0x5F80, 0x54C0, -0x8000, -0x8000, -// nRevaOldL nRevaOldR nRevbOldL nRevbOldR + //nRevaOldL nRevaOldR nRevbOldL nRevbOldR 0x0058 - 0x0017, 0x0040 - 0x0017, 0x0028 - 0x0013, 0x0014 - 0x0013, -// nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R + //nLwlNew nRwrNew nEcho0L nEcho0R nEcho1L nEcho1R 0x0371, 0x02AF, 0x02E5, 0x01DF, 0x02B0, 0x01D7, -// nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R + //nLwlOld nRwrOld nLwrNew nRwlNew nEcho2L nEcho2R nEcho3L nEcho3R 0x0358, 0x026A, 0x01D6, 0x011E, 0x012D, 0x00B1, 0x011F, 0x0059, -// nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR + //nLwrOld nRwlOld nRevaNewL nRevaNewR nRevbNewL nRevbNewR 0x01A0, 0x00E3, 0x0058, 0x0040, 0x0028, 0x0014 }; @@ -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. // BOTH p_input and p_output must be touched (use ClearModuleBuffer). - // �������LOCAL MACROS ������۲ + // LOCAL MACROS #undef LM_SETSRCOFFSET #define LM_SETSRCOFFSET(x) \ @@ -296,14 +296,14 @@ MULSHIFT_S32 ( x, current_params->y, 15 ) #undef LM_REVERB #define LM_REVERB(x) reverb_buffer[ (x) + cSample ] - // �������LOCAL VARIABLES ������۲ + // LOCAL VARIABLES unsigned int Offset; int lwl, lwr, rwl, rwr; -// unsigned char HZShift; + //unsigned char HZShift; - // �������CODE ������۲ + // CODE lwl = state.lwl; diff --git a/servers/physics/area_pair_sw.cpp b/servers/physics/area_pair_sw.cpp index 1131aa90d3..e95c85d751 100644 --- a/servers/physics/area_pair_sw.cpp +++ b/servers/physics/area_pair_sw.cpp @@ -110,7 +110,7 @@ bool Area2PairSW::setup(float p_step) { return false; } -// bool result = area_a->test_collision_mask(area_b) && CollisionSolverSW::solve(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),Vector2(),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),Vector2(),NULL,this); + //bool result = area_a->test_collision_mask(area_b) && CollisionSolverSW::solve(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),Vector2(),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),Vector2(),NULL,this); bool result = CollisionSolverSW::solve_static(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),NULL,this); if (result!=colliding) { diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp index ceeeafe04a..81604dd5e1 100644 --- a/servers/physics/body_sw.cpp +++ b/servers/physics/body_sw.cpp @@ -270,8 +270,10 @@ void BodySW::set_mode(PhysicsServer::BodyMode p_mode) { } _update_inertia(); - //if (get_space()) -// _update_queries(); + /* + if (get_space()) + _update_queries(); + */ } PhysicsServer::BodyMode BodySW::get_mode() const { @@ -319,14 +321,18 @@ void BodySW::set_state(PhysicsServer::BodyState p_state, const Variant& p_varian } break; case PhysicsServer::BODY_STATE_LINEAR_VELOCITY: { - //if (mode==PhysicsServer::BODY_MODE_STATIC) - // break; + /* + if (mode==PhysicsServer::BODY_MODE_STATIC) + break; + */ linear_velocity=p_variant; wakeup(); } break; case PhysicsServer::BODY_STATE_ANGULAR_VELOCITY: { - //if (mode!=PhysicsServer::BODY_MODE_RIGID) - // break; + /* + if (mode!=PhysicsServer::BODY_MODE_RIGID) + break; + */ angular_velocity=p_variant; wakeup(); @@ -400,11 +406,13 @@ void BodySW::set_space(SpaceSW *p_space){ _update_inertia(); if (active) get_space()->body_add_to_active_list(&active_list); -// _update_queries(); - //if (is_active()) { - // active=false; - // set_active(true); - //} + /* + _update_queries(); + if (is_active()) { + 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 (angular_damp>=0) 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) 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; @@ -630,10 +642,10 @@ void BodySW::integrate_velocities(real_t p_step) { _update_transform_dependant(); - //if (fi_callback) { - - // get_space()->body_add_to_state_query_list(&direct_state_query_list); - // + /* + if (fi_callback) { + get_space()->body_add_to_state_query_list(&direct_state_query_list); + */ } /* @@ -772,12 +784,12 @@ BodySW::BodySW() : CollisionObjectSW(TYPE_BODY), active_list(this), inertia_upda active=true; mass=1; -// _inv_inertia=Transform(); + //_inv_inertia=Transform(); _inv_mass=1; bounce=0; friction=1; omit_force_integration=false; -// applied_torque=0; + //applied_torque=0; island_step=0; island_next=NULL; island_list_next=NULL; diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp index 7f8153611f..d02303e23d 100644 --- a/servers/physics/collision_solver_sat.cpp +++ b/servers/physics/collision_solver_sat.cpp @@ -42,9 +42,11 @@ struct _CollectorCallback { _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; -// print_line("** A: "+p_point_A+" B: "+p_point_B+" D: "+rtos(p_point_A.distance_to(p_point_B))); + /* + if (normal.dot(p_point_A) >= normal.dot(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) callback(p_point_B,p_point_A,userdata); @@ -108,7 +110,7 @@ static void _generate_contacts_edge_edge(const Vector3 * p_points_A,int p_point_ Vector3 c=rel_A.cross(rel_B).cross(rel_B); -// if ( Math::abs(rel_A.dot(c) )<_EDGE_IS_VALID_SUPPORT_TRESHOLD ) { + //if ( Math::abs(rel_A.dot(c) )<_EDGE_IS_VALID_SUPPORT_TRESHOLD ) { if ( Math::abs(rel_A.dot(c) )<CMP_EPSILON ) { // should handle somehow.. @@ -205,7 +207,7 @@ static void _generate_contacts_face_face(const Vector3 * p_points_A,int p_point_ // check for different sides and non coplanar -// if ( (dist0*dist1) < -CMP_EPSILON && !(edge && j)) { + //if ( (dist0*dist1) < -CMP_EPSILON && !(edge && j)) { if ( (dist0*dist1) < 0 && !(edge && j)) { // calculate intersection @@ -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++) { 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; @@ -1379,7 +1383,7 @@ static void _collision_convex_polygon_convex_polygon(const ShapeSW *p_a,const Tr for (int i=0;i<face_count_A;i++) { Vector3 axis = p_transform_a.xform( faces_A[i].plane ).normal; -// Vector3 axis = p_transform_a.basis.xform( faces_A[i].plane.normal ).normalized(); + //Vector3 axis = p_transform_a.basis.xform( faces_A[i].plane.normal ).normalized(); if (!separator.test_axis( axis )) return; @@ -1389,7 +1393,7 @@ static void _collision_convex_polygon_convex_polygon(const ShapeSW *p_a,const Tr for (int i=0;i<face_count_B;i++) { Vector3 axis = p_transform_b.xform( faces_B[i].plane ).normal; -// Vector3 axis = p_transform_b.basis.xform( faces_B[i].plane.normal ).normalized(); + //Vector3 axis = p_transform_b.basis.xform( faces_B[i].plane.normal ).normalized(); if (!separator.test_axis( axis )) @@ -1502,7 +1506,7 @@ static void _collision_convex_polygon_face(const ShapeSW *p_a,const Transform &p // faces of A for (int i=0;i<face_count;i++) { -// Vector3 axis = p_transform_a.xform( faces[i].plane ).normal; + //Vector3 axis = p_transform_a.xform( faces[i].plane ).normal; Vector3 axis = p_transform_a.basis.xform( faces[i].plane.normal ).normalized(); if (!separator.test_axis( axis )) diff --git a/servers/physics/collision_solver_sw.cpp b/servers/physics/collision_solver_sw.cpp index 91ef7913cf..3399849ab7 100644 --- a/servers/physics/collision_solver_sw.cpp +++ b/servers/physics/collision_solver_sw.cpp @@ -383,7 +383,7 @@ bool CollisionSolverSW::solve_distance(const ShapeSW *p_shape_A,const Transform& concave_B->cull(local_aabb,concave_distance_callback,&cinfo); if (!cinfo.collided) { -// print_line(itos(cinfo.tested)); + //print_line(itos(cinfo.tested)); r_point_A=cinfo.close_A; r_point_B=cinfo.close_B; diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp index 5036a1d8a3..cbf444f1e8 100644 --- a/servers/physics/joints/cone_twist_joint_sw.cpp +++ b/servers/physics/joints/cone_twist_joint_sw.cpp @@ -156,7 +156,7 @@ bool ConeTwistJointSW::setup(float p_step) { if (m_swingSpan1 >= real_t(0.05f)) { b1Axis2 = A->get_transform().basis.xform( this->m_rbAFrame.basis.get_axis(1) ); -// swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) ); + //swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) ); swx = b2Axis1.dot(b1Axis1); swy = b2Axis1.dot(b1Axis2); swing1 = atan2fast(swy, swx); @@ -169,7 +169,7 @@ bool ConeTwistJointSW::setup(float p_step) { if (m_swingSpan2 >= real_t(0.05f)) { b1Axis3 = A->get_transform().basis.xform( this->m_rbAFrame.basis.get_axis(2) ); -// swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) ); + //swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) ); swx = b2Axis1.dot(b1Axis1); swy = b2Axis1.dot(b1Axis3); swing2 = atan2fast(swy, swx); diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp index 5824de0127..48f70d9077 100644 --- a/servers/physics/joints/generic_6dof_joint_sw.cpp +++ b/servers/physics/joints/generic_6dof_joint_sw.cpp @@ -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) { -// // rot = cy*cz -cy*sz sy -// // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx -// // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy -// + // rot = cy*cz -cy*sz sy + // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx + // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy if (btGetMatrixElem(mat,2) < real_t(1.0)) { @@ -325,16 +324,18 @@ void Generic6DOFJointSW::calculateAngleInfo() m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]); -// if(m_debugDrawer) -// { -// -// char buff[300]; -// sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ", -// m_calculatedAxisAngleDiff[0], -// m_calculatedAxisAngleDiff[1], -// m_calculatedAxisAngleDiff[2]); -// m_debugDrawer->reportErrorWarning(buff); -// } + /* + if(m_debugDrawer) + { + + char buff[300]; + sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ", + m_calculatedAxisAngleDiff[0], + m_calculatedAxisAngleDiff[1], + m_calculatedAxisAngleDiff[2]); + m_debugDrawer->reportErrorWarning(buff); + } + */ } diff --git a/servers/physics/joints/hinge_joint_sw.cpp b/servers/physics/joints/hinge_joint_sw.cpp index 2f07779131..277346fbbb 100644 --- a/servers/physics/joints/hinge_joint_sw.cpp +++ b/servers/physics/joints/hinge_joint_sw.cpp @@ -221,7 +221,7 @@ bool HingeJointSW::setup(float p_step) { // Compute limit information real_t hingeAngle = get_hinge_angle(); -// print_line("angle: "+rtos(hingeAngle)); + //print_line("angle: "+rtos(hingeAngle)); //set bias, sign, clear accumulator m_correction = real_t(0.); m_limitSign = real_t(0.); @@ -235,17 +235,17 @@ bool HingeJointSW::setup(float p_step) { print_line("hi: "+rtos(m_upperLimit)); }*/ -// if (m_lowerLimit < m_upperLimit) + //if (m_lowerLimit < m_upperLimit) if (m_useLimit && m_lowerLimit <= m_upperLimit) { -// if (hingeAngle <= m_lowerLimit*m_limitSoftness) + //if (hingeAngle <= m_lowerLimit*m_limitSoftness) if (hingeAngle <= m_lowerLimit) { m_correction = (m_lowerLimit - hingeAngle); m_limitSign = 1.0f; m_solveLimit = true; } -// else if (hingeAngle >= m_upperLimit*m_limitSoftness) + //else if (hingeAngle >= m_upperLimit*m_limitSoftness) else if (hingeAngle >= m_upperLimit) { m_correction = m_upperLimit - hingeAngle; diff --git a/servers/physics/joints/pin_joint_sw.cpp b/servers/physics/joints/pin_joint_sw.cpp index 292d30443c..9c7fe65684 100644 --- a/servers/physics/joints/pin_joint_sw.cpp +++ b/servers/physics/joints/pin_joint_sw.cpp @@ -68,8 +68,8 @@ void PinJointSW::solve(float p_step){ Vector3 normal(0,0,0); -// Vector3 angvelA = A->get_transform().origin.getBasis().transpose() * A->getAngularVelocity(); -// Vector3 angvelB = B->get_transform().origin.getBasis().transpose() * B->getAngularVelocity(); + //Vector3 angvelA = A->get_transform().origin.getBasis().transpose() * A->getAngularVelocity(); + //Vector3 angvelB = B->get_transform().origin.getBasis().transpose() * B->getAngularVelocity(); for (int i=0;i<3;i++) { diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp index 4069ccdccb..b71eae54b0 100644 --- a/servers/physics/physics_server_sw.cpp +++ b/servers/physics/physics_server_sw.cpp @@ -1395,11 +1395,13 @@ void PhysicsServerSW::free(RID 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()) -// _clear_query(body->get_direct_state_query()); + if (body->get_direct_state_query()) + _clear_query(body->get_direct_state_query()); + */ body->set_space(NULL); @@ -1422,8 +1424,10 @@ void PhysicsServerSW::free(RID 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); diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h index a3f98392fc..72b133c4b9 100644 --- a/servers/physics/physics_server_sw.h +++ b/servers/physics/physics_server_sw.h @@ -62,7 +62,7 @@ friend class PhysicsDirectSpaceStateSW; mutable RID_Owner<BodySW> body_owner; mutable RID_Owner<JointSW> joint_owner; -// void _clear_query(QuerySW *p_query); + //void _clear_query(QuerySW *p_query); public: struct CollCbkData { diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp index 59ade71475..9f8d1107f4 100644 --- a/servers/physics/shape_sw.cpp +++ b/servers/physics/shape_sw.cpp @@ -1048,8 +1048,10 @@ void ConcavePolygonShapeSW::_cull_segment(int p_idx,_SegmentCullParams *p_params 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); @@ -1309,7 +1311,7 @@ _VolumeSW_BVH* _volume_sw_build_bvh(_VolumeSW_BVH_Element *p_elements,int p_size bvh->left=_volume_sw_build_bvh(p_elements,split,count); bvh->right=_volume_sw_build_bvh(&p_elements[split],p_size-split,count); -// printf("branch at %p - %i: %i\n",bvh,count,bvh->face_index); + //printf("branch at %p - %i: %i\n",bvh,count,bvh->face_index); count++; return bvh; } @@ -1322,7 +1324,7 @@ void ConcavePolygonShapeSW::_fill_bvh(_VolumeSW_BVH* p_bvh_tree,BVH* p_bvh_array p_bvh_array[idx].aabb=p_bvh_tree->aabb; p_bvh_array[idx].face_index=p_bvh_tree->face_index; -// printf("%p - %i: %i(%p) -- %p:%p\n",%p_bvh_array[idx],p_idx,p_bvh_array[i]->face_index,&p_bvh_tree->face_index,p_bvh_tree->left,p_bvh_tree->right); + //printf("%p - %i: %i(%p) -- %p:%p\n",%p_bvh_array[idx],p_idx,p_bvh_array[i]->face_index,&p_bvh_tree->face_index,p_bvh_tree->left,p_bvh_tree->right); if (p_bvh_tree->left) { diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h index 3cbd1c9609..919c681105 100644 --- a/servers/physics/shape_sw.h +++ b/servers/physics/shape_sw.h @@ -366,8 +366,8 @@ struct HeightMapShapeSW : public ConcaveShapeSW { int depth; float cell_size; -// void _cull_segment(int p_idx,_SegmentCullParams *p_params) const; -// void _cull(int p_idx,_CullParams *p_params) const; + //void _cull_segment(int p_idx,_SegmentCullParams *p_params) const; + //void _cull(int p_idx,_CullParams *p_params) const; void _setup(PoolVector<float> p_heights,int p_width,int p_depth,float p_cell_size); public: diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index d73d5f140e..eaa3d3194c 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -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.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); diff --git a/servers/physics/step_sw.cpp b/servers/physics/step_sw.cpp index e24081761b..30ee33a7de 100644 --- a/servers/physics/step_sw.cpp +++ b/servers/physics/step_sw.cpp @@ -233,7 +233,7 @@ void StepSW::step(SpaceSW* p_space,float p_delta,int p_iterations) { } -// print_line("island count: "+itos(island_count)+" active count: "+itos(active_count)); + //print_line("island count: "+itos(island_count)+" active count: "+itos(active_count)); /* SETUP CONSTRAINT ISLANDS */ { diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index a32e024fe9..093f69a169 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -251,8 +251,10 @@ void Body2DSW::set_mode(Physics2DServer::BodyMode p_mode) { } _update_inertia(); - //if (get_space()) -// _update_queries(); + /* + if (get_space()) + _update_queries(); + */ } Physics2DServer::BodyMode Body2DSW::get_mode() const { @@ -301,15 +303,19 @@ void Body2DSW::set_state(Physics2DServer::BodyState p_state, const Variant& p_va } break; case Physics2DServer::BODY_STATE_LINEAR_VELOCITY: { - //if (mode==Physics2DServer::BODY_MODE_STATIC) - // break; + /* + if (mode==Physics2DServer::BODY_MODE_STATIC) + break; + */ linear_velocity=p_variant; wakeup(); } break; case Physics2DServer::BODY_STATE_ANGULAR_VELOCITY: { - //if (mode!=Physics2DServer::BODY_MODE_RIGID) - // break; + /* + if (mode!=Physics2DServer::BODY_MODE_RIGID) + break; + */ angular_velocity=p_variant; wakeup(); @@ -385,11 +391,13 @@ void Body2DSW::set_space(Space2DSW *p_space){ _update_inertia(); if (active) get_space()->body_add_to_active_list(&active_list); -// _update_queries(); - //if (is_active()) { - // active=false; - // set_active(true); - //} + /* + _update_queries(); + if (is_active()) { + 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 (angular_damp>=0) 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) 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; bool do_motion=false; @@ -482,10 +494,12 @@ void Body2DSW::integrate_forces(real_t p_step) { do_motion=true; - //for(int i=0;i<get_shape_count();i++) { - // set_shape_kinematic_advance(i,Vector2()); - // set_shape_kinematic_retreat(i,0); - //} + /* + for(int i=0;i<get_shape_count();i++) { + set_shape_kinematic_advance(i,Vector2()); + set_shape_kinematic_retreat(i,0); + } + */ } else { if (!omit_force_integration && !first_integration) { diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp index efa12c37cb..d2b37319ad 100644 --- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp +++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp @@ -599,8 +599,10 @@ int BroadPhase2DHashGrid::cull_segment(const Vector2& p_from, const Vector2& p_t 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)) continue; @@ -645,8 +647,10 @@ int BroadPhase2DHashGrid::cull_aabb(const Rect2& p_aabb,CollisionObject2DSW** p_ if (!p_aabb.intersects(E->key()->aabb)) 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_result_indices[cullcount]=E->key()->subindex; diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp index 2e7b0d8835..a09574a94c 100644 --- a/servers/physics_2d/collision_solver_2d_sat.cpp +++ b/servers/physics_2d/collision_solver_2d_sat.cpp @@ -40,8 +40,10 @@ struct _CollectorCallback2D { _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) callback(p_point_B,p_point_A,userdata); else @@ -462,7 +464,7 @@ public: } } - // print_line("test axis: "+p_axis+" depth: "+rtos(best_depth)); + //print_line("test axis: "+p_axis+" depth: "+rtos(best_depth)); #ifdef DEBUG_ENABLED best_axis_count++; #endif @@ -610,8 +612,10 @@ static void _collision_segment_segment(const Shape2DSW* p_a,const Transform2D& p //this collision is kind of pointless - //if (!separator.test_previous_axis()) - // return; + /* + if (!separator.test_previous_axis()) + return; + */ if (!separator.test_cast()) return; @@ -850,7 +854,7 @@ static void _collision_circle_rectangle(const Shape2DSW* p_a,const Transform2D& const Vector2 &sphere=p_transform_a.elements[2]; const Vector2 *axis=&p_transform_b.elements[0]; -// const Vector2& half_extents = rectangle_B->get_half_extents(); + //const Vector2& half_extents = rectangle_B->get_half_extents(); if (!separator.test_axis(axis[0].normalized())) return; diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp index e509bb76cd..02d59b69f0 100644 --- a/servers/physics_2d/collision_solver_2d_sw.cpp +++ b/servers/physics_2d/collision_solver_2d_sw.cpp @@ -226,7 +226,7 @@ bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A,const Transfo concave_B->cull(local_aabb,concave_callback,&cinfo); -// print_line("Rect2 TESTS: "+itos(cinfo.aabb_tests)); + //print_line("Rect2 TESTS: "+itos(cinfo.aabb_tests)); return cinfo.collided; } @@ -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) { return false; - //if (type_B==Physics2DServer::SHAPE_RAY) { - // return false; } + /* + if (type_B==Physics2DServer::SHAPE_RAY) { + return false; + */ if (swap) { return solve_static_line(p_shape_B,p_transform_B,p_shape_A,p_transform_A,p_result_callback,p_userdata,true); diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp index 7205e90d27..f0703a0894 100644 --- a/servers/physics_2d/joints_2d_sw.cpp +++ b/servers/physics_2d/joints_2d_sw.cpp @@ -407,8 +407,8 @@ bool GrooveJoint2DSW::setup(float p_step) { jn_max = get_max_force() * p_step; // calculate bias velocity -// cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); -// joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias); + //cpVect delta = cpvsub(cpvadd(b->p, joint->r2), cpvadd(a->p, joint->r1)); + //joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias); Vector2 delta = (B->get_transform().get_origin() +rB) - (A->get_transform().get_origin() + rA); diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index 3cc69f470e..d134ce7ea8 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -1176,11 +1176,13 @@ void Physics2DServerSW::free(RID 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()) -// _clear_query(body->get_direct_state_query()); + if (body->get_direct_state_query()) + _clear_query(body->get_direct_state_query()); + */ body->set_space(NULL); @@ -1203,8 +1205,10 @@ void Physics2DServerSW::free(RID 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); @@ -1380,7 +1384,7 @@ Physics2DServerSW::Physics2DServerSW() { singletonsw=this; BroadPhase2DSW::create_func=BroadPhase2DHashGrid::_create; -// BroadPhase2DSW::create_func=BroadPhase2DBasic::_create; + //BroadPhase2DSW::create_func=BroadPhase2DBasic::_create; active=true; island_count=0; diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h index ba45dd9272..1da7d65dc8 100644 --- a/servers/physics_2d/physics_2d_server_sw.h +++ b/servers/physics_2d/physics_2d_server_sw.h @@ -70,7 +70,7 @@ friend class Physics2DDirectBodyStateSW; static Physics2DServerSW *singletonsw; -// void _clear_query(Query2DSW *p_query); + //void _clear_query(Query2DSW *p_query); public: struct CollCbkData { diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 8b19122f17..886ae7730b 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -639,8 +639,10 @@ bool ConvexPolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vect for(int i=0;i<point_count;i++) { //hmm crap.. no can do.. - //if (d.dot(points[i].normal)>=0) - // continue; + /* + if (d.dot(points[i].normal)>=0) + continue; + */ Vector2 res; @@ -816,8 +818,10 @@ bool ConcavePolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vec real_t d=1e10; 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; @@ -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; diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 2c7b099b36..e95707f135 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -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.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); @@ -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); 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_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); a+=n*traveled; + float d = a.distance_to(b); + if (d<margin) + continue; #endif - // float d = a.distance_to(b); - - //if (d<margin) - /// continue; recover_motion+=(b-a)*0.4; } @@ -972,7 +975,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co if (collide_character) mask|=Physics2DDirectSpaceState::TYPE_MASK_CHARACTER_BODY; -// print_line("motion: "+p_motion+" margin: "+rtos(margin)); + //print_line("motion: "+p_motion+" margin: "+rtos(margin)); //print_line("margin: "+rtos(margin)); do { @@ -999,8 +1002,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co float d = a.distance_to(b); - //if (d<margin) - /// continue; + /* + if (d<margin) + continue; + */ recover_motion+=(b-a)*0.4; } diff --git a/servers/physics_2d/step_2d_sw.cpp b/servers/physics_2d/step_2d_sw.cpp index 05c0bf0516..8be4e2b5d5 100644 --- a/servers/physics_2d/step_2d_sw.cpp +++ b/servers/physics_2d/step_2d_sw.cpp @@ -216,7 +216,7 @@ void Step2DSW::step(Space2DSW* p_space,float p_delta,int p_iterations) { p_space->area_remove_from_moved_list((SelfList<Area2DSW>*)aml.first()); //faster to remove here } -// print_line("island count: "+itos(island_count)+" active count: "+itos(active_count)); + //print_line("island count: "+itos(island_count)+" active count: "+itos(active_count)); { //profile profile_endtime=OS::get_singleton()->get_ticks_usec(); diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index c175c04ee9..bd5a58e57b 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -602,7 +602,7 @@ void Physics2DServer::_bind_methods() { ClassDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&Physics2DServer::body_add_collision_exception); ClassDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&Physics2DServer::body_remove_collision_exception); -// virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0; + //virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0; ClassDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&Physics2DServer::body_set_max_contacts_reported); ClassDB::bind_method(_MD("body_get_max_contacts_reported","body"),&Physics2DServer::body_get_max_contacts_reported); @@ -641,9 +641,9 @@ void Physics2DServer::_bind_methods() { ClassDB::bind_method(_MD("get_process_info","process_info"),&Physics2DServer::get_process_info); -// ClassDB::bind_method(_MD("init"),&Physics2DServer::init); -// ClassDB::bind_method(_MD("step"),&Physics2DServer::step); -// ClassDB::bind_method(_MD("sync"),&Physics2DServer::sync); + //ClassDB::bind_method(_MD("init"),&Physics2DServer::init); + //ClassDB::bind_method(_MD("step"),&Physics2DServer::step); + //ClassDB::bind_method(_MD("sync"),&Physics2DServer::sync); //ClassDB::bind_method(_MD("flush_queries"),&Physics2DServer::flush_queries); BIND_CONSTANT( SPACE_PARAM_CONTACT_RECYCLE_RADIUS ); @@ -710,8 +710,8 @@ void Physics2DServer::_bind_methods() { BIND_CONSTANT( CCD_MODE_CAST_RAY ); BIND_CONSTANT( CCD_MODE_CAST_SHAPE ); -// BIND_CONSTANT( TYPE_BODY ); -// BIND_CONSTANT( TYPE_AREA ); + //BIND_CONSTANT( TYPE_BODY ); + //BIND_CONSTANT( TYPE_AREA ); BIND_CONSTANT( AREA_BODY_ADDED ); BIND_CONSTANT( AREA_BODY_REMOVED ); diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index 8f57fcfbdb..93553efb27 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -363,8 +363,8 @@ PhysicsDirectSpaceState::PhysicsDirectSpaceState() { void PhysicsDirectSpaceState::_bind_methods() { -// ClassDB::bind_method(_MD("intersect_ray","from","to","exclude","umask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0)); -// ClassDB::bind_method(_MD("intersect_shape:PhysicsShapeQueryResult","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0)); + //ClassDB::bind_method(_MD("intersect_ray","from","to","exclude","umask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0)); + //ClassDB::bind_method(_MD("intersect_shape:PhysicsShapeQueryResult","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0)); ClassDB::bind_method(_MD("intersect_ray:Dictionary","from","to","exclude","layer_mask","type_mask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION)); ClassDB::bind_method(_MD("intersect_shape","shape:PhysicsShapeQueryParameters","max_results"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(32)); @@ -529,7 +529,7 @@ void PhysicsServer::_bind_methods() { ClassDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&PhysicsServer::body_add_collision_exception); ClassDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&PhysicsServer::body_remove_collision_exception); -// virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0; + //virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0; ClassDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&PhysicsServer::body_set_max_contacts_reported); ClassDB::bind_method(_MD("body_get_max_contacts_reported","body"),&PhysicsServer::body_get_max_contacts_reported); @@ -678,9 +678,9 @@ void PhysicsServer::_bind_methods() { ClassDB::bind_method(_MD("set_active","active"),&PhysicsServer::set_active); -// ClassDB::bind_method(_MD("init"),&PhysicsServer::init); -// ClassDB::bind_method(_MD("step"),&PhysicsServer::step); -// ClassDB::bind_method(_MD("sync"),&PhysicsServer::sync); + //ClassDB::bind_method(_MD("init"),&PhysicsServer::init); + //ClassDB::bind_method(_MD("step"),&PhysicsServer::step); + //ClassDB::bind_method(_MD("sync"),&PhysicsServer::sync); //ClassDB::bind_method(_MD("flush_queries"),&PhysicsServer::flush_queries); @@ -739,8 +739,8 @@ void PhysicsServer::_bind_methods() { BIND_CONSTANT( DAMPED_STRING_STIFFNESS ); BIND_CONSTANT( DAMPED_STRING_DAMPING ); */ -// BIND_CONSTANT( TYPE_BODY ); -// BIND_CONSTANT( TYPE_AREA ); + //BIND_CONSTANT( TYPE_BODY ); + //BIND_CONSTANT( TYPE_AREA ); BIND_CONSTANT( AREA_BODY_ADDED ); BIND_CONSTANT( AREA_BODY_REMOVED ); diff --git a/servers/physics_server.h b/servers/physics_server.h index d57ca93d92..653959be45 100644 --- a/servers/physics_server.h +++ b/servers/physics_server.h @@ -135,8 +135,8 @@ class PhysicsDirectSpaceState : public Object { GDCLASS( PhysicsDirectSpaceState, Object ); -// Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0); -// Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0); + //Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0); + //Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0); public: enum ObjectTypeMask { diff --git a/servers/spatial_sound/spatial_sound_server_sw.cpp b/servers/spatial_sound/spatial_sound_server_sw.cpp index ccde73561f..d550134d82 100644 --- a/servers/spatial_sound/spatial_sound_server_sw.cpp +++ b/servers/spatial_sound/spatial_sound_server_sw.cpp @@ -66,7 +66,7 @@ void SpatialSoundServerSW::_update_sources() { SpatialSoundServerSW::Room::Room() { -// params[ROOM_PARAM_SPEED_OF_SOUND]=343.0; + //params[ROOM_PARAM_SPEED_OF_SOUND]=343.0; params[ROOM_PARAM_SPEED_OF_SOUND_SCALE]=1; params[ROOM_PARAM_DOPPLER_FACTOR]=1.0; params[ROOM_PARAM_PITCH_SCALE]=1.0; diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp index 33e51eb262..2bcc9644f1 100644 --- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp +++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp @@ -67,7 +67,7 @@ void SpatialSound2DServerSW::_update_sources() { SpatialSound2DServerSW::Room::Room() { -// params[ROOM_PARAM_SPEED_OF_SOUND]=343.0; + //params[ROOM_PARAM_SPEED_OF_SOUND]=343.0; params[ROOM_PARAM_PITCH_SCALE]=1.0; params[ROOM_PARAM_VOLUME_SCALE_DB]=0; params[ROOM_PARAM_REVERB_SEND]=0; @@ -79,7 +79,7 @@ SpatialSound2DServerSW::Room::Room() { params[ROOM_PARAM_ATTENUATION_REVERB_SCALE]=0.0; override_other_sources=false; reverb=ROOM_REVERB_HALL; -// octree_id=0; + //octree_id=0; level=-1; @@ -149,7 +149,7 @@ void SpatialSound2DServerSW::room_set_space(RID p_room,RID p_space) { Space *space = space_owner.get(room->space); space->rooms.erase(p_room); -// space->octree.erase(room->octree_id); + //space->octree.erase(room->octree_id); //room->octree_id=0; } @@ -160,10 +160,10 @@ void SpatialSound2DServerSW::room_set_space(RID p_room,RID p_space) { Space *space = space_owner.get(p_space); ERR_FAIL_COND(!space); space->rooms.insert(p_room); -// room->octree_id=space->octree.create(room,AABB()); + //room->octree_id=space->octree.create(room,AABB()); //set bounds -// AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb(); - // space->octree.move(room->octree_id,room->transform.xform(aabb)); + //AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb(); + //space->octree.move(room->octree_id,room->transform.xform(aabb)); room->space=p_space; } @@ -191,11 +191,11 @@ void SpatialSound2DServerSW::room_set_bounds(RID p_room, const PoolVector<Point2 if (!room->space.is_valid()) return; -// AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb(); -// Space* space = space_owner.get(room->space); -// ERR_FAIL_COND(!space); + //AABB aabb = room->bounds.is_empty()?AABB():room->bounds.get_aabb(); + //Space* space = space_owner.get(room->space); + //ERR_FAIL_COND(!space); -// space->octree.move(room->octree_id,room->transform.xform(aabb)); + //space->octree.move(room->octree_id,room->transform.xform(aabb)); } PoolVector<Point2> SpatialSound2DServerSW::room_get_bounds(RID p_room) const { @@ -603,7 +603,7 @@ void SpatialSound2DServerSW::free(RID p_id) { if (room->space.is_valid()) { Space *space = space_owner.get(room->space); ERR_FAIL_COND(!space); -// space->octree.erase(room->octree_id); + //space->octree.erase(room->octree_id); space->rooms.erase(p_id); } room_owner.free(p_id); diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h index 16d2c93e7d..7999a8c22b 100644 --- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h +++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h @@ -179,7 +179,7 @@ class SpatialSound2DServerSW : public SpatialSound2DServer { ActiveVoice(Source *p_source=NULL,int p_voice=0) { source=p_source; voice=p_voice; } }; -// Room *cull_rooms[MAX_CULL_ROOMS]; + //Room *cull_rooms[MAX_CULL_ROOMS]; Set<Source*> streaming_sources; Set<ActiveVoice> active_voices; diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp index 1adf2ee021..ba85f92e37 100644 --- a/servers/visual/rasterizer.cpp +++ b/servers/visual/rasterizer.cpp @@ -256,7 +256,7 @@ RID Rasterizer::_create_shader(const FixedSpatialMaterialShaderKey& p_key) { vcode+="uniform float "+_fixed_material_point_size_name+";\n"; vcode+="POINT_SIZE="+_fixed_material_point_size_name+";\n"; -// vcode+="POINT_SIZE=10.0;\n"; + //vcode+="POINT_SIZE=10.0;\n"; } String lcode; diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index ea634e8f06..6a6f437816 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -2920,7 +2920,7 @@ ShaderLanguage::Node* ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha ERR_FAIL_COND_V(op->arguments[0]->type!=Node::TYPE_VARIABLE,p_node); VariableNode *vn = static_cast<VariableNode*>(op->arguments[0]); - // StringName name=vn->name; + //StringName name=vn->name; DataType base=get_scalar_type(op->get_datatype()); diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h index b5f843c114..4f8717088e 100644 --- a/servers/visual/shader_language.h +++ b/servers/visual/shader_language.h @@ -579,7 +579,7 @@ private: public: -// static void get_keyword_list(ShaderType p_type,List<String> *p_keywords); + //static void get_keyword_list(ShaderType p_type,List<String> *p_keywords); void clear(); Error compile(const String& p_code,const Map< StringName, Map<StringName,DataType> > &p_functions,const Set<String>& p_render_modes); diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index d68c580442..2f7bcccf73 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -1188,9 +1188,11 @@ bool VisualServerCanvas::free(RID p_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 ); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 3262479c43..e3bc0fb6c6 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -85,8 +85,10 @@ void VisualServerRaster::free( RID p_rid ){ void VisualServerRaster::draw(){ - //if (changes) - // print_line("changes: "+itos(changes)); + /* + if (changes) + print_line("changes: "+itos(changes)); + */ changes=0; @@ -181,7 +183,7 @@ BalloonAllocator<> *VisualServerRaster::OctreeAllocator::allocator=NULL; #define VS_CHANGED\ changes++;\ -// print_line(__FUNCTION__); + //print_line(__FUNCTION__); @@ -2928,7 +2930,7 @@ void VisualServerRaster::instance_geometry_set_flag(RID p_instance,InstanceFlags Instance *instance = instance_owner.get( p_instance ); ERR_FAIL_COND( !instance ); -// ERR_FAIL_COND( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK) ); + //ERR_FAIL_COND( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK) ); switch(p_flags) { @@ -2980,7 +2982,7 @@ bool VisualServerRaster::instance_geometry_get_flag(RID p_instance,InstanceFlags const Instance *instance = instance_owner.get( p_instance ); ERR_FAIL_COND_V( !instance, false ); -// ERR_FAIL_COND_V( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK), false ); + //ERR_FAIL_COND_V( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK), false ); switch(p_flags) { @@ -3335,8 +3337,10 @@ void VisualServerRaster::_update_instance(Instance *p_instance) { } 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); } @@ -4656,7 +4660,7 @@ void VisualServerRaster::_free_attached_instances(RID p_rid,bool p_free_scenario void VisualServerRaster::custom_shade_model_set_shader(int p_model, RID p_shader) { VS_CHANGED; -// rasterizer->custom_shade_model_set_shader(p_model,p_shader); + //rasterizer->custom_shade_model_set_shader(p_model,p_shader); } RID VisualServerRaster::custom_shade_model_get_shader(int p_model) const { @@ -4746,8 +4750,10 @@ void VisualServerRaster::free( RID p_rid ) { BakedLightSampler *baked_light_sampler = baked_light_sampler_owner.get(p_rid); 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); memdelete(baked_light_sampler); @@ -4766,7 +4772,7 @@ void VisualServerRaster::free( RID p_rid ) { Viewport *viewport = viewport_owner.get( p_rid ); ERR_FAIL_COND(!viewport); -// Viewport *parent=NULL; + //Viewport *parent=NULL; rasterizer->free(viewport->viewport_data); if (viewport->render_target.is_valid()) { @@ -5105,7 +5111,7 @@ void VisualServerRaster::_light_instance_update_pssm_shadow(Instance *p_light,Sc float distances[5]; float texsize=rasterizer->light_instance_get_shadow_size( p_light->light_info->instance ); -// float cull_min=p_cull_range.min; + //float cull_min=p_cull_range.min; //float cull_max=p_cull_range.max; @@ -6657,7 +6663,7 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S /* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0)); print_line("OTO: "+itos(p_scenario->octree.get_octant_count())); -// print_line("OTE: "+itos(p_scenario->octree.get_elem_count())); + //print_line("OTE: "+itos(p_scenario->octree.get_elem_count())); print_line("OTP: "+itos(p_scenario->octree.get_pair_count())); */ @@ -6761,7 +6767,7 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S if (light_cull_count<MAX_LIGHTS_CULLED) { light_cull_result[light_cull_count++]=ins; -// rasterizer->light_instance_set_active_hint(ins->light_info->instance); + //rasterizer->light_instance_set_active_hint(ins->light_info->instance); { //compute distance to camera using aabb support Vector3 n = ins->data.transform.basis.xform_inv(cull_range.nearp.normal).normalized(); @@ -7284,7 +7290,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_ ViewportRect desired_rect=p_viewport->rect; ViewportRect old_rect = viewport_rect; -// bool vpchanged=false; + //bool vpchanged=false; // convert default expanding viewports to actual size //if (desired_rect.x==0 && desired_rect.y==0 && desired_rect.width==0 && desired_rect.height==0) { if (p_parent_w != 0 && p_parent_h != 0) { @@ -7476,7 +7482,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_ for (Map<Viewport::CanvasKey,Viewport::CanvasData*>::Element *E=canvas_map.front();E;E=E->next()) { - // print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size())); + //print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size())); //print_line("GT "+p_viewport->global_transform+". CT: "+E->get()->transform); Matrix32 xform = p_viewport->global_transform * E->get()->transform; @@ -7508,7 +7514,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_ } -// rasterizer->canvas_debug_viewport_shadows(lights_with_shadow); + //rasterizer->canvas_debug_viewport_shadows(lights_with_shadow); } //capture @@ -7721,8 +7727,10 @@ void VisualServerRaster::sync() { } void VisualServerRaster::draw() { - //if (changes) - // print_line("changes: "+itos(changes)); + /* + if (changes) + print_line("changes: "+itos(changes)); + */ changes=0; shadows_enabled=GLOBAL_DEF("render/shadows_enabled",true); room_cull_enabled = GLOBAL_DEF("render/room_cull_enabled",true); diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 030796a22d..157a85be98 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -78,7 +78,7 @@ void VisualServerScene::camera_set_use_vertical_aspect(RID p_camera,bool p_enabl void* VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance *p_A,int, OctreeElementID, Instance *p_B,int) { -// VisualServerScene *self = (VisualServerScene*)p_self; + //VisualServerScene *self = (VisualServerScene*)p_self; Instance *A = p_A; Instance *B = p_B; @@ -204,7 +204,7 @@ void* VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance } void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance *p_A,int, OctreeElementID, Instance *p_B,int,void* udata) { -// VisualServerScene *self = (VisualServerScene*)p_self; + //VisualServerScene *self = (VisualServerScene*)p_self; Instance *A = p_A; Instance *B = p_B; @@ -1239,8 +1239,10 @@ void VisualServerScene::_update_instance(Instance *p_instance) { } 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); } @@ -1773,7 +1775,7 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform,const Came VSG::scene_render->set_scene_pass(render_pass); -// rasterizer->set_camera(camera->transform, camera_matrix,ortho); + //rasterizer->set_camera(camera->transform, camera_matrix,ortho); Vector<Plane> planes = p_cam_projection.get_projection_planes(p_cam_transform); @@ -1786,11 +1788,11 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform,const Came reflection_probe_cull_count=0; -// light_samplers_culled=0; + //light_samplers_culled=0; /* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0)); print_line("OTO: "+itos(p_scenario->octree.get_octant_count())); -// print_line("OTE: "+itos(p_scenario->octree.get_elem_count())); + //print_line("OTE: "+itos(p_scenario->octree.get_elem_count())); print_line("OTP: "+itos(p_scenario->octree.get_pair_count())); */ @@ -3375,7 +3377,7 @@ void VisualServerScene::render_probes() { probe->dynamic.updating_stage=GI_UPDATE_STAGE_CHECK; -// print_line("UPLOAD TIME: "+rtos((OS::get_singleton()->get_ticks_usec()-us)/1000000.0)); + //print_line("UPLOAD TIME: "+rtos((OS::get_singleton()->get_ticks_usec()-us)/1000000.0)); } break; } diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp index 780335a7f4..d2ee32f9cc 100644 --- a/servers/visual/visual_server_viewport.cpp +++ b/servers/visual/visual_server_viewport.cpp @@ -176,7 +176,7 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport) { light=light->shadows_next_ptr; } - // VSG::canvas_render->reset_canvas(); + //VSG::canvas_render->reset_canvas(); } VSG::rasterizer->restore_render_target(); @@ -196,7 +196,7 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport) { VisualServerCanvas::Canvas *canvas = static_cast<VisualServerCanvas::Canvas*>(E->get()->canvas); - // print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size())); + //print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size())); //print_line("GT "+p_viewport->global_transform+". CT: "+E->get()->transform); Transform2D xform = p_viewport->global_transform * E->get()->transform; diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 71f9c88f2a..da73980e08 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1675,7 +1675,7 @@ RID VisualServer::instance_create2(RID p_base, RID p_scenario) { VisualServer::VisualServer() { -// ERR_FAIL_COND(singleton); + //ERR_FAIL_COND(singleton); singleton=this; } diff --git a/servers/visual_server.h b/servers/visual_server.h index cb4d87ce8a..f75223e378 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -706,7 +706,7 @@ public: virtual RID instance_create2(RID p_base, RID p_scenario); -// virtual RID instance_create(RID p_base,RID p_scenario)=0; // from can be mesh, light, area and portal so far. + //virtual RID instance_create(RID p_base,RID p_scenario)=0; // from can be mesh, light, area and portal so far. virtual RID instance_create()=0; // from can be mesh, light, poly, area and portal so far. virtual void instance_set_base(RID p_instance, RID p_base)=0; // from can be mesh, light, poly, area and portal so far. diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp index 9f2416223e..daf30b00d7 100644 --- a/tools/collada/collada.cpp +++ b/tools/collada/collada.cpp @@ -103,7 +103,7 @@ Transform Collada::fix_transform(const Transform& p_transform) { } #endif -// tr.scale(Vector3(state.unit_scale.unit_scale.unit_scale)); + //tr.scale(Vector3(state.unit_scale.unit_scale.unit_scale)); return tr; //return state.matrix_fix * p_transform; } @@ -444,9 +444,11 @@ Vector<String> Collada::_read_string_array(XMLParser& parser) { // parse String data String str = parser.get_node_data(); 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 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; - }// 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") break; @@ -1396,7 +1401,7 @@ void Collada::_parse_skin_controller(XMLParser& parser,String p_id) { for(int i=0;i<joint_source.sarray.size();i++) { String name = joint_source.sarray[i]; - Transform xform = _read_transform_from_array(ibm_source.array,i*16);// <- this is a mistake, it must be applied to vertices + Transform xform = _read_transform_from_array(ibm_source.array,i*16); //<- this is a mistake, it must be applied to vertices xform.affine_invert(); // inverse for rest, because it's an inverse #ifdef COLLADA_IMPORT_SCALE_SCENE xform.origin*=state.unit_scale; @@ -1442,8 +1447,10 @@ void Collada::_parse_morph_controller(XMLParser& parser, String p_id) { } else if (section=="Name_array" || section=="IDREF_array") { // 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)) { 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") break; @@ -1705,7 +1714,7 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) { if ( parser.has_attribute("sid") ) { //bones may not have sid joint->sid=parser.get_attribute_value("sid"); -// state.bone_map[joint->sid]=joint; + //state.bone_map[joint->sid]=joint; } else if (state.idref_joints.has(name)) { joint->sid=name; //kind of a cheat but.. } else if (parser.has_attribute("name")) { diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index 6b6a864ecc..f18265c541 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -250,7 +250,7 @@ void DocData::generate(bool p_basic_types) { } else if (arginfo.type!=Variant::NIL) // { #endif method.return_type=(arginfo.hint==PROPERTY_HINT_RESOURCE_TYPE)?arginfo.hint_string:Variant::get_type_name(arginfo.type); -// } + //} } else { @@ -804,7 +804,7 @@ Error DocData::_load(Ref<XMLParser> parser) { class_list[name]=ClassDoc(); ClassDoc& c = class_list[name]; -// print_line("class: "+name); + //print_line("class: "+name); c.name=name; if (parser->has_attribute("inherits")) c.inherits = parser->get_attribute_value("inherits"); diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index bdf4e83236..cb95f5fb7d 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -198,7 +198,7 @@ public: static void _bind_methods() { - // ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj); + //ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj); ClassDB::bind_method("_gui_input",&AnimationCurveEdit::_gui_input); ADD_SIGNAL(MethodInfo("transition_changed")); } @@ -647,8 +647,10 @@ public: } 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; @@ -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()) { 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)); } @@ -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()) { 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); } @@ -2690,7 +2696,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) { float oldpos=E->get().pos; float newpos=oldpos-from_t+motion; //if (newpos>=0) - undo_redo->add_do_method(this,"_select_at_anim",animation,E->key().track,newpos); + undo_redo->add_do_method(this,"_select_at_anim",animation,E->key().track,newpos); undo_redo->add_undo_method(this,"_select_at_anim",animation,E->key().track,oldpos); } @@ -3148,7 +3154,7 @@ void AnimationKeyEditor::_notification(int p_what) { } call_select->connect("selected",this,"_add_call_track"); -// rename_anim->set_icon( get_icon("Rename","EditorIcons") ); + //rename_anim->set_icon( get_icon("Rename","EditorIcons") ); /* edit_anim->set_icon( get_icon("Edit","EditorIcons") ); blend_anim->set_icon( get_icon("Blend","EditorIcons") ); @@ -3156,8 +3162,8 @@ void AnimationKeyEditor::_notification(int p_what) { stop->set_icon( get_icon("Stop","EditorIcons") ); pause->set_icon( get_icon("Pause","EditorIcons") ); */ -// menu->set_icon(get_icon("Animation","EditorIcons")); -// play->set_icon(get_icon("AnimationPlay","EditorIcons")); + //menu->set_icon(get_icon("Animation","EditorIcons")); + //play->set_icon(get_icon("AnimationPlay","EditorIcons")); //menu->set_icon(get_icon("Animation","EditorIcons")); _update_menu(); @@ -3920,7 +3926,7 @@ void AnimationKeyEditor::_bind_methods() { ClassDB::bind_method(_MD("set_root"),&AnimationKeyEditor::set_root); -// ClassDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert); + //ClassDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert); ClassDB::bind_method(_MD("_confirm_insert_list"),&AnimationKeyEditor::_confirm_insert_list); @@ -4143,9 +4149,9 @@ AnimationKeyEditor::AnimationKeyEditor() { /* l = memnew( Label ); l->set_text("Base: "); l->set_pos(Point2(0,3)); -// dr_panel->add_child(l);*/ + //dr_panel->add_child(l);*/ -// menu->get_popup()->connect("id_pressed",this,"_menu_callback"); + //menu->get_popup()->connect("id_pressed",this,"_menu_callback"); hb = memnew( HBoxContainer); diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp index 12489ada0d..ad17364685 100644 --- a/tools/editor/asset_library_editor_plugin.cpp +++ b/tools/editor/asset_library_editor_plugin.cpp @@ -1462,7 +1462,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { library_vb->set_h_size_flags(SIZE_EXPAND_FILL); library_vb_border->add_child(library_vb); -// margin_panel->set_stop_mouse(false); + //margin_panel->set_stop_mouse(false); asset_top_page = memnew( HBoxContainer ); library_vb->add_child(asset_top_page); diff --git a/tools/editor/call_dialog.cpp b/tools/editor/call_dialog.cpp index 054a5098f0..f8966093f6 100644 --- a/tools/editor/call_dialog.cpp +++ b/tools/editor/call_dialog.cpp @@ -283,7 +283,7 @@ CallDialog::CallDialog() { property_editor->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 ); property_editor->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 50 ); -// property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 ); + //property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 ); property_editor->set_anchor_and_margin( MARGIN_BOTTOM, ANCHOR_END, 90 ); property_editor->get_scene_tree()->set_hide_root( true ); property_editor->hide_top_label(); diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 343070375d..00767fd297 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -714,7 +714,7 @@ void FindReplaceDialog::_replace() { } text_edit->set_v_scroll(vsval); -// text_edit->set_h_scroll(hsval); + //text_edit->set_h_scroll(hsval); error_label->set_text(vformat(TTR("Replaced %d ocurrence(s)."),rc)); @@ -951,7 +951,7 @@ FindReplaceDialog::FindReplaceDialog() { VBoxContainer *rvb = memnew( VBoxContainer); opt_mg->add_child(rvb); replace_vb=rvb; -// rvb ->add_child(memnew(HSeparator)); + //rvb ->add_child(memnew(HSeparator)); rvb ->add_child(memnew(Label)); prompt = memnew( CheckButton ); diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp index 6e53c32080..92dd206030 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -421,7 +421,7 @@ ConnectDialog::ConnectDialog() { -// dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected"); + //dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected"); tree->connect("node_selected", this,"_tree_node_selected"); set_as_toplevel(true); @@ -432,7 +432,7 @@ ConnectDialog::ConnectDialog() { add_child(error); error->get_ok()->set_text(TTR("Close")); get_ok()->set_text(TTR("Connect")); -// error->get_cancel()->set_text("Close"); + //error->get_cancel()->set_text("Close"); @@ -857,7 +857,7 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) { hb->add_spacer(); hb->add_child(connect_button); connect_button->connect("pressed",this,"_connect_pressed"); -// add_child(tree); + //add_child(tree); connect_dialog = memnew( ConnectDialog ); connect_dialog->set_as_toplevel(true); diff --git a/tools/editor/connections_dialog.h b/tools/editor/connections_dialog.h index 6f35cf3db0..64b292bc34 100644 --- a/tools/editor/connections_dialog.h +++ b/tools/editor/connections_dialog.h @@ -86,8 +86,8 @@ public: void set_dst_method(const StringName& p_method); void set_dst_node(Node* p_node); -// Button *get_ok() { return ok; } -// Button *get_cancel() { return cancel; } + //Button *get_ok() { return ok; } + //Button *get_cancel() { return cancel; } void edit(Node *p_node); ConnectDialog(); diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index 5a76439a5a..b69234e704 100644 --- a/tools/editor/create_dialog.cpp +++ b/tools/editor/create_dialog.cpp @@ -694,7 +694,7 @@ CreateDialog::CreateDialog() { set_hide_on_ok(false); search_options->connect("item_activated",this,"_confirmed"); search_options->connect("cell_selected",this,"_item_selected"); -// search_options->set_hide_root(true); + //search_options->set_hide_root(true); base_type="Object"; help_bit = memnew( EditorHelpBit ); diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp index 710d955326..08b03ae65f 100644 --- a/tools/editor/editor_data.cpp +++ b/tools/editor/editor_data.cpp @@ -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) { -// 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; @@ -814,7 +816,7 @@ EditorData::EditorData() { current_edited_scene=-1; -// load_imported_scenes_from_globals(); + //load_imported_scenes_from_globals(); } /////////// diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index 352aba08bb..e2b7d475b0 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -255,7 +255,7 @@ EditorDirDialog::EditorDirDialog() { VBoxContainer *makevb= memnew( VBoxContainer ); makedialog->add_child(makevb); -// makedialog->set_child_rect(makevb); + //makedialog->set_child_rect(makevb); makedirname = memnew( LineEdit ); makevb->add_margin_child(TTR("Name:"),makedirname); diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index 5efbb17ee4..d4ca515493 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -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(); diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp index 03c7b7f74c..4a79a208e2 100644 --- a/tools/editor/editor_file_system.cpp +++ b/tools/editor/editor_file_system.cpp @@ -378,7 +378,7 @@ void EditorFileSystem::_scan_filesystem() { //save back the findings -// String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("file_cache"); + //String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("file_cache"); f=FileAccess::open(fscache,FileAccess::WRITE); _save_filesystem_cache(new_filesystem,f); @@ -502,7 +502,7 @@ void EditorFileSystem::scan() { _scan_filesystem(); if (filesystem) memdelete(filesystem); -// file_type_cache.clear(); + //file_type_cache.clear(); filesystem=new_filesystem; new_filesystem=NULL; _update_scan_actions(); diff --git a/tools/editor/editor_fonts.cpp b/tools/editor/editor_fonts.cpp index 3e128e7759..3c846fc538 100644 --- a/tools/editor/editor_fonts.cpp +++ b/tools/editor/editor_fonts.cpp @@ -127,9 +127,9 @@ void editor_register_fonts(Ref<Theme> p_theme) { p_theme->set_default_theme_font(df); -// Ref<BitmapFont> doc_font = make_font(_bi_font_doc_font_height,_bi_font_doc_font_ascent,0,_bi_font_doc_font_charcount,_bi_font_doc_font_characters,p_theme->get_icon("DocFont","EditorIcons")); -// Ref<BitmapFont> doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons")); -// Ref<BitmapFont> doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons")); + //Ref<BitmapFont> doc_font = make_font(_bi_font_doc_font_height,_bi_font_doc_font_ascent,0,_bi_font_doc_font_charcount,_bi_font_doc_font_characters,p_theme->get_icon("DocFont","EditorIcons")); + //Ref<BitmapFont> doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons")); + //Ref<BitmapFont> doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons")); MAKE_DROID_SANS(df_title,int(EDITOR_DEF("text_editor/help/help_title_font_size",18))*EDSCALE); diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 7a2a53c929..f96a02bc52 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -334,7 +334,7 @@ EditorHelpSearch::EditorHelpSearch() { search_options->connect("item_activated",this,"_confirmed"); set_title(TTR("Search Help")); -// search_options->set_hide_root(true); + //search_options->set_hide_root(true); } @@ -349,8 +349,10 @@ void EditorHelpIndex::add_type(const String& p_type,HashMap<String,TreeItem*>& p if (p_types.has(p_type)) 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; @@ -571,15 +573,15 @@ void EditorHelp::_button_pressed(int p_idx) { if (p_idx==PAGE_CLASS_LIST) { - // edited_class->set_pressed(false); - // class_list_button->set_pressed(true); - // tabs->set_current_tab(PAGE_CLASS_LIST); + //edited_class->set_pressed(false); + //class_list_button->set_pressed(true); + //tabs->set_current_tab(PAGE_CLASS_LIST); } else if (p_idx==PAGE_CLASS_DESC) { - // edited_class->set_pressed(true); - // class_list_button->set_pressed(false); - // tabs->set_current_tab(PAGE_CLASS_DESC); + //edited_class->set_pressed(true); + //class_list_button->set_pressed(false); + //tabs->set_current_tab(PAGE_CLASS_DESC); } else if (p_idx==PAGE_CLASS_PREV) { @@ -619,7 +621,7 @@ void EditorHelp::_class_desc_select(const String& p_select) { -// print_line("LINK: "+p_select); + //print_line("LINK: "+p_select); if (p_select.begins_with("#")) { //_goto_desc(p_select.substr(1,p_select.length())); emit_signal("go_to_help","class_name:"+p_select.substr(1,p_select.length())); @@ -824,7 +826,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->add_text(TTR("Members:")); class_desc->pop(); class_desc->pop(); -// class_desc->add_newline(); + //class_desc->add_newline(); class_desc->push_indent(1); class_desc->push_table(2); @@ -924,7 +926,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->pop(); //class_desc->add_newline(); -// class_desc->add_newline(); + //class_desc->add_newline(); class_desc->push_indent(1); class_desc->push_table(2); @@ -997,7 +999,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { } class_desc->pop();//monofont -// class_desc->add_newline(); + //class_desc->add_newline(); class_desc->pop(); //cell } @@ -1734,8 +1736,8 @@ void EditorHelp::_notification(int p_what) { case NOTIFICATION_READY: { -// forward->set_icon(get_icon("Forward","EditorIcons")); -// back->set_icon(get_icon("Back","EditorIcons")); + //forward->set_icon(get_icon("Forward","EditorIcons")); + //back->set_icon(get_icon("Back","EditorIcons")); _update_doc(); } break; @@ -1789,7 +1791,7 @@ void EditorHelp::_bind_methods() { ClassDB::bind_method("_class_list_select",&EditorHelp::_class_list_select); ClassDB::bind_method("_class_desc_select",&EditorHelp::_class_desc_select); ClassDB::bind_method("_class_desc_input",&EditorHelp::_class_desc_input); -// ClassDB::bind_method("_button_pressed",&EditorHelp::_button_pressed); + //ClassDB::bind_method("_button_pressed",&EditorHelp::_button_pressed); ClassDB::bind_method("_scroll_changed",&EditorHelp::_scroll_changed); ClassDB::bind_method("_request_help",&EditorHelp::_request_help); ClassDB::bind_method("_unhandled_key_input",&EditorHelp::_unhandled_key_input); @@ -1852,7 +1854,7 @@ EditorHelp::EditorHelp() { editor->get_gui_base()->add_child(class_search); class_search->connect("go_to_help",this,"_help_callback");*/ -// prev_search_page=-1; + //prev_search_page=-1; } EditorHelp::~EditorHelp() { @@ -1872,8 +1874,7 @@ void EditorHelpBit::_go_to_help(String p_what) { void EditorHelpBit::_meta_clicked(String p_select) { - - // print_line("LINK: "+p_select); + //print_line("LINK: "+p_select); if (p_select.begins_with("#")) { //_goto_desc(p_select.substr(1,p_select.length())); _go_to_help("class_name:"+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)); } else { -// - // if (!method_line.has(m)) - // return; - //class_desc->scroll_to_line(method_line[m]); + /* + if (!method_line.has(m)) + return; + class_desc->scroll_to_line(method_line[m]); + */ } } diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index cc64ffb103..cf83052ee0 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -89,7 +89,7 @@ void EditorImportPlugin::_bind_methods() { ClassDB::add_virtual_method(get_class_static(),MethodInfo("reimport_multiple_files",PropertyInfo(Variant::POOL_STRING_ARRAY,"files"))); ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"can_reimport_multiple_files")); -// BIND_VMETHOD( mi ); + //BIND_VMETHOD( mi ); } String EditorImportPlugin::get_name() const { @@ -420,11 +420,12 @@ Vector<StringName> EditorExportPlatform::get_dependencies(bool p_bundles) const { List<String> l; - // SceneLoader::get_recognized_extensions(&l); - // for(List<String>::Element *E=l.front();E;E=E->next()) { - // - // scene_extensions.insert(E->get()); - // } + /* + SceneLoader::get_recognized_extensions(&l); + for(List<String>::Element *E=l.front();E;E=E->next()) { + scene_extensions.insert(E->get()); + } + */ ResourceLoader::get_recognized_extensions_for_type("",&l); for(List<String>::Element *E=l.front();E;E=E->next()) { @@ -921,7 +922,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func options["lossy_quality"]=group_lossy_quality; options["shrink"]=EditorImportExport::get_singleton()->image_export_group_get_shrink(E->get()); options["image_format"]=group_format; -// f->store_line(options.to_json()); + //f->store_line(options.to_json()); f->store_line(image_list_md5); } @@ -958,7 +959,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (f) { //recreating deps.. String depline; -// depline=String(F->get())+"::"+itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); name unneccesary by top md5 + //depline=String(F->get())+"::"+itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); name unneccesary by top md5 depline=itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); depline+="::"+itos(region.pos.x)+"::"+itos(region.pos.y)+"::"+itos(region.size.x)+"::"+itos(region.size.y); depline+="::"+itos(margin.pos.x)+"::"+itos(margin.pos.y)+"::"+itos(margin.size.x)+"::"+itos(margin.size.y); diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp index 01068e78fc..fd2da2e4c0 100644 --- a/tools/editor/editor_log.cpp +++ b/tools/editor/editor_log.cpp @@ -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); } -// 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; self->log->add_newline(); @@ -129,7 +131,7 @@ void EditorLog::add_message(const String& p_msg,bool p_error) { log->add_newline(); log->add_text(p_msg); -// button->set_text(p_msg); + //button->set_text(p_msg); if (p_error) log->pop(); diff --git a/tools/editor/editor_log.h b/tools/editor/editor_log.h index 914b5d0c57..965d8d6420 100644 --- a/tools/editor/editor_log.h +++ b/tools/editor/editor_log.h @@ -48,7 +48,7 @@ class EditorLog : public VBoxContainer { Label *title; RichTextLabel *log; HBoxContainer *title_hb; -// PaneDrag *pd; + //PaneDrag *pd; Control *ec; PanelContainer *pc; @@ -58,7 +58,7 @@ class EditorLog : public VBoxContainer { Thread::ID current; -// void _dragged(const Point2& p_ofs); + //void _dragged(const Point2& p_ofs); void _clear_request(); static void _undo_redo_cbk(void *p_self,const String& p_name); protected: diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 57f9c46381..e3c7cc40dc 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -557,8 +557,10 @@ void EditorNode::save_resource_in_path(const Ref<Resource>& p_resource,const Str int flg=0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ String path = GlobalConfig::get_singleton()->localize_path(p_path); Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); @@ -568,7 +570,7 @@ void EditorNode::save_resource_in_path(const Ref<Resource>& p_resource,const Str accept->popup_centered_minsize(); return; } -// EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); + //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); ((Resource*)p_resource.ptr())->set_path(path); emit_signal("resource_saved",p_resource); @@ -770,7 +772,7 @@ bool EditorNode::_find_and_save_resource(RES res,Map<RES,bool>& processed,int32_ bool subchanged = _find_and_save_edited_subresources(res.ptr(),processed,flags); -// print_line("checking if edited: "+res->get_type()+" :: "+res->get_name()+" :: "+res->get_path()+" :: "+itos(changed)+" :: SR "+itos(subchanged)); + //print_line("checking if edited: "+res->get_type()+" :: "+res->get_name()+" :: "+res->get_path()+" :: "+itos(changed)+" :: SR "+itos(subchanged)); if (res->get_path().is_resource_file()) { if (changed || subchanged) { @@ -1005,8 +1007,10 @@ void EditorNode::_save_scene(String p_file, int idx) { int flg=0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ flg|=ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; @@ -1245,7 +1249,7 @@ void EditorNode::_dialog_action(String p_file) { ml = Ref<MeshLibrary>( memnew( MeshLibrary )); } -// MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(),ml,true); + //MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(),ml,true); Error err = ResourceSaver::save(p_file,ml); if (err) { @@ -1344,9 +1348,11 @@ void EditorNode::_dialog_action(String p_file) { unzCloseCurrentFile(pkg); print_line(fname); - //for(int i=0;i<512;i++) { - // print_line(itos(data[i])); - //} + /* + for(int i=0;i<512;i++) { + print_line(itos(data[i])); + } + */ file=file.get_file(); @@ -2506,8 +2512,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { editor_data.get_undo_redo().add_undo_method(parent,"remove_child",instanced_scene); editor_data.get_undo_redo().commit_action(); -// parent->add_child(instanced_scene); -// instanced_scene->set_owner(edited_scene); + //parent->add_child(instanced_scene); + //instanced_scene->set_owner(edited_scene); _last_instanced_scene=instanced_scene; } break; @@ -3176,15 +3182,17 @@ void EditorNode::_remove_edited_scene() { _update_title(); _update_scene_tabs(); -// if (editor_data.get_edited_scene_count()==1) { -// //make new scene appear saved -// set_current_version(editor_data.get_undo_redo().get_version()); -// unsaved_cache=false; -// } + /* + if (editor_data.get_edited_scene_count()==1) { + //make new scene appear saved + set_current_version(editor_data.get_undo_redo().get_version()); + unsaved_cache=false; + } + */ } void EditorNode::_remove_scene(int index) { -// printf("Attempting to remove scene %d (current is %d)\n", index, editor_data.get_edited_scene()); + //printf("Attempting to remove scene %d (current is %d)\n", index, editor_data.get_edited_scene()); if (editor_data.get_edited_scene() == index) { //Scene to remove is current scene @@ -3278,8 +3286,8 @@ Error EditorNode::save_translatable_strings(const String& p_to_file) { f->store_line("msgstr \"\""); f->store_line("\"Report-Msgid-Bugs-To: <define>\\n\""); f->store_line("\"POT-Creation-Date: "+itos(date.year)+"-"+itos(date.month)+"-"+itos(date.day)+" "+itos(time.hour)+":"+itos(time.min)+"0000\\n\""); -// f->store_line("\"PO-Revision-Date: 2006-08-30 13:56-0700\\n\""); -// f->store_line("\"Last-Translator: Rubén C. Díaz Alonso <outime@gmail.com>\\n\""); + //f->store_line("\"PO-Revision-Date: 2006-08-30 13:56-0700\\n\""); + //f->store_line("\"Last-Translator: Rubén C. Díaz Alonso <outime@gmail.com>\\n\""); f->store_line("\"Language-Team: <define>\\n\""); f->store_line("\"MIME-Version: 1.0\\n\""); f->store_line("\"Content-Type: text/plain; charset=UTF-8\\n\""); @@ -3400,8 +3408,10 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres uint32_t flags=0; -// if (saver->is_bundle_scenes_enabled()) -// flags|=ResourceSaver::FLAG_BUNDLE_INSTANCED_SCENES; + /* + if (saver->is_bundle_scenes_enabled()) + flags|=ResourceSaver::FLAG_BUNDLE_INSTANCED_SCENES; + */ if (saver->is_bundle_resources_enabled()) flags|=ResourceSaver::FLAG_BUNDLE_RESOURCES; if (saver->is_remove_editor_data_enabled()) @@ -3784,8 +3794,10 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo state->set_path(lpath); new_scene->set_scene_inherited_state(state); new_scene->set_filename(String()); - //if (new_scene->get_scene_instance_state().is_valid()) - // new_scene->get_scene_instance_state()->set_path(String()); + /* + if (new_scene->get_scene_instance_state().is_valid()) + new_scene->get_scene_instance_state()->set_path(String()); + */ } new_scene->set_scene_instance_state(Ref<SceneState>()); @@ -3801,7 +3813,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo */ editor_data.set_edited_scene_import_metadata( sdata->get_import_metadata() ); -// editor_data.get_undo_redo().clear_history(); + //editor_data.get_undo_redo().clear_history(); saved_version=editor_data.get_undo_redo().get_version(); _update_title(); _update_scene_tabs(); @@ -3893,17 +3905,17 @@ void EditorNode::update_keying() { void EditorNode::_close_messages() { -// left_split->set_dragger_visible(false); + //left_split->set_dragger_visible(false); old_split_ofs = center_split->get_split_offset(); center_split->set_split_offset(0); -// scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,0); + //scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,0); } void EditorNode::_show_messages() { -// left_split->set_dragger_visible(true); + //left_split->set_dragger_visible(true); center_split->set_split_offset(old_split_ofs); -// scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,log->get_margin(MARGIN_TOP)); + //scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,log->get_margin(MARGIN_TOP)); } @@ -3934,7 +3946,7 @@ void EditorNode::animation_editor_make_visible(bool p_visible) { } else { //pd_anim->hide(); animation_editor->hide(); -// scene_root_parent->set_margin(MARGIN_TOP,0); + //scene_root_parent->set_margin(MARGIN_TOP,0); if (!animation_vb->get_parent_control()) return; animation_vb->get_parent_control()->minimum_size_changed(); @@ -3989,7 +4001,7 @@ void EditorNode::_open_recent_scene(int p_idx) { void EditorNode::_save_optimized() { -// save_optimized_copy(optimized_save->get_optimized_scene(),optimized_save->get_preset()); + //save_optimized_copy(optimized_save->get_optimized_scene(),optimized_save->get_preset()); #if 0 String path = optimized_save->get_optimized_scene(); @@ -4159,7 +4171,7 @@ void EditorNode::register_editor_types() { //ClassDB::register_type<EditorImporter>(); -// ClassDB::register_type<EditorPostImport>(); + //ClassDB::register_type<EditorPostImport>(); } void EditorNode::unregister_editor_types() { @@ -5308,9 +5320,9 @@ void EditorNode::_bind_methods() { ClassDB::bind_method("_import_action",&EditorNode::_import_action); //ClassDB::bind_method("_import",&EditorNode::_import); -// ClassDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved); + //ClassDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved); ClassDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene); -// ClassDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm); + //ClassDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm); ClassDB::bind_method("_save_optimized",&EditorNode::_save_optimized); @@ -5517,7 +5529,7 @@ EditorNode::EditorNode() { menu_hb = memnew( HBoxContainer ); main_vbox->add_child(menu_hb); -// top_dark_vb->add_child(scene_tabs); + //top_dark_vb->add_child(scene_tabs); //left left_l_hsplit = memnew( HSplitContainer ); main_vbox->add_child(left_l_hsplit); @@ -5701,7 +5713,7 @@ EditorNode::EditorNode() { scene_root->set_as_audio_listener_2d(true); //scene_root->set_size_override(true,Size2(GlobalConfig::get_singleton()->get("display/width"),GlobalConfig::get_singleton()->get("display/height"))); -// scene_root->set_world_2d( Ref<World2D>( memnew( World2D )) ); + //scene_root->set_world_2d( Ref<World2D>( memnew( World2D )) ); viewport = memnew( VBoxContainer ); @@ -5934,8 +5946,8 @@ EditorNode::EditorNode() { native_play_button->get_popup()->connect("id_pressed",this,"_run_in_device"); run_native->connect("native_run",this,"_menu_option",varray(RUN_PLAY_NATIVE)); -// VSeparator *s1 = memnew( VSeparator ); -// play_hb->add_child(s1); + //VSeparator *s1 = memnew( VSeparator ); + //play_hb->add_child(s1); play_scene_button = memnew( ToolButton ); play_hb->add_child(play_scene_button); @@ -6322,8 +6334,8 @@ EditorNode::EditorNode() { bottom_pc->add_child(bottom_hb);*/ -// center_vb->add_child( log->get_button() ); -// log->get_button()->set_h_size_flags(Control::SIZE_EXPAND_FILL); + //center_vb->add_child( log->get_button() ); + //log->get_button()->set_h_size_flags(Control::SIZE_EXPAND_FILL); //progress_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -6371,7 +6383,7 @@ EditorNode::EditorNode() { -// optimized_save = memnew( OptimizedSaveDialog(&editor_data) ); + //optimized_save = memnew( OptimizedSaveDialog(&editor_data) ); //gui_base->add_child(optimized_save); //optimized_save->connect("confirmed",this,"_save_optimized"); @@ -6524,8 +6536,8 @@ EditorNode::EditorNode() { Ref<EditorSceneImportPlugin> _scene_import = memnew(EditorSceneImportPlugin(this) ); Ref<EditorSceneImporterCollada> _collada_import = memnew( EditorSceneImporterCollada); _scene_import->add_importer(_collada_import); -// Ref<EditorSceneImporterFBXConv> _fbxconv_import = memnew( EditorSceneImporterFBXConv); -// _scene_import->add_importer(_fbxconv_import); + //Ref<EditorSceneImporterFBXConv> _fbxconv_import = memnew( EditorSceneImporterFBXConv); + //_scene_import->add_importer(_fbxconv_import); editor_import_export->add_import_plugin( _scene_import); // TODO: This plugin has no code, it should be either implemented or dropped (GH-3667) // editor_import_export->add_import_plugin( Ref<EditorSceneAnimationImportPlugin>( memnew(EditorSceneAnimationImportPlugin(this)))); @@ -6569,14 +6581,14 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( MeshInstanceEditorPlugin(this) ) ); add_editor_plugin( memnew( AnimationTreeEditorPlugin(this) ) ); //add_editor_plugin( memnew( SamplePlayerEditorPlugin(this) ) ); - this is kind of useless at this point -// add_editor_plugin( memnew( MeshLibraryEditorPlugin(this) ) ); + //add_editor_plugin( memnew( MeshLibraryEditorPlugin(this) ) ); //add_editor_plugin( memnew( StreamEditorPlugin(this) ) ); add_editor_plugin( memnew( StyleBoxEditorPlugin(this) ) ); //add_editor_plugin( memnew( ParticlesEditorPlugin(this) ) ); add_editor_plugin( memnew( ResourcePreloaderEditorPlugin(this) ) ); add_editor_plugin( memnew( ItemListEditorPlugin(this) ) ); //add_editor_plugin( memnew( RichTextEditorPlugin(this) ) ); -// add_editor_plugin( memnew( CollisionPolygonEditorPlugin(this) ) ); + //add_editor_plugin( memnew( CollisionPolygonEditorPlugin(this) ) ); add_editor_plugin( memnew( CollisionPolygon2DEditorPlugin(this) ) ); add_editor_plugin( memnew( TileSetEditorPlugin(this) ) ); add_editor_plugin( memnew( TileMapEditorPlugin(this) ) ); @@ -6585,7 +6597,7 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( Particles2DEditorPlugin(this) ) ); add_editor_plugin( memnew( GIProbeEditorPlugin(this) ) ); add_editor_plugin( memnew( Path2DEditorPlugin(this) ) ); -// add_editor_plugin( memnew( PathEditorPlugin(this) ) ); + //add_editor_plugin( memnew( PathEditorPlugin(this) ) ); //add_editor_plugin( memnew( BakedLightEditorPlugin(this) ) ); add_editor_plugin( memnew( Polygon2DEditorPlugin(this) ) ); add_editor_plugin( memnew( LightOccluder2DEditorPlugin(this) ) ); @@ -6593,8 +6605,8 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( ColorRampEditorPlugin(this) ) ); add_editor_plugin( memnew( CollisionShape2DEditorPlugin(this) ) ); add_editor_plugin( memnew( TextureEditorPlugin(this) ) ); -// add_editor_plugin( memnew( MaterialEditorPlugin(this) ) ); -// add_editor_plugin( memnew( MeshEditorPlugin(this) ) ); + //add_editor_plugin( memnew( MaterialEditorPlugin(this) ) ); + //add_editor_plugin( memnew( MeshEditorPlugin(this) ) ); for(int i=0;i<EditorPlugins::get_plugin_count();i++) add_editor_plugin( EditorPlugins::create(i,this) ); @@ -6622,7 +6634,7 @@ EditorNode::EditorNode() { editor_plugin_screen=NULL; editor_plugins_over = memnew(EditorPluginList); -// force_top_viewport(true); + //force_top_viewport(true); _edit_current(); current=NULL; @@ -6631,7 +6643,7 @@ EditorNode::EditorNode() { ScriptServer::set_scripting_enabled(false); // no scripting by default if editor -// GlobalConfig::get_singleton()->set("render/room_cull_enabled",false); + //GlobalConfig::get_singleton()->set("render/room_cull_enabled",false); reference_resource_mem=true; save_external_resources_mem=true; @@ -6684,9 +6696,9 @@ EditorNode::EditorNode() { set_process_unhandled_input(true); _playing_edited=false; -// Panel *errors = memnew( Panel ); + //Panel *errors = memnew( Panel ); load_errors = memnew( RichTextLabel ); -// load_errors->set_readonly(true); + //load_errors->set_readonly(true); load_error_dialog = memnew( AcceptDialog ); load_error_dialog->add_child(load_errors); load_error_dialog->set_title(TTR("Load Errors")); @@ -6722,8 +6734,8 @@ EditorNode::EditorNode() { pick_main_scene->get_ok()->set_text("Select"); pick_main_scene->connect("confirmed",this,"_menu_option",varray(SETTINGS_PICK_MAIN_SCENE)); -// Ref<ImageTexture> it = gui_base->get_icon("logo","Icons"); -// OS::get_singleton()->set_icon( it->get_data() ); + //Ref<ImageTexture> it = gui_base->get_icon("logo","Icons"); + //OS::get_singleton()->set_icon( it->get_data() ); for(int i=0;i<_init_callbacks.size();i++) _init_callbacks[i](); diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 2cb1cd00ab..dd5ff1e175 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -286,7 +286,7 @@ private: CreateDialog *create_dialog; -// CallDialog *call_dialog; + //CallDialog *call_dialog; ConfirmationDialog *confirmation; ConfirmationDialog *import_confirmation; ConfirmationDialog *open_recent_confirmation; diff --git a/tools/editor/editor_profiler.cpp b/tools/editor/editor_profiler.cpp index 8522012113..5279711b0f 100644 --- a/tools/editor/editor_profiler.cpp +++ b/tools/editor/editor_profiler.cpp @@ -724,7 +724,7 @@ EditorProfiler::EditorProfiler() int metric_size=CLAMP(int(EDITOR_DEF("debugger/profiler_frame_history_size",600)),60,1024); frame_metrics.resize(metric_size); last_metric=-1; -// cursor_metric=-1; + //cursor_metric=-1; hover_metric=-1; @@ -750,6 +750,6 @@ EditorProfiler::EditorProfiler() seeking=false; graph_height=1; -// activate->set_disabled(true); + //activate->set_disabled(true); } diff --git a/tools/editor/editor_run_script.cpp b/tools/editor/editor_run_script.cpp index c8f3f9fc5d..4a3cbfbccb 100644 --- a/tools/editor/editor_run_script.cpp +++ b/tools/editor/editor_run_script.cpp @@ -46,7 +46,7 @@ void EditorScript::add_root_node(Node *p_node) { return; } -// editor->set_edited_scene(p_node); + //editor->set_edited_scene(p_node); } Node *EditorScript::get_scene() { diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 2d6618f449..807183ae46 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -1105,7 +1105,7 @@ EditorSettings::EditorSettings() { EditorSettings::~EditorSettings() { -// singleton=NULL; + //singleton=NULL; } Ref<ShortCut> ED_GET_SHORTCUT(const String& p_path) { diff --git a/tools/editor/editor_sub_scene.cpp b/tools/editor/editor_sub_scene.cpp index 5c40108f93..34c3d47006 100644 --- a/tools/editor/editor_sub_scene.cpp +++ b/tools/editor/editor_sub_scene.cpp @@ -203,7 +203,7 @@ EditorSubScene::EditorSubScene() { VBoxContainer *vb = memnew( VBoxContainer ); add_child(vb); -// set_child_rect(vb); + //set_child_rect(vb); HBoxContainer *hb = memnew( HBoxContainer ); path = memnew( LineEdit ); diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp index cd13d93cf5..2df5a00e9d 100644 --- a/tools/editor/filesystem_dock.cpp +++ b/tools/editor/filesystem_dock.cpp @@ -1149,7 +1149,7 @@ void FileSystemDock::_open_pressed(){ current_path->set_text(path); _push_to_history(); -// emit_signal("open",path); + //emit_signal("open",path); } @@ -1242,8 +1242,10 @@ Variant FileSystemDock::get_drag_data_fw(const Point2& p_point,Control* p_from) if (seldirs.empty() && selfiles.empty()) return Variant(); - //if (seldirs.size() && selfiles.size()) - // return Variant(); //can't really mix files and dirs (i think?) - yes you can, commenting + /* + if (seldirs.size() && selfiles.size()) + return Variant(); //can't really mix files and dirs (i think?) - yes you can, commenting + */ /*if (selfiles.size()==1) { Ref<Resource> resource = ResourceLoader::load(files->get_item_metadata(selfiles.front()->get())); @@ -1622,7 +1624,7 @@ void FileSystemDock::_bind_methods() { ClassDB::bind_method(_MD("_update_tree"),&FileSystemDock::_update_tree); ClassDB::bind_method(_MD("_rescan"),&FileSystemDock::_rescan); ClassDB::bind_method(_MD("_favorites_pressed"),&FileSystemDock::_favorites_pressed); -// ClassDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed); + //ClassDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed); ClassDB::bind_method(_MD("_open_pressed"),&FileSystemDock::_open_pressed); ClassDB::bind_method(_MD("_dir_rmb_pressed"),&FileSystemDock::_dir_rmb_pressed); @@ -1700,7 +1702,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { button_favorite->set_focus_mode(FOCUS_NONE); -// Control *spacer = memnew( Control); + //Control *spacer = memnew( Control); diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp index bad6261d4e..722b02f77b 100644 --- a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp @@ -167,7 +167,7 @@ public: ClassDB::bind_method("_import", &EditorBitMaskImportDialog::_import); ClassDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse); ClassDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target); - // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorBitMaskImportDialog(EditorBitMaskImportPlugin *p_plugin) { @@ -225,7 +225,7 @@ public: save_select = memnew(EditorDirDialog); add_child(save_select); - // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this, "_choose_save_dir"); get_ok()->connect("pressed", this, "_import"); @@ -235,7 +235,7 @@ public: error_dialog = memnew(ConfirmationDialog); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); - // error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); } diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp index 3f4e454cac..c4619458ce 100644 --- a/tools/editor/io_plugins/editor_font_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp @@ -665,10 +665,12 @@ public: List<String> fl; Ref<BitmapFont> font= memnew(BitmapFont); dest->get_file_dialog()->add_filter("*.fnt ; Font" ); - //ResourceSaver::get_recognized_extensions(font,&fl); - //for(List<String>::Element *E=fl.front();E;E=E->next()) { - // dest->get_file_dialog()->add_filter("*."+E->get()); - //} + /* + ResourceSaver::get_recognized_extensions(font,&fl); + for(List<String>::Element *E=fl.front();E;E=E->next()) { + dest->get_file_dialog()->add_filter("*."+E->get()); + } + */ vbl->add_margin_child(TTR("Dest Resource:"),dest); HBoxContainer *testhb = memnew( HBoxContainer ); @@ -689,7 +691,7 @@ public: vbl->add_margin_child(TTR("Test:")+" ",testhb); /* HBoxContainer *upd_hb = memnew( HBoxContainer ); -// vbl->add_child(upd_hb); + //vbl->add_child(upd_hb); upd_hb->add_spacer(); Button *update = memnew( Button); upd_hb->add_child(update); @@ -754,7 +756,7 @@ struct _EditorFontData { int texture; Image blit; Point2i blit_ofs; -// bool printable; + //bool printable; }; @@ -780,13 +782,13 @@ static unsigned char get_SDF_radial( int x, int y, int max_radius ) { - // hideous brute force method + //hideous brute force method float d2 = max_radius*max_radius+1.0; unsigned char v = fontmap[x+y*w]; for( int radius = 1; (radius <= max_radius) && (radius*radius < d2); ++radius ) { int line, lo, hi; - // north + //north line = y - radius; if( (line >= 0) && (line < h) ) { @@ -797,7 +799,7 @@ static unsigned char get_SDF_radial( int idx = line * w + lo; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = i - x; @@ -808,11 +810,11 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on ++idx; } } - // south + //south line = y + radius; if( (line >= 0) && (line < h) ) { @@ -823,7 +825,7 @@ static unsigned char get_SDF_radial( int idx = line * w + lo; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = i - x; @@ -834,11 +836,11 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on ++idx; } } - // west + //west line = x - radius; if( (line >= 0) && (line < w) ) { @@ -849,7 +851,7 @@ static unsigned char get_SDF_radial( int idx = lo * w + line; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = line - x; @@ -860,11 +862,11 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on idx += w; } } - // east + //east line = x + radius; if( (line >= 0) && (line < w) ) { @@ -875,7 +877,7 @@ static unsigned char get_SDF_radial( int idx = lo * w + line; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = line - x; @@ -886,7 +888,7 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on idx += w; } } @@ -981,14 +983,14 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe FT_GlyphSlot slot = face->glyph; -// error = FT_Set_Charmap(face,ft_encoding_unicode ); /* encoding.. */ + //error = FT_Set_Charmap(face,ft_encoding_unicode ); /* encoding.. */ /* PRINT CHARACTERS TO INDIVIDUAL BITMAPS */ -// int space_size=5; //size for space, if none found.. 5! -// int min_valign=500; //some ridiculous number + //int space_size=5; //size for space, if none found.. 5! + //int min_valign=500; //some ridiculous number FT_ULong charcode; FT_UInt gindex; @@ -1080,10 +1082,10 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) { - // oversize the holding buffer so I can smooth it! + //oversize the holding buffer so I can smooth it! int sw = w + scaler * 4; int sh = h + scaler * 4; - // do the SDF + //do the SDF int sdfw = sw / scaler; int sdfh = sh / scaler; @@ -1139,7 +1141,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) { - // oversize the holding buffer so I can smooth it! + //oversize the holding buffer so I can smooth it! int sw = w + scaler * 4; int sh = h + scaler * 4; @@ -1578,7 +1580,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe //debug the texture Ref<ImageTexture> atlast = memnew( ImageTexture ); atlast->create_from_image(atlas); -// atlast->create_from_image(font_data_list[5]->blit); + //atlast->create_from_image(font_data_list[5]->blit); TextureRect *tf = memnew( TextureRect ); tf->set_texture(atlast); dialog->add_child(tf); diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp index d17ca1d7f1..1cbb594a51 100644 --- a/tools/editor/io_plugins/editor_import_collada.cpp +++ b/tools/editor/io_plugins/editor_import_collada.cpp @@ -236,20 +236,22 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) { return OK; //well, it's an ambient light.. Light *l = memnew( DirectionalLight ); -// l->set_color(Light::COLOR_AMBIENT,ld.color); -// l->set_color(Light::COLOR_DIFFUSE,Color(0,0,0)); -// l->set_color(Light::COLOR_SPECULAR,Color(0,0,0)); + //l->set_color(Light::COLOR_AMBIENT,ld.color); + //l->set_color(Light::COLOR_DIFFUSE,Color(0,0,0)); + //l->set_color(Light::COLOR_SPECULAR,Color(0,0,0)); node = l; } else if (ld.mode==Collada::LightData::MODE_DIRECTIONAL) { //well, it's an ambient light.. Light *l = memnew( DirectionalLight ); - //if (found_ambient) //use it here - // l->set_color(Light::COLOR_AMBIENT,ambient); + /* + if (found_ambient) //use it here + l->set_color(Light::COLOR_AMBIENT,ambient); -// l->set_color(Light::COLOR_DIFFUSE,ld.color); -// l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); + l->set_color(Light::COLOR_DIFFUSE,ld.color); + l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); + */ node = l; } else { @@ -259,14 +261,14 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) { l=memnew( OmniLight ); else { l=memnew( SpotLight ); -// l->set_parameter(Light::PARAM_SPOT_ANGLE,ld.spot_angle); -// l->set_parameter(Light::PARAM_SPOT_ATTENUATION,ld.spot_exp); + //l->set_parameter(Light::PARAM_SPOT_ANGLE,ld.spot_angle); + //l->set_parameter(Light::PARAM_SPOT_ATTENUATION,ld.spot_exp); } // -// l->set_color(Light::COLOR_DIFFUSE,ld.color); -// l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); -// l->approximate_opengl_attenuation(ld.constant_att,ld.linear_att,ld.quad_att); + //l->set_color(Light::COLOR_DIFFUSE,ld.color); + //l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); + //l->approximate_opengl_attenuation(ld.constant_att,ld.linear_att,ld.quad_att); node=l; } @@ -396,13 +398,13 @@ Error ColladaImport::_create_material(const String& p_target) { material->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,texture); material->set_albedo(Color(1,1,1,1)); -// material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,Color(1,1,1,1)); + //material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,Color(1,1,1,1)); } else { missing_textures.push_back(texfile.get_file()); } } } else { -// material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,effect.diffuse.color); + //material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,effect.diffuse.color); } // SPECULAR @@ -417,15 +419,15 @@ Error ColladaImport::_create_material(const String& p_target) { material->set_texture(FixedSpatialMaterial::TEXTURE_SPECULAR,texture); material->set_specular(Color(1,1,1,1)); -// material->set_texture(FixedSpatialMaterial::PARAM_SPECULAR,texture); -// material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,Color(1,1,1,1)); + //material->set_texture(FixedSpatialMaterial::PARAM_SPECULAR,texture); + //material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,Color(1,1,1,1)); } else { missing_textures.push_back(texfile.get_file()); } } } else { -// material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,effect.specular.color); + //material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,effect.specular.color); } // EMISSION @@ -441,14 +443,14 @@ Error ColladaImport::_create_material(const String& p_target) { material->set_texture(FixedSpatialMaterial::TEXTURE_EMISSION,texture); material->set_emission(Color(1,1,1,1)); -// material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,Color(1,1,1,1)); + //material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,Color(1,1,1,1)); }else { -// missing_textures.push_back(texfile.get_file()); + //missing_textures.push_back(texfile.get_file()); } } } else { -// material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,effect.emission.color); + //material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,effect.emission.color); } // NORMAL @@ -461,18 +463,18 @@ Error ColladaImport::_create_material(const String& p_target) { Ref<Texture> texture = ResourceLoader::load(texfile,"Texture"); if (texture.is_valid()) { material->set_texture(FixedSpatialMaterial::TEXTURE_NORMAL,texture); -// material->set_emission(Color(1,1,1,1)); + //material->set_emission(Color(1,1,1,1)); - // material->set_texture(FixedSpatialMaterial::PARAM_NORMAL,texture); + //material->set_texture(FixedSpatialMaterial::PARAM_NORMAL,texture); }else { -// missing_textures.push_back(texfile.get_file()); + //missing_textures.push_back(texfile.get_file()); } } } -// material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR_EXP,effect.shininess); + //material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR_EXP,effect.shininess); if (effect.double_sided) { material->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED); } @@ -1171,11 +1173,13 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con narrayw = PoolVector<Vector3>::Write(); final_normal_array=narray; - //PoolVector<Vector3> altnaray; - //_generate_normals(index_array,final_vertex_array,altnaray); + /* + PoolVector<Vector3> altnaray; + _generate_normals(index_array,final_vertex_array,altnaray); - //for(int i=0;i<altnaray.size();i++) - // print_line(rtos(altnaray[i].dot(final_normal_array[i]))); + for(int i=0;i<altnaray.size();i++) + print_line(rtos(altnaray[i].dot(final_normal_array[i]))); + */ } else if (primitive==Mesh::PRIMITIVE_TRIANGLES) { //generate normals (even if unused later) @@ -1257,8 +1261,10 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con } -// if (sum<0.8) -// COLLADA_PRINT("ERROR SUMMING INDEX "+itos(k)+" had weights: "+itos(vertex_array[k].weights.size())); + /* + if (sum<0.8) + COLLADA_PRINT("ERROR SUMMING INDEX "+itos(k)+" had weights: "+itos(vertex_array[k].weights.size())); + */ } @@ -1468,7 +1474,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con #endif for(int mi=0;mi<p_morph_meshes.size();mi++) { - // print_line("want surface "+itos(mi)+" has "+itos(p_morph_meshes[mi]->get_surface_count())); + //print_line("want surface "+itos(mi)+" has "+itos(p_morph_meshes[mi]->get_surface_count())); Array a = p_morph_meshes[mi]->surface_get_arrays(surface); //add valid weight and bone arrays if they exist, TODO check if they are unique to shape (generally not) @@ -2375,9 +2381,11 @@ Node* EditorSceneImporterCollada::import_scene(const String& p_path, uint32_t p_ if (state.missing_textures.size()) { - //for(int i=0;i<state.missing_textures.size();i++) { -// EditorNode::add_io_error("Texture Not Found: "+state.missing_textures[i]); -// } + /* + for(int i=0;i<state.missing_textures.size();i++) { + EditorNode::add_io_error("Texture Not Found: "+state.missing_textures[i]); + } + */ if (r_missing_deps) { diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp index d45f3839f8..eeb61fc443 100644 --- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp @@ -323,7 +323,7 @@ public: ClassDB::bind_method("_import",&EditorSampleImportDialog::_import); ClassDB::bind_method("_browse",&EditorSampleImportDialog::_browse); ClassDB::bind_method("_browse_target",&EditorSampleImportDialog::_browse_target); - // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorSampleImportDialog(EditorSampleImportPlugin *p_plugin) { @@ -373,7 +373,7 @@ public: save_select = memnew( EditorDirDialog ); add_child(save_select); - // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); @@ -383,7 +383,7 @@ public: error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); - // error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); options = memnew( _EditorSampleImportOptions ); @@ -648,7 +648,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI } } -// print_line("compressing ima-adpcm, resulting buffersize is "+itos(dst_data.size())+" from "+itos(data.size())); + //print_line("compressing ima-adpcm, resulting buffersize is "+itos(dst_data.size())+" from "+itos(data.size())); } else { @@ -758,12 +758,14 @@ void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,P xm_sample=CLAMP(in[i]*32767.0,-32768,32767); - //if (xm_sample==32767 || xm_sample==-32768) - // printf("clippy!\n",xm_sample); + /* + if (xm_sample==32767 || xm_sample==-32768) + printf("clippy!\n",xm_sample); + */ } - // xm_sample=xm_sample+xm_prev; - // xm_prev=xm_sample; + //xm_sample=xm_sample+xm_prev; + //xm_prev=xm_sample; diff = (int)xm_sample - prev ; diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp index ae0559636b..79c88e7407 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp @@ -377,7 +377,7 @@ void EditorImportAnimationOptions::_bind_methods() { ClassDB::bind_method("_changed",&EditorImportAnimationOptions::_changed); ClassDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited); ClassDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action); -// ClassDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp); + //ClassDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp); ADD_SIGNAL(MethodInfo("changed")); } @@ -390,7 +390,7 @@ void EditorImportAnimationOptions::_notification(int p_what) { flags->connect("item_edited",this,"_changed"); clips_tree->connect("item_edited",this,"_item_edited"); clips_tree->connect("button_pressed",this,"_button_action",varray(),CONNECT_DEFERRED); -// format->connect("item_selected",this,"_changedp"); + //format->connect("item_selected",this,"_changedp"); } } @@ -1237,7 +1237,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); -// error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); HBoxContainer *custom_root_hb = memnew( HBoxContainer ); @@ -1302,7 +1302,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce add_child(confirm_import); VBoxContainer *cvb = memnew( VBoxContainer ); confirm_import->add_child(cvb); -// confirm_import->set_child_rect(cvb); + //confirm_import->set_child_rect(cvb); PanelContainer *pc = memnew( PanelContainer ); pc->add_style_override("panel",get_stylebox("normal","TextEdit")); @@ -1421,9 +1421,11 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag if (tex.is_valid()) { image_map.insert(tex,TEXTURE_ROLE_NORMALMAP); - //if (p_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY) - // res->cast_to<FixedSpatialMaterial>()->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_XY_NORMALMAP,true); - }// + /* + if (p_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY) + res->cast_to<FixedSpatialMaterial>()->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_XY_NORMALMAP,true); + */ + } } else { @@ -1531,10 +1533,10 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh> Ref<FixedSpatialMaterial> fm = m->surface_get_material(i); if (fm.is_valid()) { - // fm->set_flag(Material::FLAG_UNSHADED,true); - // fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); - // fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); - // fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //fm->set_flag(Material::FLAG_UNSHADED,true); + //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); + //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); + //fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); } } } @@ -1558,8 +1560,8 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh> if (p_flags&SCENE_FLAG_DETECT_ALPHA && _teststr(mat->get_name(),"alpha")) { - // mat->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); - // mat->set_name(_fixstr(mat->get_name(),"alpha")); + //mat->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //mat->set_name(_fixstr(mat->get_name(),"alpha")); } if (p_flags&SCENE_FLAG_DETECT_VCOLOR && _teststr(mat->get_name(),"vcol")) { @@ -1640,10 +1642,10 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh> Ref<FixedSpatialMaterial> fm = m->surface_get_material(i); if (fm.is_valid()) { - // fm->set_flag(Material::FLAG_UNSHADED,true); - // fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); - // fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); - // fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //fm->set_flag(Material::FLAG_UNSHADED,true); + //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); + //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); + //fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); } } } @@ -2172,8 +2174,10 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from import_flags|=EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS; if (scene_flags&SCENE_FLAG_IMPORT_ANIMATIONS) import_flags|=EditorSceneImporter::IMPORT_ANIMATION; - //if (scene_flags&SCENE_FLAG_FAIL_ON_MISSING_IMAGES) - // import_flags|=EditorSceneImporter::IMPORT_FAIL_ON_MISSING_DEPENDENCIES; + /* + if (scene_flags&SCENE_FLAG_FAIL_ON_MISSING_IMAGES) + import_flags|=EditorSceneImporter::IMPORT_FAIL_ON_MISSING_DEPENDENCIES; + */ if (scene_flags&SCENE_FLAG_GENERATE_TANGENT_ARRAYS) import_flags|=EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS; diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp index 564753ca7b..5ba7d0c417 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -344,7 +344,7 @@ void EditorTextureImportDialog::_choose_save_dir(const String& p_path) { void EditorTextureImportDialog::_import() { -// ImportMonitorBlock imb; + //ImportMonitorBlock imb; Vector<String> files=import_path->get_text().split(","); @@ -539,7 +539,7 @@ void EditorTextureImportDialog::_notification(int p_what) { List<String> extensions; ImageLoader::get_recognized_extensions(&extensions); - // ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions); + //ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions); file_select->clear_filters(); for(int i=0;i<extensions.size();i++) { @@ -643,7 +643,7 @@ void EditorTextureImportDialog::_bind_methods() { ClassDB::bind_method("_browse",&EditorTextureImportDialog::_browse); ClassDB::bind_method("_browse_target",&EditorTextureImportDialog::_browse_target); ClassDB::bind_method("_mode_changed",&EditorTextureImportDialog::_mode_changed); -// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* p_plugin) { @@ -760,20 +760,22 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* save_select = memnew( EditorDirDialog ); add_child(save_select); -// save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); get_ok()->set_text(TTR("Import")); //move stuff up - //for(int i=0;i<4;i++) - // vbc->move_child( vbc->get_child( vbc->get_child_count() -1), 0); + /* + for(int i=0;i<4;i++) + vbc->move_child( vbc->get_child( vbc->get_child_count() -1), 0); + */ error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); -// error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); @@ -784,8 +786,8 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* _mode_changed(EditorTextureImportPlugin::MODE_TEXTURE_3D); -// GLOBAL_DEF("import/shared_textures","res://"); -// Globals::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR)); + //GLOBAL_DEF("import/shared_textures","res://"); + //Globals::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR)); } @@ -944,10 +946,12 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { - // image.srgb_to_linear(); - //} + image.srgb_to_linear(); + } + */ if (shrink>1) { @@ -1003,11 +1007,13 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { -// - // print_line("CONVERT BECAUSE: "+itos(flags)); - // image.srgb_to_linear(); - //} + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + + print_line("CONVERT BECAUSE: "+itos(flags)); + image.srgb_to_linear(); + } + */ int orig_w=image.get_width(); int orig_h=image.get_height(); @@ -1425,10 +1431,12 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { - // image.srgb_to_linear(); - //} + image.srgb_to_linear(); + } + */ if (shrink>1) { @@ -1484,11 +1492,13 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { -// - // print_line("CONVERT BECAUSE: "+itos(flags)); - // image.srgb_to_linear(); - //} + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + + print_line("CONVERT BECAUSE: "+itos(flags)); + image.srgb_to_linear(); + } + */ int orig_w=image.get_width(); int orig_h=image.get_height(); diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp index 90c8e35f6a..d9288f5990 100644 --- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp @@ -287,7 +287,7 @@ public: ClassDB::bind_method("_import",&EditorTranslationImportDialog::_import); ClassDB::bind_method("_browse",&EditorTranslationImportDialog::_browse); ClassDB::bind_method("_browse_target",&EditorTranslationImportDialog::_browse_target); - // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorTranslationImportDialog(EditorTranslationImportPlugin *p_plugin) { @@ -356,7 +356,7 @@ public: save_select = memnew( EditorDirDialog ); add_child(save_select); - // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); @@ -366,7 +366,7 @@ public: error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); - // error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); diff --git a/tools/editor/output_strings.cpp b/tools/editor/output_strings.cpp index 9ba97451c0..cb43bb9230 100644 --- a/tools/editor/output_strings.cpp +++ b/tools/editor/output_strings.cpp @@ -82,7 +82,7 @@ void OutputStrings::_notification(int p_what) { Ref<Texture> icon_error = get_icon("Error","EditorIcons"); Ref<Texture> icon_warning = get_icon("Warning","EditorIcons"); - // int lines = (size_height-(int)margin.y) / font_height; + //int lines = (size_height-(int)margin.y) / font_height; Point2 ofs=tree_st->get_offset(); LineMap::Element *E = line_map.find(v_scroll->get_value()); diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index b511bc30d0..59ab3bc467 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -94,7 +94,7 @@ void AnimationPlayerEditor::_notification(int p_what) { if (p_what==NOTIFICATION_ENTER_TREE) { -// editor->connect("hide_animation_player_editors",this,"_hide_anim_editors"); + //editor->connect("hide_animation_player_editors",this,"_hide_anim_editors"); add_anim->set_icon( get_icon("New","EditorIcons") ); rename_anim->set_icon( get_icon("Rename","EditorIcons") ); duplicate_anim->set_icon( get_icon("Duplicate","EditorIcons") ); @@ -377,8 +377,10 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resou int flg = 0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg |= ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg |= ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg |= ResourceSaver::FLAG_RELATIVE_PATHS; + */ String path = GlobalConfig::get_singleton()->localize_path(p_path); Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); @@ -388,7 +390,7 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resou accept->popup_centered_minsize(); return; } - // EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); + //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); ((Resource*)p_resource.ptr())->set_path(path); editor->emit_signal("resource_saved", p_resource); @@ -672,7 +674,7 @@ void AnimationPlayerEditor::set_state(const Dictionary& p_state) { show(); set_process(true); ensure_visibility(); -// EditorNode::get_singleton()->animation_panel_make_visible(true); + //EditorNode::get_singleton()->animation_panel_make_visible(true); if (p_state.has("animation")) { String anim = p_state["animation"]; @@ -897,7 +899,7 @@ void AnimationPlayerEditor::edit(AnimationPlayer *p_player) { } else { key_editor->show_select_node_warning(true); -// hide(); + //hide(); } @@ -1128,7 +1130,7 @@ void AnimationPlayerEditor::_hide_anim_editors() { key_editor->set_animation(Ref<Animation>()); key_editor->set_root(NULL); key_editor->show_select_node_warning(true); -// editor->animation_editor_make_visible(false); + //editor->animation_editor_make_visible(false); } @@ -1267,7 +1269,7 @@ void AnimationPlayerEditor::_bind_methods() { ClassDB::bind_method(_MD("_seek_value_changed"),&AnimationPlayerEditor::_seek_value_changed,DEFVAL(true)); ClassDB::bind_method(_MD("_animation_player_changed"),&AnimationPlayerEditor::_animation_player_changed); ClassDB::bind_method(_MD("_blend_edited"),&AnimationPlayerEditor::_blend_edited); -// ClassDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed); + //ClassDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed); ClassDB::bind_method(_MD("_scale_changed"),&AnimationPlayerEditor::_scale_changed); //ClassDB::bind_method(_MD("_editor_store_all"),&AnimationPlayerEditor::_editor_store_all); ///jectTypeDB::bind_method(_MD("_editor_load_all"),&AnimationPlayerEditor::_editor_load_all); @@ -1552,11 +1554,11 @@ void AnimationPlayerEditorPlugin::make_visible(bool p_visible) { editor->make_bottom_panel_item_visible(anim_editor); anim_editor->set_process(true); anim_editor->ensure_visibility(); -// editor->animation_panel_make_visible(true); + //editor->animation_panel_make_visible(true); } else { -// anim_editor->hide(); -// anim_editor->set_idle_process(false); + //anim_editor->hide(); + //anim_editor->set_idle_process(false); } } diff --git a/tools/editor/plugins/animation_player_editor_plugin.h b/tools/editor/plugins/animation_player_editor_plugin.h index 9074eb127b..840c39ba49 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.h +++ b/tools/editor/plugins/animation_player_editor_plugin.h @@ -73,7 +73,7 @@ class AnimationPlayerEditor : public VBoxContainer { Button *play_bw; Button *play_bw_from; -// Button *pause; + //Button *pause; Button *add_anim; Button *autoplay; Button *rename_anim; diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp index 5a5660ae50..ea63a0e858 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.cpp +++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp @@ -621,9 +621,9 @@ void AnimationTreeEditor::_draw_node(const StringName& p_node) { #if 0 void AnimationTreeEditor::_node_param_changed() { -// anim_tree->node_set_param( click_node,property_editor->get_variant() ); -// update(); -// _write_anim_tree_graph(); + //anim_tree->node_set_param( click_node,property_editor->get_variant() ); + //update(); + //_write_anim_tree_graph(); } #endif @@ -792,7 +792,7 @@ void AnimationTreeEditor::_gui_input(InputEvent p_event) { renaming_edit=false; _popup_edit_dialog(); //open editor - // _node_edit_property(click_node); + //_node_edit_property(click_node); } break; default:{} } @@ -1325,7 +1325,7 @@ void AnimationTreeEditor::_bind_methods() { ClassDB::bind_method( "_add_menu_item", &AnimationTreeEditor::_add_menu_item ); ClassDB::bind_method( "_node_menu_item", &AnimationTreeEditor::_node_menu_item ); ClassDB::bind_method( "_gui_input", &AnimationTreeEditor::_gui_input ); -// ClassDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed ); + //ClassDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed ); ClassDB::bind_method( "_scroll_moved", &AnimationTreeEditor::_scroll_moved ); ClassDB::bind_method( "_edit_dialog_changeds", &AnimationTreeEditor::_edit_dialog_changeds ); ClassDB::bind_method( "_edit_dialog_changede", &AnimationTreeEditor::_edit_dialog_changede ); @@ -1414,8 +1414,8 @@ AnimationTreeEditor::AnimationTreeEditor() { updating_edit=false; edit_dialog = memnew( PopupPanel ); -// edit_dialog->get_ok()->hide(); -// edit_dialog->get_cancel()->hide(); + //edit_dialog->get_ok()->hide(); + //edit_dialog->get_cancel()->hide(); add_child(edit_dialog); edit_option = memnew( OptionButton ); @@ -1502,8 +1502,8 @@ bool AnimationTreeEditorPlugin::handles(Object *p_object) const { void AnimationTreeEditorPlugin::make_visible(bool p_visible) { if (p_visible) { -// editor->hide_animation_player_editors(); -// editor->animation_panel_make_visible(true); + //editor->hide_animation_player_editors(); + //editor->animation_panel_make_visible(true); button->show(); editor->make_bottom_panel_item_visible(anim_tree_editor); anim_tree_editor->set_fixed_process(true); diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp index 2d91524ef9..0b12d080e4 100644 --- a/tools/editor/plugins/baked_light_baker.cpp +++ b/tools/editor/plugins/baked_light_baker.cpp @@ -1006,8 +1006,10 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c Triangle *triangle=NULL; - //for(int i=0;i<max_depth;i++) - // stack[i]=0; + /* + for(int i=0;i<max_depth;i++) + stack[i]=0; + */ int level=0; //AABB ray_aabb; @@ -1059,7 +1061,7 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c bool valid = b.aabb.smits_intersect_ray(p_begin,n,0,len); //bool valid = b.aabb.intersects_segment(p_begin,p_end); - // bool valid = b.aabb.intersects(ray_aabb); + //bool valid = b.aabb.intersects(ray_aabb); if (!valid) { @@ -1234,7 +1236,7 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c } //specular later -// _plot_light_point(r_point,octree,octree_aabb,p_light); + //_plot_light_point(r_point,octree,octree_aabb,p_light); Color plot_light=res_light.linear_interpolate(diffuse_at_point,tint); @@ -1678,7 +1680,7 @@ void BakedLightBaker::throw_rays(ThreadStack& thread_stack,int p_amount) { dl.rays_thrown++; baked_light_baker_add_64i(&total_rays,1); _throw_ray(thread_stack,dl.bake_direct,from,to,dl.radius,col,dl.attenuation_table.ptr(),0,dl.radius,max_bounces,true); -// _throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); + //_throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); } } break; @@ -1710,7 +1712,7 @@ void BakedLightBaker::throw_rays(ThreadStack& thread_stack,int p_amount) { dl.rays_thrown++; baked_light_baker_add_64i(&total_rays,1); _throw_ray(thread_stack,dl.bake_direct,from,to,dl.radius,col,dl.attenuation_table.ptr(),0,dl.radius,max_bounces,true); - // _throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); + //_throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); } } break; @@ -2010,8 +2012,10 @@ void BakedLightBaker::update_octree_images(PoolVector<uint8_t> &p_octree,PoolVec //write colors for(int j=0;j<8;j++) { - //if (!oct.children[j]) - // continue; + /* + if (!oct.children[j]) + continue; + */ uint8_t *iptr=&lptr[ofs+lchild_offsets[j]]; float r=oct.light_accum[j][0]*norm; @@ -2291,7 +2295,7 @@ void BakedLightBaker::_plot_pixel_to_lightmap(int x, int y, int width, int heigh bool valid = b.aabb.smits_intersect_ray(from,n,0,len); //bool valid = b.aabb.intersects_segment(p_begin,p_end); - // bool valid = b.aabb.intersects(ray_aabb); + //bool valid = b.aabb.intersects(ray_aabb); if (!valid) { @@ -2649,10 +2653,13 @@ void BakedLightBaker::clear() { /* * ??? for(int i=0;i<octant_pool.size();i++) { - //if (octant_pool[i].leaf) { - // memdelete_arr( octant_pool[i].light ); - //} Vector<double> norm_arr; - //norm_arr.resize(lights.size()); + /* + if (octant_pool[i].leaf) { + memdelete_arr( octant_pool[i].light ); + } + Vector<double> norm_arr; + norm_arr.resize(lights.size()); + */ for(int i=0;i<lights.size();i++) { norm_arr[i] = 1.0/get_normalization(i); diff --git a/tools/editor/plugins/baked_light_baker.h b/tools/editor/plugins/baked_light_baker.h index 6fcf78dd0a..89788338d9 100644 --- a/tools/editor/plugins/baked_light_baker.h +++ b/tools/editor/plugins/baked_light_baker.h @@ -45,10 +45,11 @@ public: OCTANT_POOL_CHUNK=1000000 }; - //struct OctantLight { - - // double accum[8][3]; - //}; + /* + struct OctantLight { + double accum[8][3]; + }; + */ struct Octant { bool leaf; diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp index 8f564a3247..26c3144188 100644 --- a/tools/editor/plugins/baked_light_editor_plugin.cpp +++ b/tools/editor/plugins/baked_light_editor_plugin.cpp @@ -105,8 +105,10 @@ void BakedLightEditor::_notification(int p_option) { colors[i].b=oct->light_accum[i][2]/norm; float lum = colors[i].get_v(); - //if (lum<0.05) - // color.a=0; + /* + if (lum<0.05) + color.a=0; + */ if (lum>max_lum) max_lum=lum; @@ -141,7 +143,7 @@ void BakedLightEditor::_notification(int p_option) { baker->update_octree_images(octree_texture,light_texture); baker->update_octree_sampler(octree_sampler); - // print_line("sampler size: "+itos(octree_sampler.size()*4)); + //print_line("sampler size: "+itos(octree_sampler.size()*4)); #if 1 //debug diff --git a/tools/editor/plugins/camera_editor_plugin.cpp b/tools/editor/plugins/camera_editor_plugin.cpp index 67f776ba0b..1c8c392d65 100644 --- a/tools/editor/plugins/camera_editor_plugin.cpp +++ b/tools/editor/plugins/camera_editor_plugin.cpp @@ -114,10 +114,8 @@ bool CameraEditorPlugin::handles(Object *p_object) const { void CameraEditorPlugin::make_visible(bool p_visible) { if (p_visible) { -// SpatialEditor::get_singleton()->set_can_preview(p_object->cast_to<Camera>()); - + //SpatialEditor::get_singleton()->set_can_preview(p_object->cast_to<Camera>()); } else { - SpatialEditor::get_singleton()->set_can_preview(NULL); } diff --git a/tools/editor/plugins/camera_editor_plugin.h b/tools/editor/plugins/camera_editor_plugin.h index 56702f174b..7e79d0ec74 100644 --- a/tools/editor/plugins/camera_editor_plugin.h +++ b/tools/editor/plugins/camera_editor_plugin.h @@ -60,7 +60,7 @@ class CameraEditorPlugin : public EditorPlugin { GDCLASS( CameraEditorPlugin, EditorPlugin ); -// CameraEditor *camera_editor; + //CameraEditor *camera_editor; EditorNode *editor; public: diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 65fdababbd..514e44e809 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -79,7 +79,7 @@ public: container = memnew( VBoxContainer ); add_child(container); - // set_child_rect(container); + //set_child_rect(container); child_container = memnew( GridContainer ); child_container->set_columns(3); @@ -287,7 +287,7 @@ Dictionary CanvasItemEditor::get_state() const { Dictionary state; state["zoom"]=zoom; state["ofs"]=Point2(h_scroll->get_value(),v_scroll->get_value()); -// state["ofs"]=-transform.get_origin(); + //state["ofs"]=-transform.get_origin(); state["snap_offset"]=snap_offset; state["snap_step"]=snap_step; state["snap_rotation_offset"]=snap_rotation_offset; @@ -1187,8 +1187,10 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) { } return; } - //if (!canvas_items.size()) - // return; + /* + if (!canvas_items.size()) + return; + */ if (b.button_index==BUTTON_LEFT && tool==TOOL_LIST_SELECT) { if (b.pressed) @@ -1417,7 +1419,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) { Transform2D xform = transform * canvas_item->get_global_transform_with_canvas(); Rect2 rect=canvas_item->get_item_rect(); - // float handle_radius = handle_len * 1.4144; //magic number, guess what it means! + //float handle_radius = handle_len * 1.4144; //magic number, guess what it means! if (tool==TOOL_SELECT) { drag = _find_drag_type(xform,rect,click,drag_point_from); @@ -2342,7 +2344,7 @@ void CanvasItemEditor::_find_canvas_items_span(Node *p_node, Rect2& r_rect, cons for (int i=p_node->get_child_count()-1;i>=0;i--) { -// CanvasItem *r=NULL; + //CanvasItem *r=NULL; if (c && !c->is_set_as_toplevel()) _find_canvas_items_span(p_node->get_child(i),r_rect,p_xform * c->get_transform()); @@ -2473,14 +2475,14 @@ void CanvasItemEditor::_update_scrollbars() { ofs.x=h_scroll->get_value(); } -// transform=Matrix32(); + //transform=Matrix32(); transform.elements[2]=-ofs*zoom; editor->get_scene_root()->set_global_canvas_transform(transform); updating_scroll=false; -// transform.scale_basis(Vector2(zoom,zoom)); + //transform.scale_basis(Vector2(zoom,zoom)); } @@ -2495,7 +2497,7 @@ void CanvasItemEditor::_update_scroll(float) { ofs.x=h_scroll->get_value(); ofs.y=v_scroll->get_value(); -// current_window->set_scroll(-ofs); + //current_window->set_scroll(-ofs); transform=Transform2D(); @@ -3004,8 +3006,10 @@ void CanvasItemEditor::_popup_callback(int p_op) { if (key_pos) ctrl->set_pos(Point2()); - //if (key_scale) - // AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size()); + /* + if (key_scale) + AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size()); + */ } } diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp index da5c07221e..563b8298eb 100644 --- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp +++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp @@ -203,7 +203,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, it->create_from_image(img); p_library->set_item_preview(id,it); -// print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height())); + //print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height())); VS::get_singleton()->free(inst); } diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp index 9dcfc2fa94..478fa2308d 100644 --- a/tools/editor/plugins/editor_preview_plugins.cpp +++ b/tools/editor/plugins/editor_preview_plugins.cpp @@ -248,7 +248,7 @@ Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES& p_from) { VS::get_singleton()->viewport_queue_screen_capture(viewport); VS::get_singleton()->viewport_set_render_target_update_mode(viewport,VS::RENDER_TARGET_UPDATE_ONCE); //once used for capture -// print_line("queue capture!"); + //print_line("queue capture!"); Image img; int timeout=1000; @@ -825,7 +825,7 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES& p_from) { VS::get_singleton()->viewport_queue_screen_capture(viewport); VS::get_singleton()->viewport_set_render_target_update_mode(viewport,VS::RENDER_TARGET_UPDATE_ONCE); //once used for capture -// print_line("queue capture!"); + //print_line("queue capture!"); Image img; int timeout=1000; @@ -867,7 +867,7 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() { camera = VS::get_singleton()->camera_create(); VS::get_singleton()->viewport_attach_camera(viewport,camera); VS::get_singleton()->camera_set_transform(camera,Transform(Matrix3(),Vector3(0,0,3))); -// VS::get_singleton()->camera_set_perspective(camera,45,0.1,10); + //VS::get_singleton()->camera_set_perspective(camera,45,0.1,10); VS::get_singleton()->camera_set_orthogonal(camera,1.0,0.01,1000.0); light = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL); @@ -881,7 +881,7 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() { VS::get_singleton()->instance_set_transform(light_instance2,Transform().looking_at(Vector3(0,1,0),Vector3(0,0,1))); -// sphere = VS::get_singleton()->mesh_create(); + //sphere = VS::get_singleton()->mesh_create(); mesh_instance = VS::get_singleton()->instance_create(); VS::get_singleton()->instance_set_scenario(mesh_instance,scenario); diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp index d5ddd3804b..e9bcf063fd 100644 --- a/tools/editor/plugins/material_editor_plugin.cpp +++ b/tools/editor/plugins/material_editor_plugin.cpp @@ -355,11 +355,11 @@ void MaterialEditorPlugin::make_visible(bool p_visible) { if (p_visible) { material_editor->show(); -// material_editor->set_process(true); + //material_editor->set_process(true); } else { material_editor->hide(); -// material_editor->set_process(false); + //material_editor->set_process(false); } } diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index db96a60808..49cb02c9d8 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -218,11 +218,11 @@ void MeshEditorPlugin::make_visible(bool p_visible) { if (p_visible) { mesh_editor->show(); -// mesh_editor->set_process(true); + //mesh_editor->set_process(true); } else { mesh_editor->hide(); -// mesh_editor->set_process(false); + //mesh_editor->set_process(false); } } diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp index 4a3ea91ff6..8e475e56f7 100644 --- a/tools/editor/plugins/path_2d_editor_plugin.cpp +++ b/tools/editor/plugins/path_2d_editor_plugin.cpp @@ -38,7 +38,7 @@ void Path2DEditor::_notification(int p_what) { case NOTIFICATION_READY: { -// button_create->set_icon( get_icon("Edit","EditorIcons")); + //button_create->set_icon( get_icon("Edit","EditorIcons")); //button_edit->set_icon( get_icon("MovePoint","EditorIcons")); //set_pressed_button(button_edit); //button_edit->set_pressed(true); diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp index a69de2e78d..4f0afe9e94 100644 --- a/tools/editor/plugins/path_editor_plugin.cpp +++ b/tools/editor/plugins/path_editor_plugin.cpp @@ -449,7 +449,7 @@ void PathEditorPlugin::edit(Object *p_object) { pre->get_curve()->emit_signal("changed"); } } -// collision_polygon_editor->edit(p_object->cast_to<Node>()); + //collision_polygon_editor->edit(p_object->cast_to<Node>()); } bool PathEditorPlugin::handles(Object *p_object) const { @@ -543,7 +543,7 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) { path_thin_material->set_flag(Material::FLAG_DOUBLE_SIDED,true); path_thin_material->set_flag(Material::FLAG_UNSHADED,true); -// SpatialEditor::get_singleton()->add_gizmo_plugin(this); + //SpatialEditor::get_singleton()->add_gizmo_plugin(this); sep = memnew( VSeparator); sep->hide(); diff --git a/tools/editor/plugins/path_editor_plugin.h b/tools/editor/plugins/path_editor_plugin.h index e446dfa7c7..79e978dc1d 100644 --- a/tools/editor/plugins/path_editor_plugin.h +++ b/tools/editor/plugins/path_editor_plugin.h @@ -83,7 +83,7 @@ public: Ref<FixedSpatialMaterial> path_thin_material; virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event); -// virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } + //virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial); virtual String get_name() const { return "Path"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp index 689cd6a353..0799732e02 100644 --- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp @@ -52,7 +52,7 @@ void ResourcePreloaderEditor::_notification(int p_what) { if (p_what==NOTIFICATION_READY) { -// NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); + //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); } if (p_what==NOTIFICATION_DRAW) { @@ -471,14 +471,14 @@ void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) { //preloader_editor->show(); button->show(); editor->make_bottom_panel_item_visible(preloader_editor); -// preloader_editor->set_process(true); + //preloader_editor->set_process(true); } else { if (preloader_editor->is_visible_in_tree()) editor->hide_bottom_panel(); button->hide(); //preloader_editor->hide(); -// preloader_editor->set_process(false); + //preloader_editor->set_process(false); } } @@ -492,8 +492,8 @@ ResourcePreloaderEditorPlugin::ResourcePreloaderEditorPlugin(EditorNode *p_node) button=editor->add_bottom_panel_item("ResourcePreloader",preloader_editor); button->hide(); -// preloader_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); -// preloader_editor->set_margin( MARGIN_TOP, 120 ); + //preloader_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); + //preloader_editor->set_margin( MARGIN_TOP, 120 ); diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp index afc151b900..cbeaeb7d60 100644 --- a/tools/editor/plugins/sample_editor_plugin.cpp +++ b/tools/editor/plugins/sample_editor_plugin.cpp @@ -422,11 +422,11 @@ void SampleEditorPlugin::make_visible(bool p_visible) { if (p_visible) { sample_editor->show(); -// sample_editor->set_process(true); + //sample_editor->set_process(true); } else { sample_editor->hide(); -// sample_editor->set_process(false); + //sample_editor->set_process(false); } } diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp index 28a44d99f1..c3e2481b5a 100644 --- a/tools/editor/plugins/sample_library_editor_plugin.cpp +++ b/tools/editor/plugins/sample_library_editor_plugin.cpp @@ -58,7 +58,7 @@ void SampleLibraryEditor::_notification(int p_what) { if (p_what==NOTIFICATION_READY) { -// NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); + //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); } if (p_what==NOTIFICATION_DRAW) { @@ -506,14 +506,14 @@ void SampleLibraryEditorPlugin::make_visible(bool p_visible) { //sample_library_editor->show(); button->show(); editor->make_bottom_panel_item_visible(sample_library_editor); -// sample_library_editor->set_process(true); + //sample_library_editor->set_process(true); } else { if (sample_library_editor->is_visible_in_tree()) editor->hide_bottom_panel(); button->hide(); -// sample_library_editor->set_process(false); + //sample_library_editor->set_process(false); } } @@ -529,8 +529,8 @@ SampleLibraryEditorPlugin::SampleLibraryEditorPlugin(EditorNode *p_node) { button->hide(); //sample_library_editor->set_area_as_parent_rect(); -// sample_library_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); -// sample_library_editor->set_margin( MARGIN_TOP, 120 ); + //sample_library_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); + //sample_library_editor->set_margin( MARGIN_TOP, 120 ); //sample_library_editor->hide(); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 45340f9366..fa53e87fad 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -278,7 +278,7 @@ ScriptEditor *ScriptEditor::script_editor=NULL; String ScriptEditor::_get_debug_tooltip(const String&p_text,Node *_se) { -// ScriptEditorBase *se=_se->cast_to<ScriptEditorBase>(); + //ScriptEditorBase *se=_se->cast_to<ScriptEditorBase>(); String val = debugger->get_var_value(p_text); if (val!=String()) { @@ -311,7 +311,7 @@ void ScriptEditor::_breaked(bool p_breaked,bool p_can_debug) { void ScriptEditor::_show_debugger(bool p_show) { -// debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), p_show); + //debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), p_show); } void ScriptEditor::_script_created(Ref<Script> p_script) { @@ -1104,7 +1104,7 @@ static const Node * _find_node_with_script(const Node* p_node, const RefPtr & p_ Dictionary ScriptEditor::get_state() const { -// apply_scripts(); + //apply_scripts(); Dictionary state; #if 0 @@ -2247,7 +2247,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { { VBoxContainer *vbc = memnew( VBoxContainer ); disk_changed->add_child(vbc); - // disk_changed->set_child_rect(vbc); + //disk_changed->set_child_rect(vbc); Label *dl = memnew( Label ); dl->set_text(TTR("The following files are newer on disk.\nWhat action should be taken?:")); @@ -2293,7 +2293,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { help_index->connect("open_class",this,"_help_class_open"); history_pos=-1; -// debugger_gui->hide(); + //debugger_gui->hide(); edit_pass=0; trim_trailing_whitespace_on_save = false; diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp index a7cc1d4326..3de8812902 100644 --- a/tools/editor/plugins/script_text_editor.cpp +++ b/tools/editor/plugins/script_text_editor.cpp @@ -60,7 +60,7 @@ void ScriptTextEditor::apply_code() { if (script.is_null()) return; -// print_line("applying code"); + //print_line("applying code"); script->set_source_code(code_editor->get_text_edit()->get_text()); script->update_exports(); } diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index a42158c7b0..90d0f7fc93 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -127,7 +127,7 @@ void ShaderTextEditor::_load_theme_settings() { } //colorize core types -// Color basetype_color= EDITOR_DEF("text_editor/base_type_color",Color(0.3,0.3,0.0)); + //Color basetype_color= EDITOR_DEF("text_editor/base_type_color",Color(0.3,0.3,0.0)); //colorize comments @@ -253,9 +253,9 @@ void ShaderEditor::_menu_option(int p_option) { current->get_find_replace_bar()->popup_replace(); } break; -// case SEARCH_LOCATE_SYMBOL: { + //case SEARCH_LOCATE_SYMBOL: { -// } break; + //} break; case SEARCH_GOTO_LINE: { goto_line_dialog->popup_find_line(current->get_text_edit()); @@ -396,7 +396,7 @@ void ShaderEditor::_bind_methods() { ClassDB::bind_method("_menu_option",&ShaderEditor::_menu_option); ClassDB::bind_method("_params_changed",&ShaderEditor::_params_changed); ClassDB::bind_method("apply_shaders",&ShaderEditor::apply_shaders); -// ClassDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab); + //ClassDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab); } void ShaderEditor::ensure_select_current() { @@ -481,7 +481,7 @@ ShaderEditor::ShaderEditor() { search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT|KEY_F3), SEARCH_FIND_PREV); search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/replace", TTR("Replace.."), KEY_MASK_CMD|KEY_R), SEARCH_REPLACE); search_menu->get_popup()->add_separator(); -// search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K); + //search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K); search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_line", TTR("Goto Line.."), KEY_MASK_CMD|KEY_L), SEARCH_GOTO_LINE); search_menu->get_popup()->connect("id_pressed", this,"_menu_option"); @@ -512,8 +512,10 @@ bool ShaderEditorPlugin::handles(Object *p_object) const { bool handles = true; Shader *shader=p_object->cast_to<Shader>(); - //if (!shader || shader->cast_to<ShaderGraph>()) // Dont handle ShaderGraph's - // handles = false; + /* + if (!shader || shader->cast_to<ShaderGraph>()) // Dont handle ShaderGraph's + handles = false; + */ return shader!=NULL; } diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp index fa28129b6d..d989c5b30d 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.cpp +++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp @@ -2933,9 +2933,9 @@ ShaderGraphEditorPlugin::ShaderGraphEditorPlugin(EditorNode *p_node, bool p_2d) SpatialEditor::get_singleton()->get_shader_split()->add_child(shader_editor); - // editor->get_viewport()->add_child(shader_editor); - // shader_editor->set_area_as_parent_rect(); - // shader_editor->hide(); + //editor->get_viewport()->add_child(shader_editor); + //shader_editor->set_area_as_parent_rect(); + //shader_editor->hide(); } diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 27200a5d5d..e159df86ab 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -278,7 +278,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2& p_pos, bool p_append,b Set<Ref<SpatialEditorGizmo> > found_gizmos; //uint32_t closest=0; -// float closest_dist=0; + //float closest_dist=0; r_includes_current=false; @@ -580,8 +580,8 @@ void SpatialEditorViewport::_compute_edit(const Point2& p_point) { List<Node*> &selection = editor_selection->get_selected_node_list(); -// Vector3 center; -// int nc=0; + //Vector3 center; + //int nc=0; for(List<Node*>::Element *E=selection.front();E;E=E->next()) { Spatial *sp = E->get()->cast_to<Spatial>(); @@ -593,16 +593,14 @@ void SpatialEditorViewport::_compute_edit(const Point2& p_point) { continue; se->original=se->sp->get_global_transform(); -// center+=se->original.origin; -// nc++; + //center+=se->original.origin; + //nc++; } - -// if (nc) -// _edit.center=center/float(nc); - - - + /* + if (nc) + _edit.center=center/float(nc); + */ } static int _get_key_modifier(const String& p_property) { @@ -2498,7 +2496,7 @@ void SpatialEditor::update_transform_gizmo() { center.expand_to(xf.origin); gizmo_basis=Basis(); } -// count++; + //count++; } Vector3 pcenter = center.pos+center.size*0.5; @@ -2761,16 +2759,16 @@ void SpatialEditor::edit(Spatial *p_spatial) { } } + /* if (p_spatial) { - //_validate_selection(); - //if (selected.has(p_spatial->get_instance_ID()) && selected.size()==1) - // return; - //_select(p_spatial->get_instance_ID(),false,true); + _validate_selection(); + if (selected.has(p_spatial->get_instance_ID()) && selected.size()==1) + return; + _select(p_spatial->get_instance_ID(),false,true); // should become the selection } - - + */ } void SpatialEditor::_xform_dialog_action() { @@ -2837,8 +2835,8 @@ void SpatialEditor::_menu_item_pressed(int p_option) { tool_button[i]->set_pressed(i==p_option); tool_mode=(ToolMode)p_option; - // static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode.","List Selection Mode."}; -// set_message(_mode[p_option],3); + //static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode.","List Selection Mode."}; + //set_message(_mode[p_option],3); update_transform_gizmo(); } break; @@ -3214,9 +3212,9 @@ void SpatialEditor::_init_indicators() { VisualServer::get_singleton()->mesh_surface_set_material(origin,0,indicator_mat->get_rid()); -// origin = VisualServer::get_singleton()->poly_create(); -// VisualServer::get_singleton()->poly_add_primitive(origin,origin_points,Vector<Vector3>(),origin_colors,Vector<Vector3>()); -// VisualServer::get_singleton()->poly_set_material(origin,indicator_mat,true); + //origin = VisualServer::get_singleton()->poly_create(); + //VisualServer::get_singleton()->poly_add_primitive(origin,origin_points,Vector<Vector3>(),origin_colors,Vector<Vector3>()); + //VisualServer::get_singleton()->poly_set_material(origin,indicator_mat,true); origin_instance = VisualServer::get_singleton()->instance_create2(origin,get_tree()->get_root()->get_world()->get_scenario()); VS::get_singleton()->instance_set_layer_mask(origin_instance,1<<SpatialEditorViewport::GIZMO_GRID_LAYER); @@ -3674,7 +3672,7 @@ void SpatialEditor::_node_removed(Node* p_node) { void SpatialEditor::_bind_methods() { -// ClassDB::bind_method("_gui_input",&SpatialEditor::_gui_input); + //ClassDB::bind_method("_gui_input",&SpatialEditor::_gui_input); ClassDB::bind_method("_unhandled_key_input",&SpatialEditor::_unhandled_key_input); ClassDB::bind_method("_node_removed",&SpatialEditor::_node_removed); ClassDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed); @@ -3738,7 +3736,7 @@ void SpatialEditor::clear() { void SpatialEditor::_update_ambient_light_color(const Color& p_color) { -// viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,settings_ambient_color->get_color()); + //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,settings_ambient_color->get_color()); } @@ -4008,8 +4006,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { settings_vbc->add_margin_child(TTR("Ambient Light Color:"),settings_ambient_color); settings_ambient_color->connect("color_changed",this,"_update_ambient_light_color"); -// viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true); -// viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15)); + //viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true); + //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15)); settings_ambient_color->set_color(Color(0.15,0.15,0.15)); @@ -4154,7 +4152,7 @@ void SpatialEditorPlugin::set_state(const Dictionary& p_state) { void SpatialEditor::snap_cursor_to_plane(const Plane& p_plane) { -// cursor.pos=p_plane.project(cursor.pos); + //cursor.pos=p_plane.project(cursor.pos); } void SpatialEditorPlugin::_bind_methods() { diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp index 7706b063a9..095b059836 100644 --- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp @@ -56,7 +56,7 @@ void SpriteFramesEditor::_notification(int p_what) { if (p_what==NOTIFICATION_READY) { -// NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); + //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); } if (p_what==NOTIFICATION_DRAW) { @@ -937,14 +937,14 @@ void SpriteFramesEditorPlugin::make_visible(bool p_visible) { if (p_visible) { button->show(); editor->make_bottom_panel_item_visible(frames_editor); -// frames_editor->set_process(true); + //frames_editor->set_process(true); } else { button->hide(); if (frames_editor->is_visible_in_tree()) editor->hide_bottom_panel(); -// frames_editor->set_process(false); + //frames_editor->set_process(false); } } diff --git a/tools/editor/plugins/style_box_editor_plugin.cpp b/tools/editor/plugins/style_box_editor_plugin.cpp index 171eac57d9..396ebd0052 100644 --- a/tools/editor/plugins/style_box_editor_plugin.cpp +++ b/tools/editor/plugins/style_box_editor_plugin.cpp @@ -49,9 +49,9 @@ void StyleBoxEditor::_sb_changed() { void StyleBoxEditor::_bind_methods() { ClassDB::bind_method("_sb_changed",&StyleBoxEditor::_sb_changed); -// ClassDB::bind_method("_import",&StyleBoxEditor::_import); -// ClassDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept); -// ClassDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed); + //ClassDB::bind_method("_import",&StyleBoxEditor::_import); + //ClassDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept); + //ClassDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed); } StyleBoxEditor::StyleBoxEditor() { diff --git a/tools/editor/plugins/texture_editor_plugin.cpp b/tools/editor/plugins/texture_editor_plugin.cpp index 7ff7d0f2f7..a846a908d2 100644 --- a/tools/editor/plugins/texture_editor_plugin.cpp +++ b/tools/editor/plugins/texture_editor_plugin.cpp @@ -113,11 +113,11 @@ void TextureEditorPlugin::make_visible(bool p_visible) { if (p_visible) { texture_editor->show(); -// texture_editor->set_process(true); + //texture_editor->set_process(true); } else { texture_editor->hide(); -// texture_editor->set_process(false); + //texture_editor->set_process(false); } } diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp index 84f711675b..027e91ade8 100644 --- a/tools/editor/plugins/theme_editor_plugin.cpp +++ b/tools/editor/plugins/theme_editor_plugin.cpp @@ -693,9 +693,9 @@ ThemeEditor::ThemeEditor() { -// main_panel->add_child(panel); -// panel->set_area_as_parent_rect(); -// panel->set_margin( MARGIN_TOP,20 ); + //main_panel->add_child(panel); + //panel->set_area_as_parent_rect(); + //panel->set_margin( MARGIN_TOP,20 ); first_vb->add_child(memnew( Label("Label") )); @@ -987,7 +987,7 @@ ThemeEditorPlugin::ThemeEditorPlugin(EditorNode *p_node) { theme_editor = memnew( ThemeEditor ); theme_editor->set_custom_minimum_size(Size2(0,200)); -// p_node->get_viewport()->add_child(theme_editor); + //p_node->get_viewport()->add_child(theme_editor); button=editor->add_bottom_panel_item("Theme",theme_editor); button->hide(); diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index dd3a9c3d38..10005b6850 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -67,14 +67,14 @@ bool ProjectExportDialog::_create_tree(TreeItem *p_parent,EditorFileSystemDirect has_items=true; } -// int cc = p_options.get_slice_count(","); + //int cc = p_options.get_slice_count(","); for (int i=0;i<p_dir->get_file_count();i++) { TreeItem *fitem = tree->create_item(item); //fitem->set_cell_mode(0,TreeItem::CELL_MODE_CHECK); //fitem->set_editable(0,true); - // fitem->set_checked(0,isfave); + //fitem->set_checked(0,isfave); fitem->set_text(0,p_dir->get_file(i)); String path = p_dir->get_file_path(i); fitem->set_tooltip(0,path); @@ -164,8 +164,8 @@ void ProjectExportDialog::_platform_selected() { String p =platforms->get_selected()->get_metadata(0); _update_platform(); -// editor->save_import_export(); -// EditorFileSystem::get_singleton()->scan(); + //editor->save_import_export(); + //EditorFileSystem::get_singleton()->scan(); } @@ -313,7 +313,7 @@ void ProjectExportDialog::_notification(int p_what) { } EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"_scan_finished"); -// _rescan(); + //_rescan(); _update_platform(); export_mode->select( EditorImportExport::get_singleton()->get_export_filter() ); convert_text_scenes->set_pressed( EditorImportExport::get_singleton()->get_convert_text_scenes() ); @@ -343,7 +343,7 @@ void ProjectExportDialog::_notification(int p_what) { } image_formats->connect("item_edited",this,"_format_toggled"); group_add->set_icon(get_icon("Add","EditorIcons")); -// group_del->set_icon(get_icon("Del","EditorIcons")); + //group_del->set_icon(get_icon("Del","EditorIcons")); _update_group_list(); _update_group(); @@ -1332,8 +1332,8 @@ void ProjectExportDialog::_bind_methods() { ClassDB::bind_method(_MD("_keystore_created"),&ProjectExportDialog::_keystore_created); -// ADD_SIGNAL(MethodInfo("instance")); -// ADD_SIGNAL(MethodInfo("open")); + //ADD_SIGNAL(MethodInfo("instance")); + //ADD_SIGNAL(MethodInfo("open")); } @@ -1775,11 +1775,13 @@ Error ProjectExport::export_project(const String& p_preset) { { List<String> l; -// SceneLoader::get_recognized_extensions(&l); -// for(List<String>::Element *E=l.front();E;E=E->next()) { -// -// scene_extensions.insert(E->get()); -// } + /* + SceneLoader::get_recognized_extensions(&l); + for(List<String>::Element *E=l.front();E;E=E->next()) { + + scene_extensions.insert(E->get()); + } + */ ResourceLoader::get_recognized_extensions_for_type("",&l); for(List<String>::Element *E=l.front();E;E=E->next()) { @@ -1994,8 +1996,10 @@ Error ProjectExport::export_project(const String& p_preset) { uint32_t flags=0; -// if (saver->is_bundle_scenes_enabled()) -// flags|=Reso::FLAG_BUNDLE_INSTANCED_SCENES; + /* + if (saver->is_bundle_scenes_enabled()) + flags|=Reso::FLAG_BUNDLE_INSTANCED_SCENES; + */ saver->set_bundle_exceptions(NULL); if (E->get().depaction>=ProjectExportSettings::DA_BUNDLE) { flags|=ResourceSaver::FLAG_BUNDLE_RESOURCES; @@ -2041,7 +2045,7 @@ Error ProjectExport::export_project(const String& p_preset) { ERR_FAIL_COND_V(err,ERR_CANT_OPEN); } source_file=write_file; - // project_settings->add_remapped_path(src_scene,path,platform); + //project_settings->add_remapped_path(src_scene,path,platform); } @@ -2093,7 +2097,7 @@ Error ProjectExport::export_project(const String& p_preset) { -// added_settings["remap/"+platform]=remaps;` + //added_settings["remap/"+platform]=remaps;` added_settings["remap/"+platform]=Variant(remaps).operator Array(); } diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h index 433f4502a1..06992a7e34 100644 --- a/tools/editor/project_export.h +++ b/tools/editor/project_export.h @@ -99,7 +99,7 @@ private: bool _create_tree(TreeItem *p_parent,EditorFileSystemDirectory *p_dir); void _rescan(); -// void _confirmed(); + //void _confirmed(); void _scan_finished(); void _validate_platform(); diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 01dca396c8..2cf940a29a 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -404,7 +404,7 @@ public: VBoxContainer *vb = memnew( VBoxContainer ); add_child(vb); - // set_child_rect(vb); + //set_child_rect(vb); Label* l = memnew(Label); l->set_text(TTR("Project Path:")); @@ -1003,7 +1003,7 @@ void ProjectManager::_run_project_confirm() { Error err = OS::get_singleton()->execute(exec,args,false,&pid); ERR_FAIL_COND(err); } - // get_scene()->quit(); do not quit + //get_scene()->quit(); do not quit } void ProjectManager::_run_project() { diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index 968333d466..0396456c49 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -1357,7 +1357,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { message = memnew( ConfirmationDialog ); add_child(message); -// message->get_cancel()->hide(); + //message->get_cancel()->hide(); message->set_hide_on_ok(true); Control *input_base = memnew( Control ); @@ -1424,7 +1424,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { hbc = memnew( HBoxContainer ); device_input->add_child(hbc); -// device_input->set_child_rect(hbc); + //device_input->set_child_rect(hbc); VBoxContainer *vbc_left = memnew( VBoxContainer ); hbc->add_child(vbc_left); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index c1a01e0fd0..f602c3ee72 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -2161,7 +2161,7 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName& p_p bool found=false; -// print_line("for prop - "+String(p_prop)); + //print_line("for prop - "+String(p_prop)); while(node) { @@ -2174,13 +2174,13 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName& p_p } else { ss=node->get_scene_instance_state(); } - // print_line("at - "+String(edited_scene->get_path_to(node))); + //print_line("at - "+String(edited_scene->get_path_to(node))); if (ss.is_valid()) { NodePath np = node->get_path_to(orig); int node_idx = ss->find_node_by_path(np); - // print_line("\t valid, nodeidx "+itos(node_idx)); + //print_line("\t valid, nodeidx "+itos(node_idx)); if (node_idx>=0) { bool lfound=false; Variant lvar; @@ -2189,7 +2189,7 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName& p_p found=true; value=lvar; - // print_line("\t found value "+String(value)); + //print_line("\t found value "+String(value)); } } } @@ -2215,7 +2215,7 @@ bool PropertyEditor::_is_property_different(const Variant& p_current, const Vari Node* edited_scene =EditorNode::get_singleton()->get_edited_scene(); bool found_state=false; - // print_line("for prop - "+String(p_prop)); + //print_line("for prop - "+String(p_prop)); while(node) { @@ -2867,7 +2867,7 @@ TreeItem *PropertyEditor::get_parent_node(String p_path,HashMap<String,TreeItem* item = item_paths.get(p_path); } else { -// printf("path %s parent path %s - item name %s\n",p_path.ascii().get_data(),p_path.left( p_path.find_last("/") ).ascii().get_data(),p_path.right( p_path.find_last("/") ).ascii().get_data() ); + //printf("path %s parent path %s - item name %s\n",p_path.ascii().get_data(),p_path.left( p_path.find_last("/") ).ascii().get_data(),p_path.right( p_path.find_last("/") ).ascii().get_data() ); TreeItem *parent = get_parent_node( p_path.left( p_path.find_last("/") ),item_paths,root ); item = tree->create_item( parent ); @@ -3174,8 +3174,10 @@ void PropertyEditor::update_tree() { //printf("property %s\n",basename.ascii().get_data()); TreeItem * parent = get_parent_node(path,item_path,current_category?current_category:root ); - //if (parent->get_parent()==root) - // parent=root; + /* + if (parent->get_parent()==root) + parent=root; + */ int level = 0; if (parent!=root) { level++; @@ -3359,7 +3361,7 @@ void PropertyEditor::update_tree() { item->set_range_config(1,min,max,step,p.hint==PROPERTY_HINT_EXP_RANGE); } else if (p.hint==PROPERTY_HINT_ENUM) { -// int c = p.hint_string.get_slice_count(","); + //int c = p.hint_string.get_slice_count(","); item->set_text(1,p.hint_string); if (show_type_icons) item->set_icon( 0,get_icon("Enum","EditorIcons") ); @@ -3368,7 +3370,7 @@ void PropertyEditor::update_tree() { break; } else if (p.hint==PROPERTY_HINT_OBJECT_ID) { -// int c = p.hint_string.get_slice_count(","); + //int c = p.hint_string.get_slice_count(","); item->set_cell_mode(1,TreeItem::CELL_MODE_CUSTOM); String type=p.hint_string; @@ -3704,7 +3706,7 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, !read_only ); -// item->set_text(1,obj->get(p.name)); + //item->set_text(1,obj->get(p.name)); item->set_custom_bg_color(1,obj->get(p.name)); if (show_type_icons) item->set_icon( 0,get_icon("Color","EditorIcons") ); @@ -3790,7 +3792,7 @@ void PropertyEditor::update_tree() { item->set_icon( 0, get_icon("Object","EditorIcons") ); } -// item->double_click_signal.connect( Method1<int>( Method2<int,String>( this, &Editoritem_obj_edited ), p.name ) ); + //item->double_click_signal.connect( Method1<int>( Method2<int,String>( this, &Editoritem_obj_edited ), p.name ) ); } break; default: {}; diff --git a/tools/editor/reparent_dialog.cpp b/tools/editor/reparent_dialog.cpp index a8909b0772..4b6a032b64 100644 --- a/tools/editor/reparent_dialog.cpp +++ b/tools/editor/reparent_dialog.cpp @@ -88,7 +88,7 @@ ReparentDialog::ReparentDialog() { VBoxContainer *vbc = memnew( VBoxContainer ); add_child(vbc); -// set_child_rect(vbc); + //set_child_rect(vbc); tree = memnew( SceneTreeEditor(false) ); tree->set_show_enabled_subscene(true); diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp index c8fa1eda77..ddd4a782e4 100644 --- a/tools/editor/resources_dock.cpp +++ b/tools/editor/resources_dock.cpp @@ -126,8 +126,10 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re int flg=0; if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ String path = GlobalConfig::get_singleton()->localize_path(p_path); Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); @@ -137,7 +139,7 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re accept->popup_centered_minsize(); return; } -// EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); + //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); ((Resource*)p_resource.ptr())->set_path(path); editor->emit_signal("resource_saved",p_resource); diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 762213787c..6a1d1ed3b2 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -295,10 +295,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { switch(p_tool) { case TOOL_NEW: { - - - //if (!_validate_no_foreign()) - // break; + /* + if (!_validate_no_foreign()) + break; + */ create_dialog->popup(true); } break; case TOOL_INSTANCE: { @@ -319,8 +319,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } - //if (!_validate_no_foreign()) - // break; + /* + if (!_validate_no_foreign()) + break; + */ file->set_mode(EditorFileDialog::MODE_OPEN_FILE); List<String> extensions; @@ -345,10 +347,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (!current) break; - //if (!_validate_no_foreign()) - // break; - //connect_dialog->popup_centered_ratio(); - //connect_dialog->set_node(current); + /* + if (!_validate_no_foreign()) + break; + connect_dialog->popup_centered_ratio(); + connect_dialog->set_node(current); + */ } break; case TOOL_GROUP: { @@ -356,10 +360,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { Node *current = scene_tree->get_selected(); if (!current) break; - //if (!_validate_no_foreign()) - // break; - //groups_editor->set_current(current); - //groups_editor->popup_centered_ratio(); + /* + if (!_validate_no_foreign()) + break; + groups_editor->set_current(current); + groups_editor->popup_centered_ratio(); + */ } break; case TOOL_ATTACH_SCRIPT: { @@ -367,8 +373,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (!selected) break; - //if (!_validate_no_foreign()) - // break; + /* + if (!_validate_no_foreign()) + break; + */ Ref<Script> existing = selected->get_script(); if (existing.is_valid()) @@ -1556,8 +1564,10 @@ void SceneTreeDock::_new_scene_from(String p_file) { int flg=0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ err = ResourceSaver::save(p_file,sdata,flg); diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index a1a8803b04..7b6a03e20e 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -671,8 +671,8 @@ void SceneTreeEditor::_notification(int p_what) { EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed"); -// get_scene()->connect("tree_changed",this,"_tree_changed",Vector<Variant>(),CONNECT_DEFERRED); -// get_scene()->connect("node_removed",this,"_node_removed",Vector<Variant>(),CONNECT_DEFERRED); + //get_scene()->connect("tree_changed",this,"_tree_changed",Vector<Variant>(),CONNECT_DEFERRED); + //get_scene()->connect("node_removed",this,"_node_removed",Vector<Variant>(),CONNECT_DEFERRED); _update_tree(); } if (p_what==NOTIFICATION_EXIT_TREE) { @@ -1081,7 +1081,7 @@ void SceneTreeEditor::_warning_changed(Node* p_for_node) { //should use a timer update_timer->start(); -// print_line("WARNING CHANGED "+String(p_for_node->get_name())); + //print_line("WARNING CHANGED "+String(p_for_node->get_name())); } @@ -1186,7 +1186,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open tree->connect("item_edited", this,"_renamed",varray(),CONNECT_DEFERRED); tree->connect("multi_selected",this,"_cell_multi_selected"); tree->connect("button_pressed",this,"_cell_button_pressed"); -// tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true); + //tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true); error = memnew( AcceptDialog ); add_child(error); diff --git a/tools/editor/scene_tree_editor.h b/tools/editor/scene_tree_editor.h index 3cc1bd2388..5586f02c00 100644 --- a/tools/editor/scene_tree_editor.h +++ b/tools/editor/scene_tree_editor.h @@ -175,8 +175,8 @@ class SceneTreeDialog : public ConfirmationDialog { GDCLASS( SceneTreeDialog, ConfirmationDialog ); SceneTreeEditor *tree; -// Button *select; -// Button *cancel; + //Button *select; + //Button *cancel; void update_tree(); void _select(); diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index 47725896e6..c8755b0473 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -520,7 +520,7 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat d["frame"]=i; s->set_metadata(0,d); -// String line = itos(i)+" - "+String(d["file"])+":"+itos(d["line"])+" - at func: "+d["function"]; + //String line = itos(i)+" - "+String(d["file"])+":"+itos(d["line"])+" - at func: "+d["function"]; String line = itos(i)+" - "+String(d["file"])+":"+itos(d["line"]); s->set_text(0,line); @@ -1986,7 +1986,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){ ScriptEditorDebugger::~ScriptEditorDebugger() { -// inspector->edit(NULL); + //inspector->edit(NULL); memdelete(variables); ppeer->set_stream_peer(Ref<StreamPeer>()); diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp index 62de22a4b3..82dfa94c06 100644 --- a/tools/editor/spatial_editor_gizmos.cpp +++ b/tools/editor/spatial_editor_gizmos.cpp @@ -3117,8 +3117,8 @@ void Generic6DOFJointSpatialGizmo::redraw() { float s = ll+i*(Math_PI*2.0)/points; float n = ll+(i+1)*(Math_PI*2.0)/points; -// Vector3 from=Vector3(0,Math::cos(s),-Math::sin(s) )*cs; -// Vector3 to=Vector3( 0,Math::cos(n),-Math::sin(n) )*cs; + //Vector3 from=Vector3(0,Math::cos(s),-Math::sin(s) )*cs; + //Vector3 to=Vector3( 0,Math::cos(n),-Math::sin(n) )*cs; Vector3 from; SET_VTX(from,0, Math::cos(s), -Math::sin(s) ); |