From db43e941752590f32e949638e35f5891bc8979c3 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 11 Feb 2016 00:00:11 -0300 Subject: [PATCH] -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 .../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 b5041b265f2..05acd5c1ec2 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 fd18803394f..c1799ec12c8 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 494d4c71a82606304eaa84e7fc12a350a16143f2..447acaab2b0da74d805bd66440bcc665aa818d70 100644 GIT binary patch delta 134 zcmV;10D1q^0k8p(7YYmr1^@s6Yv( z5@cnTUHpZ+2`Cui>Eak-ar)>aLm>x47MJ_G{?Gj`?l!S!$q&s78+gQwp1C%;&(v3_ zh+#^Y{OkC< zz%U3ypSk~?oq<+L6Nab^fyI1fjEw16&@@4l0$`K=2j4$I*T2AXf-8a6S`|kktKR(0 p&+&^Rm6XpE-}^QObJIFdF&(eUMB3;?M|}VQ002ovPDHLkV1k`yH%I^g delta 171 zcmdnUc$IO2xTXLH8v_G_{OA9PK#H+A$lZxy-8q?;Kn`1yx4R3F27;f?yXz+^%9Y<@ z5@cl%&*0e@4-^dbba4!^IDK@IHQxaP4(Ith|IfYK80ID1wu>ppSjn!Ehf1hr7i k%#Q+Ms>tUX)NXe;0228x_donhH2?qr07*qoM6N<$f}lJ!wg3PC delta 162 zcmZ3(c!qI;xTXLH8v_G_{OA9PK#H+A$lZxy-8q?;Kn`1yx4R3&e-K=-clqRrigJ0k zm;_lYwd|Fo4g=+VJY5_^EKZ-Db#mhWO!baBdG zmd0m73{S7w|NAFcbWOg+BDvT0+sfuy8fnMEnGC0@W!DlX+Kyw*9 MUHx3vIVCg!04K9OkN^Mx diff --git a/tools/editor/icons/icon_array_string.png b/tools/editor/icons/icon_array_string.png index 2aeded63df9d6ab2c0b3f4111b9fa6b2b0c1cacd..a2e3f11c357ce2a520cd8cd3b7c170bef87756a7 100644 GIT binary patch delta 136 zcmV;30C)e{0kQ#*7YYmr1^@s6Yv(3xI$x1eeY&n!pX7*^nH-^Hk8 qt~ezK6^wJd?FjVo@hO2%Q+olYfH3q}L+R%L00000}ki-l<)gD{nlvpeWg*l;IF|V3E!!YL(XVK z)iXN=vK*NE(XZe?SJwXK*L(ZhjCQD*+VImP_|GHjfe&$7?m*{6io=4D*!elZu<8Y^!y9tan?F>$7j?*Tz~v% kLCDEdq*nDD*lm!aAJw->))vrXApigX07*qoM6N<$f}3tJaR2}S delta 167 zcmZ3(c#&~}xTXLH8v_G_{OA9PK#H+A$lZxy-8q?;Kn`1yx4R3F27;f?yXz+^$`#*Y z5@cmkuI^LM015_rx;TbdoIX0~AQyuohs*sR|Nq;_PE*j~y4LLV!ojA*>sW}AhMT=Z zfC=M=m_89!#c?rR?|P;^aFNZU5v!gqt??f687%u4Uu=9LZ0 PKvsIX`njxgN@xNAl#@FJ diff --git a/tools/editor/icons/icon_bool.png b/tools/editor/icons/icon_bool.png index 3381033b002a14bfc93487095e4f19cf87ac7291..80b3a9deb7e62f0086fbef7f9ee7fa3b5ddd6e9b 100644 GIT binary patch delta 128 zcmbQtxP)?NMQuIvw(xESR0H`FpL07^M~x;TbtoKH@W z_|)+6U^DwSgTAJwLyl}fP-2)bP0l+XkKG~_D~ delta 111 zcmV-#0FeKr0h0lc7YYyv1^@s6AM^iVks%mbMM*?KR5*=eU>F4y1I7mr9@xV;3JMAb z85kHC(8aLvVQQIRg4h%y+l0=C0VYblz=G^#T(;l?IK4oz3(yTC#2*C|004|fEiq>C RF3=RVZ=DqbIGV%|K|i z6UeZk@d#R%*@TM9(=2~7ybX8VE(|K`EZsv z+x)9~E7nymuaiC(cUHPBkwe(Wc+>s)9gZ)!@7qd%z`5mT(kl)rHD6VYIQ(FT+?2ve z;(BH6m$|YRD77=D+00(wcEhYv)NF6G0Gq)h!zX>LVQ2qOH%jvK=-_B*XHP!!UpFI@ hdELxLiN;1ohTsP_oGh=h41hjk@O1TaS?83{1OPT>X?Xwu delta 281 zcmV+!0p|X#0>T227aR}>1^@s6AM^iV00006VoOIv0RI600RN!9r<0K(9)H~l7!3$E z^>Q?l0002bNklmo=db1s!!U#irWq#iL~;y5U-<3;*LXfGgSZptZ6}*zL#g`l7EJT5T;`BOR~v9q~QbvMyM7iL;9 z^)~t%!`*twG1wSb)od)9Q8b4*iB{Q0?;~328+7S)WPj?7$N&HU07*qoM6N<$g2{MN ATL1t6 delta 224 zcmV<603ZMF0f_>T7by@31^@s6AM^iV00001b5ch_0Itp)=>Px#24YJ`L;(K){{a7> zy{D6rAs&C)0ucl|8Y|66?EnA(iAh93R5;7EQ$Y@ZAPj4b(Vyr$e7W!7DV*v>$izWJ z<8~ozbY)v92w!Z#M{5EQ6hXZLShrc;`BudCz$S)0GF2DEGL|3d^kthQTpfS_-0p4e zkSbqLJ8bMp_WIH_#*$^&BfIw?fn=~ZO|<@aj5aK8zrvapyyfvG#g>>#2ET~OWl$54 a$K(LTXnY-kB-c>@0000YH82aGBg9r97jExTy!^TDtK&Oe7XQI>xO!#cY>1=E+P*6}fh>eYnk70mF6Ig9i^D*uyY3K1>W7 z8$|$}CRUz_QXeqkvlXYavAIA&LE#`aHa0$n0SXEV2hjrxpRI)CM*)cd0ARI4x7cfF QJOBUy07*qoM6N<$f<@dS>i_@% diff --git a/tools/editor/icons/icon_rect2.png b/tools/editor/icons/icon_rect2.png index e9293b5fad753be9a5e77809c45a0ac0a93e972c..cf3cfe3b2257c745706bb91bbf008512e3656135 100644 GIT binary patch delta 152 zcmV;J0B8U30l@)~7YYmr1^@s6Yv(Px#24YJ`L;&XigaCwZ zUR2eQAs&C*0TvJqE{S2cO#lD@a7jc#R5;6H{Lk>8ffB&PKp|kkC86%fPEhmB{XelA zpzg@daC84p24W0nK@$8=q6-+Yd4Um^%`gLR?*EBm84D?X$7VPSAq9jCrZ^ghumP~} zVnGWiycq*qK(Y{%2GG+1&S)f*`mkBRNNIKk0K*gICVCrBB8~t6002ovPDHLkV1i6t BO345K diff --git a/tools/editor/icons/icon_rect3.png b/tools/editor/icons/icon_rect3.png index e1e81f84e79e779dd6963302452ba61c9e66b458..8eacfff2077c24a4120bdd66d269f07bdf37ef55 100644 GIT binary patch delta 161 zcmV;S0ABy*0m=c87YYmr1^@s6Yv(3-V*=-0BK1?K~yNuWBkwX zp8*?CcVx#dfdp>u|H;ULOY_bBKN)dpL^1q78dP&+`~RN-H-yQl P00000NkvXXu0mjfs`5g+ delta 189 zcmV;u07C!D0pPx#24YJ`L;&XigaCwZ zUR2eQAs&C*0TvJqI+MF&FaQ7mW=TXrR5;6H{Lk>8ffB&PKp|kkC86%fPS9yL_y1&M z!KL};{-2CQ8U7y)syVX#|IdIM!sKBzS(=gAEa=X{=XY%0Vj-k}P@qyAjYHG`>6eq&KBc12A9000R9NkvXXu0mjfcpgu5 diff --git a/tools/editor/icons/icon_string.png b/tools/editor/icons/icon_string.png index 48bf753c40fa466b8bd22fb413d50ffca03c33aa..4a747f7c62b90d964e24c4113360f4057df8d46f 100644 GIT binary patch delta 99 zcmb>IV4NV%#lykIz`&6G+_rI|qJ%$tiKnkC`vWE}1|{tykN3I(rPMuL978nDCnqd0 ztN8Gs@ozIb|C@_9QzTt_tkk?>ZL$t*Flcx*g@a*#zT}I^7Vg`CS{OWC{an^LB{Ts5 DI#(iw delta 84 zcmeBRtehauCBVVPz`!8?`G4X>MF|IOPZ!4!i{9h}iMj^|o7und%h_yjPoJDBVEAgr o38UI84G+^8*cL>2EsmdKI;Vst0JEhXXaE2J diff --git a/tools/editor/icons/icon_vector.png b/tools/editor/icons/icon_vector.png index 0ee33ba0b7ed2973c857be9c829f7bdd18244a74..0bda8ff7c0fd110fc54c3cab9df96d2ffdbc3248 100644 GIT binary patch delta 147 zcmV;E0BrxB0k;8=7YYmr1^@s6Yv(A|ThjoM#bss( zs}8Aus2Vmu^JVv%?Y1TLwKikhP}TK$aqPnCk`83bKRGBn-KPKm002ovPDHLkV1mc& BICKC2 delta 122 zcmV-=0EPdz0iFSn7YYyv1^@s6AM^iVks%mmP)S5VR5*=eV4xLv@Zdo`G3pozX;x5B zXe7&Kbed#9tVSlXOdl`JiqXZfMk6t{;f-E=nsLez6YqFk_29vSdU6sCMl6t> c@&*h509TDU`=+g6cK`qY07*qoM6N<$f`!s8jQ{`u diff --git a/tools/editor/icons/icon_vector2.png b/tools/editor/icons/icon_vector2.png index 5920109a55daabe3a1217b4e7b11ad12fc65f962..5bfd08f52ab5287cf3b15ece01c33bac28951b91 100644 GIT binary patch delta 136 zcmeBWT*Ej)oQsEpje&t7`?+o7L`8{W_7YEDSM~=?TntJI!G?^o;Sp(4Ok>z)pmdeB_eGn*Bx&vqTMjkl oF$-3`?hI+S<&m?gXi#Ef=nqz1?a5&v2Q-$!)78&qol`;+01y5v2><{9 delta 105 zcmV-v0G9u(0gVBW7YYyv1^@s6AM^iVks%mVKS@MER5*=eU>H>3!Gj0&r0QYBrddHj zp^+?`(P@$aIU1SBvS|bxKroPri3M~ujQAw+0g@9NIhIgYGcEuCWFaR*jy}5l00000 LNkvXXu0mjfz6>Qy diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp index b81c88c817e..47673f8f815 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