diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-08-01 22:10:38 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-08-01 22:10:38 -0300 |
commit | 678948068bbde7f12a9c5f28a467b6cf4d127851 (patch) | |
tree | 75572f3a5cc6089a6ca3046e9307d0a7c0b72c51 /core | |
parent | 9ff6d55822647c87eef392147ea15641d0922d47 (diff) |
Small Issues & Maintenance
-=-=-=-=-=-=-=-=-=-=-=-=-=
-Begin work on Navigation Meshes (simple pathfinding for now, will improve soon)
-More doc on theme overriding
-Upgraded OpenSSL to version without bugs
-Misc bugfixes
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 9 | ||||
-rw-r--r-- | core/bind/core_bind.h | 1 | ||||
-rw-r--r-- | core/globals.cpp | 2 | ||||
-rw-r--r-- | core/io/file_access_pack.cpp | 9 | ||||
-rw-r--r-- | core/io/file_access_pack.h | 34 | ||||
-rw-r--r-- | core/math/face3.cpp | 96 | ||||
-rw-r--r-- | core/math/face3.h | 1 | ||||
-rw-r--r-- | core/math/math_2d.cpp | 5 | ||||
-rw-r--r-- | core/math/math_2d.h | 3 | ||||
-rw-r--r-- | core/os/input.cpp | 16 | ||||
-rw-r--r-- | core/os/input.h | 9 | ||||
-rw-r--r-- | core/print_string.cpp | 5 | ||||
-rw-r--r-- | core/print_string.h | 2 | ||||
-rw-r--r-- | core/translation.cpp | 14 | ||||
-rw-r--r-- | core/translation.h | 3 | ||||
-rw-r--r-- | core/ustring.cpp | 18 | ||||
-rw-r--r-- | core/ustring.h | 3 | ||||
-rw-r--r-- | core/variant_call.cpp | 10 |
18 files changed, 229 insertions, 11 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 64b31d6fdd..ba27c2cdd6 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -176,6 +176,11 @@ bool _OS::is_video_mode_fullscreen(int p_screen) const { } +void _OS::set_use_file_access_save_and_swap(bool p_enable) { + + FileAccess::set_backup_save(p_enable); +} + bool _OS::is_video_mode_resizable(int p_screen) const { OS::VideoMode vm; @@ -675,6 +680,10 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("native_video_pause"),&_OS::native_video_pause); + ObjectTypeDB::bind_method(_MD("set_use_file_access_save_and_swap","enabled"),&_OS::set_use_file_access_save_and_swap); + + + BIND_CONSTANT( DAY_SUNDAY ); BIND_CONSTANT( DAY_MONDAY ); BIND_CONSTANT( DAY_TUESDAY ); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 20a33fa013..cac2de314d 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -174,6 +174,7 @@ public: }; */ + void set_use_file_access_save_and_swap(bool p_enable); void set_icon(const Image& p_icon); Dictionary get_date() const; diff --git a/core/globals.cpp b/core/globals.cpp index 3a04becef4..ccda457f46 100644 --- a/core/globals.cpp +++ b/core/globals.cpp @@ -1358,6 +1358,7 @@ void Globals::_bind_methods() { ObjectTypeDB::bind_method(_MD("save"),&Globals::save); ObjectTypeDB::bind_method(_MD("has_singleton"),&Globals::has_singleton); ObjectTypeDB::bind_method(_MD("get_singleton"),&Globals::get_singleton_object); + ObjectTypeDB::bind_method(_MD("load_resource_pack"),&Globals::_load_resource_pack); } Globals::Globals() { @@ -1379,6 +1380,7 @@ Globals::Globals() { set("application/name","" ); set("application/main_scene",""); custom_prop_info["application/main_scene"]=PropertyInfo(Variant::STRING,"application/main_scene",PROPERTY_HINT_FILE,"xml,res,scn,xscn"); + set("application/disable_stdout",false); key.key.scancode=KEY_RETURN; diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index e2cb300ebc..6e03819aac 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -48,7 +48,10 @@ Error PackedData::add_pack(const String& p_path) { void PackedData::add_path(const String& pkg_path, const String& path, uint64_t ofs, uint64_t size,const uint8_t* p_md5, PackSource* p_src) { - bool exists = files.has(path); + PathMD5 pmd5(path.md5_buffer()); + //printf("adding path %ls, %lli, %lli\n", path.c_str(), pmd5.a, pmd5.b); + + bool exists = files.has(pmd5); PackedFile pf; pf.pack=pkg_path; @@ -58,7 +61,7 @@ void PackedData::add_path(const String& pkg_path, const String& path, uint64_t o pf.md5[i]=p_md5[i]; pf.src = p_src; - files[path]=pf; + files[pmd5]=pf; if (!exists) { //search for dir @@ -113,6 +116,8 @@ bool PackedSourcePCK::try_open_pack(const String& p_path) { if (!f) return false; + //printf("try open %ls!\n", p_path.c_str()); + uint32_t magic= f->get_32(); if (magic != 0x43504447) { diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index a4c750bf3c..5fcc79aaf4 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -60,8 +60,34 @@ private: Set<String> files; }; + struct PathMD5 { + uint64_t a; + uint64_t b; + bool operator < (const PathMD5& p_md5) const { + + if (p_md5.a == a) { + return b < p_md5.b; + } else { + return a < p_md5.a; + } + } + + bool operator == (const PathMD5& p_md5) const { + return a == p_md5.a && b == p_md5.b; + }; + + PathMD5() { + a = b = 0; + }; + + PathMD5(const Vector<uint8_t> p_buf) { + a = *((uint64_t*)&p_buf[0]); + b = *((uint64_t*)&p_buf[8]); + }; + }; + + Map<PathMD5,PackedFile> files; - Map<String,PackedFile> files; Vector<PackSource*> sources; PackedDir *root; @@ -151,7 +177,9 @@ public: FileAccess *PackedData::try_open_path(const String& p_path) { - Map<String,PackedFile>::Element *E=files.find(p_path); + //print_line("try open path " + p_path); + PathMD5 pmd5(p_path.md5_buffer()); + Map<PathMD5,PackedFile>::Element *E=files.find(pmd5); if (!E) return NULL; //not found if (E->get().offset==0) @@ -162,7 +190,7 @@ FileAccess *PackedData::try_open_path(const String& p_path) { bool PackedData::has_path(const String& p_path) { - return files.has(p_path); + return files.has(PathMD5(p_path.md5_buffer())); } diff --git a/core/math/face3.cpp b/core/math/face3.cpp index 814f2d675d..1adc95e4e9 100644 --- a/core/math/face3.cpp +++ b/core/math/face3.cpp @@ -356,4 +356,100 @@ void Face3::get_support(const Vector3& p_normal,const Transform& p_transform,Vec } +Vector3 Face3::get_closest_point_to(const Vector3& p_point) const { + + Vector3 edge0 = vertex[1] - vertex[0]; + Vector3 edge1 = vertex[2] - vertex[0]; + Vector3 v0 = vertex[0] - p_point; + + float a = edge0.dot( edge0 ); + float b = edge0.dot( edge1 ); + float c = edge1.dot( edge1 ); + float d = edge0.dot( v0 ); + float e = edge1.dot( v0 ); + + float det = a*c - b*b; + float s = b*e - c*d; + float t = b*d - a*e; + + if ( s + t < det ) + { + if ( s < 0.f ) + { + if ( t < 0.f ) + { + if ( d < 0.f ) + { + s = CLAMP( -d/a, 0.f, 1.f ); + t = 0.f; + } + else + { + s = 0.f; + t = CLAMP( -e/c, 0.f, 1.f ); + } + } + else + { + s = 0.f; + t = CLAMP( -e/c, 0.f, 1.f ); + } + } + else if ( t < 0.f ) + { + s = CLAMP( -d/a, 0.f, 1.f ); + t = 0.f; + } + else + { + float invDet = 1.f / det; + s *= invDet; + t *= invDet; + } + } + else + { + if ( s < 0.f ) + { + float tmp0 = b+d; + float tmp1 = c+e; + if ( tmp1 > tmp0 ) + { + float numer = tmp1 - tmp0; + float denom = a-2*b+c; + s = CLAMP( numer/denom, 0.f, 1.f ); + t = 1-s; + } + else + { + t = CLAMP( -e/c, 0.f, 1.f ); + s = 0.f; + } + } + else if ( t < 0.f ) + { + if ( a+d > b+e ) + { + float numer = c+e-b-d; + float denom = a-2*b+c; + s = CLAMP( numer/denom, 0.f, 1.f ); + t = 1-s; + } + else + { + s = CLAMP( -e/c, 0.f, 1.f ); + t = 0.f; + } + } + else + { + float numer = c+e-b-d; + float denom = a-2*b+c; + s = CLAMP( numer/denom, 0.f, 1.f ); + t = 1.f - s; + } + } + + return vertex[0] + s * edge0 + t * edge1; +} diff --git a/core/math/face3.h b/core/math/face3.h index 630c408de3..5a509299a2 100644 --- a/core/math/face3.h +++ b/core/math/face3.h @@ -68,6 +68,7 @@ public: real_t get_area() const; Vector3 get_median_point() const; + Vector3 get_closest_point_to(const Vector3& p_point) const; bool intersects_ray(const Vector3& p_from,const Vector3& p_dir,Vector3 * p_intersection=0) const; bool intersects_segment(const Vector3& p_from,const Vector3& p_dir,Vector3 * p_intersection=0) const; diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp index 6c160abaca..3aaa539fbb 100644 --- a/core/math/math_2d.cpp +++ b/core/math/math_2d.cpp @@ -77,6 +77,11 @@ float Vector2::angle_to(const Vector2& p_vector2) const { return Math::atan2( tangent().dot(p_vector2), dot(p_vector2) ); } +float Vector2::angle_to_point(const Vector2& p_vector2) const { + + return Math::atan2( x-p_vector2.x, y - p_vector2.y ); +} + float Vector2::dot(const Vector2& p_other) const { return x*p_other.x + y*p_other.y; diff --git a/core/math/math_2d.h b/core/math/math_2d.h index 3cc5bdc843..fa40d305f5 100644 --- a/core/math/math_2d.h +++ b/core/math/math_2d.h @@ -90,7 +90,8 @@ struct Vector2 { float distance_to(const Vector2& p_vector2) const; float distance_squared_to(const Vector2& p_vector2) const; float angle_to(const Vector2& p_vector2) const; - + float angle_to_point(const Vector2& p_vector2) const; + float dot(const Vector2& p_other) const; float cross(const Vector2& p_other) const; Vector2 cross(real_t p_other) const; diff --git a/core/os/input.cpp b/core/os/input.cpp index 70733aadec..3712690cc1 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -53,6 +53,7 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("is_joy_button_pressed","device","button"),&Input::is_joy_button_pressed); ObjectTypeDB::bind_method(_MD("is_action_pressed","action"),&Input::is_action_pressed); ObjectTypeDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis); + ObjectTypeDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name); ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer); ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); ObjectTypeDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed); @@ -64,6 +65,7 @@ void Input::_bind_methods() { BIND_CONSTANT( MOUSE_MODE_HIDDEN ); BIND_CONSTANT( MOUSE_MODE_CAPTURED ); + ADD_SIGNAL( MethodInfo("joy_connection_changed", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "connected")) ); } Input::Input() { @@ -193,6 +195,20 @@ float InputDefault::get_joy_axis(int p_device,int p_axis) { } } +String InputDefault::get_joy_name(int p_idx) { + + _THREAD_SAFE_METHOD_ + return joy_names[p_idx]; +}; + +void InputDefault::joy_connection_changed(int p_idx, bool p_connected, String p_name) { + + _THREAD_SAFE_METHOD_ + joy_names[p_idx] = p_connected ? p_name : ""; + + emit_signal("joy_connection_changed", p_idx, p_connected); +}; + Vector3 InputDefault::get_accelerometer() { _THREAD_SAFE_METHOD_ diff --git a/core/os/input.h b/core/os/input.h index cc51dbf42f..b837a1f68f 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -61,6 +61,9 @@ public: virtual bool is_action_pressed(const StringName& p_action)=0; virtual float get_joy_axis(int p_device,int p_axis)=0; + virtual String get_joy_name(int p_idx)=0; + virtual void joy_connection_changed(int p_idx, bool p_connected, String p_name)=0; + virtual Point2 get_mouse_pos() const=0; virtual Point2 get_mouse_speed() const=0; @@ -71,6 +74,7 @@ public: virtual void action_press(const StringName& p_action)=0; virtual void action_release(const StringName& p_action)=0; + Input(); }; @@ -86,6 +90,7 @@ class InputDefault : public Input { Set<int> joy_buttons_pressed; Map<int,float> joy_axis; Map<StringName,int> custom_action_press; + Map<int, String> joy_names; Vector3 accelerometer; Vector2 mouse_pos; MainLoop *main_loop; @@ -108,14 +113,14 @@ class InputDefault : public Input { public: - - virtual bool is_key_pressed(int p_scancode); virtual bool is_mouse_button_pressed(int p_button); virtual bool is_joy_button_pressed(int p_device, int p_button); virtual bool is_action_pressed(const StringName& p_action); virtual float get_joy_axis(int p_device,int p_axis); + String get_joy_name(int p_idx); + void joy_connection_changed(int p_idx, bool p_connected, String p_name); virtual Vector3 get_accelerometer(); diff --git a/core/print_string.cpp b/core/print_string.cpp index 85700fe650..ae15d05a35 100644 --- a/core/print_string.cpp +++ b/core/print_string.cpp @@ -31,7 +31,7 @@ #include <stdio.h> static PrintHandlerList *print_handler_list=NULL; - +bool _print_line_enabled=true; void add_print_handler(PrintHandlerList *p_handler) { @@ -75,6 +75,9 @@ void remove_print_handler(PrintHandlerList *p_handler) { void print_line(String p_string) { + if (!_print_line_enabled) + return; + OS::get_singleton()->print("%s\n",p_string.utf8().get_data()); _global_lock(); diff --git a/core/print_string.h b/core/print_string.h index 49960b7ed7..c3e91f32fa 100644 --- a/core/print_string.h +++ b/core/print_string.h @@ -47,9 +47,11 @@ struct PrintHandlerList { }; + void add_print_handler(PrintHandlerList *p_handler); void remove_print_handler(PrintHandlerList *p_handler); +extern bool _print_line_enabled; extern void print_line(String p_string); #endif diff --git a/core/translation.cpp b/core/translation.cpp index 045771f7c7..81f2c36075 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -470,6 +470,11 @@ void Translation::get_message_list(List<StringName> *r_messages) const { } +int Translation::get_message_count() const { + + return translation_map.size(); +}; + void Translation::_bind_methods() { @@ -479,6 +484,7 @@ void Translation::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_message","src_message"),&Translation::get_message); ObjectTypeDB::bind_method(_MD("erase_message","src_message"),&Translation::erase_message); ObjectTypeDB::bind_method(_MD("get_message_list"),&Translation::_get_message_list); + ObjectTypeDB::bind_method(_MD("get_message_count"),&Translation::get_message_count); ObjectTypeDB::bind_method(_MD("_set_messages"),&Translation::_set_messages); ObjectTypeDB::bind_method(_MD("_get_messages"),&Translation::_get_messages); @@ -519,6 +525,11 @@ void TranslationServer::remove_translation(const Ref<Translation> &p_translation translations.erase(p_translation); } +void TranslationServer::clear() { + + translations.clear(); +}; + StringName TranslationServer::translate(const StringName& p_message) const { //translate using locale @@ -609,6 +620,9 @@ void TranslationServer::_bind_methods() { ObjectTypeDB::bind_method(_MD("add_translation"),&TranslationServer::add_translation); ObjectTypeDB::bind_method(_MD("remove_translation"),&TranslationServer::remove_translation); + + ObjectTypeDB::bind_method(_MD("clear"),&TranslationServer::clear); + } void TranslationServer::load_translations() { diff --git a/core/translation.h b/core/translation.h index 1286f48a0b..d690320cd0 100644 --- a/core/translation.h +++ b/core/translation.h @@ -60,6 +60,7 @@ public: void erase_message(const StringName& p_src_text); void get_message_list(List<StringName> *r_messages) const; + int get_message_count() const; Translation(); }; @@ -103,6 +104,8 @@ public: void setup(); + void clear(); + void load_translations(); TranslationServer(); diff --git a/core/ustring.cpp b/core/ustring.cpp index 00477e7570..cb0540dbb0 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -2276,6 +2276,24 @@ String String::md5_text() const { return String::md5(ctx.digest); } +Vector<uint8_t> String::md5_buffer() const { + + CharString cs=utf8(); + MD5_CTX ctx; + MD5Init(&ctx); + MD5Update(&ctx,(unsigned char*)cs.ptr(),cs.length()); + MD5Final(&ctx); + + Vector<uint8_t> ret; + ret.resize(16); + for (int i=0; i<16; i++) { + ret[i] = ctx.digest[i]; + }; + + return ret; +}; + + String String::insert(int p_at_pos,String p_string) const { if (p_at_pos<0) diff --git a/core/ustring.h b/core/ustring.h index 13db00f07f..4831341866 100644 --- a/core/ustring.h +++ b/core/ustring.h @@ -183,7 +183,8 @@ public: uint32_t hash() const; /* hash the string */ uint64_t hash64() const; /* hash the string */ String md5_text() const; - + Vector<uint8_t> md5_buffer() const; + inline bool empty() const { return length() == 0; } // path functions diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 8cdfce1b0a..b28035e8b0 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -290,6 +290,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM1R(Vector2,distance_to); VCALL_LOCALMEM1R(Vector2,distance_squared_to); VCALL_LOCALMEM1R(Vector2,angle_to); + VCALL_LOCALMEM1R(Vector2,angle_to_point); VCALL_LOCALMEM2R(Vector2,linear_interpolate); VCALL_LOCALMEM4R(Vector2,cubic_interpolate); VCALL_LOCALMEM1R(Vector2,rotated); @@ -300,6 +301,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM1R(Vector2,dot); VCALL_LOCALMEM1R(Vector2,slide); VCALL_LOCALMEM1R(Vector2,reflect); + VCALL_LOCALMEM0R(Vector2,atan2); // VCALL_LOCALMEM1R(Vector2,cross); VCALL_LOCALMEM0R(Rect2,get_area); @@ -520,7 +522,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var #define VCALL_PTR3R(m_type,m_method)\ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Variant** p_args) { r_ret=reinterpret_cast<m_type*>(p_self._data._ptr)->m_method(*p_args[0],*p_args[1],*p_args[2]); } #define VCALL_PTR4(m_type,m_method)\ -static void _call_##m_type##m_method(Variant& r_ret,Variant& p_self,const Variant** p_args) { reinterpret_cast<m_type*>(p_self._data._ptr)->m_method(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); } +static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Variant** p_args) { reinterpret_cast<m_type*>(p_self._data._ptr)->m_method(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); } #define VCALL_PTR4R(m_type,m_method)\ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Variant** p_args) { r_ret=reinterpret_cast<m_type*>(p_self._data._ptr)->m_method(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); } #define VCALL_PTR5(m_type,m_method)\ @@ -533,6 +535,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_PTR0R(Image,get_height); VCALL_PTR0R(Image,empty); VCALL_PTR3R(Image,get_pixel); + VCALL_PTR4(Image, put_pixel); VCALL_PTR0R(Image,get_used_rect); VCALL_PTR3R(Image,brushed); VCALL_PTR1R(Image,load); @@ -552,6 +555,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_PTR1R( AABB, merge ); VCALL_PTR1R( AABB, intersection ); VCALL_PTR1R( AABB, intersects_plane ); + VCALL_PTR2R( AABB, intersects_segment ); VCALL_PTR1R( AABB, has_point ); VCALL_PTR1R( AABB, get_support ); VCALL_PTR0R( AABB, get_longest_axis ); @@ -1184,10 +1188,12 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(VECTOR2,VECTOR2,Vector2,normalized,varray()); ADDFUNC0(VECTOR2,REAL,Vector2,length,varray()); + ADDFUNC0(VECTOR2,REAL,Vector2,atan2,varray()); ADDFUNC0(VECTOR2,REAL,Vector2,length_squared,varray()); ADDFUNC1(VECTOR2,REAL,Vector2,distance_to,VECTOR2,"to",varray()); ADDFUNC1(VECTOR2,REAL,Vector2,distance_squared_to,VECTOR2,"to",varray()); ADDFUNC1(VECTOR2,REAL,Vector2,angle_to,VECTOR2,"to",varray()); + ADDFUNC1(VECTOR2,REAL,Vector2,angle_to_point,VECTOR2,"to",varray()); ADDFUNC2(VECTOR2,VECTOR2,Vector2,linear_interpolate,VECTOR2,"b",REAL,"t",varray()); ADDFUNC4(VECTOR2,VECTOR2,Vector2,cubic_interpolate,VECTOR2,"b",VECTOR2,"pre_a",VECTOR2,"post_b",REAL,"t",varray()); ADDFUNC1(VECTOR2,VECTOR2,Vector2,rotated,REAL,"phi",varray()); @@ -1261,6 +1267,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(IMAGE, INT, Image, get_height, varray()); ADDFUNC0(IMAGE, BOOL, Image, empty, varray()); ADDFUNC3(IMAGE, COLOR, Image, get_pixel, INT, "x", INT, "y", INT, "mipmap_level", varray(0)); + ADDFUNC4(IMAGE, NIL, Image, put_pixel, INT, "x", INT, "y", COLOR, "color", INT, "mipmap_level", varray(0)); ADDFUNC3(IMAGE, IMAGE, Image, brushed, IMAGE, "src", IMAGE, "brush", VECTOR2, "pos", varray(0)); ADDFUNC1(IMAGE, INT, Image, load, STRING, "path", varray(0)); ADDFUNC3(IMAGE, NIL, Image, brush_transfer, IMAGE, "src", IMAGE, "brush", VECTOR2, "pos", varray(0)); @@ -1364,6 +1371,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC1(_AABB,_AABB,AABB,merge,_AABB,"with",varray()); ADDFUNC1(_AABB,_AABB,AABB,intersection,_AABB,"with",varray()); ADDFUNC1(_AABB,BOOL,AABB,intersects_plane,PLANE,"plane",varray()); + ADDFUNC2(_AABB,BOOL,AABB,intersects_segment,VECTOR3,"from",VECTOR3,"to",varray()); ADDFUNC1(_AABB,BOOL,AABB,has_point,VECTOR3,"point",varray()); ADDFUNC1(_AABB,VECTOR3,AABB,get_support,VECTOR3,"dir",varray()); ADDFUNC0(_AABB,VECTOR3,AABB,get_longest_axis,varray()); |