summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct46
-rw-r--r--bin/tests/test_physics_2d.cpp4
-rw-r--r--core/io/file_access_memory.cpp42
-rw-r--r--core/io/resource_format_xml.cpp8
-rw-r--r--core/io/resource_format_xml.h2
-rw-r--r--core/math/math_funcs.cpp4
-rw-r--r--core/object.h3
-rw-r--r--core/os/input.cpp2
-rw-r--r--core/variant.cpp11
-rw-r--r--core/variant.h3
-rw-r--r--core/variant_call.cpp2
-rw-r--r--core/variant_op.cpp56
-rw-r--r--demos/2d/isometric_light/character_shder.resbin1150 -> 1152 bytes
-rw-r--r--demos/2d/isometric_light/cubio.scnbin6927 -> 7003 bytes
-rw-r--r--demos/2d/isometric_light/floor_shader.resbin1026 -> 1027 bytes
-rw-r--r--demos/2d/isometric_light/map.scnbin8535 -> 8634 bytes
-rw-r--r--demos/2d/isometric_light/tileset.resbin2775 -> 2781 bytes
-rw-r--r--demos/2d/isometric_light/wall_shader.resbin1684 -> 1687 bytes
-rw-r--r--demos/2d/platformer/one_way_platform.pngbin0 -> 2287 bytes
-rw-r--r--demos/2d/platformer/one_way_platform.xml220
-rw-r--r--demos/2d/platformer/stage.xml877
-rw-r--r--demos/3d/kinematic_char/cubelib.resbin11530 -> 11532 bytes
-rw-r--r--demos/3d/kinematic_char/level.scnbin15556 -> 15523 bytes
-rw-r--r--demos/3d/platformer/bullet.scnbin5465 -> 6156 bytes
-rw-r--r--demos/gui/rich_text_bbcode/rich_text_bbcode.gd17
-rw-r--r--doc/base/classes.xml4
-rw-r--r--drivers/SCsub185
-rw-r--r--drivers/chibi/cp_player_data_control.cpp4
-rw-r--r--drivers/convex_decomp/b2Polygon.cpp1
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp7
-rw-r--r--drivers/gles2/shader_compiler_gles2.cpp7
-rw-r--r--drivers/gles2/shader_compiler_gles2.h1
-rw-r--r--drivers/gles2/shaders/canvas.glsl10
-rw-r--r--drivers/unix/memory_pool_static_malloc.cpp2
-rw-r--r--main/main.cpp3
-rw-r--r--modules/gdscript/gd_parser.cpp2
-rw-r--r--platform/android/AndroidManifest.xml.template4
-rw-r--r--platform/android/android_native_app_glue.h2
-rw-r--r--platform/android/dir_access_jandroid.cpp53
-rw-r--r--platform/android/dir_access_jandroid.h1
-rw-r--r--platform/android/export/export.cpp118
-rw-r--r--platform/android/file_access_jandroid.cpp1
-rw-r--r--platform/android/java/res/drawable/icon.pngbin91728 -> 17135 bytes
-rw-r--r--platform/android/java/src/com/android/godot/GodotIO.java35
-rw-r--r--platform/windows/SCsub6
-rw-r--r--platform/x11/detect.py6
-rw-r--r--scene/2d/area_2d.cpp34
-rw-r--r--scene/2d/area_2d.h8
-rw-r--r--scene/2d/camera_2d.cpp2
-rw-r--r--scene/2d/canvas_item.cpp14
-rw-r--r--scene/2d/canvas_item.h3
-rw-r--r--scene/2d/navigation2d.cpp46
-rw-r--r--scene/2d/navigation2d.h2
-rw-r--r--scene/2d/physics_body_2d.cpp34
-rw-r--r--scene/2d/physics_body_2d.h4
-rw-r--r--scene/2d/polygon_2d.cpp23
-rw-r--r--scene/2d/polygon_2d.h3
-rw-r--r--scene/2d/tile_map.cpp32
-rw-r--r--scene/2d/tile_map.h9
-rw-r--r--scene/3d/camera.cpp8
-rw-r--r--scene/3d/camera.h1
-rw-r--r--scene/3d/mesh_instance.cpp4
-rw-r--r--scene/3d/navigation.cpp15
-rw-r--r--scene/3d/navigation.h2
-rw-r--r--scene/3d/physics_body.cpp11
-rw-r--r--scene/3d/sprite_3d.cpp2
-rw-r--r--scene/3d/visual_instance.cpp1
-rw-r--r--scene/animation/animation_tree_player.cpp6
-rw-r--r--scene/animation/tween.cpp2
-rw-r--r--scene/gui/control.cpp6
-rw-r--r--scene/gui/grid_container.cpp28
-rw-r--r--scene/gui/label.cpp88
-rw-r--r--scene/gui/label.h3
-rw-r--r--scene/gui/scroll_bar.cpp16
-rw-r--r--scene/gui/text_edit.cpp4
-rw-r--r--scene/gui/texture_frame.cpp4
-rw-r--r--scene/main/timer.cpp2
-rw-r--r--scene/resources/animation.cpp4
-rw-r--r--scene/resources/curve.cpp2
-rw-r--r--scene/resources/scene_preloader.cpp2
-rw-r--r--scene/resources/shader_graph.cpp2
-rw-r--r--servers/physics/body_sw.cpp3
-rw-r--r--servers/physics/body_sw.h6
-rw-r--r--servers/physics/joints/generic_6dof_joint_sw.cpp2
-rw-r--r--servers/physics/physics_server_sw.cpp9
-rw-r--r--servers/physics/shape_sw.cpp13
-rw-r--r--servers/physics_2d/area_pair_2d_sw.cpp4
-rw-r--r--servers/physics_2d/body_2d_sw.cpp4
-rw-r--r--servers/physics_2d/body_2d_sw.h17
-rw-r--r--servers/physics_2d/body_pair_2d_sw.cpp55
-rw-r--r--servers/physics_2d/collision_object_2d_sw.cpp2
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h11
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp33
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h6
-rw-r--r--servers/physics_2d/space_2d_sw.cpp2
-rw-r--r--servers/physics_2d_server.cpp8
-rw-r--r--servers/physics_2d_server.h7
-rw-r--r--servers/physics_server.cpp4
-rw-r--r--servers/physics_server.h4
-rw-r--r--servers/visual/shader_language.cpp16
-rw-r--r--servers/visual/visual_server_raster.cpp4
-rw-r--r--tools/collada/collada.cpp2
-rw-r--r--tools/editor/animation_editor.cpp4
-rw-r--r--tools/editor/editor_node.cpp7
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp4
-rw-r--r--version.py2
106 files changed, 1671 insertions, 734 deletions
diff --git a/SConstruct b/SConstruct
index 537bb0e395..11b35e0b4b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -123,6 +123,7 @@ opts.Add('disable_3d', 'Disable 3D nodes for smaller executable (yes/no)', "no")
opts.Add('disable_advanced_gui', 'Disable advance 3D gui nodes and behaviors (yes/no)', "no")
opts.Add('colored', 'Enable colored output for the compilation (yes/no)', 'no')
opts.Add('extra_suffix', 'Custom extra suffix added to the base filename of all generated binary files.', '')
+opts.Add('vsproj', 'Generate Visual Studio Project. (yes/no)', 'no')
# add platform specific options
@@ -177,6 +178,25 @@ if selected_platform in platform_list:
else:
env = env_base.Clone()
+ if env['vsproj']=="yes":
+ env.vs_incs = []
+ env.vs_srcs = []
+
+ def AddToVSProject( sources ):
+ for x in sources:
+ if type(x) == type(""):
+ fname = env.File(x).path
+ else:
+ fname = env.File(x)[0].path
+ pieces = fname.split(".")
+ if len(pieces)>0:
+ basename = pieces[0]
+ basename = basename.replace('\\\\','/')
+ env.vs_srcs = env.vs_srcs + [basename + ".cpp"]
+ env.vs_incs = env.vs_incs + [basename + ".h"]
+ #print basename
+ env.AddToVSProject = AddToVSProject
+
env.extra_suffix=""
if env["extra_suffix"] != '' :
@@ -330,6 +350,32 @@ if selected_platform in platform_list:
SConscript("main/SCsub")
SConscript("platform/"+selected_platform+"/SCsub"); # build selected platform
+
+ # Microsoft Visual Studio Project Generation
+ if (env['vsproj'])=="yes":
+
+ AddToVSProject(env.core_sources)
+ AddToVSProject(env.main_sources)
+ AddToVSProject(env.modules_sources)
+ AddToVSProject(env.scene_sources)
+ AddToVSProject(env.servers_sources)
+ AddToVSProject(env.tool_sources)
+
+ debug_variants = ['Debug|Win32']+['Debug|x64']
+ release_variants = ['Release|Win32']+['Release|x64']
+ release_debug_variants = ['Release_Debug|Win32']+['Release_Debug|x64']
+ variants = debug_variants + release_variants + release_debug_variants
+ debug_targets = ['Debug']+['Debug']
+ release_targets = ['Release']+['Release']
+ release_debug_targets = ['ReleaseDebug']+['ReleaseDebug']
+ targets = debug_targets + release_targets + release_debug_targets
+ msvproj = env.MSVSProject(target = ['#godot' + env['MSVSPROJECTSUFFIX'] ],
+ incs = env.vs_incs,
+ srcs = env.vs_srcs,
+ runfile = targets,
+ buildtarget = targets,
+ auto_build_solution=1,
+ variant = variants)
else:
diff --git a/bin/tests/test_physics_2d.cpp b/bin/tests/test_physics_2d.cpp
index a441bed430..70a7d868be 100644
--- a/bin/tests/test_physics_2d.cpp
+++ b/bin/tests/test_physics_2d.cpp
@@ -191,7 +191,7 @@ class TestPhysics2DMainLoop : public MainLoop {
Image image(convex_png);
- body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image=vs->texture_create_from_image(image);
+ body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].image=vs->texture_create_from_image(image);
RID convex_polygon_shape = ps->shape_create(Physics2DServer::SHAPE_CONVEX_POLYGON);
@@ -206,7 +206,7 @@ class TestPhysics2DMainLoop : public MainLoop {
arr.push_back(Point2(11,7)-sb);
ps->shape_set_data(convex_polygon_shape,arr);
- body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].shape = convex_polygon_shape;
+ body_shape_data[Physics2DServer::SHAPE_CUSTOM+1].shape = convex_polygon_shape;
}
diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp
index 749f7d1641..2880c4ebda 100644
--- a/core/io/file_access_memory.cpp
+++ b/core/io/file_access_memory.cpp
@@ -39,7 +39,7 @@ void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
if (!files) {
files = memnew((Map<String, Vector<uint8_t> >));
- };
+ }
String name;
if (Globals::get_singleton())
@@ -49,7 +49,7 @@ void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
name = DirAccess::normalize_path(name);
(*files)[name] = p_data;
-};
+}
void FileAccessMemory::cleanup() {
@@ -57,13 +57,13 @@ void FileAccessMemory::cleanup() {
return;
memdelete(files);
-};
+}
FileAccess* FileAccessMemory::create() {
return memnew(FileAccessMemory);
-};
+}
bool FileAccessMemory::file_exists(const String& p_name) {
@@ -71,7 +71,7 @@ bool FileAccessMemory::file_exists(const String& p_name) {
name = DirAccess::normalize_path(name);
return files && (files->find(name) != NULL);
-};
+}
Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
@@ -89,57 +89,57 @@ Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
pos = 0;
return OK;
-};
+}
void FileAccessMemory::close() {
data = NULL;
-};
+}
bool FileAccessMemory::is_open() const {
return data != NULL;
-};
+}
void FileAccessMemory::seek(size_t p_position) {
ERR_FAIL_COND(!data);
pos = p_position;
-};
+}
void FileAccessMemory::seek_end(int64_t p_position) {
ERR_FAIL_COND(!data);
pos = length + p_position;
-};
+}
size_t FileAccessMemory::get_pos() const {
ERR_FAIL_COND_V(!data, 0);
return pos;
-};
+}
size_t FileAccessMemory::get_len() const {
ERR_FAIL_COND_V(!data, 0);
return length;
-};
+}
bool FileAccessMemory::eof_reached() const {
return pos >= length;
-};
+}
uint8_t FileAccessMemory::get_8() const {
- uint8_t ret;
+ uint8_t ret = 0;
if (pos < length) {
ret = data[pos];
- };
+ }
++pos;
return ret;
-};
+}
int FileAccessMemory::get_buffer(uint8_t *p_dst,int p_length) const {
@@ -156,19 +156,19 @@ int FileAccessMemory::get_buffer(uint8_t *p_dst,int p_length) const {
pos += p_length;
return read;
-};
+}
Error FileAccessMemory::get_error() const {
return pos >= length ? ERR_FILE_EOF : OK;
-};
+}
void FileAccessMemory::store_8(uint8_t p_byte) {
ERR_FAIL_COND(!data);
ERR_FAIL_COND(pos >= length);
data[pos++] = p_byte;
-};
+}
void FileAccessMemory::store_buffer(const uint8_t *p_src,int p_length) {
@@ -176,11 +176,11 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src,int p_length) {
int write = MIN(p_length, left);
if (write < p_length) {
WARN_PRINT("Writing less data than requested");
- };
+ }
copymem(&data[pos], p_src, write);
pos += p_length;
-};
+}
FileAccessMemory::FileAccessMemory() {
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp
index 50b1eba6e7..4771c31de2 100644
--- a/core/io/resource_format_xml.cpp
+++ b/core/io/resource_format_xml.cpp
@@ -2243,12 +2243,12 @@ void ResourceFormatSaverXMLInstance::write_property(const String& p_name,const V
List<Variant> keys;
dict.get_key_list(&keys);
+ keys.sort();
for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
//if (!_check_type(dict[E->get()]))
// continue;
-
bool ok;
write_property("",E->get(),&ok);
ERR_CONTINUE(!ok);
@@ -2438,7 +2438,7 @@ void ResourceFormatSaverXMLInstance::_find_resources(const Variant& p_variant,bo
return;
if (!p_main && (!bundle_resources ) && res->get_path().length() && res->get_path().find("::") == -1 ) {
- external_resources.insert(res);
+ external_resources.push_back(res);
return;
}
@@ -2448,6 +2448,7 @@ void ResourceFormatSaverXMLInstance::_find_resources(const Variant& p_variant,bo
List<PropertyInfo> property_list;
res->get_property_list( &property_list );
+ property_list.sort();
List<PropertyInfo>::Element *I=property_list.front();
@@ -2525,7 +2526,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
enter_tag("resource_file","type=\""+p_resource->get_type()+"\" subresource_count=\""+itos(saved_resources.size()+external_resources.size())+"\" version=\""+itos(VERSION_MAJOR)+"."+itos(VERSION_MINOR)+"\" version_name=\""+VERSION_FULL_NAME+"\"");
write_string("\n",false);
- for(Set<RES>::Element *E=external_resources.front();E;E=E->next()) {
+ for(List<RES>::Element *E=external_resources.front();E;E=E->next()) {
write_tabs();
String p = E->get()->get_path();
@@ -2562,6 +2563,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
List<PropertyInfo> property_list;
res->get_property_list(&property_list);
+// property_list.sort();
for(List<PropertyInfo>::Element *PE = property_list.front();PE;PE=PE->next()) {
diff --git a/core/io/resource_format_xml.h b/core/io/resource_format_xml.h
index 8bc29d3f5c..711b607668 100644
--- a/core/io/resource_format_xml.h
+++ b/core/io/resource_format_xml.h
@@ -125,7 +125,7 @@ class ResourceFormatSaverXMLInstance {
int depth;
Map<RES,int> resource_map;
List<RES> saved_resources;
- Set<RES> external_resources;
+ List<RES> external_resources;
void enter_tag(const char* p_tag,const String& p_args=String());
void exit_tag(const char* p_tag);
diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp
index 490e529d82..6ad5c7499b 100644
--- a/core/math/math_funcs.cpp
+++ b/core/math/math_funcs.cpp
@@ -48,8 +48,8 @@ uint32_t Math::rand_from_seed(uint32_t *seed) {
s = 0x12345987;
k = s / 127773;
s = 16807 * (s - k * 127773) - 2836 * k;
- if (s < 0)
- s += 2147483647;
+// if (s < 0)
+// s += 2147483647;
(*seed) = s;
return (s & Math::RANDOM_MAX);
#else
diff --git a/core/object.h b/core/object.h
index e828a24767..44464ab199 100644
--- a/core/object.h
+++ b/core/object.h
@@ -111,6 +111,9 @@ struct PropertyInfo {
PropertyInfo( Variant::Type p_type, const String p_name, PropertyHint p_hint=PROPERTY_HINT_NONE, const String& p_hint_string="",uint32_t p_usage=PROPERTY_USAGE_DEFAULT) {
type=p_type; name=p_name; hint=p_hint; hint_string=p_hint_string; usage=p_usage;
}
+ bool operator<(const PropertyInfo& p_info) const {
+ return name<p_info.name;
+ }
};
diff --git a/core/os/input.cpp b/core/os/input.cpp
index 87aa507bba..2b939ede46 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -56,7 +56,7 @@ void Input::_bind_methods() {
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_pos"),&Input::get_mouse_pos); - this is not the function you want
ObjectTypeDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed);
ObjectTypeDB::bind_method(_MD("get_mouse_button_mask"),&Input::get_mouse_button_mask);
ObjectTypeDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode);
diff --git a/core/variant.cpp b/core/variant.cpp
index e0c4b4244d..5e2ab962a6 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -456,6 +456,15 @@ bool Variant::operator==(const Variant& p_variant) const {
}
+bool Variant::operator<(const Variant& p_variant) const {
+ if (type!=p_variant.type) //if types differ, then order by type first
+ return type<p_variant.type;
+ bool v;
+ Variant r;
+ evaluate(OP_LESS,*this,p_variant,r,v);
+ return r;
+}
+
bool Variant::is_zero() const {
switch( type ) {
@@ -523,7 +532,7 @@ bool Variant::is_zero() const {
} break;
case QUAT: {
- *reinterpret_cast<const Quat*>(_data._mem)==Quat();
+ return *reinterpret_cast<const Quat*>(_data._mem)==Quat();
} break;
case MATRIX3: {
diff --git a/core/variant.h b/core/variant.h
index d9b1a93376..85c7b92c0d 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -408,7 +408,8 @@ public:
//argsVariant call()
- bool operator==(const Variant& p_variant) const;
+ bool operator==(const Variant& p_variant) const;
+ bool operator<(const Variant& p_variant) const;
uint32_t hash() const;
bool booleanize(bool &valid) const;
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index a024c0068a..c48336d2ff 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -1032,7 +1032,7 @@ Variant Variant::construct(const Variant::Type p_type,const Variant** p_args,int
case STRING_ARRAY: return (StringArray(*p_args[0]));
case VECTOR2_ARRAY: return (Vector2Array(*p_args[0])); // 25
case VECTOR3_ARRAY: return (Vector3Array(*p_args[0])); // 25
- case COLOR_ARRAY: return (Color(*p_args[0]));
+ case COLOR_ARRAY: return (ColorArray(*p_args[0]));
default: return Variant();
}
}
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 361e31f743..f68652b8cc 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -165,6 +165,12 @@ r_valid=false;\
return;}
#define DEFAULT_OP_ARRAY_EQ(m_name,m_type)\
+DEFAULT_OP_ARRAY_OP(m_name,m_type,!=,!=,true,false,false)
+
+#define DEFAULT_OP_ARRAY_LT(m_name,m_type)\
+DEFAULT_OP_ARRAY_OP(m_name,m_type,<,!=,false,a_len<array_b.size(),true)
+
+#define DEFAULT_OP_ARRAY_OP(m_name,m_type,m_opa,m_opb,m_ret_def,m_ret_s,m_ret_f)\
case m_name: { \
if (p_a.type!=p_b.type) {\
r_valid=false;\
@@ -174,19 +180,19 @@ case m_name: { \
const DVector<m_type> &array_b=*reinterpret_cast<const DVector<m_type> *>(p_b._data._mem);\
\
int a_len = array_a.size();\
- if (a_len!=array_b.size()){\
- _RETURN( false);\
+ if (a_len m_opa array_b.size()){\
+ _RETURN( m_ret_s);\
}else {\
\
DVector<m_type>::Read ra = array_a.read();\
DVector<m_type>::Read rb = array_b.read();\
\
for(int i=0;i<a_len;i++) {\
- if (ra[i]!=rb[i])\
- _RETURN( false);\
+ if (ra[i] m_opb rb[i])\
+ _RETURN( m_ret_f);\
}\
\
- _RETURN( true);\
+ _RETURN( m_ret_def);\
}\
}
@@ -290,8 +296,9 @@ void Variant::evaluate(const Operator& p_op, const Variant& p_a, const Variant&
if (arr_b->size()!=l)
_RETURN( false );
for(int i=0;i<l;i++) {
- if (!(arr_a[i]==arr_b[i]))
+ if (!((*arr_a)[i]==(*arr_b)[i])) {
_RETURN( false );
+ }
}
_RETURN( true );
@@ -356,14 +363,33 @@ void Variant::evaluate(const Operator& p_op, const Variant& p_a, const Variant&
} break;
DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
- DEFAULT_OP_FAIL(ARRAY);
- DEFAULT_OP_FAIL(RAW_ARRAY);
- DEFAULT_OP_FAIL(INT_ARRAY);
- DEFAULT_OP_FAIL(REAL_ARRAY);
- DEFAULT_OP_FAIL(STRING_ARRAY);
- DEFAULT_OP_FAIL(VECTOR2_ARRAY);
- DEFAULT_OP_FAIL(VECTOR3_ARRAY);
- DEFAULT_OP_FAIL(COLOR_ARRAY);
+ case ARRAY: {
+
+ if (p_b.type!=ARRAY)
+ _RETURN( false );
+
+ const Array *arr_a=reinterpret_cast<const Array*>(p_a._data._mem);
+ const Array *arr_b=reinterpret_cast<const Array*>(p_b._data._mem);
+
+ int l = arr_a->size();
+ if (arr_b->size()<l)
+ _RETURN( false );
+ for(int i=0;i<l;i++) {
+ if (!((*arr_a)[i]<(*arr_b)[i])) {
+ _RETURN( true );
+ }
+ }
+
+ _RETURN( false );
+
+ } break;
+ DEFAULT_OP_ARRAY_LT(RAW_ARRAY,uint8_t);
+ DEFAULT_OP_ARRAY_LT(INT_ARRAY,int);
+ DEFAULT_OP_ARRAY_LT(REAL_ARRAY,real_t);
+ DEFAULT_OP_ARRAY_LT(STRING_ARRAY,String);
+ DEFAULT_OP_ARRAY_LT(VECTOR2_ARRAY,Vector3);
+ DEFAULT_OP_ARRAY_LT(VECTOR3_ARRAY,Vector3);
+ DEFAULT_OP_ARRAY_LT(COLOR_ARRAY,Color);
case VARIANT_MAX: {
r_valid=false;
return;
@@ -2407,7 +2433,7 @@ Variant Variant::get(const Variant& p_index, bool *r_valid) const {
}
else if (str == "pressed") {
valid=true;
- ie.action.pressed;
+ return ie.action.pressed;
}
}
diff --git a/demos/2d/isometric_light/character_shder.res b/demos/2d/isometric_light/character_shder.res
index ca221f766c..17cd9ad287 100644
--- a/demos/2d/isometric_light/character_shder.res
+++ b/demos/2d/isometric_light/character_shder.res
Binary files differ
diff --git a/demos/2d/isometric_light/cubio.scn b/demos/2d/isometric_light/cubio.scn
index c8ab7ddd4e..c52b7dfd4b 100644
--- a/demos/2d/isometric_light/cubio.scn
+++ b/demos/2d/isometric_light/cubio.scn
Binary files differ
diff --git a/demos/2d/isometric_light/floor_shader.res b/demos/2d/isometric_light/floor_shader.res
index 446c71d227..c078d27b97 100644
--- a/demos/2d/isometric_light/floor_shader.res
+++ b/demos/2d/isometric_light/floor_shader.res
Binary files differ
diff --git a/demos/2d/isometric_light/map.scn b/demos/2d/isometric_light/map.scn
index c939a4b392..c1d11f8e4c 100644
--- a/demos/2d/isometric_light/map.scn
+++ b/demos/2d/isometric_light/map.scn
Binary files differ
diff --git a/demos/2d/isometric_light/tileset.res b/demos/2d/isometric_light/tileset.res
index 633bdada38..dab6f36f57 100644
--- a/demos/2d/isometric_light/tileset.res
+++ b/demos/2d/isometric_light/tileset.res
Binary files differ
diff --git a/demos/2d/isometric_light/wall_shader.res b/demos/2d/isometric_light/wall_shader.res
index 78c8fe57e1..7e33c26201 100644
--- a/demos/2d/isometric_light/wall_shader.res
+++ b/demos/2d/isometric_light/wall_shader.res
Binary files differ
diff --git a/demos/2d/platformer/one_way_platform.png b/demos/2d/platformer/one_way_platform.png
new file mode 100644
index 0000000000..b5eca877a6
--- /dev/null
+++ b/demos/2d/platformer/one_way_platform.png
Binary files differ
diff --git a/demos/2d/platformer/one_way_platform.xml b/demos/2d/platformer/one_way_platform.xml
new file mode 100644
index 0000000000..491dd32b17
--- /dev/null
+++ b/demos/2d/platformer/one_way_platform.xml
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<resource_file type="PackedScene" subresource_count="3" version="1.1" version_name="Godot Engine v1.1.rc1.custom_build">
+ <ext_resource path="res://one_way_platform.png" type="Texture"></ext_resource>
+ <resource type="RectangleShape2D" path="local://1">
+ <real name="custom_solver_bias"> 0 </real>
+ <vector2 name="extents"> 100, 10 </vector2>
+
+ </resource>
+ <main_resource>
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
+ <string> "names" </string>
+ <string_array len="42">
+ <string> "one_way_platform" </string>
+ <string> "StaticBody2D" </string>
+ <string> "_import_path" </string>
+ <string> "visibility/visible" </string>
+ <string> "visibility/opacity" </string>
+ <string> "visibility/self_opacity" </string>
+ <string> "visibility/light_mask" </string>
+ <string> "transform/pos" </string>
+ <string> "transform/rot" </string>
+ <string> "transform/scale" </string>
+ <string> "z/z" </string>
+ <string> "z/relative" </string>
+ <string> "input/pickable" </string>
+ <string> "shape_count" </string>
+ <string> "shapes/0/shape" </string>
+ <string> "shapes/0/transform" </string>
+ <string> "shapes/0/trigger" </string>
+ <string> "collision/layers" </string>
+ <string> "collision/mask" </string>
+ <string> "one_way_collision/direction" </string>
+ <string> "one_way_collision/max_depth" </string>
+ <string> "constant_linear_velocity" </string>
+ <string> "constant_angular_velocity" </string>
+ <string> "friction" </string>
+ <string> "bounce" </string>
+ <string> "__meta__" </string>
+ <string> "sprite" </string>
+ <string> "Sprite" </string>
+ <string> "texture" </string>
+ <string> "centered" </string>
+ <string> "offset" </string>
+ <string> "flip_h" </string>
+ <string> "flip_v" </string>
+ <string> "vframes" </string>
+ <string> "hframes" </string>
+ <string> "frame" </string>
+ <string> "modulate" </string>
+ <string> "region" </string>
+ <string> "region_rect" </string>
+ <string> "CollisionShape2D" </string>
+ <string> "shape" </string>
+ <string> "trigger" </string>
+ </string_array>
+ <string> "node_count" </string>
+ <int> 3 </int>
+ <string> "nodes" </string>
+ <int_array len="135"> -1, -1, 1, 0, -1, 24, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 12, 8, 13, 3, 14, 9, 15, 10, 16, 8, 17, 3, 18, 3, 19, 11, 20, 12, 21, 4, 22, 5, 23, 2, 24, 5, 25, 13, 0, 0, 0, 27, 26, -1, 21, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 1, 28, 14, 29, 1, 30, 4, 31, 8, 32, 8, 33, 3, 34, 3, 35, 7, 36, 15, 37, 8, 38, 16, 0, 0, 0, 39, 39, -1, 12, 2, 0, 3, 1, 4, 2, 5, 2, 6, 3, 7, 17, 8, 5, 9, 6, 10, 7, 11, 1, 40, 9, 41, 8, 0 </int_array>
+ <string> "variants" </string>
+ <array len="18" shared="false">
+ <node_path> "" </node_path>
+ <bool> True </bool>
+ <real> 1 </real>
+ <int> 1 </int>
+ <vector2> 0, 0 </vector2>
+ <real> 0 </real>
+ <vector2> 1, 1 </vector2>
+ <int> 0 </int>
+ <bool> False </bool>
+ <resource resource_type="Shape2D" path="local://1"> </resource>
+ <matrix32> 1, -0, 0, 1, 1.46304, -13.1672 </matrix32>
+ <vector2> 0, 1 </vector2>
+ <real> 20 </real>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -133.699, -110.553 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
+ <string> "zoom" </string>
+ <real> 2.050546 </real>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
+ <string> "fov" </string>
+ <real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ </dictionary>
+ <resource resource_type="Texture" path="res://one_way_platform.png"> </resource>
+ <color> 1, 1, 1, 1 </color>
+ <rect2> 0, 0, 0, 0 </rect2>
+ <vector2> 1.46304, -13.1672 </vector2>
+ </array>
+ <string> "version" </string>
+ <int> 1 </int>
+ </dictionary>
+
+ </main_resource>
+</resource_file> \ No newline at end of file
diff --git a/demos/2d/platformer/stage.xml b/demos/2d/platformer/stage.xml
index 610057183b..76df853326 100644
--- a/demos/2d/platformer/stage.xml
+++ b/demos/2d/platformer/stage.xml
@@ -1,17 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="9" version="1.0" version_name="Godot Engine v1.0.stable.custom_build">
- <ext_resource path="res://music.ogg" type="AudioStream"></ext_resource>
+<resource_file type="PackedScene" subresource_count="10" version="1.1" version_name="Godot Engine v1.1.rc1.custom_build">
<ext_resource path="res://tileset.xml" type="TileSet"></ext_resource>
- <ext_resource path="res://parallax_bg.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://player.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://coin.xml" type="PackedScene"></ext_resource>
<ext_resource path="res://moving_platform.xml" type="PackedScene"></ext_resource>
<ext_resource path="res://seesaw.xml" type="PackedScene"></ext_resource>
- <ext_resource path="res://coin.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://one_way_platform.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://player.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://music.ogg" type="AudioStream"></ext_resource>
<ext_resource path="res://enemy.xml" type="PackedScene"></ext_resource>
+ <ext_resource path="res://parallax_bg.xml" type="PackedScene"></ext_resource>
<main_resource>
<dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 0 </int>
+ <string> "conns" </string>
+ <int_array len="0"> </int_array>
<string> "names" </string>
- <string_array len="130">
+ <string_array len="133">
<string> "stage" </string>
<string> "Node" </string>
<string> "_import_path" </string>
@@ -39,6 +44,7 @@
<string> "collision/friction" </string>
<string> "collision/bounce" </string>
<string> "collision/layers" </string>
+ <string> "collision/mask" </string>
<string> "tile_data" </string>
<string> "coins" </string>
<string> "coin" </string>
@@ -84,8 +90,6 @@
<string> "coin 31 7 3" </string>
<string> "coin 31 7 4" </string>
<string> "coin 31 7 5" </string>
- <string> "player" </string>
- <string> "RigidBody2D" </string>
<string> "props" </string>
<string> "moving_platform" </string>
<string> "Node2D" </string>
@@ -94,6 +98,10 @@
<string> "moving_platform 2" </string>
<string> "moving_platform 3" </string>
<string> "seesaw" </string>
+ <string> "one_way_platform" </string>
+ <string> "StaticBody2D" </string>
+ <string> "player" </string>
+ <string> "RigidBody2D" </string>
<string> "music" </string>
<string> "StreamPlayer" </string>
<string> "stream/stream" </string>
@@ -143,134 +151,146 @@
<string> "uppercase" </string>
<string> "percent_visible" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 0 </int>
<string> "node_count" </string>
- <int> 66 </int>
+ <int> 67 </int>
+ <string> "nodes" </string>
+ <int_array len="975"> -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 25, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 2, 15, 8, 16, 9, 17, 10, 18, 11, 19, 12, 20, 13, 21, 8, 22, 14, 23, 14, 24, 3, 25, 6, 26, 4, 27, 4, 28, 15, 3, 16, 0, 0, 0, 1, 29, -1, 2, 2, 0, 3, 17, 0, 2, 0, 31, 30, 18, 3, 2, 0, 10, 19, 3, 20, 0, 2, 0, 31, 32, 18, 3, 2, 0, 10, 21, 3, 20, 0, 2, 0, 31, 33, 18, 3, 2, 0, 10, 22, 3, 20, 0, 2, 0, 31, 34, 18, 3, 2, 0, 10, 23, 3, 20, 0, 2, 0, 31, 35, 18, 3, 2, 0, 10, 24, 3, 20, 0, 2, 0, 31, 36, 18, 3, 2, 0, 10, 25, 3, 20, 0, 2, 0, 31, 37, 18, 3, 2, 0, 10, 26, 3, 20, 0, 2, 0, 31, 38, 18, 3, 2, 0, 10, 27, 3, 20, 0, 2, 0, 31, 39, 18, 3, 2, 0, 10, 28, 3, 20, 0, 2, 0, 31, 40, 18, 3, 2, 0, 10, 29, 3, 20, 0, 2, 0, 31, 41, 18, 3, 2, 0, 10, 30, 3, 20, 0, 2, 0, 31, 42, 18, 3, 2, 0, 10, 31, 3, 20, 0, 2, 0, 31, 43, 18, 3, 2, 0, 10, 32, 3, 20, 0, 2, 0, 31, 44, 18, 3, 2, 0, 10, 33, 3, 20, 0, 2, 0, 31, 45, 18, 3, 2, 0, 10, 34, 3, 20, 0, 2, 0, 31, 46, 18, 3, 2, 0, 10, 35, 3, 20, 0, 2, 0, 31, 47, 18, 3, 2, 0, 10, 36, 3, 20, 0, 2, 0, 31, 48, 18, 3, 2, 0, 10, 37, 3, 20, 0, 2, 0, 31, 49, 18, 3, 2, 0, 10, 38, 3, 20, 0, 2, 0, 31, 50, 18, 3, 2, 0, 10, 39, 3, 20, 0, 2, 0, 31, 51, 18, 3, 2, 0, 10, 40, 3, 20, 0, 2, 0, 31, 52, 18, 3, 2, 0, 10, 41, 3, 20, 0, 2, 0, 31, 53, 18, 3, 2, 0, 10, 42, 3, 20, 0, 2, 0, 31, 54, 18, 3, 2, 0, 10, 43, 3, 20, 0, 2, 0, 31, 55, 18, 3, 2, 0, 10, 44, 3, 20, 0, 2, 0, 31, 56, 18, 3, 2, 0, 10, 45, 3, 20, 0, 2, 0, 31, 57, 18, 3, 2, 0, 10, 46, 3, 20, 0, 2, 0, 31, 58, 18, 3, 2, 0, 10, 47, 3, 20, 0, 2, 0, 31, 59, 18, 3, 2, 0, 10, 48, 3, 20, 0, 2, 0, 31, 60, 18, 3, 2, 0, 10, 49, 3, 20, 0, 2, 0, 31, 61, 18, 3, 2, 0, 10, 50, 3, 20, 0, 2, 0, 31, 62, 18, 3, 2, 0, 10, 51, 3, 20, 0, 2, 0, 31, 63, 18, 3, 2, 0, 10, 52, 3, 20, 0, 2, 0, 31, 64, 18, 3, 2, 0, 10, 53, 3, 20, 0, 2, 0, 31, 65, 18, 3, 2, 0, 10, 54, 3, 20, 0, 2, 0, 31, 66, 18, 3, 2, 0, 10, 55, 3, 20, 0, 2, 0, 31, 67, 18, 3, 2, 0, 10, 56, 3, 20, 0, 2, 0, 31, 68, 18, 3, 2, 0, 10, 57, 3, 20, 0, 2, 0, 31, 69, 18, 3, 2, 0, 10, 58, 3, 20, 0, 2, 0, 31, 70, 18, 3, 2, 0, 10, 59, 3, 20, 0, 2, 0, 31, 71, 18, 3, 2, 0, 10, 60, 3, 20, 0, 2, 0, 31, 72, 18, 3, 2, 0, 10, 61, 3, 20, 0, 0, 0, 1, 73, -1, 1, 2, 0, 0, 45, 0, 75, 74, 62, 5, 2, 0, 10, 63, 3, 64, 76, 65, 77, 66, 0, 45, 0, 75, 78, 62, 5, 2, 0, 10, 67, 3, 64, 76, 68, 77, 69, 0, 45, 0, 75, 79, 62, 5, 2, 0, 10, 70, 3, 64, 76, 71, 77, 69, 0, 45, 0, 75, 80, 72, 3, 2, 0, 10, 73, 3, 74, 0, 45, 0, 82, 81, 75, 3, 2, 0, 10, 76, 3, 77, 0, 0, 0, 84, 83, 78, 3, 2, 0, 10, 79, 3, 80, 0, 0, 0, 86, 85, -1, 7, 2, 0, 87, 81, 88, 14, 89, 2, 90, 82, 91, 2, 92, 14, 0, 0, 0, 1, 93, -1, 1, 2, 0, 0, 53, 0, 84, 94, 83, 3, 2, 0, 10, 84, 3, 85, 0, 53, 0, 84, 95, 83, 3, 2, 0, 10, 86, 3, 85, 0, 53, 0, 84, 96, 83, 3, 2, 0, 10, 87, 3, 85, 0, 53, 0, 84, 97, 83, 3, 2, 0, 10, 88, 3, 85, 0, 53, 0, 84, 98, 83, 3, 2, 0, 10, 89, 3, 85, 0, 53, 0, 84, 99, 83, 3, 2, 0, 10, 90, 3, 85, 0, 53, 0, 84, 100, 83, 3, 2, 0, 10, 91, 3, 85, 0, 53, 0, 84, 101, 83, 3, 2, 0, 10, 92, 3, 85, 0, 53, 0, 84, 102, 83, 3, 2, 0, 10, 93, 3, 85, 0, 53, 0, 84, 103, 83, 3, 2, 0, 10, 94, 3, 85, 0, 53, 0, 84, 104, 83, 3, 2, 0, 10, 95, 3, 85, 0, 0, 0, 106, 105, 96, 2, 2, 0, 3, 97, 0, 0, 0, 107, 107, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 108, 98, 109, 99, 110, 100, 111, 101, 112, 0, 113, 0, 114, 0, 115, 0, 116, 2, 117, 2, 118, 13, 119, 3, 120, 6, 121, 102, 122, 3, 123, 103, 124, 6, 125, 14, 126, 14, 127, 104, 128, 8, 129, 8, 130, 2, 131, 14, 132, 105, 0 </int_array>
<string> "variants" </string>
- <array len="103" shared="false">
+ <array len="106" shared="false">
<node_path> "" </node_path>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 2 </int>
- <string> "sources" </string>
- <array len="4" shared="false">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> 328.379, 822.226 </vector2>
+ <string> "snap_grid" </string>
<bool> False </bool>
- <string> "zoom" </string>
- <real> 0.814506 </real>
- <string> "use_snap" </string>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
<bool> False </bool>
- <string> "snap_vec" </string>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
<vector2> 10, 10 </vector2>
- <string> "ofs" </string>
- <vector2> 177.488, 709.633 </vector2>
+ <string> "zoom" </string>
+ <real> 1.108032 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
<string> "deflight_rot_y" </string>
<real> 0.628319 </real>
- <string> "zfar" </string>
- <real> 500 </real>
<string> "fov" </string>
<real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
- <real> 4 </real>
- <string> "x_rot" </string>
- <real> 0 </real>
- <string> "y_rot" </string>
- <real> 0 </real>
+ <real> 18.643827 </real>
<string> "listener" </string>
<bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
- <dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
<string> "listener" </string>
<bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "ambient_light_color" </string>
- <color> 0.15, 0.15, 0.15, 1 </color>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "default_srgb" </string>
- <bool> False </bool>
- <string> "deflight_rot_x" </string>
- <real> 0.942478 </real>
+ </dictionary>
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 2 </int>
+ <string> "sources" </string>
+ <array len="4" shared="false">
+ <string> "res://moving_platform.gd" </string>
+ <string> "res://enemy.gd" </string>
+ <string> "res://player.gd" </string>
+ <string> "res://coin.gd" </string>
+ </array>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -280,8 +300,6 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "3D" </string>
</dictionary>
<bool> True </bool>
<real> 1 </real>
@@ -296,7 +314,7 @@
<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
<int> 2 </int>
<bool> False </bool>
- <int_array len="1998"> 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870925, 1048587, 13, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 0, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 </int_array>
+ <int_array len="2008"> 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 0, 983052, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870914, 1048587, 536870922, 1048588, 2, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114122, 536870925, 1114123, 11, 1114124, 13, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 0, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 </int_array>
<dictionary shared="false">
<string> "_edit_lock_" </string>
<bool> True </bool>
@@ -308,103 +326,105 @@
<resource resource_type="PackedScene" path="res://coin.xml"> </resource>
<vector2> 672, 1120 </vector2>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 2 </int>
- <string> "sources" </string>
- <array len="3" shared="false">
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -34.3697, -21.6562 </vector2>
<string> "pixel_snap" </string>
<bool> False </bool>
<string> "zoom" </string>
<real> 3.794776 </real>
- <string> "ofs" </string>
- <vector2> -34.3697, -21.6562 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "default_light" </string>
+ <bool> True </bool>
<string> "fov" </string>
<real> 45 </real>
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "show_origin" </string>
- <bool> True </bool>
+ </dictionary>
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 2 </int>
+ <string> "sources" </string>
+ <array len="3" shared="false">
+ <string> "res://enemy.gd" </string>
+ <string> "res://player.gd" </string>
+ <string> "res://coin.gd" </string>
+ </array>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -414,8 +434,6 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
<vector2> 704, 1120 </vector2>
<vector2> 736, 1120 </vector2>
@@ -458,124 +476,217 @@
<vector2> 4300.75, 541.058 </vector2>
<vector2> 4236.75, 541.058 </vector2>
<vector2> 4172.75, 541.058 </vector2>
- <resource resource_type="PackedScene" path="res://player.xml"> </resource>
- <vector2> 251.684, 1045.6 </vector2>
+ <resource resource_type="PackedScene" path="res://moving_platform.xml"> </resource>
+ <vector2> 1451.86, 742.969 </vector2>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1" shared="false">
- <string> "res://player.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -210.652, -172.81 </vector2>
<string> "pixel_snap" </string>
<bool> False </bool>
<string> "zoom" </string>
- <real> 2.272073 </real>
- <string> "use_snap" </string>
- <bool> False </bool>
- <string> "ofs" </string>
- <vector2> -181.946, -86.2812 </vector2>
- <string> "snap" </string>
- <int> 10 </int>
+ <real> 1.360373 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "default_light" </string>
+ <bool> True </bool>
<string> "fov" </string>
- <real> 45 </real>
- <string> "zfar" </string>
- <real> 500 </real>
+ <real> 400 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "listener" </string>
- <bool> True </bool>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "listener" </string>
- <bool> False </bool>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
</dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
+ <string> "znear" </string>
+ <real> 0.1 </real>
+ </dictionary>
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="4" shared="false">
+ <string> "res://moving_platform.gd" </string>
+ <string> "res://enemy.gd" </string>
+ <string> "res://player.gd" </string>
+ <string> "res://coin.gd" </string>
+ </array>
+ </dictionary>
+ </dictionary>
+ <string> "__editor_run_settings__" </string>
+ <dictionary shared="false">
+ <string> "custom_args" </string>
+ <string> "-l $scene" </string>
+ <string> "run_mode" </string>
+ <int> 0 </int>
+ </dictionary>
+ </dictionary>
+ <vector2> 0, 140 </vector2>
+ <real> 5 </real>
+ <vector2> 624.824, 545.544 </vector2>
+ <vector2> 300, 0 </vector2>
+ <real> 10 </real>
+ <vector2> 3419.86, 739.662 </vector2>
+ <vector2> 450, 0 </vector2>
+ <resource resource_type="PackedScene" path="res://seesaw.xml"> </resource>
+ <vector2> 2402.79, 849.52 </vector2>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
+ <string> "__editor_plugin_states__" </string>
+ <dictionary shared="false">
+ <string> "2D" </string>
+ <dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -116.979, -109.897 </vector2>
+ <string> "pixel_snap" </string>
+ <bool> False </bool>
+ <string> "zoom" </string>
+ <real> 2.050547 </real>
+ </dictionary>
+ <string> "3D" </string>
+ <dictionary shared="false">
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "fov" </string>
+ <real> 400 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "listener" </string>
- <bool> False </bool>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "listener" </string>
- <bool> False </bool>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "use_environment" </string>
<bool> False </bool>
<string> "use_orthogonal" </string>
<bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
</dictionary>
</array>
- <string> "deflight_rot_y" </string>
- <real> 0.628319 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "ambient_light_color" </string>
- <color> 0.15, 0.15, 0.15, 1 </color>
- <string> "show_grid" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "deflight_rot_x" </string>
- <real> 0.942478 </real>
- <string> "default_srgb" </string>
- <bool> False </bool>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -585,110 +696,130 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "Script" </string>
</dictionary>
- <resource resource_type="PackedScene" path="res://moving_platform.xml"> </resource>
- <vector2> 1451.86, 742.969 </vector2>
+ <resource resource_type="PackedScene" path="res://one_way_platform.xml"> </resource>
+ <vector2> 927.698, 1120.81 </vector2>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="4" shared="false">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "pixel_snap" </string>
+ <string> "ofs" </string>
+ <vector2> -133.699, -110.553 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
<bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
- <real> 1.360373 </real>
- <string> "ofs" </string>
- <vector2> -210.652, -172.81 </vector2>
+ <real> 2.050546 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
- <real> 400 </real>
- <string> "zfar" </string>
- <real> 500 </real>
+ <real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "show_origin" </string>
- <bool> True </bool>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -698,105 +829,127 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <vector2> 0, 140 </vector2>
- <real> 5 </real>
- <vector2> 624.824, 545.544 </vector2>
- <vector2> 300, 0 </vector2>
- <real> 10 </real>
- <vector2> 3419.86, 739.662 </vector2>
- <vector2> 450, 0 </vector2>
- <resource resource_type="PackedScene" path="res://seesaw.xml"> </resource>
- <vector2> 2402.79, 849.52 </vector2>
+ <resource resource_type="PackedScene" path="res://player.xml"> </resource>
+ <vector2> 251.684, 1045.6 </vector2>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "Script" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
<string> "2D" </string>
<dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -181.946, -86.2812 </vector2>
<string> "pixel_snap" </string>
<bool> False </bool>
+ <string> "snap" </string>
+ <int> 10 </int>
+ <string> "use_snap" </string>
+ <bool> False </bool>
<string> "zoom" </string>
- <real> 2.050547 </real>
- <string> "ofs" </string>
- <vector2> -116.979, -109.897 </vector2>
+ <real> 2.272073 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
- <real> 400 </real>
- <string> "zfar" </string>
- <real> 500 </real>
+ <real> 45 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "show_origin" </string>
- <bool> True </bool>
+ </dictionary>
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="1" shared="false">
+ <string> "res://player.gd" </string>
+ </array>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -806,109 +959,109 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
<resource resource_type="AudioStream" path="res://music.ogg"> </resource>
<real> 2 </real>
<resource resource_type="PackedScene" path="res://enemy.xml"> </resource>
<vector2> 834.664, 1309.6 </vector2>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1" shared="false">
- <string> "res://enemy.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -227.625, -197.9 </vector2>
<string> "pixel_snap" </string>
<bool> False </bool>
<string> "zoom" </string>
<real> 1.108033 </real>
- <string> "ofs" </string>
- <vector2> -227.625, -197.9 </vector2>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
+ <string> "default_light" </string>
+ <bool> True </bool>
<string> "fov" </string>
<real> 45 </real>
- <string> "zfar" </string>
- <real> 500 </real>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
<string> "viewports" </string>
<array len="4" shared="false">
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
<dictionary shared="false">
<string> "distance" </string>
<real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
<string> "x_rot" </string>
<real> 0 </real>
<string> "y_rot" </string>
<real> 0 </real>
- <string> "use_orthogonal" </string>
- <bool> False </bool>
- <string> "use_environment" </string>
- <bool> False </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
</dictionary>
</array>
- <string> "viewport_mode" </string>
- <int> 1 </int>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "show_grid" </string>
- <bool> True </bool>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
- <string> "show_origin" </string>
- <bool> True </bool>
+ </dictionary>
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="1" shared="false">
+ <string> "res://enemy.gd" </string>
+ </array>
</dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
@@ -918,8 +1071,6 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
<vector2> 707.665, 1225.05 </vector2>
<vector2> 1125.21, 1053.06 </vector2>
@@ -933,55 +1084,57 @@
<vector2> 2406.63, 815.115 </vector2>
<resource resource_type="PackedScene" path="res://parallax_bg.xml"> </resource>
<dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
<dictionary shared="false">
- <string> "Script" </string>
- <dictionary shared="false">
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="4" shared="false">
- <string> "res://moving_platform.gd" </string>
- <string> "res://enemy.gd" </string>
- <string> "res://player.gd" </string>
- <string> "res://coin.gd" </string>
- </array>
- </dictionary>
<string> "2D" </string>
<dictionary shared="false">
- <string> "zoom" </string>
- <real> 1 </real>
<string> "ofs" </string>
<vector2> -5, -25 </vector2>
+ <string> "zoom" </string>
+ <real> 1 </real>
</dictionary>
<string> "3D" </string>
<dictionary shared="false">
- <string> "zfar" </string>
- <real> 500 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
<string> "window_0" </string>
<dictionary shared="false">
- <string> "distance" </string>
- <real> 4 </real>
- <string> "x_rot" </string>
- <real> 0.337 </real>
<string> "default_light" </string>
<bool> True </bool>
- <string> "y_rot" </string>
- <real> -0.575 </real>
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
<string> "show_grid" </string>
<bool> True </bool>
<string> "show_origin" </string>
<bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
+ <string> "x_rot" </string>
+ <real> 0.337 </real>
+ <string> "y_rot" </string>
+ <real> -0.575 </real>
</dictionary>
+ <string> "window_mode" </string>
+ <int> 0 </int>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Script" </string>
+ <dictionary shared="false">
+ <string> "current" </string>
+ <int> 0 </int>
+ <string> "sources" </string>
+ <array len="4" shared="false">
+ <string> "res://moving_platform.gd" </string>
+ <string> "res://enemy.gd" </string>
+ <string> "res://player.gd" </string>
+ <string> "res://coin.gd" </string>
+ </array>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
<dictionary shared="false">
@@ -990,8 +1143,6 @@
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
<real> 12 </real>
<real> -202 </real>
@@ -1002,10 +1153,8 @@
<string> "This is a simple demo on how to make a platformer game with Godot.&quot;This version uses physics and the 2D physics engine for motion and collision.&quot;&quot;The demo also shows the benefits of using the scene system, where coins,&quot;enemies and the player are edited separatedly and instanced in the stage.&quot;&quot;To edit the base tiles for the tileset, open the tileset_edit.xml file and follow &quot;instructions.&quot;" </string>
<real> -1 </real>
</array>
- <string> "nodes" </string>
- <int_array len="960"> -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 24, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 2, 15, 8, 16, 9, 17, 10, 18, 11, 19, 12, 20, 13, 21, 8, 22, 14, 23, 14, 24, 3, 25, 6, 26, 4, 27, 15, 3, 16, 0, 0, 0, 1, 28, -1, 2, 2, 0, 3, 17, 0, 2, 0, 30, 29, 18, 3, 2, 0, 10, 19, 3, 20, 0, 2, 0, 30, 31, 18, 3, 2, 0, 10, 21, 3, 20, 0, 2, 0, 30, 32, 18, 3, 2, 0, 10, 22, 3, 20, 0, 2, 0, 30, 33, 18, 3, 2, 0, 10, 23, 3, 20, 0, 2, 0, 30, 34, 18, 3, 2, 0, 10, 24, 3, 20, 0, 2, 0, 30, 35, 18, 3, 2, 0, 10, 25, 3, 20, 0, 2, 0, 30, 36, 18, 3, 2, 0, 10, 26, 3, 20, 0, 2, 0, 30, 37, 18, 3, 2, 0, 10, 27, 3, 20, 0, 2, 0, 30, 38, 18, 3, 2, 0, 10, 28, 3, 20, 0, 2, 0, 30, 39, 18, 3, 2, 0, 10, 29, 3, 20, 0, 2, 0, 30, 40, 18, 3, 2, 0, 10, 30, 3, 20, 0, 2, 0, 30, 41, 18, 3, 2, 0, 10, 31, 3, 20, 0, 2, 0, 30, 42, 18, 3, 2, 0, 10, 32, 3, 20, 0, 2, 0, 30, 43, 18, 3, 2, 0, 10, 33, 3, 20, 0, 2, 0, 30, 44, 18, 3, 2, 0, 10, 34, 3, 20, 0, 2, 0, 30, 45, 18, 3, 2, 0, 10, 35, 3, 20, 0, 2, 0, 30, 46, 18, 3, 2, 0, 10, 36, 3, 20, 0, 2, 0, 30, 47, 18, 3, 2, 0, 10, 37, 3, 20, 0, 2, 0, 30, 48, 18, 3, 2, 0, 10, 38, 3, 20, 0, 2, 0, 30, 49, 18, 3, 2, 0, 10, 39, 3, 20, 0, 2, 0, 30, 50, 18, 3, 2, 0, 10, 40, 3, 20, 0, 2, 0, 30, 51, 18, 3, 2, 0, 10, 41, 3, 20, 0, 2, 0, 30, 52, 18, 3, 2, 0, 10, 42, 3, 20, 0, 2, 0, 30, 53, 18, 3, 2, 0, 10, 43, 3, 20, 0, 2, 0, 30, 54, 18, 3, 2, 0, 10, 44, 3, 20, 0, 2, 0, 30, 55, 18, 3, 2, 0, 10, 45, 3, 20, 0, 2, 0, 30, 56, 18, 3, 2, 0, 10, 46, 3, 20, 0, 2, 0, 30, 57, 18, 3, 2, 0, 10, 47, 3, 20, 0, 2, 0, 30, 58, 18, 3, 2, 0, 10, 48, 3, 20, 0, 2, 0, 30, 59, 18, 3, 2, 0, 10, 49, 3, 20, 0, 2, 0, 30, 60, 18, 3, 2, 0, 10, 50, 3, 20, 0, 2, 0, 30, 61, 18, 3, 2, 0, 10, 51, 3, 20, 0, 2, 0, 30, 62, 18, 3, 2, 0, 10, 52, 3, 20, 0, 2, 0, 30, 63, 18, 3, 2, 0, 10, 53, 3, 20, 0, 2, 0, 30, 64, 18, 3, 2, 0, 10, 54, 3, 20, 0, 2, 0, 30, 65, 18, 3, 2, 0, 10, 55, 3, 20, 0, 2, 0, 30, 66, 18, 3, 2, 0, 10, 56, 3, 20, 0, 2, 0, 30, 67, 18, 3, 2, 0, 10, 57, 3, 20, 0, 2, 0, 30, 68, 18, 3, 2, 0, 10, 58, 3, 20, 0, 2, 0, 30, 69, 18, 3, 2, 0, 10, 59, 3, 20, 0, 2, 0, 30, 70, 18, 3, 2, 0, 10, 60, 3, 20, 0, 2, 0, 30, 71, 18, 3, 2, 0, 10, 61, 3, 20, 0, 0, 0, 73, 72, 62, 3, 2, 0, 10, 63, 3, 64, 0, 0, 0, 1, 74, -1, 1, 2, 0, 0, 46, 0, 76, 75, 65, 5, 2, 0, 10, 66, 3, 67, 77, 68, 78, 69, 0, 46, 0, 76, 79, 65, 5, 2, 0, 10, 70, 3, 67, 77, 71, 78, 72, 0, 46, 0, 76, 80, 65, 5, 2, 0, 10, 73, 3, 67, 77, 74, 78, 72, 0, 46, 0, 76, 81, 75, 3, 2, 0, 10, 76, 3, 77, 0, 0, 0, 83, 82, -1, 7, 2, 0, 84, 78, 85, 14, 86, 2, 87, 79, 88, 2, 89, 14, 0, 0, 0, 1, 90, -1, 1, 2, 0, 0, 52, 0, 73, 91, 80, 3, 2, 0, 10, 81, 3, 82, 0, 52, 0, 73, 92, 80, 3, 2, 0, 10, 83, 3, 82, 0, 52, 0, 73, 93, 80, 3, 2, 0, 10, 84, 3, 82, 0, 52, 0, 73, 94, 80, 3, 2, 0, 10, 85, 3, 82, 0, 52, 0, 73, 95, 80, 3, 2, 0, 10, 86, 3, 82, 0, 52, 0, 73, 96, 80, 3, 2, 0, 10, 87, 3, 82, 0, 52, 0, 73, 97, 80, 3, 2, 0, 10, 88, 3, 82, 0, 52, 0, 73, 98, 80, 3, 2, 0, 10, 89, 3, 82, 0, 52, 0, 73, 99, 80, 3, 2, 0, 10, 90, 3, 82, 0, 52, 0, 73, 100, 80, 3, 2, 0, 10, 91, 3, 82, 0, 52, 0, 73, 101, 80, 3, 2, 0, 10, 92, 3, 82, 0, 0, 0, 103, 102, 93, 2, 2, 0, 3, 94, 0, 0, 0, 104, 104, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 105, 95, 106, 96, 107, 97, 108, 98, 109, 0, 110, 0, 111, 0, 112, 0, 113, 2, 114, 2, 115, 13, 116, 3, 117, 6, 118, 99, 119, 3, 120, 100, 121, 6, 122, 14, 123, 14, 124, 101, 125, 8, 126, 8, 127, 2, 128, 14, 129, 102, 0 </int_array>
- <string> "conns" </string>
- <int_array len="0"> </int_array>
+ <string> "version" </string>
+ <int> 1 </int>
</dictionary>
</main_resource>
diff --git a/demos/3d/kinematic_char/cubelib.res b/demos/3d/kinematic_char/cubelib.res
index 27f2b9b3bd..130b9529fe 100644
--- a/demos/3d/kinematic_char/cubelib.res
+++ b/demos/3d/kinematic_char/cubelib.res
Binary files differ
diff --git a/demos/3d/kinematic_char/level.scn b/demos/3d/kinematic_char/level.scn
index 7ccb2430c1..8be64c61c0 100644
--- a/demos/3d/kinematic_char/level.scn
+++ b/demos/3d/kinematic_char/level.scn
Binary files differ
diff --git a/demos/3d/platformer/bullet.scn b/demos/3d/platformer/bullet.scn
index 43f48fc99f..4f1623b7d9 100644
--- a/demos/3d/platformer/bullet.scn
+++ b/demos/3d/platformer/bullet.scn
Binary files differ
diff --git a/demos/gui/rich_text_bbcode/rich_text_bbcode.gd b/demos/gui/rich_text_bbcode/rich_text_bbcode.gd
new file mode 100644
index 0000000000..30fac1f729
--- /dev/null
+++ b/demos/gui/rich_text_bbcode/rich_text_bbcode.gd
@@ -0,0 +1,17 @@
+
+extends Panel
+
+# member variables here, example:
+# var a=2
+# var b="textvar"
+
+func _ready():
+ # Initialization here
+ pass
+
+
+
+
+func _on_RichTextLabel_meta_clicked( meta ):
+ OS.shell_open(meta)
+ pass # replace with function body
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 905e999125..901bfa1253 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -19442,7 +19442,7 @@
<description>
</description>
</method>
- <method name="body_set_user_mask" >
+ <method name="body_set_collision_mask" >
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="mask" type="int">
@@ -19450,7 +19450,7 @@
<description>
</description>
</method>
- <method name="body_get_user_mask" qualifiers="const" >
+ <method name="body_get_collision_mask" qualifiers="const" >
<return type="int">
</return>
<argument index="0" name="body" type="RID">
diff --git a/drivers/SCsub b/drivers/SCsub
index a1a2191cbc..6ab0973625 100644
--- a/drivers/SCsub
+++ b/drivers/SCsub
@@ -1,91 +1,94 @@
-Import('env')
-
-env.drivers_sources=[]
-#env.add_source_files(env.drivers_sources,"*.cpp")
-env.Append(CPPPATH=["vorbis"])
-Export('env')
-
-SConscript('unix/SCsub');
-SConscript('alsa/SCsub');
-SConscript('pulseaudio/SCsub');
-SConscript('windows/SCsub');
-SConscript('gles2/SCsub');
-SConscript('gl_context/SCsub');
-SConscript('openssl/SCsub');
-
-if (env["png"]=="yes"):
- SConscript("png/SCsub");
-if (env["jpg"]=="yes"):
- SConscript("jpg/SCsub");
-if (env["webp"]=="yes"):
- SConscript("webp/SCsub");
-SConscript("dds/SCsub");
-SConscript("pvr/SCsub");
-SConscript("etc1/SCsub")
-if (env["builtin_zlib"]=="yes"):
- SConscript("builtin_zlib/SCsub");
-if (env["openssl"]=="builtin"):
- SConscript("builtin_openssl2/SCsub");
-
-SConscript("rtaudio/SCsub");
-SConscript("nedmalloc/SCsub");
-SConscript("trex/SCsub");
-SConscript("chibi/SCsub");
-if (env["vorbis"]=="yes" or env["speex"]=="yes" or env["theora"]=="yes"):
- SConscript("ogg/SCsub");
-if (env["vorbis"]=="yes"):
- SConscript("vorbis/SCsub");
-if (env["tools"]=="yes"):
- SConscript("convex_decomp/SCsub");
-
-if env["theora"]=="yes":
- SConscript("theoraplayer/SCsub")
-if (env["theora"]=="yes"):
- SConscript("theora/SCsub");
-if (env['speex']=='yes'):
- SConscript("speex/SCsub");
-if (env['musepack']=='yes'):
- SConscript("mpc/SCsub");
-if (env["squish"]=="yes" and env["tools"]=="yes"):
- SConscript("squish/SCsub");
-
-num = 0
-cur_base = ""
-total = len(env.drivers_sources)
-max_src = 64
-list = []
-lib_list = []
-
-import string
-
-for f in env.drivers_sources:
- fname = ""
- if type(f) == type(""):
- fname = env.File(f).path
- else:
- fname = env.File(f)[0].path
- #base = string.join(fname.split("/")[:-1], "/")
- fname = fname.replace("\\", "/")
- base = string.join(fname.split("/")[:2], "/")
- if base != cur_base and len(list) > max_src:
- lib = env.Library("drivers"+str(num), list)
- lib_list.append(lib)
- list = []
- num = num+1
- cur_base = base
- list.append(f)
-
-if len(list) > 0:
- lib = env.Library("drivers"+str(num), list)
- lib_list.append(lib)
-
-
-drivers_base=[]
-env.add_source_files(drivers_base,"*.cpp")
-lib_list.insert(0, env.Library("drivers", drivers_base))
-
-env.Prepend(LIBS=lib_list)
-
-#lib = env.Library("drivers",env.drivers_sources)
-#env.Prepend(LIBS=[lib])
-
+Import('env')
+
+env.drivers_sources=[]
+#env.add_source_files(env.drivers_sources,"*.cpp")
+env.Append(CPPPATH=["vorbis"])
+Export('env')
+
+SConscript('unix/SCsub');
+SConscript('alsa/SCsub');
+SConscript('pulseaudio/SCsub');
+SConscript('windows/SCsub');
+SConscript('gles2/SCsub');
+SConscript('gl_context/SCsub');
+SConscript('openssl/SCsub');
+
+if (env["png"]=="yes"):
+ SConscript("png/SCsub");
+if (env["jpg"]=="yes"):
+ SConscript("jpg/SCsub");
+if (env["webp"]=="yes"):
+ SConscript("webp/SCsub");
+SConscript("dds/SCsub");
+SConscript("pvr/SCsub");
+SConscript("etc1/SCsub")
+if (env["builtin_zlib"]=="yes"):
+ SConscript("builtin_zlib/SCsub");
+if (env["openssl"]=="builtin"):
+ SConscript("builtin_openssl2/SCsub");
+
+SConscript("rtaudio/SCsub");
+SConscript("nedmalloc/SCsub");
+SConscript("trex/SCsub");
+SConscript("chibi/SCsub");
+if (env["vorbis"]=="yes" or env["speex"]=="yes" or env["theora"]=="yes"):
+ SConscript("ogg/SCsub");
+if (env["vorbis"]=="yes"):
+ SConscript("vorbis/SCsub");
+if (env["tools"]=="yes"):
+ SConscript("convex_decomp/SCsub");
+
+if env["theora"]=="yes":
+ SConscript("theoraplayer/SCsub")
+if (env["theora"]=="yes"):
+ SConscript("theora/SCsub");
+if (env['speex']=='yes'):
+ SConscript("speex/SCsub");
+if (env['musepack']=='yes'):
+ SConscript("mpc/SCsub");
+if (env["squish"]=="yes" and env["tools"]=="yes"):
+ SConscript("squish/SCsub");
+
+num = 0
+cur_base = ""
+total = len(env.drivers_sources)
+max_src = 64
+list = []
+lib_list = []
+
+import string
+
+if env['vsproj']=="yes":
+ env.AddToVSProject(env.drivers_sources)
+
+for f in env.drivers_sources:
+ fname = ""
+ if type(f) == type(""):
+ fname = env.File(f).path
+ else:
+ fname = env.File(f)[0].path
+ #base = string.join(fname.split("/")[:-1], "/")
+ fname = fname.replace("\\", "/")
+ base = string.join(fname.split("/")[:2], "/")
+ if base != cur_base and len(list) > max_src:
+ lib = env.Library("drivers"+str(num), list)
+ lib_list.append(lib)
+ list = []
+ num = num+1
+ cur_base = base
+ list.append(f)
+
+if len(list) > 0:
+ lib = env.Library("drivers"+str(num), list)
+ lib_list.append(lib)
+
+
+drivers_base=[]
+env.add_source_files(drivers_base,"*.cpp")
+lib_list.insert(0, env.Library("drivers", drivers_base))
+
+env.Prepend(LIBS=lib_list)
+
+#lib = env.Library("drivers",env.drivers_sources)
+#env.Prepend(LIBS=[lib])
+
diff --git a/drivers/chibi/cp_player_data_control.cpp b/drivers/chibi/cp_player_data_control.cpp
index 4d30c1a703..d5ca648fff 100644
--- a/drivers/chibi/cp_player_data_control.cpp
+++ b/drivers/chibi/cp_player_data_control.cpp
@@ -233,7 +233,7 @@ int CPPlayer::get_channel_voice(int p_channel) {
const char* CPPlayer::get_voice_sample_name(int p_voice) {
- const char *name;
+ const char *name = NULL;
@@ -302,7 +302,7 @@ const char * CPPlayer::get_voice_instrument_name(int p_voice) {
- const char *name;
+ const char *name = NULL;
diff --git a/drivers/convex_decomp/b2Polygon.cpp b/drivers/convex_decomp/b2Polygon.cpp
index 49a3e74c2a..668313967e 100644
--- a/drivers/convex_decomp/b2Polygon.cpp
+++ b/drivers/convex_decomp/b2Polygon.cpp
@@ -970,6 +970,7 @@ int32 DecomposeConvex(b2Polygon* p, b2Polygon* results, int32 maxPolys) {
}
if (nTri < 1) {
//Still no luck? Oh well...
+ delete[] triangulated;
return -1;
}
int32 nPolys = PolygonizeTriangles(triangulated, nTri, results, maxPolys);
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index 759d20aab1..4acac957c8 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -1263,7 +1263,6 @@ void RasterizerGLES2::texture_set_flags(RID p_texture,uint32_t p_flags) {
p_flags&=VS::TEXTURE_FLAG_FILTER;//can change only filter
}
-
glActiveTexture(GL_TEXTURE0);
glBindTexture(texture->target, texture->tex_id);
uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;
@@ -4609,6 +4608,10 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const {
if (fragment_flags.uses_normal) {
enablers.push_back("#define NORMAL_USED\n");
}
+ if (fragment_flags.uses_normalmap) {
+ enablers.push_back("#define USE_NORMALMAP\n");
+ }
+
if (light_flags.uses_light) {
enablers.push_back("#define USE_LIGHT_SHADER_CODE\n");
}
@@ -9448,6 +9451,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const
while(light) {
+
if (ci->light_mask&light->item_mask && p_z>=light->z_min && p_z<=light->z_max && ci->global_rect_cache.intersects_transformed(light->xform_cache,light->rect_cache)) {
//intersects this light
@@ -9485,6 +9489,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const
}
+
bool has_shadow = light->shadow_buffer.is_valid() && ci->light_mask&light->item_shadow_mask;
canvas_shader.set_conditional(CanvasShaderGLES2::USE_SHADOWS,has_shadow);
diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp
index a44abc7bd2..10da30acca 100644
--- a/drivers/gles2/shader_compiler_gles2.cpp
+++ b/drivers/gles2/shader_compiler_gles2.cpp
@@ -243,6 +243,10 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a
if (vnode->name==vname_normal) {
uses_normal=true;
}
+ if (vnode->name==vname_normalmap || vnode->name==vname_normalmap_depth) {
+ uses_normalmap=true;
+ uses_normal=true;
+ }
if (vnode->name==vname_screen_uv) {
uses_screen_uv=true;
@@ -810,6 +814,8 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
mode_replace_table[4]["POSITION"]="gl_Position";
mode_replace_table[4]["NORMAL"]="normal";
+ mode_replace_table[4]["NORMALMAP"]="normal_map";
+ mode_replace_table[4]["NORMALMAP_DEPTH"]="normal_depth";
mode_replace_table[4]["UV"]="uv_interp";
mode_replace_table[4]["SRC_COLOR"]="color_interp";
mode_replace_table[4]["COLOR"]="color";
@@ -861,6 +867,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
vname_light="LIGHT";
vname_time="TIME";
vname_normalmap="NORMALMAP";
+ vname_normalmap_depth="NORMALMAP_DEPTH";
vname_normal="NORMAL";
vname_texpixel_size="TEXTURE_PIXEL_SIZE";
vname_world_vec="WORLD_VERTEX";
diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h
index 2890d8555d..6dfc213994 100644
--- a/drivers/gles2/shader_compiler_gles2.h
+++ b/drivers/gles2/shader_compiler_gles2.h
@@ -72,6 +72,7 @@ private:
StringName vname_light;
StringName vname_time;
StringName vname_normalmap;
+ StringName vname_normalmap_depth;
StringName vname_normal;
StringName vname_texpixel_size;
StringName vname_world_vec;
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
index 65e40f069b..669ae44621 100644
--- a/drivers/gles2/shaders/canvas.glsl
+++ b/drivers/gles2/shaders/canvas.glsl
@@ -207,7 +207,17 @@ void main() {
{
+#if defined(USE_NORMALMAP)
+ vec3 normal_map=vec3(0.0,0.0,1.0);
+ float normal_depth=1.0;
+#endif
+
FRAGMENT_SHADER_CODE
+
+#if defined(USE_NORMALMAP)
+ normal = mix(vec3(0.0,0.0,1.0), normal_map * vec3(2.0,-2.0,1.0) - vec3( 1.0, -1.0, 0.0 ), normal_depth );
+#endif
+
}
#ifdef DEBUG_ENCODED_32
highp float enc32 = dot( color,highp vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) );
diff --git a/drivers/unix/memory_pool_static_malloc.cpp b/drivers/unix/memory_pool_static_malloc.cpp
index 62abe7d26d..e0bab27a63 100644
--- a/drivers/unix/memory_pool_static_malloc.cpp
+++ b/drivers/unix/memory_pool_static_malloc.cpp
@@ -153,7 +153,7 @@ void* MemoryPoolStaticMalloc::_realloc(void *p_memory,size_t p_bytes) {
return alloc( p_bytes );
}
- if (p_bytes<=0) {
+ if (p_bytes==0) {
this->free(p_memory);
ERR_FAIL_COND_V( p_bytes < 0 , NULL );
diff --git a/main/main.cpp b/main/main.cpp
index 7c687bb0ce..a822418eaa 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -640,6 +640,9 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
GLOBAL_DEF("display/test_height",0);
if (rtm==-1) {
rtm=GLOBAL_DEF("render/thread_model",OS::RENDER_THREAD_SAFE);
+ if (rtm>=1) //hack for now
+ rtm=1;
+
}
if (rtm>=0 && rtm<3)
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 916fbc6182..6242400663 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -1462,7 +1462,7 @@ void GDParser::_parse_block(BlockNode *p_block,bool p_static) {
} break;
case GDTokenizer::TK_CF_PASS: {
- if (tokenizer->get_token(1)!=GDTokenizer::TK_SEMICOLON && tokenizer->get_token(1)!=GDTokenizer::TK_NEWLINE ) {
+ if (tokenizer->get_token(1)!=GDTokenizer::TK_SEMICOLON && tokenizer->get_token(1)!=GDTokenizer::TK_NEWLINE && tokenizer->get_token(1)!=GDTokenizer::TK_EOF) {
_set_error("Expected ';' or <NewLine>.");
return;
diff --git a/platform/android/AndroidManifest.xml.template b/platform/android/AndroidManifest.xml.template
index 71e8b866dc..c95c86c060 100644
--- a/platform/android/AndroidManifest.xml.template
+++ b/platform/android/AndroidManifest.xml.template
@@ -7,7 +7,7 @@
>
<supports-screens android:smallScreens="true"
android:normalScreens="true"
- android:largeScreens="true"
+ android:largeScreens="false"
android:xlargeScreens="true"/>
<application android:label="@string/godot_project_name_string" android:icon="@drawable/icon" android:allowBackup="false" $$ADD_APPATTRIBUTE_CHUNKS$$ >
@@ -15,7 +15,7 @@
android:label="@string/godot_project_name_string"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
- android:screenOrientation="portrait"
+ android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize">
<intent-filter>
diff --git a/platform/android/android_native_app_glue.h b/platform/android/android_native_app_glue.h
index a902a3b4da..f5ba27ae66 100644
--- a/platform/android/android_native_app_glue.h
+++ b/platform/android/android_native_app_glue.h
@@ -26,7 +26,7 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
- * Copyright (C) 2010 The Android Open Source Project
+/* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index 3d2926b4fc..2b5fc6a50a 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -31,11 +31,15 @@
#include "dir_access_jandroid.h"
#include "file_access_jandroid.h"
#include "thread_jandroid.h"
+#include "print_string.h"
+
+
jobject DirAccessJAndroid::io=NULL;
jclass DirAccessJAndroid::cls=NULL;
jmethodID DirAccessJAndroid::_dir_open=NULL;
jmethodID DirAccessJAndroid::_dir_next=NULL;
jmethodID DirAccessJAndroid::_dir_close=NULL;
+jmethodID DirAccessJAndroid::_dir_is_dir=NULL;
DirAccess *DirAccessJAndroid::create_fs() {
@@ -67,43 +71,18 @@ String DirAccessJAndroid::get_next(){
if (!str)
return "";
- int sl = env->GetStringLength(str);
- if (sl==0) {
- env->DeleteLocalRef((jobject)str);
- return "";
- }
-
- CharString cs;
- cs.resize(sl+1);
- env->GetStringRegion(str,0,sl,(jchar*)&cs[0]);
- cs[sl]=0;
-
- String ret;
- ret.parse_utf8(&cs[0]);
+ String ret = String::utf8(env->GetStringUTFChars( (jstring)str, NULL ));
env->DeleteLocalRef((jobject)str);
-
return ret;
}
bool DirAccessJAndroid::current_is_dir() const{
- JNIEnv *env = ThreadAndroid::get_env();
- String sd;
- if (current_dir=="")
- sd=current;
- else
- sd=current_dir+"/"+current;
-
- jstring js = env->NewStringUTF(sd.utf8().get_data());
- int res = env->CallIntMethod(io,_dir_open,js);
- if (res<=0)
- return false;
-
- env->CallObjectMethod(io,_dir_close,res);
+ JNIEnv *env = ThreadAndroid::get_env();
+ return env->CallBooleanMethod(io,_dir_is_dir,id);
- return true;
}
bool DirAccessJAndroid::current_is_hidden() const {
@@ -142,24 +121,31 @@ Error DirAccessJAndroid::change_dir(String p_dir){
String new_dir;
+ if (p_dir!="res://" && p_dir.length()>1 && p_dir.ends_with("/"))
+ p_dir=p_dir.substr(0,p_dir.length()-1);
+
if (p_dir.begins_with("/"))
new_dir=p_dir.substr(1,p_dir.length());
else if (p_dir.begins_with("res://"))
new_dir=p_dir.substr(6,p_dir.length());
- else //relative
- new_dir=new_dir+"/"+p_dir;
+ else if (current_dir=="")
+ new_dir=p_dir;
+ else
+ new_dir=current_dir.plus_file(p_dir);
+ //print_line("new dir is: "+new_dir);
//test if newdir exists
new_dir=new_dir.simplify_path();
jstring js = env->NewStringUTF(new_dir.utf8().get_data());
int res = env->CallIntMethod(io,_dir_open,js);
+ env->DeleteLocalRef(js);
if (res<=0)
return ERR_INVALID_PARAMETER;
env->CallObjectMethod(io,_dir_close,res);
-
+ current_dir=new_dir;
return OK;
}
@@ -210,6 +196,7 @@ bool DirAccessJAndroid::dir_exists(String p_dir) {
jstring js = env->NewStringUTF(path.utf8().get_data());
int res = env->CallIntMethod(io,_dir_open,js);
+ env->DeleteLocalRef(js);
if (res<=0)
return false;
@@ -263,6 +250,10 @@ void DirAccessJAndroid::setup( jobject p_io) {
if(_dir_close != 0) {
__android_log_print(ANDROID_LOG_INFO,"godot","*******GOT METHOD _dir_close ok!!");
}
+ _dir_is_dir = env->GetMethodID(cls, "dir_is_dir", "(I)Z");
+ if(_dir_is_dir != 0) {
+ __android_log_print(ANDROID_LOG_INFO,"godot","*******GOT METHOD _dir_is_dir ok!!");
+ }
// (*env)->CallVoidMethod(env,obj,aMethodID, myvar);
}
diff --git a/platform/android/dir_access_jandroid.h b/platform/android/dir_access_jandroid.h
index dd08a0d214..7b6242ca32 100644
--- a/platform/android/dir_access_jandroid.h
+++ b/platform/android/dir_access_jandroid.h
@@ -47,6 +47,7 @@ class DirAccessJAndroid : public DirAccess {
static jmethodID _dir_open;
static jmethodID _dir_next;
static jmethodID _dir_close;
+ static jmethodID _dir_is_dir;
int id;
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 4d3f8f110a..d169ec51d5 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -187,6 +187,8 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
bool remove_prev;
bool use_32_fb;
bool immersive;
+ bool export_arm;
+ bool export_x86;
String apk_expansion_salt;
String apk_expansion_pkey;
int orientation;
@@ -223,6 +225,8 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
static void _device_poll_thread(void *ud);
+ String get_package_name();
+
String get_project_name() const;
void _fix_manifest(Vector<uint8_t>& p_manifest);
void _fix_resources(Vector<uint8_t>& p_manifest);
@@ -281,6 +285,10 @@ bool EditorExportPlatformAndroid::_set(const StringName& p_name, const Variant&
icon=p_value;
else if (n=="package/signed")
_signed=p_value;
+ else if (n=="architecture/arm")
+ export_arm=p_value;
+ else if (n=="architecture/x86")
+ export_x86=p_value;
else if (n=="screen/use_32_bits_view")
use_32_fb=p_value;
else if (n=="screen/immersive_mode")
@@ -350,6 +358,10 @@ bool EditorExportPlatformAndroid::_get(const StringName& p_name,Variant &r_ret)
r_ret=icon;
else if (n=="package/signed")
r_ret=_signed;
+ else if (n=="architecture/arm")
+ r_ret=export_arm;
+ else if (n=="architecture/x86")
+ r_ret=export_x86;
else if (n=="screen/use_32_bits_view")
r_ret=use_32_fb;
else if (n=="screen/immersive_mode")
@@ -403,6 +415,8 @@ void EditorExportPlatformAndroid::_get_property_list( List<PropertyInfo> *p_list
p_list->push_back( PropertyInfo( Variant::STRING, "package/name") );
p_list->push_back( PropertyInfo( Variant::STRING, "package/icon",PROPERTY_HINT_FILE,"png") );
p_list->push_back( PropertyInfo( Variant::BOOL, "package/signed") );
+ p_list->push_back( PropertyInfo( Variant::BOOL, "architecture/arm") );
+ p_list->push_back( PropertyInfo( Variant::BOOL, "architecture/x86") );
p_list->push_back( PropertyInfo( Variant::BOOL, "screen/use_32_bits_view") );
p_list->push_back( PropertyInfo( Variant::BOOL, "screen/immersive_mode") );
p_list->push_back( PropertyInfo( Variant::INT, "screen/orientation",PROPERTY_HINT_ENUM,"Landscape,Portrait") );
@@ -641,11 +655,11 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) {
int iofs=ofs+8;
- uint32_t string_count=decode_uint32(&p_manifest[iofs]);
- uint32_t styles_count=decode_uint32(&p_manifest[iofs+4]);
+ string_count=decode_uint32(&p_manifest[iofs]);
+ styles_count=decode_uint32(&p_manifest[iofs+4]);
uint32_t string_flags=decode_uint32(&p_manifest[iofs+8]);
- uint32_t string_data_offset=decode_uint32(&p_manifest[iofs+12]);
- uint32_t styles_offset=decode_uint32(&p_manifest[iofs+16]);
+ string_data_offset=decode_uint32(&p_manifest[iofs+12]);
+ styles_offset=decode_uint32(&p_manifest[iofs+16]);
/*
printf("string count: %i\n",string_count);
printf("flags: %i\n",string_flags);
@@ -744,7 +758,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) {
if (tname=="manifest" && attrname=="package") {
print_line("FOUND PACKAGE");
- string_table[attr_value]=package;
+ string_table[attr_value]=get_package_name();
}
//print_line("tname: "+tname);
@@ -768,19 +782,21 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) {
if (tname=="activity" && /*nspace=="android" &&*/ attrname=="screenOrientation") {
+ encode_uint32(orientation==0?0:1,&p_manifest[iofs+16]);
+ /*
print_line("FOUND screen orientation");
if (attr_value==0xFFFFFFFF) {
WARN_PRINT("Version name in a resource, should be plaintext")
} else {
string_table[attr_value]=(orientation==0?"landscape":"portrait");
- }
+ }*/
}
if (tname=="application" && /*nspace=="android" &&*/ attrname=="label") {
print_line("FOUND application");
if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Application name in a resource, should be plaintext.")
+ WARN_PRINT("Application name in a resource, should be plaintext (but you can ignore this).")
} else {
String aname = get_project_name();
@@ -791,7 +807,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) {
print_line("FOUND activity name");
if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Activity name in a resource, should be plaintext")
+ WARN_PRINT("Activity name in a resource, should be plaintext (but you can ignore this)")
} else {
String aname;
if (this->name!="") {
@@ -835,23 +851,19 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) {
WARN_PRINT("Screen res name in a resource, should be plaintext")
} else if (attrname=="smallScreens") {
- print_line("SMALLSCREEN");
- string_table[attr_value]=screen_support[SCREEN_SMALL]?"true":"false";
+ encode_uint32(screen_support[SCREEN_SMALL]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
} else if (attrname=="mediumScreens") {
- print_line("MEDSCREEN");
- string_table[attr_value]=screen_support[SCREEN_NORMAL]?"true":"false";
+ encode_uint32(screen_support[SCREEN_NORMAL]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
} else if (attrname=="largeScreens") {
- print_line("LARGECREEN");
- string_table[attr_value]=screen_support[SCREEN_LARGE]?"true":"false";
+ encode_uint32(screen_support[SCREEN_LARGE]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
} else if (attrname=="xlargeScreens") {
- print_line("XLARGECREEN");
- string_table[attr_value]=screen_support[SCREEN_XLARGE]?"true":"false";
+ encode_uint32(screen_support[SCREEN_XLARGE]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
}
}
@@ -1047,6 +1059,8 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
char fname[16384];
ret = unzGetCurrentFileInfo(pkg,&info,fname,16384,NULL,0,NULL,0);
+ bool skip=false;
+
String file=fname;
Vector<uint8_t> data;
@@ -1099,20 +1113,31 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
}
}
+ if (file=="lib/x86/libgodot_android.so" && !export_x86) {
+ skip=true;
+ }
+
+ if (file=="lib/armeabi/libgodot_android.so" && !export_arm) {
+ skip=true;
+ }
+
print_line("ADDING: "+file);
- zipOpenNewFileInZip(apk,
- file.utf8().get_data(),
- NULL,
- NULL,
- 0,
- NULL,
- 0,
- NULL,
- Z_DEFLATED,
- Z_DEFAULT_COMPRESSION);
- zipWriteInFileInZip(apk,data.ptr(),data.size());
- zipCloseFileInZip(apk);
+ if (!skip) {
+ zipOpenNewFileInZip(apk,
+ file.utf8().get_data(),
+ NULL,
+ NULL,
+ 0,
+ NULL,
+ 0,
+ NULL,
+ Z_DEFLATED,
+ Z_DEFAULT_COMPRESSION);
+
+ zipWriteInFileInZip(apk,data.ptr(),data.size());
+ zipCloseFileInZip(apk);
+ }
ret = unzGoToNextFile(pkg);
}
@@ -1146,7 +1171,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
if (apk_expansion) {
- String apkfname="main."+itos(version_code)+"."+package+".obb";
+ String apkfname="main."+itos(version_code)+"."+get_package_name()+".obb";
String fullpath=p_path.get_base_dir().plus_file(apkfname);
FileAccess *pf = FileAccess::open(fullpath,FileAccess::WRITE);
if (!pf) {
@@ -1491,7 +1516,7 @@ Error EditorExportPlatformAndroid::run(int p_device, bool p_dumb) {
args.push_back("-s");
args.push_back(devices[p_device].id);
args.push_back("uninstall");
- args.push_back(package);
+ args.push_back(get_package_name());
err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
#if 0
@@ -1529,7 +1554,7 @@ Error EditorExportPlatformAndroid::run(int p_device, bool p_dumb) {
args.push_back("-a");
args.push_back("android.intent.action.MAIN");
args.push_back("-n");
- args.push_back(package+"/com.android.godot.Godot");
+ args.push_back(get_package_name()+"/com.android.godot.Godot");
err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
if (err || rv!=0) {
@@ -1541,12 +1566,37 @@ Error EditorExportPlatformAndroid::run(int p_device, bool p_dumb) {
return OK;
}
+String EditorExportPlatformAndroid::get_package_name() {
+
+ String pname = package;
+ String basename = Globals::get_singleton()->get("application/name");
+ basename=basename.to_lower();
+
+ String name;
+ bool first=true;
+ for(int i=0;i<basename.length();i++) {
+ CharType c = basename[i];
+ if (c>='0' && c<='9' && first) {
+ continue;
+ }
+ if ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9')) {
+ name+=String::chr(c);
+ first=false;
+ }
+ }
+ if (name=="")
+ name="noname";
+
+ pname=pname.replace("$genname",name);
+ return pname;
+
+}
EditorExportPlatformAndroid::EditorExportPlatformAndroid() {
version_code=1;
version_name="1.0";
- package="com.android.noname";
+ package="org.godotengine.$genname";
name="";
_signed=true;
apk_expansion=false;
@@ -1557,6 +1607,10 @@ EditorExportPlatformAndroid::EditorExportPlatformAndroid() {
use_32_fb=true;
immersive=true;
+ export_arm=true;
+ export_x86=false;
+
+
device_thread=Thread::create(_device_poll_thread,this);
devices_changed=true;
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp
index 2e3dd82895..971d4f84ab 100644
--- a/platform/android/file_access_jandroid.cpp
+++ b/platform/android/file_access_jandroid.cpp
@@ -67,7 +67,6 @@ Error FileAccessJAndroid::_open(const String& p_path, int p_mode_flags) {
jstring js = env->NewStringUTF(path.utf8().get_data());
int res = env->CallIntMethod(io,_file_open,js,p_mode_flags&WRITE?true:false);
-
env->DeleteLocalRef(js);
if (res<=0)
diff --git a/platform/android/java/res/drawable/icon.png b/platform/android/java/res/drawable/icon.png
index 050a1cf930..78757e9035 100644
--- a/platform/android/java/res/drawable/icon.png
+++ b/platform/android/java/res/drawable/icon.png
Binary files differ
diff --git a/platform/android/java/src/com/android/godot/GodotIO.java b/platform/android/java/src/com/android/godot/GodotIO.java
index b793b8850a..addceb1528 100644
--- a/platform/android/java/src/com/android/godot/GodotIO.java
+++ b/platform/android/java/src/com/android/godot/GodotIO.java
@@ -271,6 +271,7 @@ public class GodotIO {
public String[] files;
public int current;
+ public String path;
}
public int last_dir_id=1;
@@ -281,6 +282,7 @@ public class GodotIO {
AssetDir ad = new AssetDir();
ad.current=0;
+ ad.path=path;
try {
ad.files = am.list(path);
@@ -290,6 +292,7 @@ public class GodotIO {
return -1;
}
+ //System.out.printf("Opened dir: %s\n",path);
++last_dir_id;
dirs.put(last_dir_id,ad);
@@ -297,6 +300,32 @@ public class GodotIO {
}
+ public boolean dir_is_dir(int id) {
+ if (!dirs.containsKey(id)) {
+ System.out.printf("dir_next: invalid dir id: %d\n",id);
+ return false;
+ }
+ AssetDir ad = dirs.get(id);
+ //System.out.printf("go next: %d,%d\n",ad.current,ad.files.length);
+ int idx = ad.current;
+ if (idx>0)
+ idx--;
+
+ if (idx>=ad.files.length)
+ return false;
+ String fname = ad.files[idx];
+
+ try {
+ if (ad.path.equals(""))
+ am.open(fname);
+ else
+ am.open(ad.path+"/"+fname);
+ return false;
+ } catch (Exception e) {
+ return true;
+ }
+ }
+
public String dir_next(int id) {
if (!dirs.containsKey(id)) {
@@ -305,8 +334,12 @@ public class GodotIO {
}
AssetDir ad = dirs.get(id);
- if (ad.current>=ad.files.length)
+ //System.out.printf("go next: %d,%d\n",ad.current,ad.files.length);
+
+ if (ad.current>=ad.files.length) {
+ ad.current++;
return "";
+ }
String r = ad.files[ad.current];
ad.current++;
return r;
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index a77428e954..1ad32e7989 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -12,3 +12,9 @@ common_win=[
]
env.Program('#bin/godot',['godot_win.cpp']+common_win,PROGSUFFIX=env["PROGSUFFIX"])
+
+# Microsoft Visual Studio Project Generation
+if (env['vsproj'])=="yes":
+ env.vs_srcs = env.vs_srcs + ["platform/windows/godot_win.cpp"]
+ for x in common_win:
+ env.vs_srcs = env.vs_srcs + ["platform/windows/" + x]
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 4ecd23204f..7fa1666c59 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -55,6 +55,7 @@ def get_opts():
('use_leak_sanitizer','Use llvm compiler sanitize memory leaks','no'),
('pulseaudio','Detect & Use pulseaudio','yes'),
('new_wm_api', 'Use experimental window management API','no'),
+ ('debug_release', 'Add debug symbols to release version','no'),
]
def get_flags():
@@ -109,7 +110,10 @@ def configure(env):
if (env["target"]=="release"):
- env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer'])
+ if (env["debug_release"]):
+ env.Append(CCFLAGS=['-g2','-fomit-frame-pointer'])
+ else:
+ env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer'])
elif (env["target"]=="release_debug"):
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index a40b1fb397..827256c2fa 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -512,6 +512,29 @@ bool Area2D::overlaps_body(Node* p_body) const{
}
+void Area2D::set_collision_mask(uint32_t p_mask) {
+
+ collision_mask=p_mask;
+ Physics2DServer::get_singleton()->area_set_collision_mask(get_rid(),p_mask);
+}
+
+uint32_t Area2D::get_collision_mask() const {
+
+ return collision_mask;
+}
+
+
+void Area2D::set_layer_mask(uint32_t p_mask) {
+
+ layer_mask=p_mask;
+ Physics2DServer::get_singleton()->area_set_layer_mask(get_rid(),p_mask);
+}
+
+uint32_t Area2D::get_layer_mask() const {
+
+ return layer_mask;
+}
+
void Area2D::_bind_methods() {
@@ -542,6 +565,12 @@ void Area2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_priority","priority"),&Area2D::set_priority);
ObjectTypeDB::bind_method(_MD("get_priority"),&Area2D::get_priority);
+ ObjectTypeDB::bind_method(_MD("set_collision_mask","collision_mask"),&Area2D::set_collision_mask);
+ ObjectTypeDB::bind_method(_MD("get_collision_mask"),&Area2D::get_collision_mask);
+
+ ObjectTypeDB::bind_method(_MD("set_layer_mask","layer_mask"),&Area2D::set_layer_mask);
+ ObjectTypeDB::bind_method(_MD("get_layer_mask"),&Area2D::get_layer_mask);
+
ObjectTypeDB::bind_method(_MD("set_enable_monitoring","enable"),&Area2D::set_enable_monitoring);
ObjectTypeDB::bind_method(_MD("is_monitoring_enabled"),&Area2D::is_monitoring_enabled);
@@ -578,6 +607,8 @@ void Area2D::_bind_methods() {
ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"priority",PROPERTY_HINT_RANGE,"0,128,1"),_SCS("set_priority"),_SCS("get_priority"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitoring"),_SCS("set_enable_monitoring"),_SCS("is_monitoring_enabled"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitorable"),_SCS("set_monitorable"),_SCS("is_monitorable"));
+ ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask"));
+ ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask"));
}
@@ -593,9 +624,10 @@ Area2D::Area2D() : CollisionObject2D(Physics2DServer::get_singleton()->area_crea
priority=0;
monitoring=false;
monitorable=false;
+ collision_mask=1;
+ layer_mask=1;
set_enable_monitoring(true);
set_monitorable(true);
-
}
Area2D::~Area2D() {
diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h
index 5964230a52..0c064f54cd 100644
--- a/scene/2d/area_2d.h
+++ b/scene/2d/area_2d.h
@@ -51,6 +51,8 @@ private:
bool gravity_is_point;
real_t linear_damp;
real_t angular_damp;
+ uint32_t collision_mask;
+ uint32_t layer_mask;
int priority;
bool monitoring;
bool monitorable;
@@ -151,6 +153,12 @@ public:
void set_monitorable(bool p_enable);
bool is_monitorable() const;
+ void set_collision_mask(uint32_t p_mask);
+ uint32_t get_collision_mask() const;
+
+ void set_layer_mask(uint32_t p_mask);
+ uint32_t get_layer_mask() const;
+
Array get_overlapping_bodies() const; //function for script
Array get_overlapping_areas() const; //function for script
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 2ebf34d34b..27a512845c 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -216,6 +216,7 @@ void Camera2D::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
+
viewport = NULL;
Node *n=this;
while(n){
@@ -526,6 +527,7 @@ Camera2D::Camera2D() {
drag_margin[MARGIN_RIGHT]=0.2;
drag_margin[MARGIN_BOTTOM]=0.2;
camera_pos=Vector2();
+ first=true;
smoothing=0.0;
zoom = Vector2(1, 1);
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 09c5a2a2bb..9b2cdf4ea2 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -35,7 +35,7 @@
#include "scene/resources/font.h"
#include "scene/resources/texture.h"
#include "scene/resources/style_box.h"
-
+#include "os/input.h"
bool CanvasItemMaterial::_set(const StringName& p_name, const Variant& p_value) {
@@ -1010,6 +1010,16 @@ InputEvent CanvasItem::make_input_local(const InputEvent& p_event) const {
}
+Vector2 CanvasItem::get_global_mouse_pos() const {
+
+ return get_viewport_transform().affine_inverse().xform(Input::get_singleton()->get_mouse_pos());
+}
+Vector2 CanvasItem::get_local_mouse_pos() const{
+
+ return (get_viewport_transform() * get_global_transform()).affine_inverse().xform(Input::get_singleton()->get_mouse_pos());
+}
+
+
void CanvasItem::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_sort_children"),&CanvasItem::_sort_children);
@@ -1075,6 +1085,8 @@ void CanvasItem::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_viewport_transform"),&CanvasItem::get_viewport_transform);
ObjectTypeDB::bind_method(_MD("get_viewport_rect"),&CanvasItem::get_viewport_rect);
ObjectTypeDB::bind_method(_MD("get_canvas_transform"),&CanvasItem::get_canvas_transform);
+ ObjectTypeDB::bind_method(_MD("get_local_mouse_pos"),&CanvasItem::get_local_mouse_pos);
+ ObjectTypeDB::bind_method(_MD("get_global_mouse_pos"),&CanvasItem::get_global_mouse_pos);
ObjectTypeDB::bind_method(_MD("get_canvas"),&CanvasItem::get_canvas);
ObjectTypeDB::bind_method(_MD("get_world_2d"),&CanvasItem::get_world_2d);
//ObjectTypeDB::bind_method(_MD("get_viewport"),&CanvasItem::get_viewport);
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 0755638047..6d8308dbe4 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -260,6 +260,9 @@ public:
InputEvent make_input_local(const InputEvent& pevent) const;
+ Vector2 get_global_mouse_pos() const;
+ Vector2 get_local_mouse_pos() const;
+
CanvasItem();
~CanvasItem();
};
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp
index e4d10cad12..5a02501816 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation2d.cpp
@@ -32,6 +32,7 @@ void Navigation2D::_navpoly_link(int p_id) {
p.edges.resize(plen);
Vector2 center;
+ float sum=0;
for(int j=0;j<plen;j++) {
@@ -46,8 +47,23 @@ void Navigation2D::_navpoly_link(int p_id) {
center+=ep;
e.point=_get_point(ep);
p.edges[j]=e;
+
+
+ int idxn = indices[(j+1)%plen];
+ if (idxn<0 || idxn>=len) {
+ valid=false;
+ break;
+ }
+
+ Vector2 epn = nm.xform.xform(r[idxn]);
+
+ sum+=(epn.x-ep.x)*(epn.y+ep.y);
+
+
}
+ p.clockwise=sum>0;
+
if (!valid) {
nm.polygons.pop_back();
ERR_CONTINUE(!valid);
@@ -493,17 +509,30 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect
left = _get_vertex(p->edges[prev].point);
right = _get_vertex(p->edges[prev_n].point);
- if (CLOCK_TANGENT(apex_point,left,(left+right)*0.5) < 0){
+ if (p->clockwise) {
SWAP(left,right);
}
+ /*if (CLOCK_TANGENT(apex_point,left,(left+right)*0.5) < 0){
+ SWAP(left,right);
+ }*/
}
bool skip=false;
+ /* print_line("-----\nAPEX: "+(apex_point-end_point));
+ print_line("LEFT:");
+ print_line("\tPortal: "+(portal_left-end_point));
+ print_line("\tPoint: "+(left-end_point));
+ print_line("\tFree: "+itos(CLOCK_TANGENT(apex_point,portal_left,left) >= 0));
+ print_line("RIGHT:");
+ print_line("\tPortal: "+(portal_right-end_point));
+ print_line("\tPoint: "+(right-end_point));
+ print_line("\tFree: "+itos(CLOCK_TANGENT(apex_point,portal_right,right) <= 0));
+*/
if (CLOCK_TANGENT(apex_point,portal_left,left) >= 0){
//process
- if (portal_left==apex_point || CLOCK_TANGENT(apex_point,left,portal_right) > 0) {
+ if (portal_left.distance_squared_to(apex_point)<CMP_EPSILON || CLOCK_TANGENT(apex_point,left,portal_right) > 0) {
left_poly=p;
portal_left=left;
} else {
@@ -516,14 +545,16 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect
apex_poly=p;
portal_left=apex_point;
portal_right=apex_point;
- path.push_back(apex_point);
+ if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
+ path.push_back(apex_point);
skip=true;
+ //print_line("addpoint left");
}
}
if (!skip && CLOCK_TANGENT(apex_point,portal_right,right) <= 0){
//process
- if (portal_right==apex_point || CLOCK_TANGENT(apex_point,right,portal_left) < 0) {
+ if (portal_right.distance_squared_to(apex_point)<CMP_EPSILON || CLOCK_TANGENT(apex_point,right,portal_left) < 0) {
right_poly=p;
portal_right=right;
} else {
@@ -536,7 +567,10 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect
apex_poly=p;
portal_right=apex_point;
portal_left=apex_point;
- path.push_back(apex_point);
+ if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
+ path.push_back(apex_point);
+ //print_line("addpoint right");
+
}
}
@@ -547,7 +581,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2& p_start, const Vect
}
- if (path[path.size()-1]!=begin_point)
+ if (path[path.size()-1].distance_to(begin_point)>CMP_EPSILON)
path.push_back(begin_point);
path.invert();
diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation2d.h
index 7a33105b77..829b0f544b 100644
--- a/scene/2d/navigation2d.h
+++ b/scene/2d/navigation2d.h
@@ -60,6 +60,8 @@ class Navigation2D : public Node2D {
float distance;
int prev_edge;
+ bool clockwise;
+
NavMesh *owner;
};
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index b55e9f28d1..6fb798714f 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -72,13 +72,16 @@ void PhysicsBody2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody2D::set_layer_mask);
ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsBody2D::get_layer_mask);
+ ObjectTypeDB::bind_method(_MD("set_collision_mask","mask"),&PhysicsBody2D::set_collision_mask);
+ ObjectTypeDB::bind_method(_MD("get_collision_mask"),&PhysicsBody2D::get_collision_mask);
ObjectTypeDB::bind_method(_MD("set_one_way_collision_direction","dir"),&PhysicsBody2D::set_one_way_collision_direction);
ObjectTypeDB::bind_method(_MD("get_one_way_collision_direction"),&PhysicsBody2D::get_one_way_collision_direction);
ObjectTypeDB::bind_method(_MD("set_one_way_collision_max_depth","depth"),&PhysicsBody2D::set_one_way_collision_max_depth);
ObjectTypeDB::bind_method(_MD("get_one_way_collision_max_depth"),&PhysicsBody2D::get_one_way_collision_max_depth);
ObjectTypeDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::add_collision_exception_with);
ObjectTypeDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::remove_collision_exception_with);
- ADD_PROPERTY(PropertyInfo(Variant::INT,"layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask"));
+ ADD_PROPERTY(PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask"));
+ ADD_PROPERTY(PropertyInfo(Variant::INT,"collision/mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask"));
ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"one_way_collision/direction"),_SCS("set_one_way_collision_direction"),_SCS("get_one_way_collision_direction"));
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"one_way_collision/max_depth"),_SCS("set_one_way_collision_max_depth"),_SCS("get_one_way_collision_max_depth"));
}
@@ -94,9 +97,22 @@ uint32_t PhysicsBody2D::get_layer_mask() const {
return mask;
}
+void PhysicsBody2D::set_collision_mask(uint32_t p_mask) {
+
+ collision_mask=p_mask;
+ Physics2DServer::get_singleton()->body_set_collision_mask(get_rid(),p_mask);
+}
+
+uint32_t PhysicsBody2D::get_collision_mask() const {
+
+ return collision_mask;
+}
+
+
PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) : CollisionObject2D( Physics2DServer::get_singleton()->body_create(p_mode), false) {
mask=1;
+ collision_mask=1;
set_one_way_collision_max_depth(0);
set_pickable(false);
@@ -277,6 +293,13 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(objid);
+ /*if (obj) {
+ if (body_in)
+ print_line("in: "+String(obj->call("get_name")));
+ else
+ print_line("out: "+String(obj->call("get_name")));
+ }*/
+
ERR_FAIL_COND(!body_in && !E);
if (body_in) {
@@ -386,14 +409,14 @@ void RigidBody2D::_direct_state_changed(Object *p_state) {
ObjectID obj = state->get_contact_collider_id(i);
int local_shape = state->get_contact_local_shape(i);
int shape = state->get_contact_collider_shape(i);
- toadd[i].local_shape=local_shape;
- toadd[i].id=obj;
- toadd[i].shape=shape;
// bool found=false;
Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj);
if (!E) {
+ toadd[toadd_count].local_shape=local_shape;
+ toadd[toadd_count].id=obj;
+ toadd[toadd_count].shape=shape;
toadd_count++;
continue;
}
@@ -402,6 +425,9 @@ void RigidBody2D::_direct_state_changed(Object *p_state) {
int idx = E->get().shapes.find(sp);
if (idx==-1) {
+ toadd[toadd_count].local_shape=local_shape;
+ toadd[toadd_count].id=obj;
+ toadd[toadd_count].shape=shape;
toadd_count++;
continue;
}
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index b8cba6e5ba..3cb94b95da 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -39,6 +39,7 @@ class PhysicsBody2D : public CollisionObject2D {
OBJ_TYPE(PhysicsBody2D,CollisionObject2D);
uint32_t mask;
+ uint32_t collision_mask;
Vector2 one_way_collision_direction;
float one_way_collision_max_depth;
protected:
@@ -52,6 +53,9 @@ public:
void set_layer_mask(uint32_t p_mask);
uint32_t get_layer_mask() const;
+ void set_collision_mask(uint32_t p_mask);
+ uint32_t get_collision_mask() const;
+
void add_collision_exception_with(Node* p_node); //must be physicsbody
void remove_collision_exception_with(Node* p_node);
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index 217a98aaea..fc6986327f 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -192,14 +192,14 @@ void Polygon2D::set_texture(const Ref<Texture>& p_texture){
texture=p_texture;
- if (texture.is_valid()) {
+ /*if (texture.is_valid()) {
uint32_t flags=texture->get_flags();
flags&=~Texture::FLAG_REPEAT;
if (tex_tile)
flags|=Texture::FLAG_REPEAT;
texture->set_flags(flags);
- }
+ }*/
update();
}
Ref<Texture> Polygon2D::get_texture() const{
@@ -228,22 +228,6 @@ float Polygon2D::get_texture_rotation() const{
return tex_rot;
}
-void Polygon2D::set_texture_repeat(bool p_enable){
-
- tex_tile=p_enable;
- if (texture.is_valid()) {
- uint32_t flags=texture->get_flags();
- flags&=~Texture::FLAG_REPEAT;
- if (p_enable)
- flags|=Texture::FLAG_REPEAT;
- texture->set_flags(flags);
- }
- update();
-}
-bool Polygon2D::get_texture_repeat() const{
-
- return tex_tile;
-}
void Polygon2D::_set_texture_rotationd(float p_rot){
@@ -324,8 +308,6 @@ void Polygon2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_texture_scale","texture_scale"),&Polygon2D::set_texture_scale);
ObjectTypeDB::bind_method(_MD("get_texture_scale"),&Polygon2D::get_texture_scale);
- ObjectTypeDB::bind_method(_MD("set_texture_repeat","enable"),&Polygon2D::set_texture_repeat);
- ObjectTypeDB::bind_method(_MD("get_texture_repeat"),&Polygon2D::get_texture_repeat);
ObjectTypeDB::bind_method(_MD("set_invert","invert"),&Polygon2D::set_invert);
ObjectTypeDB::bind_method(_MD("get_invert"),&Polygon2D::get_invert);
@@ -346,7 +328,6 @@ void Polygon2D::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"texture/offset"),_SCS("set_texture_offset"),_SCS("get_texture_offset"));
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"texture/scale"),_SCS("set_texture_scale"),_SCS("get_texture_scale"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"texture/rotation",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_texture_rotationd"),_SCS("_get_texture_rotationd"));
- ADD_PROPERTY( PropertyInfo(Variant::BOOL,"texture/repeat"),_SCS("set_texture_repeat"),_SCS("get_texture_repeat"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"invert/enable"),_SCS("set_invert"),_SCS("get_invert"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"invert/border",PROPERTY_HINT_RANGE,"0.1,16384,0.1"),_SCS("set_invert_border"),_SCS("get_invert_border"));
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index 38fa57b9b4..517b623ccd 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -52,9 +52,6 @@ public:
void set_texture_scale(const Vector2& p_scale);
Vector2 get_texture_scale() const;
- void set_texture_repeat(bool p_rot);
- bool get_texture_repeat() const;
-
void set_invert(bool p_rot);
bool get_invert() const;
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index bf1677ae63..2fca1e67e8 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -519,6 +519,7 @@ Map<TileMap::PosKey,TileMap::Quadrant>::Element *TileMap::_create_quadrant(const
q.body=Physics2DServer::get_singleton()->body_create(use_kinematic?Physics2DServer::BODY_MODE_KINEMATIC:Physics2DServer::BODY_MODE_STATIC);
Physics2DServer::get_singleton()->body_attach_object_instance_ID(q.body,get_instance_ID());
Physics2DServer::get_singleton()->body_set_layer_mask(q.body,collision_layer);
+ Physics2DServer::get_singleton()->body_set_collision_mask(q.body,collision_mask);
Physics2DServer::get_singleton()->body_set_param(q.body,Physics2DServer::BODY_PARAM_FRICTION,friction);
Physics2DServer::get_singleton()->body_set_param(q.body,Physics2DServer::BODY_PARAM_BOUNCE,bounce);
@@ -790,7 +791,7 @@ Rect2 TileMap::get_item_rect() const {
return rect_cache;
}
-void TileMap::set_collision_layer_mask(uint32_t p_layer) {
+void TileMap::set_collision_layer(uint32_t p_layer) {
collision_layer=p_layer;
for (Map<PosKey,Quadrant>::Element *E=quadrant_map.front();E;E=E->next()) {
@@ -800,6 +801,16 @@ void TileMap::set_collision_layer_mask(uint32_t p_layer) {
}
}
+void TileMap::set_collision_mask(uint32_t p_mask) {
+
+ collision_mask=p_mask;
+ for (Map<PosKey,Quadrant>::Element *E=quadrant_map.front();E;E=E->next()) {
+
+ Quadrant &q=E->get();
+ Physics2DServer::get_singleton()->body_set_collision_mask(q.body,collision_mask);
+ }
+}
+
bool TileMap::get_collision_use_kinematic() const{
return use_kinematic;
@@ -844,11 +855,16 @@ float TileMap::get_collision_bounce() const{
}
-uint32_t TileMap::get_collision_layer_mask() const {
+uint32_t TileMap::get_collision_layer() const {
return collision_layer;
}
+uint32_t TileMap::get_collision_mask() const {
+
+ return collision_mask;
+}
+
void TileMap::set_mode(Mode p_mode) {
_clear_quadrants();
@@ -1077,8 +1093,11 @@ void TileMap::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_collision_use_kinematic","use_kinematic"),&TileMap::set_collision_use_kinematic);
ObjectTypeDB::bind_method(_MD("get_collision_use_kinematic"),&TileMap::get_collision_use_kinematic);
- ObjectTypeDB::bind_method(_MD("set_collision_layer_mask","mask"),&TileMap::set_collision_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_collision_layer_mask"),&TileMap::get_collision_layer_mask);
+ ObjectTypeDB::bind_method(_MD("set_collision_layer","mask"),&TileMap::set_collision_layer);
+ ObjectTypeDB::bind_method(_MD("get_collision_layer"),&TileMap::get_collision_layer);
+
+ ObjectTypeDB::bind_method(_MD("set_collision_mask","mask"),&TileMap::set_collision_mask);
+ ObjectTypeDB::bind_method(_MD("get_collision_mask"),&TileMap::get_collision_mask);
ObjectTypeDB::bind_method(_MD("set_collision_friction","value"),&TileMap::set_collision_friction);
ObjectTypeDB::bind_method(_MD("get_collision_friction"),&TileMap::get_collision_friction);
@@ -1117,7 +1136,9 @@ void TileMap::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"collision/use_kinematic",PROPERTY_HINT_NONE,""),_SCS("set_collision_use_kinematic"),_SCS("get_collision_use_kinematic"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision/friction",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_collision_friction"),_SCS("get_collision_friction"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision/bounce",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_collision_bounce"),_SCS("get_collision_bounce"));
- ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_layer_mask"),_SCS("get_collision_layer_mask"));
+ ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_layer"),_SCS("get_collision_layer"));
+ ADD_PROPERTY( PropertyInfo(Variant::INT,"collision/mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask"));
+
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"tile_data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_tile_data"),_SCS("_get_tile_data"));
ADD_SIGNAL(MethodInfo("settings_changed"));
@@ -1146,6 +1167,7 @@ TileMap::TileMap() {
center_x=false;
center_y=false;
collision_layer=1;
+ collision_mask=1;
friction=1;
bounce=0;
mode=MODE_SQUARE;
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 233529f018..84ca65da4f 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -146,6 +146,8 @@ private:
float friction;
float bounce;
uint32_t collision_layer;
+ uint32_t collision_mask;
+
TileOrigin tile_origin;
void _fix_cell_transform(Matrix32& xform, const Cell& p_cell, const Vector2 &p_offset, const Size2 &p_sc);
@@ -207,8 +209,11 @@ public:
Rect2 get_item_rect() const;
- void set_collision_layer_mask(uint32_t p_layer);
- uint32_t get_collision_layer_mask() const;
+ void set_collision_layer(uint32_t p_layer);
+ uint32_t get_collision_layer() const;
+
+ void set_collision_mask(uint32_t p_mask);
+ uint32_t get_collision_mask() const;
void set_collision_use_kinematic(bool p_use_kinematic);
bool get_collision_use_kinematic() const;
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index d8512172c8..dce5060a44 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -552,6 +552,13 @@ Vector3 Camera::project_ray_origin(const Point2& p_pos) const {
};
};
+bool Camera::is_position_behind(const Vector3& p_pos) const {
+
+ Transform t = get_global_transform();
+ Vector3 eyedir = -get_global_transform().basis.get_axis(2).normalized();
+ return eyedir.dot(p_pos) < (eyedir.dot(t.origin)+near);
+}
+
Point2 Camera::unproject_position(const Vector3& p_pos) const {
if (!is_inside_tree()) {
@@ -666,6 +673,7 @@ void Camera::_bind_methods() {
ObjectTypeDB::bind_method( _MD("project_local_ray_normal","screen_point"), &Camera::project_local_ray_normal);
ObjectTypeDB::bind_method( _MD("project_ray_origin","screen_point"), &Camera::project_ray_origin);
ObjectTypeDB::bind_method( _MD("unproject_position","world_point"), &Camera::unproject_position);
+ ObjectTypeDB::bind_method( _MD("is_position_behind","world_point"), &Camera::is_position_behind);
ObjectTypeDB::bind_method( _MD("project_position","screen_point"), &Camera::project_position);
ObjectTypeDB::bind_method( _MD("set_perspective","fov","z_near","z_far"),&Camera::set_perspective );
ObjectTypeDB::bind_method( _MD("set_orthogonal","size","z_near","z_far"),&Camera::set_orthogonal );
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index a3f59231da..e21f4865ec 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -126,6 +126,7 @@ public:
Vector3 project_ray_origin(const Point2& p_point) const;
Vector3 project_local_ray_normal(const Point2& p_point) const;
Point2 unproject_position(const Vector3& p_pos) const;
+ bool is_position_behind(const Vector3& p_pos) const;
Vector3 project_position(const Point2& p_point) const;
void set_visible_layers(uint32_t p_layers);
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index 66e29627cd..62b32729c3 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -168,7 +168,7 @@ Node* MeshInstance::create_trimesh_collision_node() {
static_body->add_shape( shape );
return static_body;
- return NULL;
+
}
void MeshInstance::create_trimesh_collision() {
@@ -202,7 +202,7 @@ Node* MeshInstance::create_convex_collision_node() {
static_body->add_shape( shape );
return static_body;
- return NULL;
+
}
void MeshInstance::create_convex_collision() {
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index 8866a65801..48820706dd 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -30,6 +30,7 @@ void Navigation::_navmesh_link(int p_id) {
p.edges.resize(plen);
Vector3 center;
+ float sum=0;
for(int j=0;j<plen;j++) {
@@ -44,8 +45,19 @@ void Navigation::_navmesh_link(int p_id) {
center+=ep;
e.point=_get_point(ep);
p.edges[j]=e;
+
+ if (j>=2) {
+ Vector3 epa = nm.xform.xform(r[indices[j-2]]);
+ Vector3 epb = nm.xform.xform(r[indices[j-1]]);
+
+ sum+=up.dot((epb-epa).cross(ep-epa));
+
+ }
+
}
+ p.clockwise=sum>0;
+
if (!valid) {
nm.polygons.pop_back();
ERR_CONTINUE(!valid);
@@ -399,7 +411,8 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3& p_start, const Vector
left = _get_vertex(p->edges[prev].point);
right = _get_vertex(p->edges[prev_n].point);
- if (CLOCK_TANGENT(apex_point,left,(left+right)*0.5).dot(up) < 0){
+ //if (CLOCK_TANGENT(apex_point,left,(left+right)*0.5).dot(up) < 0){
+ if (p->clockwise) {
SWAP(left,right);
}
}
diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h
index 54cec8f1f7..0f7f67571f 100644
--- a/scene/3d/navigation.h
+++ b/scene/3d/navigation.h
@@ -59,6 +59,8 @@ class Navigation : public Spatial {
float distance;
int prev_edge;
+ bool clockwise;
+
NavMesh *owner;
};
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 469ea0dd9a..3d5091f667 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -338,14 +338,14 @@ void RigidBody::_direct_state_changed(Object *p_state) {
ObjectID obj = state->get_contact_collider_id(i);
int local_shape = state->get_contact_local_shape(i);
int shape = state->get_contact_collider_shape(i);
- toadd[i].local_shape=local_shape;
- toadd[i].id=obj;
- toadd[i].shape=shape;
- bool found=false;
+// bool found=false;
Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj);
if (!E) {
+ toadd[toadd_count].local_shape=local_shape;
+ toadd[toadd_count].id=obj;
+ toadd[toadd_count].shape=shape;
toadd_count++;
continue;
}
@@ -354,6 +354,9 @@ void RigidBody::_direct_state_changed(Object *p_state) {
int idx = E->get().shapes.find(sp);
if (idx==-1) {
+ toadd[toadd_count].local_shape=local_shape;
+ toadd[toadd_count].id=obj;
+ toadd[toadd_count].shape=shape;
toadd_count++;
continue;
}
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 35f6523c6a..4952f742df 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -292,7 +292,7 @@ SpriteBase3D::SpriteBase3D() {
parent_sprite=NULL;
pI=NULL;
- for(int i=0;i<4;i++)
+ for(int i=0;i<FLAG_MAX;i++)
flags[i]=i==FLAG_TRANSPARENT;
axis=Vector3::AXIS_Z;
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp
index 79033bf5c2..41e8b6bf54 100644
--- a/scene/3d/visual_instance.cpp
+++ b/scene/3d/visual_instance.cpp
@@ -383,6 +383,7 @@ GeometryInstance::GeometryInstance() {
flags[FLAG_RECEIVE_SHADOWS]=true;
baked_light_instance=NULL;
baked_light_texture_id=0;
+ extra_cull_margin=0;
VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0);
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index 001b7bc49f..14f2110915 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -1738,8 +1738,14 @@ void AnimationTreePlayer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_base_path","path"),&AnimationTreePlayer::set_base_path);
ObjectTypeDB::bind_method(_MD("get_base_path"),&AnimationTreePlayer::get_base_path);
+ ObjectTypeDB::bind_method(_MD("set_master_player","nodepath"),&AnimationTreePlayer::set_master_player);
+ ObjectTypeDB::bind_method(_MD("get_master_player"),&AnimationTreePlayer::get_master_player);
+
ObjectTypeDB::bind_method(_MD("get_node_list"),&AnimationTreePlayer::_get_node_list);
+
+
+
ObjectTypeDB::bind_method(_MD("reset"),&AnimationTreePlayer::reset);
ObjectTypeDB::bind_method(_MD("recompute_caches"),&AnimationTreePlayer::recompute_caches);
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index ffa1c09ab5..a7a4129a5f 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -269,7 +269,7 @@ Variant Tween::_run_equation(InterpolateData& p_data) {
{
case Variant::BOOL:
- result = ((int) _run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, (int) initial_val, (int) delta_val, p_data.times_in_sec)) >= 0.5;
+ result = ( _run_equation(p_data.trans_type, p_data.ease_type, p_data.elapsed - p_data.delay, initial_val, delta_val, p_data.times_in_sec)) >= 0.5;
break;
case Variant::INT:
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index cef2941010..22559c238c 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -524,13 +524,15 @@ void Control::_notification(int p_notification) {
if (data.MI) {
- data.window->window->modal_stack.erase(data.MI);
+ if (data.window && data.window->window)
+ data.window->window->modal_stack.erase(data.MI);
data.MI=NULL;
}
if (data.SI) {
//erase from subwindows
- data.window->window->subwindows.erase(data.SI);
+ if (data.window && data.window->window)
+ data.window->window->subwindows.erase(data.SI);
data.SI=NULL;
}
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp
index 2959513799..214d874675 100644
--- a/scene/gui/grid_container.cpp
+++ b/scene/gui/grid_container.cpp
@@ -69,6 +69,7 @@ void GridContainer::_notification(int p_what) {
else
row_minh[row]=ms.height;
+ // print_line("store row "+itos(row)+" mw "+itos(ms.height));
if (c->get_h_size_flags()&SIZE_EXPAND)
col_expanded.insert(col);
@@ -121,23 +122,22 @@ void GridContainer::_notification(int p_what) {
row_ofs+=row_minh[row-1]+sep+(row_expanded.has(row-1)?row_expand:0);
}
- if (c->is_visible()) {
- Size2 s;
- if (col_minw.has(col))
- s.width=col_minw[col];
- if (row_minh.has(row))
- s.height=row_minh[col];
-
- if (row_expanded.has(row))
- s.height+=row_expand;
- if (col_expanded.has(col))
- s.width+=col_expand;
+ Size2 s;
+ if (col_minw.has(col))
+ s.width=col_minw[col];
+ if (row_minh.has(row))
+ s.height=row_minh[row];
- Point2 p(col_ofs,row_ofs);
+ if (row_expanded.has(row))
+ s.height+=row_expand;
+ if (col_expanded.has(col))
+ s.width+=col_expand;
- fit_child_in_rect(c,Rect2(p,s));
+ Point2 p(col_ofs,row_ofs);
- }
+// print_line("col: "+itos(col)+" row: "+itos(row)+" col_ofs: "+itos(col_ofs)+" row_ofs: "+itos(row_ofs));
+ fit_child_in_rect(c,Rect2(p,s));
+ //print_line("col: "+itos(col)+" row: "+itos(row)+" rect: "+Rect2(p,s));
if (col_minw.has(col)) {
col_ofs+=col_minw[col]+sep+(col_expanded.has(col)?col_expand:0);
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 6afff81fde..1751d335ee 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -99,7 +99,7 @@ void Label::_notification(int p_what) {
int chars_total=0;
int vbegin=0,vsep=0;
-
+
if (lines_total && lines_total < lines_visible) {
@@ -136,10 +136,9 @@ void Label::_notification(int p_what) {
if (!wc)
return;
-
+ int c = 0;
int line=0;
while(wc) {
-
/* handle lines not meant to be drawn quickly */
if (line>line_to)
break;
@@ -170,8 +169,8 @@ void Label::_notification(int p_what) {
while(to && to->char_pos>=0) {
taken+=to->pixel_width;
- if (to!=from) {
- spaces++;
+ if (to!=from && to->space_count) {
+ spaces+=to->space_count;
}
to=to->next;
}
@@ -212,15 +211,15 @@ void Label::_notification(int p_what) {
ERR_PRINT("BUG");
return;
}
- if (from!=wc) {
+ if (from->space_count) {
/* spacing */
- x_ofs+=space_w;
+ x_ofs+=space_w*from->space_count;
if (can_fill && align==ALIGN_FILL && spaces) {
-
+
x_ofs+=int((size.width-(taken+space_w*spaces))/spaces);
}
-
-
+
+
}
@@ -253,7 +252,7 @@ void Label::_notification(int p_what) {
}
for (int i=0;i<from->word_len;i++) {
-
+
if (visible_chars < 0 || chars_total<visible_chars) {
CharType c = text[i+pos];
CharType n = text[i+pos+1];
@@ -361,11 +360,12 @@ void Label::regenerate_word_cache() {
int width=autowrap?get_size().width:get_longest_line_width();
Ref<Font> font = get_font("font");
-
+
int current_word_size=0;
int word_pos=0;
int line_width=0;
- int last_width=0;
+ int space_count=0;
+ int space_width=font->get_char_size(' ').width;
line_count=1;
total_char_cache=0;
@@ -374,16 +374,17 @@ void Label::regenerate_word_cache() {
for (int i=0;i<text.size()+1;i++) {
CharType current=i<text.length()?text[i]:' '; //always a space at the end, so the algo works
-
+
if (uppercase)
current=String::char_uppercase(current);
+ bool not_latin = current>=33 && (current < 65||current >90) && (current<97||current>122) && (current<48||current>57);
bool insert_newline=false;
-
+ int char_width;
+
if (current<33) {
-
+
if (current_word_size>0) {
-
WordCache *wc = memnew( WordCache );
if (word_cache) {
last->next=wc;
@@ -391,14 +392,16 @@ void Label::regenerate_word_cache() {
word_cache=wc;
}
last=wc;
-
+
wc->pixel_width=current_word_size;
wc->char_pos=word_pos;
wc->word_len=i-word_pos;
+ wc->space_count = space_count;
current_word_size=0;
-
+ space_count=0;
+
}
-
+
if (current=='\n') {
insert_newline=true;
@@ -408,26 +411,49 @@ void Label::regenerate_word_cache() {
if (i<text.length() && text[i] == ' ') {
total_char_cache--; // do not count spaces
+ if (line_width > 0 || last==NULL || last->char_pos!=WordCache::CHAR_WRAPLINE) {
+ space_count++;
+ line_width+=space_width;
+ }else {
+ space_count=0;
+ }
}
} else {
-
+ // latin characters
if (current_word_size==0) {
- if (line_width>0) // add a space before the new word if a word existed before
- line_width+=font->get_char_size(' ').width;
word_pos=i;
}
- int char_width=font->get_char_size(current).width;
+ char_width=font->get_char_size(current).width;
current_word_size+=char_width;
line_width+=char_width;
total_char_cache++;
}
-
- if ((autowrap && line_width>=width && last_width<width) || insert_newline) {
-
+
+ if ((autowrap && line_width>=width && (last && last->char_pos >= 0 || not_latin)) || insert_newline) {
+ if (not_latin) {
+ if (current_word_size>0) {
+ WordCache *wc = memnew( WordCache );
+ if (word_cache) {
+ last->next=wc;
+ } else {
+ word_cache=wc;
+ }
+ last=wc;
+
+ wc->pixel_width=current_word_size-char_width;
+ wc->char_pos=word_pos;
+ wc->word_len=i-word_pos;
+ wc->space_count = space_count;
+ current_word_size=char_width;
+ space_count=0;
+ word_pos=i;
+ }
+ }
+
WordCache *wc = memnew( WordCache );
if (word_cache) {
last->next=wc;
@@ -435,18 +461,16 @@ void Label::regenerate_word_cache() {
word_cache=wc;
}
last=wc;
-
+
wc->pixel_width=0;
wc->char_pos=insert_newline?WordCache::CHAR_NEWLINE:WordCache::CHAR_WRAPLINE;
line_width=current_word_size;
line_count++;
+ space_count=0;
-
}
- last_width=line_width;
-
}
//total_char_cache -= line_count + 1; // do not count new lines (including the first one)
@@ -465,7 +489,7 @@ void Label::regenerate_word_cache() {
set_max(line_count);
word_cache_dirty=false;
-
+
}
diff --git a/scene/gui/label.h b/scene/gui/label.h
index 3b0dddc1a3..81e3ab5676 100644
--- a/scene/gui/label.h
+++ b/scene/gui/label.h
@@ -75,8 +75,9 @@ private:
int char_pos; // if -1, then newline
int word_len;
int pixel_width;
+ int space_count;
WordCache *next;
- WordCache() { char_pos=0; word_len=0; pixel_width=0; next=0; }
+ WordCache() { char_pos=0; word_len=0; pixel_width=0; next=0; space_count=0;}
};
bool word_cache_dirty;
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 04a5591242..b1fd914fcd 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -51,20 +51,20 @@ void ScrollBar::_input_event(InputEvent p_event) {
if (b.button_index==5 && b.pressed) {
- if (orientation==VERTICAL)
- set_val( get_val() + get_page() / 4.0 );
- else
- set_val( get_val() + get_page() / 4.0 );
+ //if (orientation==VERTICAL)
+ // set_val( get_val() + get_page() / 4.0 );
+ //else
+ set_val( get_val() + get_page() / 4.0 );
accept_event();
}
if (b.button_index==4 && b.pressed) {
- if (orientation==HORIZONTAL)
- set_val( get_val() - get_page() / 4.0 );
- else
- set_val( get_val() - get_page() / 4.0 );
+ //if (orientation==HORIZONTAL)
+ // set_val( get_val() - get_page() / 4.0 );
+ //else
+ set_val( get_val() - get_page() / 4.0 );
accept_event();
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index c54333856e..6cdff20aaf 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1249,7 +1249,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
}
- if (!mb.doubleclick && (OS::get_singleton()->get_ticks_msec()-last_dblclk)<600) {
+ if (!mb.doubleclick && (OS::get_singleton()->get_ticks_msec()-last_dblclk)<600 && cursor.line==prev_line) {
//tripleclick select line
select(cursor.line,0,cursor.line,text[cursor.line].length());
last_dblclk=0;
@@ -1552,7 +1552,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
case KEY_HOME:
case KEY_END:
// ignore arrows if any modifiers are held (shift = selecting, others may be used for editor hotkeys)
- if (k.mod.command || k.mod.shift || k.mod.alt || k.mod.command)
+ if (k.mod.command || k.mod.shift || k.mod.alt)
break;
unselect=true;
break;
diff --git a/scene/gui/texture_frame.cpp b/scene/gui/texture_frame.cpp
index 73081f9d5b..931fb1cb1a 100644
--- a/scene/gui/texture_frame.cpp
+++ b/scene/gui/texture_frame.cpp
@@ -88,8 +88,8 @@ void TextureFrame::set_texture(const Ref<Texture>& p_tex) {
texture=p_tex;
update();
- if (texture.is_valid())
- texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
+ //if (texture.is_valid())
+ // texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites
minimum_size_changed();
}
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index e59fd6fb75..2e3e7db0ad 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -46,6 +46,8 @@ void Timer::_notification(int p_what) {
} break;
case NOTIFICATION_PROCESS: {
+ if (!is_processing())
+ return;
time_left -= get_process_delta_time();
if (time_left<0) {
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 0f11a66703..095406dad9 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1216,8 +1216,8 @@ T Animation::_interpolate( const Vector< TKey<T> >& p_keys, float p_time, Inter
if (p_ok)
*p_ok=true;
-
- int next;
+
+ int next=0;
float c=0;
// prepare for all cases of interpolation
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 32949c32b7..c1a389942f 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -798,6 +798,7 @@ void Curve2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_baked_length"),&Curve2D::get_baked_length);
ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve2D::interpolate_baked,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve2D::get_baked_points);
+ ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve2D::tesselate,DEFVAL(5),DEFVAL(4));
ObjectTypeDB::bind_method(_MD("_get_data"),&Curve2D::_get_data);
ObjectTypeDB::bind_method(_MD("_set_data"),&Curve2D::_set_data);
@@ -1330,6 +1331,7 @@ void Curve3D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve3D::interpolate_baked,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve3D::get_baked_points);
ObjectTypeDB::bind_method(_MD("get_baked_tilts"),&Curve3D::get_baked_tilts);
+ ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve3D::tesselate,DEFVAL(5),DEFVAL(4));
ObjectTypeDB::bind_method(_MD("_get_data"),&Curve3D::_get_data);
ObjectTypeDB::bind_method(_MD("_set_data"),&Curve3D::_set_data);
diff --git a/scene/resources/scene_preloader.cpp b/scene/resources/scene_preloader.cpp
index 08e88b32c0..09001c1a94 100644
--- a/scene/resources/scene_preloader.cpp
+++ b/scene/resources/scene_preloader.cpp
@@ -407,7 +407,7 @@ Dictionary ScenePreloader::_get_bundled_scene() const {
rconns.push_back(cd.signal);
rconns.push_back(cd.method);
rconns.push_back(cd.binds.size());
- for(int j=0;j<cd.binds.size();i++)
+ for(int j=0;j<cd.binds.size();j++)
rconns.push_back(cd.binds[j]);
}
diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp
index 79dab7b4e3..131b0e193f 100644
--- a/scene/resources/shader_graph.cpp
+++ b/scene/resources/shader_graph.cpp
@@ -1350,6 +1350,8 @@ const ShaderGraph::InOutParamInfo ShaderGraph::inout_param_info[]={
{MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Color","COLOR.rgb","",SLOT_TYPE_VEC,SLOT_OUT},
{MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Alpha","COLOR.a","",SLOT_TYPE_SCALAR,SLOT_OUT},
{MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"Normal","NORMAL","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"NormalMap","NORMALMAP","",SLOT_TYPE_VEC,SLOT_OUT},
+ {MODE_CANVAS_ITEM,SHADER_TYPE_FRAGMENT,"NormalMapDepth","NORMALMAP_DEPTH","",SLOT_TYPE_SCALAR,SLOT_OUT},
//canvas item light in
{MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"Color","COLOR.rgb","",SLOT_TYPE_VEC,SLOT_IN},
{MODE_CANVAS_ITEM,SHADER_TYPE_LIGHT,"Alpha","COLOR.a","",SLOT_TYPE_SCALAR,SLOT_IN},
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp
index 05b3fa727e..43c20d211f 100644
--- a/servers/physics/body_sw.cpp
+++ b/servers/physics/body_sw.cpp
@@ -261,6 +261,7 @@ void BodySW::set_state(PhysicsServer::BodyState p_state, const Variant& p_varian
_set_inv_transform(get_transform().inverse());
}
+ wakeup();
} break;
case PhysicsServer::BODY_STATE_LINEAR_VELOCITY: {
@@ -268,11 +269,13 @@ void BodySW::set_state(PhysicsServer::BodyState p_state, const Variant& p_varian
//if (mode==PhysicsServer::BODY_MODE_STATIC)
// break;
linear_velocity=p_variant;
+ wakeup();
} break;
case PhysicsServer::BODY_STATE_ANGULAR_VELOCITY: {
//if (mode!=PhysicsServer::BODY_MODE_RIGID)
// break;
angular_velocity=p_variant;
+ wakeup();
} break;
case PhysicsServer::BODY_STATE_SLEEPING: {
diff --git a/servers/physics/body_sw.h b/servers/physics/body_sw.h
index 63dd3e6762..f15fd9b831 100644
--- a/servers/physics/body_sw.h
+++ b/servers/physics/body_sw.h
@@ -200,6 +200,12 @@ public:
void set_active(bool p_active);
_FORCE_INLINE_ bool is_active() const { return active; }
+ _FORCE_INLINE_ void wakeup() {
+ if ((get_space() && active) || mode==PhysicsServer::BODY_MODE_STATIC || mode==PhysicsServer::BODY_MODE_KINEMATIC)
+ return;
+ set_active(true);
+ }
+
void set_param(PhysicsServer::BodyParameter p_param, float);
float get_param(PhysicsServer::BodyParameter p_param) const;
diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp
index 3d569df2c9..decc379461 100644
--- a/servers/physics/joints/generic_6dof_joint_sw.cpp
+++ b/servers/physics/joints/generic_6dof_joint_sw.cpp
@@ -536,7 +536,7 @@ void Generic6DOFJointSW::set_param(Vector3::Axis p_axis,PhysicsServer::G6DOFJoin
} break;
case PhysicsServer::G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS: {
- m_angularLimits[p_axis].m_limitSoftness;
+ m_angularLimits[p_axis].m_limitSoftness=p_value;
} break;
case PhysicsServer::G6DOF_JOINT_ANGULAR_DAMPING: {
diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp
index 53335f2e19..2b4a137e11 100644
--- a/servers/physics/physics_server_sw.cpp
+++ b/servers/physics/physics_server_sw.cpp
@@ -604,6 +604,7 @@ void PhysicsServerSW::body_set_layer_mask(RID p_body, uint32_t p_mask) {
ERR_FAIL_COND(!body);
body->set_layer_mask(p_mask);
+ body->wakeup();
}
@@ -674,6 +675,7 @@ void PhysicsServerSW::body_set_state(RID p_body, BodyState p_state, const Varian
ERR_FAIL_COND(!body);
body->set_state(p_state,p_variant);
+
};
Variant PhysicsServerSW::body_get_state(RID p_body, BodyState p_state) const {
@@ -691,6 +693,7 @@ void PhysicsServerSW::body_set_applied_force(RID p_body, const Vector3& p_force)
ERR_FAIL_COND(!body);
body->set_applied_force(p_force);
+ body->wakeup();
};
Vector3 PhysicsServerSW::body_get_applied_force(RID p_body) const {
@@ -706,6 +709,7 @@ void PhysicsServerSW::body_set_applied_torque(RID p_body, const Vector3& p_torqu
ERR_FAIL_COND(!body);
body->set_applied_torque(p_torque);
+ body->wakeup();
};
Vector3 PhysicsServerSW::body_get_applied_torque(RID p_body) const {
@@ -722,6 +726,7 @@ void PhysicsServerSW::body_apply_impulse(RID p_body, const Vector3& p_pos, const
ERR_FAIL_COND(!body);
body->apply_impulse(p_pos,p_impulse);
+ body->wakeup();
};
void PhysicsServerSW::body_set_axis_velocity(RID p_body, const Vector3& p_axis_velocity) {
@@ -734,6 +739,7 @@ void PhysicsServerSW::body_set_axis_velocity(RID p_body, const Vector3& p_axis_v
v-=axis*axis.dot(v);
v+=p_axis_velocity;
body->set_linear_velocity(v);
+ body->wakeup();
};
@@ -743,6 +749,7 @@ void PhysicsServerSW::body_set_axis_lock(RID p_body,BodyAxisLock p_lock) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
body->set_axis_lock(p_lock);
+ body->wakeup();
}
@@ -762,6 +769,7 @@ void PhysicsServerSW::body_add_collision_exception(RID p_body, RID p_body_b) {
ERR_FAIL_COND(!body);
body->add_exception(p_body_b);
+ body->wakeup();
};
@@ -771,6 +779,7 @@ void PhysicsServerSW::body_remove_collision_exception(RID p_body, RID p_body_b)
ERR_FAIL_COND(!body);
body->remove_exception(p_body_b);
+ body->wakeup();
};
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index 6b90b904f4..fabfa88ee5 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -997,6 +997,11 @@ DVector<Vector3> ConcavePolygonShapeSW::get_faces() const {
void ConcavePolygonShapeSW::project_range(const Vector3& p_normal, const Transform& p_transform, real_t &r_min, real_t &r_max) const {
int count=vertices.size();
+ if (count==0) {
+ r_min=0;
+ r_max=0;
+ return;
+ }
DVector<Vector3>::Read r=vertices.read();
const Vector3 *vptr=r.ptr();
@@ -1016,6 +1021,9 @@ Vector3 ConcavePolygonShapeSW::get_support(const Vector3& p_normal) const {
int count=vertices.size();
+ if (count==0)
+ return Vector3();
+
DVector<Vector3>::Read r=vertices.read();
const Vector3 *vptr=r.ptr();
@@ -1103,6 +1111,9 @@ void ConcavePolygonShapeSW::_cull_segment(int p_idx,_SegmentCullParams *p_params
bool ConcavePolygonShapeSW::intersect_segment(const Vector3& p_begin,const Vector3& p_end,Vector3 &r_result, Vector3 &r_normal) const {
+ if (faces.size()==0)
+ return false;
+
// unlock data
DVector<Face>::Read fr=faces.read();
DVector<Vector3>::Read vr=vertices.read();
@@ -1171,6 +1182,8 @@ void ConcavePolygonShapeSW::_cull(int p_idx,_CullParams *p_params) const {
void ConcavePolygonShapeSW::cull(const AABB& p_local_aabb,Callback p_callback,void* p_userdata) const {
// make matrix local to concave
+ if (faces.size()==0)
+ return;
AABB local_aabb=p_local_aabb;
diff --git a/servers/physics_2d/area_pair_2d_sw.cpp b/servers/physics_2d/area_pair_2d_sw.cpp
index f73fbb628b..3b1705bd56 100644
--- a/servers/physics_2d/area_pair_2d_sw.cpp
+++ b/servers/physics_2d/area_pair_2d_sw.cpp
@@ -32,7 +32,7 @@
bool AreaPair2DSW::setup(float p_step) {
- bool result = CollisionSolver2DSW::solve(body->get_shape(body_shape),body->get_transform() * body->get_shape_transform(body_shape),Vector2(),area->get_shape(area_shape),area->get_transform() * area->get_shape_transform(area_shape),Vector2(),NULL,this);
+ bool result = area->test_collision_mask(body) && CollisionSolver2DSW::solve(body->get_shape(body_shape),body->get_transform() * body->get_shape_transform(body_shape),Vector2(),area->get_shape(area_shape),area->get_transform() * area->get_shape_transform(area_shape),Vector2(),NULL,this);
if (result!=colliding) {
@@ -102,7 +102,7 @@ AreaPair2DSW::~AreaPair2DSW() {
bool Area2Pair2DSW::setup(float p_step) {
- bool result = CollisionSolver2DSW::solve(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),Vector2(),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),Vector2(),NULL,this);
+ bool result = area_a->test_collision_mask(area_b) && CollisionSolver2DSW::solve(area_a->get_shape(shape_a),area_a->get_transform() * area_a->get_shape_transform(shape_a),Vector2(),area_b->get_shape(shape_b),area_b->get_transform() * area_b->get_shape_transform(shape_b),Vector2(),NULL,this);
if (result!=colliding) {
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index 98dabb4d3c..0ba661b4c4 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -279,6 +279,7 @@ void Body2DSW::set_state(Physics2DServer::BodyState p_state, const Variant& p_va
_set_inv_transform(get_transform().inverse());
}
+ wakeup();
} break;
case Physics2DServer::BODY_STATE_LINEAR_VELOCITY: {
@@ -286,12 +287,14 @@ void Body2DSW::set_state(Physics2DServer::BodyState p_state, const Variant& p_va
//if (mode==Physics2DServer::BODY_MODE_STATIC)
// break;
linear_velocity=p_variant;
+ wakeup();
} break;
case Physics2DServer::BODY_STATE_ANGULAR_VELOCITY: {
//if (mode!=Physics2DServer::BODY_MODE_RIGID)
// break;
angular_velocity=p_variant;
+ wakeup();
} break;
case Physics2DServer::BODY_STATE_SLEEPING: {
@@ -654,6 +657,7 @@ Body2DSW::Body2DSW() : CollisionObject2DSW(TYPE_BODY), active_list(this), inerti
area_linear_damp=0;
contact_count=0;
gravity_scale=1.0;
+ using_one_way_cache=false;
one_way_collision_max_depth=0.1;
still_time=0;
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index 3b07401dd7..e34686f3ac 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -81,6 +81,7 @@ class Body2DSW : public CollisionObject2DSW {
bool active;
bool can_sleep;
bool first_time_kinematic;
+ bool using_one_way_cache;
void _update_inertia();
virtual void _shapes_changed();
Matrix32 new_transform;
@@ -201,6 +202,15 @@ public:
void set_active(bool p_active);
_FORCE_INLINE_ bool is_active() const { return active; }
+ _FORCE_INLINE_ void wakeup() {
+ if ((get_space() && active) || mode==Physics2DServer::BODY_MODE_STATIC || mode==Physics2DServer::BODY_MODE_KINEMATIC)
+ return;
+ set_active(true);
+ }
+
+
+
+
void set_param(Physics2DServer::BodyParameter p_param, float);
float get_param(Physics2DServer::BodyParameter p_param) const;
@@ -220,12 +230,17 @@ public:
_FORCE_INLINE_ void set_continuous_collision_detection_mode(Physics2DServer::CCDMode p_mode) { continuous_cd_mode=p_mode; }
_FORCE_INLINE_ Physics2DServer::CCDMode get_continuous_collision_detection_mode() const { return continuous_cd_mode; }
- void set_one_way_collision_direction(const Vector2& p_dir) { one_way_collision_direction=p_dir; }
+ void set_one_way_collision_direction(const Vector2& p_dir) {
+ one_way_collision_direction=p_dir;
+ using_one_way_cache=one_way_collision_direction!=Vector2();
+ }
Vector2 get_one_way_collision_direction() const { return one_way_collision_direction; }
void set_one_way_collision_max_depth(float p_depth) { one_way_collision_max_depth=p_depth; }
float get_one_way_collision_max_depth() const { return one_way_collision_max_depth; }
+ _FORCE_INLINE_ bool is_using_one_way_collision() const { return using_one_way_cache; }
+
void set_space(Space2DSW *p_space);
void update_inertias();
diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp
index a2402d1473..e8d37d346a 100644
--- a/servers/physics_2d/body_pair_2d_sw.cpp
+++ b/servers/physics_2d/body_pair_2d_sw.cpp
@@ -234,7 +234,7 @@ bool BodyPair2DSW::setup(float p_step) {
//cannot collide
- if ((A->get_layer_mask()&B->get_layer_mask())==0 || A->has_exception(B->get_self()) || B->has_exception(A->get_self()) || (A->get_mode()<=Physics2DServer::BODY_MODE_KINEMATIC && B->get_mode()<=Physics2DServer::BODY_MODE_KINEMATIC && A->get_max_contacts_reported()==0 && B->get_max_contacts_reported()==0)) {
+ if (!A->test_collision_mask(B) || A->has_exception(B->get_self()) || B->has_exception(A->get_self()) || (A->get_mode()<=Physics2DServer::BODY_MODE_KINEMATIC && B->get_mode()<=Physics2DServer::BODY_MODE_KINEMATIC && A->get_max_contacts_reported()==0 && B->get_max_contacts_reported()==0)) {
collided=false;
return false;
}
@@ -265,6 +265,8 @@ bool BodyPair2DSW::setup(float p_step) {
}
//faster to set than to check..
+ bool prev_collided=collided;
+
collided = CollisionSolver2DSW::solve(shape_A_ptr,xform_A,motion_A,shape_B_ptr,xform_B,motion_B,_add_contact,this,&sep_axis);
if (!collided) {
@@ -285,6 +287,57 @@ bool BodyPair2DSW::setup(float p_step) {
}
+ if (!prev_collided) {
+
+ if (A->is_using_one_way_collision()) {
+ Vector2 direction = A->get_one_way_collision_direction();
+ bool valid=false;
+ for(int i=0;i<contact_count;i++) {
+ Contact& c = contacts[i];
+
+ if (c.normal.dot(direction)<0)
+ continue;
+ if (B->get_linear_velocity().dot(direction)<0)
+ continue;
+
+ if (!c.reused) {
+ continue;
+ }
+
+ valid=true;
+ }
+
+ if (!valid) {
+ collided=false;
+ return false;
+ }
+ }
+
+ if (B->is_using_one_way_collision()) {
+ Vector2 direction = B->get_one_way_collision_direction();
+ bool valid=false;
+ for(int i=0;i<contact_count;i++) {
+
+ Contact& c = contacts[i];
+
+ if (c.normal.dot(direction)<0)
+ continue;
+ if (A->get_linear_velocity().dot(direction)<0)
+ continue;
+
+ if (!c.reused) {
+ continue;
+ }
+
+ valid=true;
+ }
+ if (!valid) {
+ collided=false;
+ return false;
+ }
+ }
+ }
+
real_t max_penetration = space->get_contact_max_allowed_penetration();
float bias = 0.3f;
diff --git a/servers/physics_2d/collision_object_2d_sw.cpp b/servers/physics_2d/collision_object_2d_sw.cpp
index 8160f22a31..7c8e223c57 100644
--- a/servers/physics_2d/collision_object_2d_sw.cpp
+++ b/servers/physics_2d/collision_object_2d_sw.cpp
@@ -226,7 +226,7 @@ CollisionObject2DSW::CollisionObject2DSW(Type p_type) {
type=p_type;
space=NULL;
instance_id=0;
- user_mask=0;
+ collision_mask=1;
layer_mask=1;
pickable=true;
}
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index 58dc3e9cd9..f3432060b9 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -65,7 +65,7 @@ private:
Space2DSW *space;
Matrix32 transform;
Matrix32 inv_transform;
- uint32_t user_mask;
+ uint32_t collision_mask;
uint32_t layer_mask;
bool _static;
@@ -117,8 +117,8 @@ public:
_FORCE_INLINE_ bool is_shape_set_as_trigger(int p_idx) const { return shapes[p_idx].trigger; }
- void set_user_mask(uint32_t p_mask) {user_mask=p_mask;}
- _FORCE_INLINE_ uint32_t get_user_mask() const { return user_mask; }
+ void set_collision_mask(uint32_t p_mask) {collision_mask=p_mask;}
+ _FORCE_INLINE_ uint32_t get_collision_mask() const { return collision_mask; }
void set_layer_mask(uint32_t p_mask) {layer_mask=p_mask;}
_FORCE_INLINE_ uint32_t get_layer_mask() const { return layer_mask; }
@@ -133,6 +133,11 @@ public:
void set_pickable(bool p_pickable) { pickable=p_pickable; }
_FORCE_INLINE_ bool is_pickable() const { return pickable; }
+ _FORCE_INLINE_ bool test_collision_mask(CollisionObject2DSW* p_other) const {
+
+ return layer_mask&p_other->collision_mask || p_other->layer_mask&collision_mask;
+ }
+
virtual ~CollisionObject2DSW() {}
};
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index d0a0ff67d7..08d871be69 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -480,6 +480,22 @@ void Physics2DServerSW::area_set_monitorable(RID p_area,bool p_monitorable) {
}
+void Physics2DServerSW::area_set_collision_mask(RID p_area,uint32_t p_mask) {
+
+ Area2DSW *area = area_owner.get(p_area);
+ ERR_FAIL_COND(!area);
+
+ area->set_collision_mask(p_mask);
+}
+
+void Physics2DServerSW::area_set_layer_mask(RID p_area,uint32_t p_mask) {
+
+ Area2DSW *area = area_owner.get(p_area);
+ ERR_FAIL_COND(!area);
+
+ area->set_layer_mask(p_mask);
+}
+
void Physics2DServerSW::area_set_monitor_callback(RID p_area,Object *p_receiver,const StringName& p_method) {
@@ -726,20 +742,20 @@ uint32_t Physics2DServerSW::body_get_layer_mask(RID p_body, uint32_t p_flags) co
};
-void Physics2DServerSW::body_set_user_mask(RID p_body, uint32_t p_flags) {
+void Physics2DServerSW::body_set_collision_mask(RID p_body, uint32_t p_flags) {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_user_mask(p_flags);
+ body->set_collision_mask(p_flags);
};
-uint32_t Physics2DServerSW::body_get_user_mask(RID p_body, uint32_t p_flags) const {
+uint32_t Physics2DServerSW::body_get_collision_mask(RID p_body, uint32_t p_flags) const {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND_V(!body,0);
- return body->get_user_mask();
+ return body->get_collision_mask();
};
void Physics2DServerSW::body_set_param(RID p_body, BodyParameter p_param, float p_value) {
@@ -783,6 +799,8 @@ void Physics2DServerSW::body_set_applied_force(RID p_body, const Vector2& p_forc
ERR_FAIL_COND(!body);
body->set_applied_force(p_force);
+ body->wakeup();
+
};
Vector2 Physics2DServerSW::body_get_applied_force(RID p_body) const {
@@ -798,6 +816,7 @@ void Physics2DServerSW::body_set_applied_torque(RID p_body, float p_torque) {
ERR_FAIL_COND(!body);
body->set_applied_torque(p_torque);
+ body->wakeup();
};
float Physics2DServerSW::body_get_applied_torque(RID p_body) const {
@@ -814,6 +833,7 @@ void Physics2DServerSW::body_apply_impulse(RID p_body, const Vector2& p_pos, con
ERR_FAIL_COND(!body);
body->apply_impulse(p_pos,p_impulse);
+ body->wakeup();
};
void Physics2DServerSW::body_set_axis_velocity(RID p_body, const Vector2& p_axis_velocity) {
@@ -826,7 +846,7 @@ void Physics2DServerSW::body_set_axis_velocity(RID p_body, const Vector2& p_axis
v-=axis*axis.dot(v);
v+=p_axis_velocity;
body->set_linear_velocity(v);
-
+ body->wakeup();
};
void Physics2DServerSW::body_add_collision_exception(RID p_body, RID p_body_b) {
@@ -835,7 +855,7 @@ void Physics2DServerSW::body_add_collision_exception(RID p_body, RID p_body_b) {
ERR_FAIL_COND(!body);
body->add_exception(p_body_b);
-
+ body->wakeup();
};
void Physics2DServerSW::body_remove_collision_exception(RID p_body, RID p_body_b) {
@@ -844,6 +864,7 @@ void Physics2DServerSW::body_remove_collision_exception(RID p_body, RID p_body_b
ERR_FAIL_COND(!body);
body->remove_exception(p_body_b);
+ body->wakeup();
};
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index 50675cbd09..341df2fdc9 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -134,6 +134,8 @@ public:
virtual Variant area_get_param(RID p_parea,AreaParameter p_param) const;
virtual Matrix32 area_get_transform(RID p_area) const;
virtual void area_set_monitorable(RID p_area,bool p_monitorable);
+ virtual void area_set_collision_mask(RID p_area,uint32_t p_mask);
+ virtual void area_set_layer_mask(RID p_area,uint32_t p_mask);
virtual void area_set_monitor_callback(RID p_area,Object *p_receiver,const StringName& p_method);
virtual void area_set_area_monitor_callback(RID p_area,Object *p_receiver,const StringName& p_method);
@@ -179,8 +181,8 @@ public:
virtual void body_set_layer_mask(RID p_body, uint32_t p_mask);
virtual uint32_t body_get_layer_mask(RID p_body, uint32_t p_mask) const;
- virtual void body_set_user_mask(RID p_body, uint32_t p_mask);
- virtual uint32_t body_get_user_mask(RID p_body, uint32_t p_mask) const;
+ virtual void body_set_collision_mask(RID p_body, uint32_t p_mask);
+ virtual uint32_t body_get_collision_mask(RID p_body, uint32_t p_mask) const;
virtual void body_set_param(RID p_body, BodyParameter p_param, float p_value);
virtual float body_get_param(RID p_body, BodyParameter p_param) const;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 9a1b977bda..40e7b19f6f 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -596,7 +596,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body,const Vector2&p_motion,float p
keep=false;
else if (intersection_query_results[i]->get_type()==CollisionObject2DSW::TYPE_AREA)
keep=false;
- else if ((static_cast<Body2DSW*>(intersection_query_results[i])->get_layer_mask()&p_body->get_layer_mask())==0)
+ else if ((static_cast<Body2DSW*>(intersection_query_results[i])->test_collision_mask(p_body))==0)
keep=false;
else if (static_cast<Body2DSW*>(intersection_query_results[i])->has_exception(p_body->get_self()) || p_body->has_exception(intersection_query_results[i]->get_self()))
keep=false;
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 16a15617ff..279ad0d742 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -285,7 +285,7 @@ Array Physics2DDirectSpaceState::_cast_motion(const Ref<Physics2DShapeQueryParam
Array ret(true);
ret.resize(2);
ret[0]=closest_safe;
- ret[0]=closest_unsafe;
+ ret[1]=closest_unsafe;
return ret;
}
@@ -536,6 +536,8 @@ void Physics2DServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("area_remove_shape","area","shape_idx"),&Physics2DServer::area_remove_shape);
ObjectTypeDB::bind_method(_MD("area_clear_shapes","area"),&Physics2DServer::area_clear_shapes);
+ ObjectTypeDB::bind_method(_MD("area_set_layer_mask","area","mask"),&Physics2DServer::area_set_layer_mask);
+ ObjectTypeDB::bind_method(_MD("area_set_collision_mask","area","mask"),&Physics2DServer::area_set_collision_mask);
ObjectTypeDB::bind_method(_MD("area_set_param","area","param","value"),&Physics2DServer::area_set_param);
ObjectTypeDB::bind_method(_MD("area_set_transform","area","transform"),&Physics2DServer::area_set_transform);
@@ -584,8 +586,8 @@ void Physics2DServer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("body_set_layer_mask","body","mask"),&Physics2DServer::body_set_layer_mask);
ObjectTypeDB::bind_method(_MD("body_get_layer_mask","body"),&Physics2DServer::body_get_layer_mask);
- ObjectTypeDB::bind_method(_MD("body_set_user_mask","body","mask"),&Physics2DServer::body_set_user_mask);
- ObjectTypeDB::bind_method(_MD("body_get_user_mask","body"),&Physics2DServer::body_get_user_mask);
+ ObjectTypeDB::bind_method(_MD("body_set_collision_mask","body","mask"),&Physics2DServer::body_set_collision_mask);
+ ObjectTypeDB::bind_method(_MD("body_get_collision_mask","body"),&Physics2DServer::body_get_collision_mask);
ObjectTypeDB::bind_method(_MD("body_set_param","body","param","value"),&Physics2DServer::body_set_param);
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index 306144c2ba..5411228c0f 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -347,6 +347,9 @@ public:
virtual Variant area_get_param(RID p_parea,AreaParameter p_param) const=0;
virtual Matrix32 area_get_transform(RID p_area) const=0;
+ virtual void area_set_collision_mask(RID p_area,uint32_t p_mask)=0;
+ virtual void area_set_layer_mask(RID p_area,uint32_t p_mask)=0;
+
virtual void area_set_monitorable(RID p_area,bool p_monitorable)=0;
virtual void area_set_pickable(RID p_area,bool p_pickable)=0;
@@ -404,8 +407,8 @@ public:
virtual void body_set_layer_mask(RID p_body, uint32_t p_mask)=0;
virtual uint32_t body_get_layer_mask(RID p_body, uint32_t p_mask) const=0;
- virtual void body_set_user_mask(RID p_body, uint32_t p_mask)=0;
- virtual uint32_t body_get_user_mask(RID p_body, uint32_t p_mask) const=0;
+ virtual void body_set_collision_mask(RID p_body, uint32_t p_mask)=0;
+ virtual uint32_t body_get_collision_mask(RID p_body, uint32_t p_mask) const=0;
// common body variables
enum BodyParameter {
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index a5c7d35490..4feb1b5269 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -221,7 +221,7 @@ PhysicsShapeQueryParameters::PhysicsShapeQueryParameters() {
/////////////////////////////////////
/*
-Variant PhysicsDirectSpaceState::_intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max,const Vector<RID>& p_exclude,uint32_t p_user_mask) {
+Variant PhysicsDirectSpaceState::_intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max,const Vector<RID>& p_exclude,uint32_t p_collision_mask) {
@@ -303,7 +303,7 @@ Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameter
Array ret(true);
ret.resize(2);
ret[0]=closest_safe;
- ret[0]=closest_unsafe;
+ ret[1]=closest_unsafe;
return ret;
}
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 97a1d34e7b..ffb462af22 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -131,8 +131,8 @@ class PhysicsDirectSpaceState : public Object {
OBJ_TYPE( PhysicsDirectSpaceState, Object );
-// Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_user_mask=0);
-// Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_user_mask=0);
+// Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
+// Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
public:
enum ObjectTypeMask {
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 5dd2c2e0be..77b7ddbc93 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -118,13 +118,17 @@ ShaderLanguage::Token ShaderLanguage::read_token(const CharType* p_text,int p_le
while(true) {
- if (GETCHAR(r_chars+1)=='0')
+ if (GETCHAR(r_chars+1)==0) {
+ r_chars+=1;
break;
- if (GETCHAR(r_chars+1)=='*' && GETCHAR(r_chars+2)=='/')
+ } if (GETCHAR(r_chars+1)=='*' && GETCHAR(r_chars+2)=='/') {
+ r_chars+=3;
break;
- if (GETCHAR(r_chars+1)=='\n')
+ } if (GETCHAR(r_chars+1)=='\n') {
r_line++;
- r_chars++;
+ }
+
+ r_chars++;
}
return Token();
@@ -1141,6 +1145,8 @@ const ShaderLanguage::BuiltinsDef ShaderLanguage::ci_fragment_builtins_defs[]={
{ "SRC_COLOR", TYPE_VEC4},
{ "POSITION", TYPE_VEC4},
{ "NORMAL", TYPE_VEC3},
+ { "NORMALMAP", TYPE_VEC3},
+ { "NORMALMAP_DEPTH", TYPE_FLOAT},
{ "UV", TYPE_VEC2},
{ "COLOR", TYPE_VEC4},
{ "TEXTURE", TYPE_TEXTURE},
@@ -1273,7 +1279,7 @@ ShaderLanguage::Node* ShaderLanguage::validate_function_call(Parser&parser, Oper
if (p_func->op==OP_CONSTRUCT && all_const) {
- bool all_const=false;
+
Vector<float> cdata;
for(int i=0;i<argcount;i++) {
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 64ddc12513..6556f8bc42 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -7047,17 +7047,20 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_
for(Set<Rasterizer::CanvasLight*>::Element *F=E->get().canvas->lights.front();F;F=F->next()) {
+
Rasterizer::CanvasLight* cl=F->get();
if (cl->enabled && cl->texture.is_valid()) {
//not super efficient..
Size2 tsize(rasterizer->texture_get_width(cl->texture),rasterizer->texture_get_height(cl->texture));
tsize*=cl->scale;
+
Vector2 offset=tsize/2.0;
cl->rect_cache=Rect2(-offset+cl->texture_offset,tsize);
cl->xform_cache=xf * cl->xform;
if (clip_rect.intersects_transformed(cl->xform_cache,cl->rect_cache)) {
+
cl->filter_next_ptr=lights;
lights=cl;
cl->texture_cache=NULL;
@@ -7067,6 +7070,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_
cl->light_shader_xform = (cl->xform_cache * scale).affine_inverse();
cl->light_shader_pos=cl->xform_cache[2];
if (cl->shadow_buffer.is_valid()) {
+
cl->shadows_next_ptr=lights_with_shadow;
if (lights_with_shadow==NULL) {
shadow_rect = cl->xform_cache.xform(cl->rect_cache);
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp
index 11ea9004d6..b7ec5c9d04 100644
--- a/tools/collada/collada.cpp
+++ b/tools/collada/collada.cpp
@@ -979,7 +979,7 @@ void Collada::_parse_curve_geometry(XMLParser& parser,String p_id,String p_name)
current_source=id;
COLLADA_PRINT("source data: "+id);
- } else if (section=="float_array" || section=="array" || section=="float_array") {
+ } else if (section=="float_array" || section=="array") {
// create a new array and read it.
if (curvedata.sources.has(current_source)) {
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index 8d666f0508..39eec4e69b 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -1375,7 +1375,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
if (p_input.is_action("ui_up"))
selected_track--;
if (v_scroll->is_visible() && p_input.is_action("ui_page_up"))
- selected_track=selected_track--;;
+ selected_track--;;
if (selected_track<0)
selected_track=0;
@@ -2538,7 +2538,7 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
insert_confirm->set_text("Create "+itos(insert_data.size())+" NEW tracks and insert keys?");
insert_confirm->get_ok()->set_text("Create");
- insert_confirm->popup_centered(Size2(300,100));
+ insert_confirm->popup_centered_minsize();
insert_query=true;
} else {
call_deferred("_insert_delay");
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 6d992960f3..a6625d7204 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1560,7 +1560,9 @@ void EditorNode::_cleanup_scene() {
void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
- current_option=(MenuOptions)p_option;
+ //print_line("option "+itos(p_option)+" confirm "+itos(p_confirmed));
+ if (!p_confirmed) //this may be a hack..
+ current_option=(MenuOptions)p_option;
switch( p_option ) {
@@ -1931,7 +1933,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
case FILE_QUIT: {
+
if (!p_confirmed) {
+
confirmation->get_ok()->set_text("Quit");
//confirmation->get_cancel()->show();
confirmation->set_text("Exit the Editor?");
@@ -1939,6 +1943,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
break;
}
+
_menu_option_confirm(RUN_STOP,true);
get_tree()->quit();
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index 49b8af67f4..d1fe10df03 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -719,8 +719,8 @@ void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,D
xm_sample=CLAMP(in[i]*32767.0,-32768,32767);
- if (xm_sample==32767 || xm_sample==-32768)
- printf("clippy!\n",xm_sample);
+ //if (xm_sample==32767 || xm_sample==-32768)
+ // printf("clippy!\n",xm_sample);
}
// xm_sample=xm_sample+xm_prev;
diff --git a/version.py b/version.py
index 46490c48f4..577bc73208 100644
--- a/version.py
+++ b/version.py
@@ -2,6 +2,6 @@ short_name="godot"
name="Godot Engine"
major=1
minor=1
-status="beta1"
+status="rc1"