diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-06-11 10:41:03 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-06-11 10:41:03 -0300 |
commit | 9b8696d3dd92e2ed6f310ad0f0bf3c2182c9c6ae (patch) | |
tree | b2ed0515196bb774504b54aab0bf242992ac3d9f /core/io | |
parent | 6f0b4678e26c04abfc88c0226c803e78a108de98 (diff) |
Light Baker!
-=-=-=-=-=-=
-Support for lightmap baker, have fun figuring out how it works before tutorial is published.
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/resource_format_xml.cpp | 9 | ||||
-rw-r--r-- | core/io/resource_format_xml.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp index f3c0f1cb8b..dae95097d3 100644 --- a/core/io/resource_format_xml.cpp +++ b/core/io/resource_format_xml.cpp @@ -193,7 +193,9 @@ Error ResourceInteractiveLoaderXML::close_tag(const String& p_name) { void ResourceInteractiveLoaderXML::unquote(String& p_str) { - p_str=p_str.strip_edges(); + p_str=p_str.strip_edges().replace("\"","").xml_unescape(); + + /*p_str=p_str.strip_edges(); p_str=p_str.replace("\"",""); p_str=p_str.replace(">","<"); p_str=p_str.replace("<",">"); @@ -205,7 +207,7 @@ void ResourceInteractiveLoaderXML::unquote(String& p_str) { p_str=p_str.replace("&#"+String::num(i)+";",chr); } p_str=p_str.replace("&","&"); - +*/ //p_str.parse_utf8( p_str.ascii(true).get_data() ); } @@ -652,11 +654,14 @@ Error ResourceInteractiveLoaderXML::parse_property(Variant& r_v, String &r_name) while( idx<len*2) { CharType c=get_char(); + if (c<=32) + continue; if (idx&1) { byte|=HEX2CHR(c); bytesptr[idx>>1]=byte; + //printf("%x\n",int(byte)); } else { byte=HEX2CHR(c)<<4; diff --git a/core/io/resource_format_xml.h b/core/io/resource_format_xml.h index 7874431a38..cfa4744915 100644 --- a/core/io/resource_format_xml.h +++ b/core/io/resource_format_xml.h @@ -68,7 +68,7 @@ friend class ResourceFormatLoaderXML; List<RES> resource_cache; Tag* parse_tag(bool* r_exit=NULL,bool p_printerr=true); Error close_tag(const String& p_name); - void unquote(String& p_str); + _FORCE_INLINE_ void unquote(String& p_str); Error goto_end_of_tag(); Error parse_property_data(String &r_data); Error parse_property(Variant& r_v, String &r_name); |