diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/bind/core_bind.cpp | 6 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 3 | ||||
| -rw-r--r-- | core/globals.cpp | 17 | ||||
| -rw-r--r-- | core/globals.h | 2 | ||||
| -rw-r--r-- | core/image.cpp | 338 | ||||
| -rw-r--r-- | core/image.h | 3 | ||||
| -rw-r--r-- | core/io/resource_format_binary.cpp | 10 | ||||
| -rw-r--r-- | core/io/resource_format_binary.h | 1 | ||||
| -rw-r--r-- | core/io/resource_format_xml.cpp | 14 | ||||
| -rw-r--r-- | core/io/resource_format_xml.h | 1 | ||||
| -rw-r--r-- | core/io/resource_saver.h | 1 | ||||
| -rw-r--r-- | core/resource.cpp | 27 | ||||
| -rw-r--r-- | core/resource.h | 5 | ||||
| -rw-r--r-- | core/ucaps.h | 6 | ||||
| -rw-r--r-- | core/variant_call.cpp | 2 |
15 files changed, 418 insertions, 18 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 4f5358591a..64b31d6fdd 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -235,7 +235,7 @@ Error _OS::shell_open(String p_uri) { }; -int _OS::execute(const String& p_path, const Vector<String> & p_arguments,bool p_blocking) { +int _OS::execute(const String& p_path, const Vector<String> & p_arguments, bool p_blocking, Array p_output) { OS::ProcessID pid; List<String> args; @@ -243,6 +243,8 @@ int _OS::execute(const String& p_path, const Vector<String> & p_arguments,bool p args.push_back(p_arguments[i]); String pipe; Error err = OS::get_singleton()->execute(p_path,args,p_blocking,&pid, &pipe); + p_output.clear(); + p_output.push_back(pipe); if (err != OK) return -1; else @@ -616,7 +618,7 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_processor_count"),&_OS::get_processor_count); ObjectTypeDB::bind_method(_MD("get_executable_path"),&_OS::get_executable_path); - ObjectTypeDB::bind_method(_MD("execute","path","arguments","blocking"),&_OS::execute); + ObjectTypeDB::bind_method(_MD("execute","path","arguments","blocking","output"),&_OS::execute,DEFVAL(Array())); ObjectTypeDB::bind_method(_MD("kill","pid"),&_OS::kill); ObjectTypeDB::bind_method(_MD("shell_open","uri"),&_OS::shell_open); ObjectTypeDB::bind_method(_MD("get_process_ID"),&_OS::get_process_ID); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 02fe3e8874..20a33fa013 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -123,7 +123,8 @@ public: bool is_in_low_processor_usage_mode() const; String get_executable_path() const; - int execute(const String& p_path, const Vector<String> & p_arguments,bool p_blocking); + int execute(const String& p_path, const Vector<String> & p_arguments,bool p_blocking,Array p_output=Array()); + Error kill(int p_pid); Error shell_open(String p_uri); diff --git a/core/globals.cpp b/core/globals.cpp index 7df7680827..3a04becef4 100644 --- a/core/globals.cpp +++ b/core/globals.cpp @@ -243,12 +243,27 @@ bool Globals::_load_resource_pack(const String& p_pack) { return true; } -Error Globals::setup(const String& p_path) { +Error Globals::setup(const String& p_path,const String & p_main_pack) { //an absolute mess of a function, must be cleaned up and reorganized somehow at some point //_load_settings(p_path+"/override.cfg"); + if (p_main_pack!="") { + + bool ok = _load_resource_pack(p_main_pack); + ERR_FAIL_COND_V(!ok,ERR_CANT_OPEN); + + if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) { + + _load_settings("res://override.cfg"); + + } + + return OK; + + } + if (OS::get_singleton()->get_executable_path()!="") { if (_load_resource_pack(OS::get_singleton()->get_executable_path())) { diff --git a/core/globals.h b/core/globals.h index b8dc3f9367..580fd0fecd 100644 --- a/core/globals.h +++ b/core/globals.h @@ -110,7 +110,7 @@ public: int get_order(const String& p_name) const; void set_order(const String& p_name, int p_order); - Error setup(const String& p_path); + Error setup(const String& p_path, const String &p_main_pack); Error save_custom(const String& p_path="",const CustomMap& p_custom=CustomMap(),const Set<String>& p_ignore_masks=Set<String>()); Error save(); diff --git a/core/image.cpp b/core/image.cpp index e5489c06fa..d9ba6c1594 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1399,10 +1399,344 @@ int Image::get_format_pallete_size(Format p_format) { } + + +Error Image::_decompress_bc() { + + print_line("decompressing bc"); + + int mm; + int size = _get_dst_image_size(width,height,FORMAT_RGBA,mm,mipmaps); + + DVector<uint8_t> newdata; + newdata.resize(size); + + DVector<uint8_t>::Write w = newdata.write(); + DVector<uint8_t>::Read r = data.read(); + + int rofs=0; + int wofs=0; + int wd=width,ht=height; + + for(int i=0;i<=mm;i++) { + + switch(format) { + + case FORMAT_BC1: { + + int len = (wd*ht)/16; + uint8_t* dst=&w[wofs]; + + uint32_t ofs_table[16]; + for(int x=0;x<4;x++) { + + for(int y=0;y<4;y++) { + + ofs_table[15-(y*4+(3-x))]=(x+y*wd)*4; + } + } + + + for(int j=0;j<len;j++) { + + const uint8_t* src=&r[rofs+j*8]; + uint16_t col_a=src[1]; + col_a<<=8; + col_a|=src[0]; + uint16_t col_b=src[3]; + col_b<<=8; + col_b|=src[2]; + + uint8_t table[4][4]={ + { (col_a>>11)<<3, ((col_a>>5)&0x3f)<<2, ((col_a)&0x1f)<<3, 255 }, + { (col_b>>11)<<3, ((col_b>>5)&0x3f)<<2, ((col_b)&0x1f)<<3, 255 }, + {0,0,0,255}, + {0,0,0,255} + }; + + if (col_a<col_b) { + //punchrough + table[2][0]=(int(table[0][0])+int(table[1][0]))>>1; + table[2][1]=(int(table[0][1])+int(table[1][1]))>>1; + table[2][2]=(int(table[0][2])+int(table[1][2]))>>1; + table[3][3]=0; //premul alpha black + } else { + //gradient + table[2][0]=(int(table[0][0])*2+int(table[1][0]))/3; + table[2][1]=(int(table[0][1])*2+int(table[1][1]))/3; + table[2][2]=(int(table[0][2])*2+int(table[1][2]))/3; + table[3][0]=(int(table[0][0])+int(table[1][0])*2)/3; + table[3][1]=(int(table[0][1])+int(table[1][1])*2)/3; + table[3][2]=(int(table[0][2])+int(table[1][2])*2)/3; + } + + uint32_t block=src[4]; + block<<=8; + block|=src[5]; + block<<=8; + block|=src[6]; + block<<=8; + block|=src[7]; + + int y = (j/(wd/4))*4; + int x = (j%(wd/4))*4; + int pixofs = (y*wd+x)*4; + + for(int k=0;k<16;k++) { + int idx = pixofs+ofs_table[k]; + dst[idx+0]=table[block&0x3][0]; + dst[idx+1]=table[block&0x3][1]; + dst[idx+2]=table[block&0x3][2]; + dst[idx+3]=table[block&0x3][3]; + block>>=2; + } + + } + + rofs+=len*8; + wofs+=wd*ht*4; + + + wd/=2; + ht/=2; + + } break; + case FORMAT_BC2: { + + int len = (wd*ht)/16; + uint8_t* dst=&w[wofs]; + + uint32_t ofs_table[16]; + for(int x=0;x<4;x++) { + + for(int y=0;y<4;y++) { + + ofs_table[15-(y*4+(3-x))]=(x+y*wd)*4; + } + } + + + for(int j=0;j<len;j++) { + + const uint8_t* src=&r[rofs+j*16]; + + uint64_t ablock=src[1]; + ablock<<=8; + ablock|=src[0]; + ablock<<=8; + ablock|=src[3]; + ablock<<=8; + ablock|=src[2]; + ablock<<=8; + ablock|=src[5]; + ablock<<=8; + ablock|=src[4]; + ablock<<=8; + ablock|=src[7]; + ablock<<=8; + ablock|=src[6]; + + + uint16_t col_a=src[8+1]; + col_a<<=8; + col_a|=src[8+0]; + uint16_t col_b=src[8+3]; + col_b<<=8; + col_b|=src[8+2]; + + uint8_t table[4][4]={ + { (col_a>>11)<<3, ((col_a>>5)&0x3f)<<2, ((col_a)&0x1f)<<3, 255 }, + { (col_b>>11)<<3, ((col_b>>5)&0x3f)<<2, ((col_b)&0x1f)<<3, 255 }, + {0,0,0,255}, + {0,0,0,255} + }; + + //always gradient + table[2][0]=(int(table[0][0])*2+int(table[1][0]))/3; + table[2][1]=(int(table[0][1])*2+int(table[1][1]))/3; + table[2][2]=(int(table[0][2])*2+int(table[1][2]))/3; + table[3][0]=(int(table[0][0])+int(table[1][0])*2)/3; + table[3][1]=(int(table[0][1])+int(table[1][1])*2)/3; + table[3][2]=(int(table[0][2])+int(table[1][2])*2)/3; + + uint32_t block=src[4+8]; + block<<=8; + block|=src[5+8]; + block<<=8; + block|=src[6+8]; + block<<=8; + block|=src[7+8]; + + int y = (j/(wd/4))*4; + int x = (j%(wd/4))*4; + int pixofs = (y*wd+x)*4; + + for(int k=0;k<16;k++) { + uint8_t alpha = ablock&0xf; + alpha=int(alpha)*255/15; //right way for alpha + int idx = pixofs+ofs_table[k]; + dst[idx+0]=table[block&0x3][0]; + dst[idx+1]=table[block&0x3][1]; + dst[idx+2]=table[block&0x3][2]; + dst[idx+3]=alpha; + block>>=2; + ablock>>=4; + } + + } + + rofs+=len*16; + wofs+=wd*ht*4; + + + wd/=2; + ht/=2; + + } break; + case FORMAT_BC3: { + + int len = (wd*ht)/16; + uint8_t* dst=&w[wofs]; + + uint32_t ofs_table[16]; + for(int x=0;x<4;x++) { + + for(int y=0;y<4;y++) { + + ofs_table[15-(y*4+(3-x))]=(x+y*wd)*4; + } + } + + + + for(int j=0;j<len;j++) { + + const uint8_t* src=&r[rofs+j*16]; + + uint8_t a_start=src[1]; + uint8_t a_end=src[0]; + + uint64_t ablock=src[3]; + ablock<<=8; + ablock|=src[2]; + ablock<<=8; + ablock|=src[5]; + ablock<<=8; + ablock|=src[4]; + ablock<<=8; + ablock|=src[7]; + ablock<<=8; + ablock|=src[6]; + + uint8_t atable[8]; + + if (a_start>a_end) { + + atable[0]=(int(a_start)*7+int(a_end)*0)/7; + atable[1]=(int(a_start)*6+int(a_end)*1)/7; + atable[2]=(int(a_start)*5+int(a_end)*2)/7; + atable[3]=(int(a_start)*4+int(a_end)*3)/7; + atable[4]=(int(a_start)*3+int(a_end)*4)/7; + atable[5]=(int(a_start)*2+int(a_end)*5)/7; + atable[6]=(int(a_start)*1+int(a_end)*6)/7; + atable[7]=(int(a_start)*0+int(a_end)*7)/7; + } else { + + atable[0]=(int(a_start)*5+int(a_end)*0)/5; + atable[1]=(int(a_start)*4+int(a_end)*1)/5; + atable[2]=(int(a_start)*3+int(a_end)*2)/5; + atable[3]=(int(a_start)*2+int(a_end)*3)/5; + atable[4]=(int(a_start)*1+int(a_end)*4)/5; + atable[5]=(int(a_start)*0+int(a_end)*5)/5; + atable[6]=0; + atable[7]=255; + + } + + + uint16_t col_a=src[8+1]; + col_a<<=8; + col_a|=src[8+0]; + uint16_t col_b=src[8+3]; + col_b<<=8; + col_b|=src[8+2]; + + uint8_t table[4][4]={ + { (col_a>>11)<<3, ((col_a>>5)&0x3f)<<2, ((col_a)&0x1f)<<3, 255 }, + { (col_b>>11)<<3, ((col_b>>5)&0x3f)<<2, ((col_b)&0x1f)<<3, 255 }, + {0,0,0,255}, + {0,0,0,255} + }; + + //always gradient + table[2][0]=(int(table[0][0])*2+int(table[1][0]))/3; + table[2][1]=(int(table[0][1])*2+int(table[1][1]))/3; + table[2][2]=(int(table[0][2])*2+int(table[1][2]))/3; + table[3][0]=(int(table[0][0])+int(table[1][0])*2)/3; + table[3][1]=(int(table[0][1])+int(table[1][1])*2)/3; + table[3][2]=(int(table[0][2])+int(table[1][2])*2)/3; + + + uint32_t block=src[4+8]; + block<<=8; + block|=src[5+8]; + block<<=8; + block|=src[6+8]; + block<<=8; + block|=src[7+8]; + + int y = (j/(wd/4))*4; + int x = (j%(wd/4))*4; + int pixofs = (y*wd+x)*4; + + + + for(int k=0;k<16;k++) { + uint8_t alpha = ablock&0x7; + int idx = pixofs+ofs_table[k]; + dst[idx+0]=table[block&0x3][0]; + dst[idx+1]=table[block&0x3][1]; + dst[idx+2]=table[block&0x3][2]; + dst[idx+3]=atable[alpha]; + block>>=2; + ablock>>=3; + } + + } + + rofs+=len*16; + wofs+=wd*ht*4; + + + wd/=2; + ht/=2; + + } break; + } + + } + + w=DVector<uint8_t>::Write(); + r=DVector<uint8_t>::Read(); + + data=newdata; + format=FORMAT_RGBA; + + return OK; +} + + +Image Image::decompressed() const { + + Image img=*this; + img.decompress(); + return img; +} + Error Image::decompress() { - if (format>=FORMAT_BC1 && format<=FORMAT_BC5 && _image_decompress_bc) - _image_decompress_bc(this); + if (format>=FORMAT_BC1 && format<=FORMAT_BC5 ) + _decompress_bc();//_image_decompress_bc(this); else if (format>=FORMAT_PVRTC2 && format<=FORMAT_PVRTC4_ALPHA && _image_decompress_pvrtc) _image_decompress_pvrtc(this); else if (format==FORMAT_ETC && _image_decompress_etc) diff --git a/core/image.h b/core/image.h index ce189f330d..7a6ee1e4b0 100644 --- a/core/image.h +++ b/core/image.h @@ -99,6 +99,8 @@ public: static void (*_image_decompress_bc)(Image *); static void (*_image_decompress_etc)(Image *); + Error _decompress_bc(); + static DVector<uint8_t> (*lossy_packer)(const Image& p_image,float p_quality); static Image (*lossy_unpacker)(const DVector<uint8_t>& p_buffer); static DVector<uint8_t> (*lossless_packer)(const Image& p_image); @@ -318,6 +320,7 @@ public: Error compress(CompressMode p_mode=COMPRESS_BC); Image compressed(int p_mode); /* from the Image::CompressMode enum */ Error decompress(); + Image decompressed() const; void fix_alpha_edges(); void premultiply_alpha(); diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 33f4cafedd..e2371fe24f 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1751,7 +1751,10 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_ skip_editor=p_flags&ResourceSaver::FLAG_OMIT_EDITOR_PROPERTIES; bundle_resources=p_flags&ResourceSaver::FLAG_BUNDLE_RESOURCES; big_endian=p_flags&ResourceSaver::FLAG_SAVE_BIG_ENDIAN; + takeover_paths=p_flags&ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; + if (!p_path.begins_with("res://")) + takeover_paths=false; local_path=p_path.get_base_dir(); //bin_meta_idx = get_string_index("__bin_meta__"); //is often used, so create @@ -1841,9 +1844,12 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_ for(List<RES>::Element *E=saved_resources.front();E;E=E->next()) { RES r = E->get(); - if (r->get_path()=="" || r->get_path().find("::")!=-1) + if (r->get_path()=="" || r->get_path().find("::")!=-1) { save_unicode_string("local://"+itos(ofs_pos.size())); - else + if (takeover_paths) { + r->set_path(p_path+"::"+itos(ofs_pos.size()),true); + } + } else save_unicode_string(r->get_path()); //actual external ofs_pos.push_back(f->get_pos()); f->store_64(0); //offset in 64 bits diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h index bd33fee82c..cc26357bfb 100644 --- a/core/io/resource_format_binary.h +++ b/core/io/resource_format_binary.h @@ -125,6 +125,7 @@ class ResourceFormatSaverBinaryInstance { bool bundle_resources; bool skip_editor; bool big_endian; + bool takeover_paths; int bin_meta_idx; FileAccess *f; String magic; diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp index dae95097d3..e6eede7de6 100644 --- a/core/io/resource_format_xml.cpp +++ b/core/io/resource_format_xml.cpp @@ -2505,6 +2505,10 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res relative_paths=p_flags&ResourceSaver::FLAG_RELATIVE_PATHS; skip_editor=p_flags&ResourceSaver::FLAG_OMIT_EDITOR_PROPERTIES; bundle_resources=p_flags&ResourceSaver::FLAG_BUNDLE_RESOURCES; + takeover_paths=p_flags&ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; + if (!p_path.begins_with("res://")) { + takeover_paths=false; + } depth=0; // save resources @@ -2541,8 +2545,14 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res enter_tag("main_resource",""); //bundled else if (res->get_path().length() && res->get_path().find("::") == -1 ) enter_tag("resource","type=\""+res->get_type()+"\" path=\""+res->get_path()+"\""); //bundled - else - enter_tag("resource","type=\""+res->get_type()+"\" path=\"local://"+itos(resource_map[res])+"\""); + else { + int idx = resource_map[res]; + enter_tag("resource","type=\""+res->get_type()+"\" path=\"local://"+itos(idx)+"\""); + if (takeover_paths) { + res->set_path(p_path+"::"+itos(idx),true); + } + + } write_string("\n",false); diff --git a/core/io/resource_format_xml.h b/core/io/resource_format_xml.h index cfa4744915..40aaa01451 100644 --- a/core/io/resource_format_xml.h +++ b/core/io/resource_format_xml.h @@ -117,6 +117,7 @@ class ResourceFormatSaverXMLInstance { + bool takeover_paths; bool relative_paths; bool bundle_resources; bool skip_editor; diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h index fd4575c872..e307668721 100644 --- a/core/io/resource_saver.h +++ b/core/io/resource_saver.h @@ -74,6 +74,7 @@ public: FLAG_OMIT_EDITOR_PROPERTIES=8, FLAG_SAVE_BIG_ENDIAN=16, FLAG_COMPRESS=32, + FLAG_REPLACE_SUBRESOURCE_PATHS=64, }; diff --git a/core/resource.cpp b/core/resource.cpp index f07c37fb06..987bd772b0 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -157,7 +157,7 @@ void Resource::_resource_path_changed() { } -void Resource::set_path(const String& p_path) { +void Resource::set_path(const String& p_path, bool p_take_over) { if (path_cache==p_path) return; @@ -168,7 +168,16 @@ void Resource::set_path(const String& p_path) { } path_cache=""; - ERR_FAIL_COND( ResourceCache::resources.has( p_path ) ); + if (ResourceCache::resources.has( p_path )) { + if (p_take_over) { + + ResourceCache::resources.get(p_path)->set_name(""); + } else { + ERR_EXPLAIN("Another resource is loaded from path: "+p_path); + ERR_FAIL_COND( ResourceCache::resources.has( p_path ) ); + } + + } path_cache=p_path; if (path_cache!="") { @@ -236,9 +245,21 @@ Ref<Resource> Resource::duplicate(bool p_subresources) { } +void Resource::_set_path(const String& p_path) { + + set_path(p_path,false); +} + +void Resource::_take_over_path(const String& p_path) { + + set_path(p_path,true); +} + + void Resource::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_path","path"),&Resource::set_path); + ObjectTypeDB::bind_method(_MD("set_path","path"),&Resource::_set_path); + ObjectTypeDB::bind_method(_MD("take_over_path","path"),&Resource::_take_over_path); ObjectTypeDB::bind_method(_MD("get_path"),&Resource::get_path); ObjectTypeDB::bind_method(_MD("set_name","name"),&Resource::set_name); ObjectTypeDB::bind_method(_MD("get_name"),&Resource::get_name); diff --git a/core/resource.h b/core/resource.h index 8d2c72d120..8a637e7996 100644 --- a/core/resource.h +++ b/core/resource.h @@ -115,6 +115,9 @@ protected: virtual void _resource_path_changed(); static void _bind_methods(); + + void _set_path(const String& p_path); + void _take_over_path(const String& p_path); public: virtual bool can_reload_from_file(); @@ -126,7 +129,7 @@ public: void set_name(const String& p_name); String get_name() const; - void set_path(const String& p_path); + void set_path(const String& p_path,bool p_take_over=false); String get_path() const; Ref<Resource> duplicate(bool p_subresources=false); diff --git a/core/ucaps.h b/core/ucaps.h index 855a946c21..9c07828006 100644 --- a/core/ucaps.h +++ b/core/ucaps.h @@ -673,7 +673,7 @@ static const int caps_table[CAPS_LEN][2]={ {0xFF5A,0xFF3A}, }; -static const int reverse_caps_table[CAPS_LEN][2]={ +static const int reverse_caps_table[CAPS_LEN-1][2]={ {0x41,0x61}, {0x42,0x62}, {0x43,0x63}, @@ -755,7 +755,7 @@ static const int reverse_caps_table[CAPS_LEN][2]={ {0x12a,0x12b}, {0x12c,0x12d}, {0x12e,0x12f}, -{0x49,0x131}, +//{0x49,0x131}, {0x132,0x133}, {0x134,0x135}, {0x136,0x137}, @@ -1370,7 +1370,7 @@ static int _find_lower(int ch) { int low = 0; - int high = CAPS_LEN -1; + int high = CAPS_LEN -2; int middle; while( low <= high ) diff --git a/core/variant_call.cpp b/core/variant_call.cpp index c245e01ee0..8cdfce1b0a 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -539,6 +539,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_PTR3(Image,brush_transfer); VCALL_PTR1R(Image,get_rect); VCALL_PTR1R(Image,compressed); + VCALL_PTR0R(Image,decompressed); VCALL_PTR3R(Image, resized); VCALL_PTR0R(Image, get_data); VCALL_PTR3(Image, blit_rect); @@ -1266,6 +1267,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(IMAGE, RECT2, Image, get_used_rect, varray(0)); ADDFUNC1(IMAGE, IMAGE, Image, get_rect, RECT2, "area", varray(0)); ADDFUNC1(IMAGE, IMAGE, Image, compressed, INT, "format", varray(0)); + ADDFUNC0(IMAGE, IMAGE, Image, decompressed, varray(0)); ADDFUNC3(IMAGE, IMAGE, Image, resized, INT, "x", INT, "y", INT, "interpolation", varray(((int)Image::INTERPOLATE_BILINEAR))); ADDFUNC0(IMAGE, RAW_ARRAY, Image, get_data, varray()); ADDFUNC3(IMAGE, NIL, Image, blit_rect, IMAGE, "src", RECT2, "src_rect", VECTOR2, "dest", varray(0)); |