diff options
author | hurikhan <m4r10.5ch14ck@gmail.com> | 2015-01-14 13:31:16 +0800 |
---|---|---|
committer | hurikhan <m4r10.5ch14ck@gmail.com> | 2015-01-14 13:31:16 +0800 |
commit | 8a30feebbe676ab922515b58d0deec2f95aa104c (patch) | |
tree | 55a208d7835022f6b876b4e45d5a482fbd4bd83f | |
parent | 2203ba5fe3f7cdca078dd557ec532b7f335d3670 (diff) | |
parent | 9012cd408e240d6039120e56fdd47a0983890993 (diff) |
Merge remote-tracking branch 'upstream/master' into x11-window-management
Conflicts:
platform/x11/detect.py
34 files changed, 1033 insertions, 78 deletions
diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp index f7917b7418..1047d7eba5 100644 --- a/core/object_type_db.cpp +++ b/core/object_type_db.cpp @@ -847,8 +847,15 @@ void ObjectTypeDB::set_type_enabled(StringName p_type,bool p_enable) { bool ObjectTypeDB::is_type_enabled(StringName p_type) { - ERR_FAIL_COND_V(!types.has(p_type),false); - return !types[p_type].disabled; + TypeInfo *ti=types.getptr(p_type); + if (!ti || !ti->creation_func) { + if (compat_types.has(p_type)) { + ti=types.getptr(compat_types[p_type]); + } + } + + ERR_FAIL_COND_V(!ti,false); + return !ti->disabled; } StringName ObjectTypeDB::get_category(const StringName& p_node) { diff --git a/demos/2d/kinematic_char/colworld.scn b/demos/2d/kinematic_char/colworld.scn Binary files differindex b3a0a1f168..7b79a1d887 100644 --- a/demos/2d/kinematic_char/colworld.scn +++ b/demos/2d/kinematic_char/colworld.scn diff --git a/demos/2d/kinematic_char/player.gd b/demos/2d/kinematic_char/player.gd index 9cff0269e8..e8b3cc8d00 100644 --- a/demos/2d/kinematic_char/player.gd +++ b/demos/2d/kinematic_char/player.gd @@ -15,6 +15,7 @@ const GRAVITY = 500.0 #consider "floor". const FLOOR_ANGLE_TOLERANCE = 40 const WALK_FORCE = 600 +const WALK_MIN_SPEED=10 const WALK_MAX_SPEED = 200 const STOP_FORCE = 1300 const JUMP_SPEED = 200 @@ -40,12 +41,12 @@ func _fixed_process(delta): var stop=true if (walk_left): - if (velocity.x<=0 and velocity.x > -WALK_MAX_SPEED): + if (velocity.x<=WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED): force.x-=WALK_FORCE stop=false elif (walk_right): - if (velocity.x>=0 and velocity.x < WALK_MAX_SPEED): + if (velocity.x>=-WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED): force.x+=WALK_FORCE stop=false diff --git a/demos/2d/kinematic_char/player.scn b/demos/2d/kinematic_char/player.scn Binary files differindex 126b332184..5809c0e98a 100644 --- a/demos/2d/kinematic_char/player.scn +++ b/demos/2d/kinematic_char/player.scn diff --git a/demos/2d/platformer/stage.xml b/demos/2d/platformer/stage.xml index 78d0f9ae2c..e2943d8fcf 100644 --- a/demos/2d/platformer/stage.xml +++ b/demos/2d/platformer/stage.xml @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> -<resource_file type="PackedScene" subresource_count="9" version="1.0" version_name="Godot Engine v1.0.3917-beta1"> +<resource_file type="PackedScene" subresource_count="9" version="1.0" version_name="Godot Engine v1.0.stable.custom_build"> <ext_resource path="res://tileset.xml" type="TileSet"></ext_resource> <ext_resource path="res://music.ogg" type="AudioStream"></ext_resource> - <ext_resource path="res://coin.xml" type="PackedScene"></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://seesaw.xml" type="PackedScene"></ext_resource> <ext_resource path="res://moving_platform.xml" type="PackedScene"></ext_resource> <ext_resource path="res://enemy.xml" type="PackedScene"></ext_resource> - <ext_resource path="res://parallax_bg.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> <main_resource> <dictionary name="_bundled" shared="false"> <string> "names" </string> - <string_array len="122"> + <string_array len="125"> <string> "stage" </string> <string> "Node" </string> <string> "_import_path" </string> @@ -25,13 +25,16 @@ <string> "transform/pos" </string> <string> "transform/rot" </string> <string> "transform/scale" </string> - <string> "cell_size" </string> - <string> "quadrant_size" </string> + <string> "mode" </string> <string> "tile_set" </string> - <string> "tile_data" </string> + <string> "cell/size" </string> + <string> "cell/quadrant_size" </string> + <string> "cell/custom_transform" </string> + <string> "cell/half_offset" </string> <string> "collision/friction" </string> <string> "collision/bounce" </string> <string> "collision/layers" </string> + <string> "tile_data" </string> <string> "coins" </string> <string> "coin" </string> <string> "Area2D" </string> @@ -142,7 +145,7 @@ <string> "node_count" </string> <int> 66 </int> <string> "variants" </string> - <array len="96" shared="false"> + <array len="103" shared="false"> <node_path> "" </node_path> <dictionary shared="false"> <string> "__editor_plugin_states__" </string> @@ -174,6 +177,8 @@ </dictionary> <string> "3D" </string> <dictionary shared="false"> + <string> "deflight_rot_y" </string> + <real> 0.628319 </real> <string> "zfar" </string> <real> 500 </real> <string> "fov" </string> @@ -187,10 +192,12 @@ <real> 0 </real> <string> "y_rot" </string> <real> 0 </real> - <string> "use_orthogonal" </string> - <bool> False </bool> + <string> "listener" </string> + <bool> True </bool> <string> "use_environment" </string> <bool> False </bool> + <string> "use_orthogonal" </string> + <bool> False </bool> <string> "pos" </string> <vector3> 0, 0, 0 </vector3> </dictionary> @@ -201,10 +208,12 @@ <real> 0 </real> <string> "y_rot" </string> <real> 0 </real> - <string> "use_orthogonal" </string> + <string> "listener" </string> <bool> False </bool> <string> "use_environment" </string> <bool> False </bool> + <string> "use_orthogonal" </string> + <bool> False </bool> <string> "pos" </string> <vector3> 0, 0, 0 </vector3> </dictionary> @@ -215,10 +224,12 @@ <real> 0 </real> <string> "y_rot" </string> <real> 0 </real> - <string> "use_orthogonal" </string> + <string> "listener" </string> <bool> False </bool> <string> "use_environment" </string> <bool> False </bool> + <string> "use_orthogonal" </string> + <bool> False </bool> <string> "pos" </string> <vector3> 0, 0, 0 </vector3> </dictionary> @@ -229,10 +240,12 @@ <real> 0 </real> <string> "y_rot" </string> <real> 0 </real> - <string> "use_orthogonal" </string> + <string> "listener" </string> <bool> False </bool> <string> "use_environment" </string> <bool> False </bool> + <string> "use_orthogonal" </string> + <bool> False </bool> <string> "pos" </string> <vector3> 0, 0, 0 </vector3> </dictionary> @@ -241,12 +254,18 @@ <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> "znear" </string> <real> 0.1 </real> + <string> "default_srgb" </string> + <bool> False </bool> + <string> "deflight_rot_x" </string> + <real> 0.942478 </real> </dictionary> </dictionary> <string> "__editor_run_settings__" </string> @@ -257,7 +276,7 @@ <int> 0 </int> </dictionary> <string> "__editor_plugin_screen__" </string> - <string> "2D" </string> + <string> "Script" </string> </dictionary> <bool> True </bool> <real> 1 </real> @@ -265,11 +284,14 @@ <vector2> 0, 0 </vector2> <real> 0 </real> <vector2> 1, 1 </vector2> - <int> 64 </int> - <int> 16 </int> + <int> 0 </int> <resource resource_type="TileSet" path="res://tileset.xml"> </resource> - <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, 536870918, 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> + <vector2> 64, 64 </vector2> + <int> 16 </int> + <matrix32> 1, 0, 0, 1, 0, 0 </matrix32> + <int> 2 </int> <int> 1 </int> + <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, 536870918, 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> @@ -280,6 +302,116 @@ </dictionary> <resource resource_type="PackedScene" path="res://coin.xml"> </resource> <vector2> 672, 1120 </vector2> + <dictionary shared="false"> + <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> "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> "fov" </string> + <real> 45 </real> + <string> "zfar" </string> + <real> 500 </real> + <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> + <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> "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> "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> "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> "znear" </string> + <real> 0.1 </real> + <string> "show_origin" </string> + <bool> True </bool> + </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> + <string> "__editor_plugin_screen__" </string> + <string> "2D" </string> + </dictionary> <vector2> 704, 1120 </vector2> <vector2> 736, 1120 </vector2> <vector2> 1120, 992 </vector2> @@ -323,8 +455,247 @@ <vector2> 4172.75, 541.058 </vector2> <resource resource_type="PackedScene" path="res://player.xml"> </resource> <vector2> 251.684, 1045.6 </vector2> + <dictionary shared="false"> + <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> "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> + </dictionary> + <string> "3D" </string> + <dictionary shared="false"> + <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> + <string> "listener" </string> + <bool> True </bool> + <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> + <string> "listener" </string> + <bool> False </bool> + <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> + <string> "listener" </string> + <bool> False </bool> + <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> + <string> "listener" </string> + <bool> False </bool> + <string> "use_environment" </string> + <bool> False </bool> + <string> "use_orthogonal" </string> + <bool> False </bool> + <string> "pos" </string> + <vector3> 0, 0, 0 </vector3> + </dictionary> + </array> + <string> "zfar" </string> + <real> 500 </real> + <string> "deflight_rot_y" </string> + <real> 0.628319 </real> + <string> "fov" </string> + <real> 45 </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> "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> + <dictionary shared="false"> + <string> "custom_args" </string> + <string> "-l $scene" </string> + <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> + <dictionary shared="false"> + <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> + <bool> False </bool> + <string> "zoom" </string> + <real> 1.360373 </real> + <string> "ofs" </string> + <vector2> -210.652, -172.81 </vector2> + </dictionary> + <string> "3D" </string> + <dictionary shared="false"> + <string> "fov" </string> + <real> 400 </real> + <string> "zfar" </string> + <real> 500 </real> + <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> + <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> "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> "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> "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> "znear" </string> + <real> 0.1 </real> + <string> "show_origin" </string> + <bool> True </bool> + </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> + <string> "__editor_plugin_screen__" </string> + <string> "2D" </string> + </dictionary> <vector2> 0, 140 </vector2> <real> 5 </real> <vector2> 624.824, 545.544 </vector2> @@ -334,10 +705,217 @@ <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_states__" </string> + <dictionary shared="false"> + <string> "2D" </string> + <dictionary shared="false"> + <string> "pixel_snap" </string> + <bool> False </bool> + <string> "zoom" </string> + <real> 2.050547 </real> + <string> "ofs" </string> + <vector2> -116.979, -109.897 </vector2> + </dictionary> + <string> "3D" </string> + <dictionary shared="false"> + <string> "fov" </string> + <real> 400 </real> + <string> "zfar" </string> + <real> 500 </real> + <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> + <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> "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> "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> "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> "znear" </string> + <real> 0.1 </real> + <string> "show_origin" </string> + <bool> True </bool> + </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> + <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_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> "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> "fov" </string> + <real> 45 </real> + <string> "zfar" </string> + <real> 500 </real> + <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> + <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> "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> "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> "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> "znear" </string> + <real> 0.1 </real> + <string> "show_origin" </string> + <bool> True </bool> + </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> + <string> "__editor_plugin_screen__" </string> + <string> "2D" </string> + </dictionary> <vector2> 707.665, 1225.05 </vector2> <vector2> 1125.21, 1053.06 </vector2> <vector2> 1292.11, 1059.24 </vector2> @@ -349,19 +927,78 @@ <vector2> 3546.2, 1356.19 </vector2> <vector2> 2406.63, 815.115 </vector2> <resource resource_type="PackedScene" path="res://parallax_bg.xml"> </resource> + <dictionary shared="false"> + <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> + </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> "show_grid" </string> + <bool> True </bool> + <string> "show_origin" </string> + <bool> True </bool> + <string> "pos" </string> + <vector3> 0, 0, 0 </vector3> + </dictionary> + <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> + <string> "__editor_plugin_screen__" </string> + <string> "2D" </string> + </dictionary> <real> 12 </real> <real> -202 </real> <real> 358 </real> <real> -10 </real> - <int> 2 </int> <real> 7 </real> <real> 14.769231 </real> - <string> "This is a simple demo on how to make a platformer game with Godot.This version uses physics and the 2D physics engine for motion and collision.The demo also shows the benefits of using the scene system, where coins,enemies and the player are edited separatedly and instanced in the stage.To edit the base tiles for the tileset, open the tileset_edit.xml file and follow instructions." </string> - <int> 0 </int> + <string> "This is a simple demo on how to make a platformer game with Godot."This version uses physics and the 2D physics engine for motion and collision.""The demo also shows the benefits of using the scene system, where coins,"enemies and the player are edited separatedly and instanced in the stage.""To edit the base tiles for the tileset, open the tileset_edit.xml file and follow "instructions."" </string> <real> -1 </real> </array> <string> "nodes" </string> - <int_array len="708"> -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 16, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 9, 15, 10, 16, 11, 17, 3, 18, 6, 19, 12, 3, 13, 0, 0, 0, 1, 20, -1, 2, 2, 0, 3, 14, 0, 2, 0, 22, 21, 15, 1, 10, 16, 0, 2, 0, 22, 23, 15, 1, 10, 17, 0, 2, 0, 22, 24, 15, 1, 10, 18, 0, 2, 0, 22, 25, 15, 1, 10, 19, 0, 2, 0, 22, 26, 15, 1, 10, 20, 0, 2, 0, 22, 27, 15, 1, 10, 21, 0, 2, 0, 22, 28, 15, 1, 10, 22, 0, 2, 0, 22, 29, 15, 1, 10, 23, 0, 2, 0, 22, 30, 15, 1, 10, 24, 0, 2, 0, 22, 31, 15, 1, 10, 25, 0, 2, 0, 22, 32, 15, 1, 10, 26, 0, 2, 0, 22, 33, 15, 1, 10, 27, 0, 2, 0, 22, 34, 15, 1, 10, 28, 0, 2, 0, 22, 35, 15, 1, 10, 29, 0, 2, 0, 22, 36, 15, 1, 10, 30, 0, 2, 0, 22, 37, 15, 1, 10, 31, 0, 2, 0, 22, 38, 15, 1, 10, 32, 0, 2, 0, 22, 39, 15, 1, 10, 33, 0, 2, 0, 22, 40, 15, 1, 10, 34, 0, 2, 0, 22, 41, 15, 1, 10, 35, 0, 2, 0, 22, 42, 15, 1, 10, 36, 0, 2, 0, 22, 43, 15, 1, 10, 37, 0, 2, 0, 22, 44, 15, 1, 10, 38, 0, 2, 0, 22, 45, 15, 1, 10, 39, 0, 2, 0, 22, 46, 15, 1, 10, 40, 0, 2, 0, 22, 47, 15, 1, 10, 41, 0, 2, 0, 22, 48, 15, 1, 10, 42, 0, 2, 0, 22, 49, 15, 1, 10, 43, 0, 2, 0, 22, 50, 15, 1, 10, 44, 0, 2, 0, 22, 51, 15, 1, 10, 45, 0, 2, 0, 22, 52, 15, 1, 10, 46, 0, 2, 0, 22, 53, 15, 1, 10, 47, 0, 2, 0, 22, 54, 15, 1, 10, 48, 0, 2, 0, 22, 55, 15, 1, 10, 49, 0, 2, 0, 22, 56, 15, 1, 10, 50, 0, 2, 0, 22, 57, 15, 1, 10, 51, 0, 2, 0, 22, 58, 15, 1, 10, 52, 0, 2, 0, 22, 59, 15, 1, 10, 53, 0, 2, 0, 22, 60, 15, 1, 10, 54, 0, 2, 0, 22, 61, 15, 1, 10, 55, 0, 2, 0, 22, 62, 15, 1, 10, 56, 0, 2, 0, 22, 63, 15, 1, 10, 57, 0, 0, 0, 65, 64, 58, 1, 10, 59, 0, 0, 0, 1, 66, -1, 1, 2, 0, 0, 46, 0, 68, 67, 60, 3, 10, 61, 69, 62, 70, 63, 0, 46, 0, 68, 71, 60, 3, 10, 64, 69, 65, 70, 66, 0, 46, 0, 68, 72, 60, 3, 10, 67, 69, 68, 70, 66, 0, 46, 0, 68, 73, 69, 1, 10, 70, 0, 0, 0, 75, 74, -1, 7, 2, 0, 76, 71, 77, 4, 78, 2, 79, 72, 80, 2, 81, 4, 0, 0, 0, 1, 82, -1, 1, 2, 0, 0, 52, 0, 65, 83, 73, 1, 10, 74, 0, 52, 0, 65, 84, 73, 1, 10, 75, 0, 52, 0, 65, 85, 73, 1, 10, 76, 0, 52, 0, 65, 86, 73, 1, 10, 77, 0, 52, 0, 65, 87, 73, 1, 10, 78, 0, 52, 0, 65, 88, 73, 1, 10, 79, 0, 52, 0, 65, 89, 73, 1, 10, 80, 0, 52, 0, 65, 90, 73, 1, 10, 81, 0, 52, 0, 65, 91, 73, 1, 10, 82, 0, 52, 0, 65, 92, 73, 1, 10, 83, 0, 52, 0, 65, 93, 73, 1, 10, 84, 0, 0, 0, 95, 94, 85, 0, 0, 0, 0, 96, 96, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 97, 86, 98, 87, 99, 88, 100, 89, 101, 0, 102, 0, 103, 0, 104, 0, 105, 2, 106, 2, 107, 90, 108, 3, 109, 6, 110, 91, 111, 3, 112, 92, 113, 6, 114, 4, 115, 4, 116, 93, 117, 94, 118, 94, 119, 2, 120, 4, 121, 95, 0 </int_array> + <int_array len="950"> -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 19, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 9, 15, 10, 16, 11, 17, 12, 18, 13, 19, 3, 20, 6, 21, 14, 22, 15, 3, 16, 0, 0, 0, 1, 23, -1, 2, 2, 0, 3, 17, 0, 2, 0, 25, 24, 18, 3, 2, 0, 10, 19, 3, 20, 0, 2, 0, 25, 26, 18, 3, 2, 0, 10, 21, 3, 20, 0, 2, 0, 25, 27, 18, 3, 2, 0, 10, 22, 3, 20, 0, 2, 0, 25, 28, 18, 3, 2, 0, 10, 23, 3, 20, 0, 2, 0, 25, 29, 18, 3, 2, 0, 10, 24, 3, 20, 0, 2, 0, 25, 30, 18, 3, 2, 0, 10, 25, 3, 20, 0, 2, 0, 25, 31, 18, 3, 2, 0, 10, 26, 3, 20, 0, 2, 0, 25, 32, 18, 3, 2, 0, 10, 27, 3, 20, 0, 2, 0, 25, 33, 18, 3, 2, 0, 10, 28, 3, 20, 0, 2, 0, 25, 34, 18, 3, 2, 0, 10, 29, 3, 20, 0, 2, 0, 25, 35, 18, 3, 2, 0, 10, 30, 3, 20, 0, 2, 0, 25, 36, 18, 3, 2, 0, 10, 31, 3, 20, 0, 2, 0, 25, 37, 18, 3, 2, 0, 10, 32, 3, 20, 0, 2, 0, 25, 38, 18, 3, 2, 0, 10, 33, 3, 20, 0, 2, 0, 25, 39, 18, 3, 2, 0, 10, 34, 3, 20, 0, 2, 0, 25, 40, 18, 3, 2, 0, 10, 35, 3, 20, 0, 2, 0, 25, 41, 18, 3, 2, 0, 10, 36, 3, 20, 0, 2, 0, 25, 42, 18, 3, 2, 0, 10, 37, 3, 20, 0, 2, 0, 25, 43, 18, 3, 2, 0, 10, 38, 3, 20, 0, 2, 0, 25, 44, 18, 3, 2, 0, 10, 39, 3, 20, 0, 2, 0, 25, 45, 18, 3, 2, 0, 10, 40, 3, 20, 0, 2, 0, 25, 46, 18, 3, 2, 0, 10, 41, 3, 20, 0, 2, 0, 25, 47, 18, 3, 2, 0, 10, 42, 3, 20, 0, 2, 0, 25, 48, 18, 3, 2, 0, 10, 43, 3, 20, 0, 2, 0, 25, 49, 18, 3, 2, 0, 10, 44, 3, 20, 0, 2, 0, 25, 50, 18, 3, 2, 0, 10, 45, 3, 20, 0, 2, 0, 25, 51, 18, 3, 2, 0, 10, 46, 3, 20, 0, 2, 0, 25, 52, 18, 3, 2, 0, 10, 47, 3, 20, 0, 2, 0, 25, 53, 18, 3, 2, 0, 10, 48, 3, 20, 0, 2, 0, 25, 54, 18, 3, 2, 0, 10, 49, 3, 20, 0, 2, 0, 25, 55, 18, 3, 2, 0, 10, 50, 3, 20, 0, 2, 0, 25, 56, 18, 3, 2, 0, 10, 51, 3, 20, 0, 2, 0, 25, 57, 18, 3, 2, 0, 10, 52, 3, 20, 0, 2, 0, 25, 58, 18, 3, 2, 0, 10, 53, 3, 20, 0, 2, 0, 25, 59, 18, 3, 2, 0, 10, 54, 3, 20, 0, 2, 0, 25, 60, 18, 3, 2, 0, 10, 55, 3, 20, 0, 2, 0, 25, 61, 18, 3, 2, 0, 10, 56, 3, 20, 0, 2, 0, 25, 62, 18, 3, 2, 0, 10, 57, 3, 20, 0, 2, 0, 25, 63, 18, 3, 2, 0, 10, 58, 3, 20, 0, 2, 0, 25, 64, 18, 3, 2, 0, 10, 59, 3, 20, 0, 2, 0, 25, 65, 18, 3, 2, 0, 10, 60, 3, 20, 0, 2, 0, 25, 66, 18, 3, 2, 0, 10, 61, 3, 20, 0, 0, 0, 68, 67, 62, 3, 2, 0, 10, 63, 3, 64, 0, 0, 0, 1, 69, -1, 1, 2, 0, 0, 46, 0, 71, 70, 65, 5, 2, 0, 10, 66, 3, 67, 72, 68, 73, 69, 0, 46, 0, 71, 74, 65, 5, 2, 0, 10, 70, 3, 67, 72, 71, 73, 72, 0, 46, 0, 71, 75, 65, 5, 2, 0, 10, 73, 3, 67, 72, 74, 73, 72, 0, 46, 0, 71, 76, 75, 3, 2, 0, 10, 76, 3, 77, 0, 0, 0, 78, 77, -1, 7, 2, 0, 79, 78, 80, 4, 81, 2, 82, 79, 83, 2, 84, 4, 0, 0, 0, 1, 85, -1, 1, 2, 0, 0, 52, 0, 68, 86, 80, 3, 2, 0, 10, 81, 3, 82, 0, 52, 0, 68, 87, 80, 3, 2, 0, 10, 83, 3, 82, 0, 52, 0, 68, 88, 80, 3, 2, 0, 10, 84, 3, 82, 0, 52, 0, 68, 89, 80, 3, 2, 0, 10, 85, 3, 82, 0, 52, 0, 68, 90, 80, 3, 2, 0, 10, 86, 3, 82, 0, 52, 0, 68, 91, 80, 3, 2, 0, 10, 87, 3, 82, 0, 52, 0, 68, 92, 80, 3, 2, 0, 10, 88, 3, 82, 0, 52, 0, 68, 93, 80, 3, 2, 0, 10, 89, 3, 82, 0, 52, 0, 68, 94, 80, 3, 2, 0, 10, 90, 3, 82, 0, 52, 0, 68, 95, 80, 3, 2, 0, 10, 91, 3, 82, 0, 52, 0, 68, 96, 80, 3, 2, 0, 10, 92, 3, 82, 0, 0, 0, 98, 97, 93, 2, 2, 0, 3, 94, 0, 0, 0, 99, 99, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 100, 95, 101, 96, 102, 97, 103, 98, 104, 0, 105, 0, 106, 0, 107, 0, 108, 2, 109, 2, 110, 13, 111, 3, 112, 6, 113, 99, 114, 3, 115, 100, 116, 6, 117, 4, 118, 4, 119, 101, 120, 8, 121, 8, 122, 2, 123, 4, 124, 102, 0 </int_array> <string> "conns" </string> <int_array len="0"> </int_array> </dictionary> diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 44fb210526..9375532f07 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -5141,6 +5141,7 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material if (p_material->shader_cache->has_texscreen && framebuffer.active) { material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_SCREEN_MULT,Vector2(float(viewport.width)/framebuffer.width,float(viewport.height)/framebuffer.height)); + material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_SCREEN_CLAMP,Color(0,0,float(viewport.width)/framebuffer.width,float(viewport.height)/framebuffer.height)); material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_TEX,texcoord); glActiveTexture(GL_TEXTURE0+texcoord); glBindTexture(GL_TEXTURE_2D,framebuffer.sample_color); @@ -8387,12 +8388,33 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list) { if (shader->has_texscreen && framebuffer.active) { + + int x = viewport.x; + int y = window_size.height-(viewport.height+viewport.y); + canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_SCREEN_MULT,Vector2(float(viewport.width)/framebuffer.width,float(viewport.height)/framebuffer.height)); + canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_SCREEN_CLAMP,Color(float(x)/framebuffer.width,float(y)/framebuffer.height,float(x+viewport.width)/framebuffer.width,float(y+viewport.height)/framebuffer.height)); canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_TEX,tex_id); glActiveTexture(GL_TEXTURE0+tex_id); glBindTexture(GL_TEXTURE_2D,framebuffer.sample_color); + if (framebuffer.scale==1 && !canvas_texscreen_used) { +#ifdef GLEW_ENABLED + glReadBuffer(GL_COLOR_ATTACHMENT0); +#endif + glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height); + if (current_clip) { + print_line(" a clip "); + } + + canvas_texscreen_used=true; + } + tex_id++; } + + if (tex_id>1) { + glActiveTexture(GL_TEXTURE0); + } if (shader->has_screen_uv) { canvas_shader.set_uniform(CanvasShaderGLES2::SCREEN_UV_MULT,Vector2(1.0/viewport.width,1.0/viewport.height)); } @@ -8412,6 +8434,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list) { } + canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX,canvas_transform); canvas_last_shader=shader_owner->shader; } diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 93b0ecc61f..f1ddcf8009 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -404,7 +404,7 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a } else if (callfunc=="texscreen") { //create the call to sample the screen, and clamp it uses_texscreen=true; - code="(texture2D( texscreen_tex, min(("+dump_node_code(onode->arguments[1],p_level)+").xy*texscreen_screen_mult,texscreen_screen_mult))).rgb"; + code="(texture2D( texscreen_tex, clamp(("+dump_node_code(onode->arguments[1],p_level)+").xy*texscreen_screen_mult,texscreen_screen_clamp.xy,texscreen_screen_clamp.zw))).rgb"; //code="(texture2D( screen_texture, ("+dump_node_code(onode->arguments[1],p_level)+").xy).rgb"; break; } else if (callfunc=="texpos") { @@ -690,6 +690,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { replace_table["cross" ]="cross"; replace_table["normalize"]= "normalize"; replace_table["reflect"]= "reflect"; + replace_table["refract"]= "refract"; replace_table["tex"]= "tex"; replace_table["texa"]= "texa"; replace_table["tex2"]= "tex2"; diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index 4ec601f0fc..464cb9e188 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -100,6 +100,7 @@ uniform vec2 screen_uv_mult; #if defined(ENABLE_TEXSCREEN) uniform vec2 texscreen_screen_mult; +uniform vec4 texscreen_screen_clamp; uniform sampler2D texscreen_tex; #endif diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index 718dd56249..38fb03ab5c 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -779,6 +779,7 @@ uniform highp mat4 camera_inverse_transform; #if defined(ENABLE_TEXSCREEN) uniform vec2 texscreen_screen_mult; +uniform vec4 texscreen_screen_clamp; uniform sampler2D texscreen_tex; #endif diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index 12dc1bb139..20cd09efd0 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -1661,7 +1661,7 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base //print_line( p_code.replace(String::chr(0xFFFF),"<cursor>")); GDParser p; - Error err = p.parse(p_code,p_base_path); + Error err = p.parse(p_code,p_base_path,true); bool isfunction=false; Set<String> options; diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 89a9091baa..0312d13644 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -205,6 +205,7 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) { String name = _get_class_name(env, c, &array); //print_line("name is " + name + ", array "+Variant(array)); + print_line("ARGNAME: "+name); if (name == "java.lang.String") { return String::utf8(env->GetStringUTFChars( (jstring)obj, NULL )); diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 1eb615893b..773928c72d 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -52,6 +52,7 @@ def get_opts(): return [ ('use_llvm','Use llvm compiler','no'), ('use_sanitizer','Use llvm compiler sanitize address','no'), + ('pulseaudio','Detect & Use pulseaudio','yes'), ('experimental_wm_api', 'Use experimental window management API','no'), ] @@ -121,12 +122,13 @@ def configure(env): env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED']) env.Append(CPPFLAGS=["-DALSA_ENABLED"]) - if not os.system("pkg-config --exists libpulse-simple"): - print("Enabling PulseAudio") - env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"]) - env.ParseConfig('pkg-config --cflags --libs libpulse-simple') - else: - print("PulseAudio development libraries not found, disabling driver") + if (env["pulseaudio"]=="yes"): + if not os.system("pkg-config --exists libpulse-simple"): + print("Enabling PulseAudio") + env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"]) + env.ParseConfig('pkg-config --cflags --libs libpulse-simple') + else: + print("PulseAudio development libraries not found, disabling driver") env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES_OVER_GL']) env.Append(LIBS=['GL', 'GLU', 'pthread','asound','z']) #TODO detect linux/BSD! diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index b9041e1224..8b4196ee7f 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -291,13 +291,27 @@ void Node2D::set_global_transform(const Matrix32& p_transform) { void Node2D::set_z(int p_z) { - ERR_FAIL_COND(p_z<-VS::CANVAS_ITEM_Z_DEFAULT); - ERR_FAIL_COND(p_z>=VS::CANVAS_ITEM_Z_DEFAULT); + ERR_FAIL_COND(p_z<VS::CANVAS_ITEM_Z_MIN); + ERR_FAIL_COND(p_z>VS::CANVAS_ITEM_Z_MAX); z=p_z; - VS::get_singleton()->canvas_item_set_z(get_canvas_item(),z+VS::CANVAS_ITEM_Z_DEFAULT); + VS::get_singleton()->canvas_item_set_z(get_canvas_item(),z); } +void Node2D::set_z_as_relative(bool p_enabled) { + + if (z_relative==p_enabled) + return; + z_relative=p_enabled; + VS::get_singleton()->canvas_item_set_z_as_relative_to_parent(get_canvas_item(),p_enabled); +} + +bool Node2D::is_z_relative() const { + + return z_relative; +} + + int Node2D::get_z() const{ return z; @@ -332,13 +346,16 @@ void Node2D::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_z","z"),&Node2D::set_z); ObjectTypeDB::bind_method(_MD("get_z"),&Node2D::get_z); + ObjectTypeDB::bind_method(_MD("set_z_as_relative","enable"),&Node2D::set_z_as_relative); + ObjectTypeDB::bind_method(_MD("is_z_relative"),&Node2D::is_z_relative); + ObjectTypeDB::bind_method(_MD("edit_set_pivot"),&Node2D::edit_set_pivot); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"transform/pos"),_SCS("set_pos"),_SCS("get_pos")); ADD_PROPERTY(PropertyInfo(Variant::REAL,"transform/rot",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_rotd"),_SCS("_get_rotd")); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"transform/scale"),_SCS("set_scale"),_SCS("get_scale")); - ADD_PROPERTY(PropertyInfo(Variant::INT,"visibility/z",PROPERTY_HINT_RANGE,"-512,511,1"),_SCS("set_z"),_SCS("get_z")); - + ADD_PROPERTY(PropertyInfo(Variant::INT,"z/z",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z"),_SCS("get_z")); + ADD_PROPERTY(PropertyInfo(Variant::BOOL,"z/relative"),_SCS("set_z_as_relative"),_SCS("is_z_relative")); } @@ -351,6 +368,7 @@ Node2D::Node2D() { scale=Vector2(1,1); _xform_dirty=false; z=0; + z_relative=true; } diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h index 63ca2e3b95..61b8c829d6 100644 --- a/scene/2d/node_2d.h +++ b/scene/2d/node_2d.h @@ -39,6 +39,7 @@ class Node2D : public CanvasItem { float angle; Size2 scale; int z; + bool z_relative; Matrix32 _mat; @@ -89,6 +90,8 @@ public: void set_z(int p_z); int get_z() const; + void set_z_as_relative(bool p_enabled); + bool is_z_relative() const; Matrix32 get_transform() const; diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 2413fbded1..6f18325212 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -43,13 +43,44 @@ void PhysicsBody2D::_notification(int p_what) { */ } +void PhysicsBody2D::set_one_way_collision_direction(const Vector2& p_dir) { + + one_way_collision_direction=p_dir; + Physics2DServer::get_singleton()->body_set_one_way_collision_direction(get_rid(),p_dir); +} + +Vector2 PhysicsBody2D::get_one_way_collision_direction() const{ + + return one_way_collision_direction; +} + + +void PhysicsBody2D::set_one_way_collision_max_depth(float p_depth) { + + one_way_collision_max_depth=p_depth; + Physics2DServer::get_singleton()->body_set_one_way_collision_max_depth(get_rid(),p_depth); + +} + +float PhysicsBody2D::get_one_way_collision_max_depth() const{ + + return one_way_collision_max_depth; +} + + 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_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_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")); } void PhysicsBody2D::set_layer_mask(uint32_t p_mask) { @@ -66,6 +97,7 @@ uint32_t PhysicsBody2D::get_layer_mask() const { PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) : CollisionObject2D( Physics2DServer::get_singleton()->body_create(p_mode), false) { mask=1; + set_one_way_collision_max_depth(0); } @@ -932,7 +964,7 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) { //if (d<margin) /// continue; - recover_motion+=(b-a)*0.2; + recover_motion+=(b-a)*0.4; } if (recover_motion==Vector2()) { @@ -963,6 +995,7 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) { bool valid = dss->cast_motion(get_shape(i)->get_rid(), get_global_transform() * get_shape_transform(i), p_motion, 0,lsafe,lunsafe,exclude,get_layer_mask(),mask); //print_line("shape: "+itos(i)+" travel:"+rtos(ltravel)); if (!valid) { + safe=0; unsafe=0; best_shape=i; //sadly it's the best @@ -994,9 +1027,11 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) { bool c2 = dss->rest_info(get_shape(best_shape)->get_rid(), ugt*get_shape_transform(best_shape), Vector2(), margin,&rest_info,exclude,get_layer_mask(),mask); if (!c2) { //should not happen, but floating point precision is so weird.. + colliding=false; } else { + //print_line("Travel: "+rtos(travel)); colliding=true; collision=rest_info.point; diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 956999ce31..eed43c95be 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -39,6 +39,8 @@ class PhysicsBody2D : public CollisionObject2D { OBJ_TYPE(PhysicsBody2D,CollisionObject2D); uint32_t mask; + Vector2 one_way_collision_direction; + float one_way_collision_max_depth; protected: void _notification(int p_what); @@ -53,6 +55,12 @@ public: void add_collision_exception_with(Node* p_node); //must be physicsbody void remove_collision_exception_with(Node* p_node); + void set_one_way_collision_direction(const Vector2& p_dir); + Vector2 get_one_way_collision_direction() const; + + void set_one_way_collision_max_depth(float p_dir); + float get_one_way_collision_max_depth() const; + PhysicsBody2D(); }; diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index f2806f2af2..940a29b5d8 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -92,6 +92,7 @@ void PhysicsBody::remove_collision_exception_with(Node* p_node) { PhysicsServer::get_singleton()->body_remove_collision_exception(get_rid(),physics_body->get_rid()); } + void PhysicsBody::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody::set_layer_mask); ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsBody::get_layer_mask); diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h index 0d1de7f236..beec01ff3a 100644 --- a/scene/3d/physics_body.h +++ b/scene/3d/physics_body.h @@ -56,6 +56,8 @@ public: void add_collision_exception_with(Node* p_node); //must be physicsbody void remove_collision_exception_with(Node* p_node); + + PhysicsBody(); }; diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index d589b93049..8855627bb4 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -298,7 +298,7 @@ void TextEdit::_update_scrollbars() { int hscroll_rows = ((hmin.height-1)/get_row_height())+1; int visible_rows = get_visible_rows(); - int total_rows = text.size() * cache.line_spacing; + int total_rows = text.size(); int vscroll_pixels = v_scroll->get_combined_minimum_size().width; int visible_width = size.width - cache.style_normal->get_minimum_size().width; diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 2592751274..8f28a3116e 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -272,7 +272,7 @@ void register_scene_types() { ObjectTypeDB::register_type<Control>(); // ObjectTypeDB::register_type<EmptyControl>(); - ObjectTypeDB::add_compatibility_type("EmptyControl","control"); + ObjectTypeDB::add_compatibility_type("EmptyControl","Control"); ObjectTypeDB::register_type<Button>(); ObjectTypeDB::register_type<Label>(); ObjectTypeDB::register_type<HScrollBar>(); diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index d93d4d5c35..1cfe9a6ab9 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -647,6 +647,7 @@ Body2DSW::Body2DSW() : CollisionObject2DSW(TYPE_BODY), active_list(this), inerti area_linear_damp=0; contact_count=0; gravity_scale=1.0; + one_way_collision_max_depth=0.1; still_time=0; continuous_cd_mode=Physics2DServer::CCD_MODE_DISABLED; diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h index 5bd68ba976..3b87be2737 100644 --- a/servers/physics_2d/body_2d_sw.h +++ b/servers/physics_2d/body_2d_sw.h @@ -67,6 +67,9 @@ class Body2DSW : public CollisionObject2DSW { Vector2 applied_force; real_t applied_torque; + Vector2 one_way_collision_direction; + float one_way_collision_max_depth; + SelfList<Body2DSW> active_list; SelfList<Body2DSW> inertia_update_list; @@ -216,6 +219,12 @@ 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; } + 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; } + void set_space(Space2DSW *p_space); void update_inertias(); diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index ab85f5e1d6..be49955055 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -138,6 +138,21 @@ void Physics2DServerSW::_shape_col_cbk(const Vector2& p_point_A,const Vector2& p if (cbk->max==0) return; + if (cbk->valid_dir!=Vector2()) { + if (p_point_A.distance_squared_to(p_point_B)>cbk->valid_depth*cbk->valid_depth) { + return; + } + if (cbk->valid_dir.dot((p_point_A-p_point_B).normalized())<0.7071) { +/* print_line("A: "+p_point_A); + print_line("B: "+p_point_B); + print_line("discard too angled "+rtos(cbk->valid_dir.dot((p_point_A-p_point_B)))); + print_line("resnorm: "+(p_point_A-p_point_B).normalized()); + print_line("distance: "+rtos(p_point_A.distance_to(p_point_B))); +*/ + return; + } + } + if (cbk->amount == cbk->max) { //find least deep float min_depth=1e20; @@ -860,6 +875,37 @@ int Physics2DServerSW::body_get_max_contacts_reported(RID p_body) const { return body->get_max_contacts_reported(); } +void Physics2DServerSW::body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction) { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND(!body); + body->set_one_way_collision_direction(p_direction); +} + +Vector2 Physics2DServerSW::body_get_one_way_collision_direction(RID p_body) const{ + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND_V(!body,Vector2()); + return body->get_one_way_collision_direction(); + +} + +void Physics2DServerSW::body_set_one_way_collision_max_depth(RID p_body,float p_max_depth) { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND(!body); + body->set_one_way_collision_max_depth(p_max_depth); + +} + +float Physics2DServerSW::body_get_one_way_collision_max_depth(RID p_body) const { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND_V(!body,0); + return body->get_one_way_collision_max_depth(); + +} + void Physics2DServerSW::body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata) { diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h index 9edd4eee11..e9c499aaff 100644 --- a/servers/physics_2d/physics_2d_server_sw.h +++ b/servers/physics_2d/physics_2d_server_sw.h @@ -71,6 +71,8 @@ public: struct CollCbkData { + Vector2 valid_dir; + float valid_depth; int max; int amount; Vector2 *ptr; @@ -205,6 +207,13 @@ public: virtual void body_set_max_contacts_reported(RID p_body, int p_contacts); virtual int body_get_max_contacts_reported(RID p_body) const; + virtual void body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction); + virtual Vector2 body_get_one_way_collision_direction(RID p_body) const; + + virtual void body_set_one_way_collision_max_depth(RID p_body,float p_max_depth); + virtual float body_get_one_way_collision_max_depth(RID p_body) const; + + virtual void body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata=Variant()); virtual bool body_collide_shape(RID p_body, int p_body_shape,RID p_shape, const Matrix32& p_shape_xform,const Vector2& p_motion,Vector2 *r_results,int p_result_max,int &r_result_count); diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 76069de9a0..f2ed74ffbf 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -98,7 +98,7 @@ bool Physics2DDirectSpaceStateSW::intersect_ray(const Vector2& p_from, const Vec if (shape->intersect_segment(local_from,local_to,shape_point,shape_normal)) { - //print_line("inters sgment!"); + Matrix32 xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); shape_point=xform.xform(shape_point); @@ -217,6 +217,16 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32 int shape_idx=space->intersection_query_subindex_results[i]; + /*if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + + const Body2DSW *body=static_cast<const Body2DSW*>(col_obj); + if (body->get_one_way_collision_direction()!=Vector2() && p_motion.dot(body->get_one_way_collision_direction())<=CMP_EPSILON) { + print_line("failed in motion dir"); + continue; + } + }*/ + + Matrix32 col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); //test initial overlap, does it collide if going all the way? if (!CollisionSolver2DSW::solve(shape,p_xform,p_motion,col_obj->get_shape(shape_idx),col_obj_xform,Vector2() ,NULL,NULL,NULL,p_margin)) { @@ -227,6 +237,14 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32 //test initial overlap if (CollisionSolver2DSW::solve(shape,p_xform,Vector2(),col_obj->get_shape(shape_idx),col_obj_xform,Vector2() ,NULL,NULL,NULL,p_margin)) { + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + //if one way collision direction ignore initial overlap + const Body2DSW *body=static_cast<const Body2DSW*>(col_obj); + if (body->get_one_way_collision_direction()!=Vector2()) { + continue; + } + } + return false; } @@ -253,6 +271,29 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32 } } + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + + const Body2DSW *body=static_cast<const Body2DSW*>(col_obj); + if (body->get_one_way_collision_direction()!=Vector2()) { + + Vector2 cd[2]; + Physics2DServerSW::CollCbkData cbk; + cbk.max=1; + cbk.amount=0; + cbk.ptr=cd; + cbk.valid_dir=body->get_one_way_collision_direction(); + cbk.valid_depth=body->get_one_way_collision_max_depth(); + + Vector2 sep=mnormal; //important optimization for this to work fast enough + bool collided = CollisionSolver2DSW::solve(shape,p_xform,p_motion*(hi+space->contact_max_allowed_penetration),col_obj->get_shape(shape_idx),col_obj_xform,Vector2(),Physics2DServerSW::_shape_col_cbk,&cbk,&sep,p_margin); + if (!collided || cbk.amount==0) { + continue; + } + + } + } + + if (low<best_safe) { best_safe=low; best_unsafe=hi; @@ -311,14 +352,23 @@ bool Physics2DDirectSpaceStateSW::collide_shape(RID p_shape, const Matrix32& p_s if (p_exclude.has( col_obj->get_self() )) continue; - + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + + const Body2DSW *body=static_cast<const Body2DSW*>(col_obj); + cbk.valid_dir=body->get_one_way_collision_direction(); + cbk.valid_depth=body->get_one_way_collision_max_depth(); + } else { + cbk.valid_dir=Vector2(); + cbk.valid_depth=0; + } if (CollisionSolver2DSW::solve(shape,p_shape_xform,p_motion,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx),Vector2(),cbkres,cbkptr,NULL,p_margin)) { - collided=true; + collided=p_result_max==0 || cbk.amount>0; } } + r_result_count=cbk.amount; return collided; @@ -334,6 +384,8 @@ struct _RestCallbackData2D { Vector2 best_contact; Vector2 best_normal; float best_len; + Vector2 valid_dir; + float valid_depth; }; static void _rest_cbk_result(const Vector2& p_point_A,const Vector2& p_point_B,void *p_userdata) { @@ -341,11 +393,23 @@ static void _rest_cbk_result(const Vector2& p_point_A,const Vector2& p_point_B,v _RestCallbackData2D *rd=(_RestCallbackData2D*)p_userdata; + if (rd->valid_dir!=Vector2()) { + + if (rd->valid_dir!=Vector2()) { + if (p_point_A.distance_squared_to(p_point_B)>rd->valid_depth*rd->valid_depth) + return; + if (rd->valid_dir.dot((p_point_A-p_point_B).normalized())<Math_PI*0.25) + return; + } + + } + Vector2 contact_rel = p_point_B - p_point_A; float len = contact_rel.length(); if (len <= rd->best_len) return; + rd->best_len=len; rd->best_contact=p_point_B; rd->best_normal=contact_rel/len; @@ -385,6 +449,17 @@ bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Matrix32& p_shape if (p_exclude.has( col_obj->get_self() )) continue; + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + + const Body2DSW *body=static_cast<const Body2DSW*>(col_obj); + rcd.valid_dir=body->get_one_way_collision_direction(); + rcd.valid_depth=body->get_one_way_collision_max_depth(); + } else { + rcd.valid_dir=Vector2(); + rcd.valid_depth=0; + } + + rcd.object=col_obj; rcd.shape=shape_idx; bool sc = CollisionSolver2DSW::solve(shape,p_shape_xform,p_motion,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx),Vector2() ,_rest_cbk_result,&rcd,NULL,p_margin); diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index 3633efc5eb..07389bc912 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -500,6 +500,13 @@ void Physics2DServer::_bind_methods() { ObjectTypeDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&Physics2DServer::body_set_max_contacts_reported); ObjectTypeDB::bind_method(_MD("body_get_max_contacts_reported","body"),&Physics2DServer::body_get_max_contacts_reported); + ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_direction","normal"),&Physics2DServer::body_set_one_way_collision_direction); + ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_direction"),&Physics2DServer::body_get_one_way_collision_direction); + + ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_max_depth","normal"),&Physics2DServer::body_set_one_way_collision_max_depth); + ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_max_depth"),&Physics2DServer::body_get_one_way_collision_max_depth); + + ObjectTypeDB::bind_method(_MD("body_set_omit_force_integration","body","enable"),&Physics2DServer::body_set_omit_force_integration); ObjectTypeDB::bind_method(_MD("body_is_omitting_force_integration","body"),&Physics2DServer::body_is_omitting_force_integration); diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h index 6e53cde55c..765cebf45f 100644 --- a/servers/physics_2d_server.h +++ b/servers/physics_2d_server.h @@ -442,6 +442,12 @@ public: virtual void body_set_max_contacts_reported(RID p_body, int p_contacts)=0; virtual int body_get_max_contacts_reported(RID p_body) const=0; + virtual void body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction)=0; + virtual Vector2 body_get_one_way_collision_direction(RID p_body) const=0; + + virtual void body_set_one_way_collision_max_depth(RID p_body,float p_max_depth)=0; + virtual float body_get_one_way_collision_max_depth(RID p_body) const=0; + //missing remove virtual void body_set_contacts_reported_depth_treshold(RID p_body, float p_treshold)=0; virtual float body_get_contacts_reported_depth_treshold(RID p_body) const=0; diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index f5bff29f47..9a76a009a9 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -900,6 +900,7 @@ const ShaderLanguage::IntrinsicFuncDef ShaderLanguage::intrinsic_func_defs[]={ {"normalize",TYPE_VEC3,{TYPE_VEC3,TYPE_VOID}}, {"normalize",TYPE_VEC4,{TYPE_VEC4,TYPE_VOID}}, {"reflect",TYPE_VEC3,{TYPE_VEC3,TYPE_VEC3,TYPE_VOID}}, + {"refract",TYPE_VEC3,{TYPE_VEC3,TYPE_VEC3,TYPE_FLOAT,TYPE_VOID}}, //intrinsics - texture {"tex",TYPE_VEC4,{TYPE_TEXTURE,TYPE_VEC2,TYPE_VOID}}, {"texcube",TYPE_VEC4,{TYPE_CUBEMAP,TYPE_VEC3,TYPE_VOID}}, diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index dfa1e849b7..dc0bff4cf4 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -3691,7 +3691,7 @@ void VisualServerRaster::canvas_item_add_set_blend_mode(RID p_item, MaterialBlen void VisualServerRaster::canvas_item_set_z(RID p_item, int p_z) { - ERR_FAIL_COND(p_z<0 || p_z>=CANVAS_ITEM_Z_MAX); + ERR_FAIL_COND(p_z<CANVAS_ITEM_Z_MIN || p_z>CANVAS_ITEM_Z_MAX); VS_CHANGED; CanvasItem *canvas_item = canvas_item_owner.get( p_item ); ERR_FAIL_COND(!canvas_item); @@ -3699,6 +3699,15 @@ void VisualServerRaster::canvas_item_set_z(RID p_item, int p_z) { } +void VisualServerRaster::canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) { + + VS_CHANGED; + CanvasItem *canvas_item = canvas_item_owner.get( p_item ); + ERR_FAIL_COND(!canvas_item); + canvas_item->z_relative=p_enable; + +} + void VisualServerRaster::canvas_item_set_use_parent_shader(RID p_item, bool p_enable) { VS_CHANGED; @@ -6139,18 +6148,20 @@ void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, S void VisualServerRaster::_render_canvas_item_tree(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect) { - Rasterizer::CanvasItem *z_list[CANVAS_ITEM_Z_MAX]; - Rasterizer::CanvasItem *z_last_list[CANVAS_ITEM_Z_MAX]; - for(int i=0;i<CANVAS_ITEM_Z_MAX;i++) { + static const int z_range = CANVAS_ITEM_Z_MAX-CANVAS_ITEM_Z_MIN+1; + Rasterizer::CanvasItem *z_list[z_range]; + Rasterizer::CanvasItem *z_last_list[z_range]; + + for(int i=0;i<z_range;i++) { z_list[i]=NULL; z_last_list[i]=NULL; } - _render_canvas_item(p_canvas_item,p_transform,p_clip_rect,1.0,z_list,z_last_list,NULL,NULL); + _render_canvas_item(p_canvas_item,p_transform,p_clip_rect,1.0,0,z_list,z_last_list,NULL,NULL); - for(int i=0;i<CANVAS_ITEM_Z_MAX;i++) { + for(int i=0;i<z_range;i++) { if (!z_list[i]) continue; rasterizer->canvas_render_items(z_list[i]); @@ -6168,7 +6179,7 @@ void VisualServerRaster::_render_canvas_item_viewport(VisualServer* p_self,void } -void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner) { +void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity,int p_z,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner) { CanvasItem *ci = p_canvas_item; @@ -6247,7 +6258,7 @@ void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Mat if (child_items[i]->ontop) continue; - _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_shader_owner); + _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,p_z,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_shader_owner); } @@ -6256,13 +6267,20 @@ void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Mat ci->final_transform=xform; ci->final_opacity=opacity * ci->self_opacity; - if (z_last_list[ci->z]) { - z_last_list[ci->z]->next=ci; - z_last_list[ci->z]=ci; + if (ci->z_relative) + p_z=CLAMP(p_z+ci->z,CANVAS_ITEM_Z_MIN,CANVAS_ITEM_Z_MAX); + else + p_z=ci->z; + + int zidx = p_z-CANVAS_ITEM_Z_MIN; + + if (z_last_list[zidx]) { + z_last_list[zidx]->next=ci; + z_last_list[zidx]=ci; } else { - z_list[ci->z]=ci; - z_last_list[ci->z]=ci; + z_list[zidx]=ci; + z_last_list[zidx]=ci; } ci->next=NULL; @@ -6273,7 +6291,7 @@ void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Mat if (!child_items[i]->ontop) continue; - _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_shader_owner); + _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,p_z,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_shader_owner); } } @@ -6282,31 +6300,62 @@ void VisualServerRaster::_render_canvas(Canvas *p_canvas,const Matrix32 &p_trans rasterizer->canvas_begin(); - int l = p_canvas->child_items.size(); + Canvas::ChildItem *ci=p_canvas->child_items.ptr(); + bool has_mirror=false; for(int i=0;i<l;i++) { + if (ci[i].mirror.x || ci[i].mirror.y) { + has_mirror=true; + break; + } + } - Canvas::ChildItem& ci=p_canvas->child_items[i]; - _render_canvas_item_tree(ci.item,p_transform,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height)); + Rect2 clip_rect(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height); + if (!has_mirror) { - //mirroring (useful for scrolling backgrounds) - if (ci.mirror.x!=0) { + static const int z_range = CANVAS_ITEM_Z_MAX-CANVAS_ITEM_Z_MIN+1; + Rasterizer::CanvasItem *z_list[z_range]; + Rasterizer::CanvasItem *z_last_list[z_range]; - Matrix32 xform2 = p_transform * Matrix32(0,Vector2(ci.mirror.x,0)); - _render_canvas_item_tree(ci.item,xform2,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height)); + for(int i=0;i<z_range;i++) { + z_list[i]=NULL; + z_last_list[i]=NULL; } - if (ci.mirror.y!=0) { - - Matrix32 xform2 = p_transform * Matrix32(0,Vector2(0,ci.mirror.y)); - _render_canvas_item_tree(ci.item,xform2,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height)); + for(int i=0;i<l;i++) { + _render_canvas_item(ci[i].item,p_transform,clip_rect,1.0,0,z_list,z_last_list,NULL,NULL); } - if (ci.mirror.y!=0 && ci.mirror.x!=0) { - Matrix32 xform2 = p_transform * Matrix32(0,ci.mirror); - _render_canvas_item_tree(ci.item,xform2,Rect2(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height)); + for(int i=0;i<z_range;i++) { + if (!z_list[i]) + continue; + rasterizer->canvas_render_items(z_list[i]); } + } else { + + for(int i=0;i<l;i++) { + + Canvas::ChildItem& ci=p_canvas->child_items[i]; + _render_canvas_item_tree(ci.item,p_transform,clip_rect); + + //mirroring (useful for scrolling backgrounds) + if (ci.mirror.x!=0) { + Matrix32 xform2 = p_transform * Matrix32(0,Vector2(ci.mirror.x,0)); + _render_canvas_item_tree(ci.item,xform2,clip_rect); + } + if (ci.mirror.y!=0) { + + Matrix32 xform2 = p_transform * Matrix32(0,Vector2(0,ci.mirror.y)); + _render_canvas_item_tree(ci.item,xform2,clip_rect); + } + if (ci.mirror.y!=0 && ci.mirror.x!=0) { + + Matrix32 xform2 = p_transform * Matrix32(0,ci.mirror); + _render_canvas_item_tree(ci.item,xform2,clip_rect); + } + + } } } diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index d30ac17400..6c4e15827a 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -380,6 +380,7 @@ class VisualServerRaster : public VisualServer { List<CanvasItem*>::Element *E; RID viewport; int z; + bool z_relative; bool sort_y; float opacity; float self_opacity; @@ -391,11 +392,12 @@ class VisualServerRaster : public VisualServer { CanvasItem() { E=NULL; - z=CANVAS_ITEM_Z_MAX/2; + z=0; opacity=1; self_opacity=1; sort_y=false; use_parent_shader=false; + z_relative=true; } }; @@ -600,7 +602,7 @@ class VisualServerRaster : public VisualServer { void _render_camera(Viewport *p_viewport,Camera *p_camera, Scenario *p_scenario); static void _render_canvas_item_viewport(VisualServer* p_self,void *p_vp,const Rect2& p_rect); void _render_canvas_item_tree(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect); - void _render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect,float p_opacity,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner); + void _render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity,int p_z,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_shader_owner); void _render_canvas(Canvas *p_canvas,const Matrix32 &p_transform); Vector<Vector3> _camera_generate_endpoints(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max); Vector<Plane> _camera_generate_orthogonal_planes(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max); @@ -1112,6 +1114,7 @@ public: virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore); virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable); virtual void canvas_item_set_z(RID p_item, int p_z); + virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable); virtual void canvas_item_set_shader(RID p_item, RID p_shader); virtual RID canvas_item_get_shader(RID p_item) const; diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index c344161445..b59fdbc66a 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -1132,6 +1132,7 @@ public: FUNC2(canvas_item_set_sort_children_by_y,RID,bool); FUNC2(canvas_item_set_z,RID,int); + FUNC2(canvas_item_set_z_as_relative_to_parent,RID,bool); FUNC2(canvas_item_set_shader,RID, RID ); FUNC1RC(RID,canvas_item_get_shader,RID ); diff --git a/servers/visual_server.h b/servers/visual_server.h index 5edf333e65..5721e7acf0 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -86,8 +86,9 @@ public: ARRAY_WEIGHTS_SIZE=4, MAX_PARTICLE_COLOR_PHASES=4, MAX_PARTICLE_ATTRACTORS=4, - CANVAS_ITEM_Z_MAX=1024, - CANVAS_ITEM_Z_DEFAULT=512, + CANVAS_ITEM_Z_MIN=-4096, + CANVAS_ITEM_Z_MAX=4096, + MAX_CURSORS = 8, @@ -985,6 +986,7 @@ public: virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore)=0; virtual void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable)=0; virtual void canvas_item_set_z(RID p_item, int p_z)=0; + virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable)=0; virtual void canvas_item_clear(RID p_item)=0; virtual void canvas_item_raise(RID p_item)=0; diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp index b855b15b39..ce376f2e7b 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -411,7 +411,11 @@ void EditorTextureImportDialog::popup_import(const String& p_from) { Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from); ERR_FAIL_COND(!rimd.is_valid()); - save_path->set_text(p_from.get_base_dir()); + if (plugin->get_mode()==EditorTextureImportPlugin::MODE_ATLAS) + save_path->set_text(p_from); + else + save_path->set_text(p_from.get_base_dir()); + texture_options->set_format(EditorTextureImportPlugin::ImageFormat(int(rimd->get_option("format")))); texture_options->set_flags(rimd->get_option("flags")); texture_options->set_quality(rimd->get_option("quality")); diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.h b/tools/editor/io_plugins/editor_texture_import_plugin.h index d17b3c05c2..e733a3ddf9 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.h +++ b/tools/editor/io_plugins/editor_texture_import_plugin.h @@ -98,6 +98,7 @@ public: IMAGE_FLAG_USE_ANISOTROPY=1024, //convert image to linear }; + Mode get_mode() const { return mode; } virtual String get_name() const; virtual String get_visible_name() const; virtual void import_dialog(const String& p_from=""); |