From db43e941752590f32e949638e35f5891bc8979c3 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 11 Feb 2016 00:00:11 -0300 Subject: -Made some icon data types smaller so they take up less space -Fixed sample import plugin, makes samples sound strange in smp when limited hz --- bin/tests/test_math.cpp | 81 +++++++++++++++++++++ scene/animation/animation_player.cpp | 1 + scene/audio/stream_player.cpp | 2 + tools/editor/icons/icon_array_data.png | Bin 212 -> 176 bytes tools/editor/icons/icon_array_float.png | Bin 213 -> 177 bytes tools/editor/icons/icon_array_int.png | Bin 204 -> 172 bytes tools/editor/icons/icon_array_string.png | Bin 217 -> 178 bytes tools/editor/icons/icon_array_variant.png | Bin 209 -> 172 bytes tools/editor/icons/icon_bool.png | Bin 147 -> 164 bytes tools/editor/icons/icon_color.png | Bin 322 -> 301 bytes tools/editor/icons/icon_integer.png | Bin 142 -> 162 bytes tools/editor/icons/icon_quat.png | Bin 265 -> 239 bytes tools/editor/icons/icon_real.png | Bin 146 -> 162 bytes tools/editor/icons/icon_rect2.png | Bin 240 -> 193 bytes tools/editor/icons/icon_rect3.png | Bin 230 -> 202 bytes tools/editor/icons/icon_string.png | Bin 121 -> 136 bytes tools/editor/icons/icon_vector.png | Bin 158 -> 183 bytes tools/editor/icons/icon_vector2.png | Bin 141 -> 172 bytes .../io_plugins/editor_sample_import_plugin.cpp | 2 +- 19 files changed, 85 insertions(+), 1 deletion(-) diff --git a/bin/tests/test_math.cpp b/bin/tests/test_math.cpp index b5041b265f..05acd5c1ec 100644 --- a/bin/tests/test_math.cpp +++ b/bin/tests/test_math.cpp @@ -75,9 +75,90 @@ fix: 0, 0, 100, 100 } +uint32_t ihash( uint32_t a) +{ + a = (a+0x7ed55d16) + (a<<12); + a = (a^0xc761c23c) ^ (a>>19); + a = (a+0x165667b1) + (a<<5); + a = (a+0xd3a2646c) ^ (a<<9); + a = (a+0xfd7046c5) + (a<<3); + a = (a^0xb55a4f09) ^ (a>>16); + return a; +} + +uint32_t ihash2( uint32_t a) { + a = (a ^ 61) ^ (a >> 16); + a = a + (a << 3); + a = a ^ (a >> 4); + a = a * 0x27d4eb2d; + a = a ^ (a >> 15); + return a; +} + +uint32_t ihash3( uint32_t a) +{ + a = (a+0x479ab41d) + (a<<8); + a = (a^0xe4aa10ce) ^ (a>>5); + a = (a+0x9942f0a6) - (a<<14); + a = (a^0x5aedd67d) ^ (a>>3); + a = (a+0x17bea992) + (a<<7); + return a; +} MainLoop* test() { + + { + + Vector hashes; + List tl; + ObjectTypeDB::get_type_list(&tl); + + + for (List::Element *E=tl.front();E;E=E->next()) { + + Vector m5b = E->get().operator String().md5_buffer(); + uint32_t *ub = (uint32_t*)m5b.ptr(); + //hashes.push_back(ihash(ihash2(ihash3(*ub)))); + hashes.push_back(hashes.size()); + //hashes.push_back(E->get().hash()); + + } + + //hashes.resize(50); + + for(int i=nearest_shift(hashes.size());i<20;i++) { + + bool success=true; + for(int s=0;s<10000;s++) { + Set existing; + success=true; + + for(int j=0;jis_editor_hint() && animation_set.has(autoplay)) { play(autoplay); + set_autoplay(""); //this line is the fix for autoplay issues with animatio } } break; case NOTIFICATION_PROCESS: { diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp index fd18803394..c1799ec12c 100644 --- a/scene/audio/stream_player.cpp +++ b/scene/audio/stream_player.cpp @@ -106,8 +106,10 @@ void StreamPlayer::_notification(int p_what) { resume_pos=-1; } else if (autoplay) { play(); + autoplay = false; //this line fix autoplay issues } } + } break; case NOTIFICATION_EXIT_TREE: { diff --git a/tools/editor/icons/icon_array_data.png b/tools/editor/icons/icon_array_data.png index 494d4c71a8..447acaab2b 100644 Binary files a/tools/editor/icons/icon_array_data.png and b/tools/editor/icons/icon_array_data.png differ diff --git a/tools/editor/icons/icon_array_float.png b/tools/editor/icons/icon_array_float.png index 558be932dc..d1b78b4c3e 100644 Binary files a/tools/editor/icons/icon_array_float.png and b/tools/editor/icons/icon_array_float.png differ diff --git a/tools/editor/icons/icon_array_int.png b/tools/editor/icons/icon_array_int.png index 74925553d9..2c4ec5bafb 100644 Binary files a/tools/editor/icons/icon_array_int.png and b/tools/editor/icons/icon_array_int.png differ diff --git a/tools/editor/icons/icon_array_string.png b/tools/editor/icons/icon_array_string.png index 2aeded63df..a2e3f11c35 100644 Binary files a/tools/editor/icons/icon_array_string.png and b/tools/editor/icons/icon_array_string.png differ diff --git a/tools/editor/icons/icon_array_variant.png b/tools/editor/icons/icon_array_variant.png index 34cb83cadd..ab294898ad 100644 Binary files a/tools/editor/icons/icon_array_variant.png and b/tools/editor/icons/icon_array_variant.png differ diff --git a/tools/editor/icons/icon_bool.png b/tools/editor/icons/icon_bool.png index 3381033b00..80b3a9deb7 100644 Binary files a/tools/editor/icons/icon_bool.png and b/tools/editor/icons/icon_bool.png differ diff --git a/tools/editor/icons/icon_color.png b/tools/editor/icons/icon_color.png index 08547caa28..3ab87c98ea 100644 Binary files a/tools/editor/icons/icon_color.png and b/tools/editor/icons/icon_color.png differ diff --git a/tools/editor/icons/icon_integer.png b/tools/editor/icons/icon_integer.png index 32c8d9885b..b49390aeb1 100644 Binary files a/tools/editor/icons/icon_integer.png and b/tools/editor/icons/icon_integer.png differ diff --git a/tools/editor/icons/icon_quat.png b/tools/editor/icons/icon_quat.png index ebb8719d33..f09d2fcaba 100644 Binary files a/tools/editor/icons/icon_quat.png and b/tools/editor/icons/icon_quat.png differ diff --git a/tools/editor/icons/icon_real.png b/tools/editor/icons/icon_real.png index 80fbf7017c..7f5bf08ede 100644 Binary files a/tools/editor/icons/icon_real.png and b/tools/editor/icons/icon_real.png differ diff --git a/tools/editor/icons/icon_rect2.png b/tools/editor/icons/icon_rect2.png index e9293b5fad..cf3cfe3b22 100644 Binary files a/tools/editor/icons/icon_rect2.png and b/tools/editor/icons/icon_rect2.png differ diff --git a/tools/editor/icons/icon_rect3.png b/tools/editor/icons/icon_rect3.png index e1e81f84e7..8eacfff207 100644 Binary files a/tools/editor/icons/icon_rect3.png and b/tools/editor/icons/icon_rect3.png differ diff --git a/tools/editor/icons/icon_string.png b/tools/editor/icons/icon_string.png index 48bf753c40..4a747f7c62 100644 Binary files a/tools/editor/icons/icon_string.png and b/tools/editor/icons/icon_string.png differ diff --git a/tools/editor/icons/icon_vector.png b/tools/editor/icons/icon_vector.png index 0ee33ba0b7..0bda8ff7c0 100644 Binary files a/tools/editor/icons/icon_vector.png and b/tools/editor/icons/icon_vector.png differ diff --git a/tools/editor/icons/icon_vector2.png b/tools/editor/icons/icon_vector2.png index 5920109a55..5bfd08f52a 100644 Binary files a/tools/editor/icons/icon_vector2.png and b/tools/editor/icons/icon_vector2.png differ diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp index b81c88c817..47673f8f81 100644 --- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp @@ -481,7 +481,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref