Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
This commit is contained in:
parent
78e90ac60b
commit
93ab45b6b5
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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); }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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++) {
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ private:
|
|||
#ifdef GLOBALNIL_DISABLED
|
||||
memdelete_allocator<Element,A>(_nil);
|
||||
#endif
|
||||
// memdelete_allocator<Element,A>(_root);
|
||||
//memdelete_allocator<Element,A>(_root);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()));
|
||||
|
||||
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(){
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
||||
//}
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
// Allocate 16-bit depth buffer
|
||||
/* glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size);
|
||||
/*
|
||||
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size);
|
||||
|
||||
// Attach the render buffer as depth buffer - will be ignored
|
||||
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);
|
||||
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -392,7 +392,7 @@ LIGHT_SHADER_CODE
|
|||
|
||||
//use lighting
|
||||
#endif
|
||||
// color.rgb*=color.a;
|
||||
//color.rgb*=color.a;
|
||||
gl_FragColor = color;
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
|
|
@ -449,7 +449,7 @@ LIGHT_SHADER_CODE
|
|||
|
||||
//use lighting
|
||||
#endif
|
||||
// color.rgb*=color.a;
|
||||
//color.rgb*=color.a;
|
||||
frag_color = color;
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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++;
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -596,7 +596,7 @@ MainLoop* test() {
|
|||
{
|
||||
|
||||
|
||||
// print_line("NUM: "+itos(237641278346127));
|
||||
//print_line("NUM: "+itos(237641278346127));
|
||||
print_line("NUM: "+itos(-128));
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -124,7 +124,7 @@ class CPPlayer {
|
|||
CPInstrument* instrument_ptr;
|
||||
CPSample* sample_ptr;
|
||||
|
||||
// Sample_Data *sample_data;
|
||||
//Sample_Data *sample_data;
|
||||
|
||||
int32_t period;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
/*
|
||||
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--;
|
||||
// }
|
||||
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) {
|
||||
|
||||
|
|
|
@ -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() ) {
|
||||
|
|
|
@ -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)) {
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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!");
|
||||
|
|
|
@ -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>();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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>);
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -71,7 +71,7 @@ Error AudioDriverAndroid::init(){
|
|||
}
|
||||
*/
|
||||
|
||||
// Android_JNI_SetupThread();
|
||||
//Android_JNI_SetupThread();
|
||||
|
||||
|
||||
// __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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"));
|
||||
*/
|
||||
|
|
|
@ -539,9 +539,11 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
|||
} 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: {
|
||||
|
||||
|
@ -555,9 +557,11 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
|||
case AMOTION_EVENT_ACTION_CANCEL:
|
||||
case AMOTION_EVENT_ACTION_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;
|
||||
}
|
||||
|
||||
|
@ -639,7 +643,7 @@ 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");
|
||||
//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);
|
||||
|
@ -725,7 +729,7 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) {
|
|||
break;
|
||||
case APP_CMD_TERM_WINDOW:
|
||||
// The window is being hidden or closed, clean it up.
|
||||
// LOGI("TERM WINDOW");
|
||||
//LOGI("TERM WINDOW");
|
||||
engine_term_display(engine);
|
||||
break;
|
||||
case APP_CMD_GAINED_FOCUS:
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue