summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/tests/test_math.cpp81
-rw-r--r--core/os/input_event.cpp4
-rw-r--r--modules/gdscript/gd_editor.cpp4
-rw-r--r--scene/animation/animation_player.cpp1
-rw-r--r--scene/audio/stream_player.cpp2
-rw-r--r--tools/doc/doc_data.cpp2
-rw-r--r--tools/editor/icons/icon_array_data.pngbin212 -> 176 bytes
-rw-r--r--tools/editor/icons/icon_array_float.pngbin213 -> 177 bytes
-rw-r--r--tools/editor/icons/icon_array_int.pngbin204 -> 172 bytes
-rw-r--r--tools/editor/icons/icon_array_string.pngbin217 -> 178 bytes
-rw-r--r--tools/editor/icons/icon_array_variant.pngbin209 -> 172 bytes
-rw-r--r--tools/editor/icons/icon_bool.pngbin147 -> 164 bytes
-rw-r--r--tools/editor/icons/icon_color.pngbin322 -> 301 bytes
-rw-r--r--tools/editor/icons/icon_integer.pngbin142 -> 162 bytes
-rw-r--r--tools/editor/icons/icon_quat.pngbin265 -> 239 bytes
-rw-r--r--tools/editor/icons/icon_real.pngbin146 -> 162 bytes
-rw-r--r--tools/editor/icons/icon_rect2.pngbin240 -> 193 bytes
-rw-r--r--tools/editor/icons/icon_rect3.pngbin230 -> 202 bytes
-rw-r--r--tools/editor/icons/icon_string.pngbin121 -> 136 bytes
-rw-r--r--tools/editor/icons/icon_vector.pngbin158 -> 183 bytes
-rw-r--r--tools/editor/icons/icon_vector2.pngbin141 -> 172 bytes
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp8
22 files changed, 93 insertions, 9 deletions
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<int32_t> hashes;
+ List<StringName> tl;
+ ObjectTypeDB::get_type_list(&tl);
+
+
+ for (List<StringName>::Element *E=tl.front();E;E=E->next()) {
+
+ Vector<uint8_t> 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<uint32_t> existing;
+ success=true;
+
+ for(int j=0;j<hashes.size();j++) {
+
+ uint32_t eh = ihash2(ihash3(hashes[j]+ihash(s)+s))&((1<<i)-1);
+ if (existing.has(eh)) {
+ success=false;
+ break;
+ }
+ existing.insert(eh);
+ }
+
+ if (success) {
+ print_line("success at "+itos(i)+"/"+itos(nearest_shift(hashes.size()))+" shift "+itos(s));
+ break;
+ }
+ }
+ if (success)
+ break;
+ }
+
+ print_line("DONE");
+
+
+
+ return NULL;
+ }
{
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 2f39567a7e..3022a56e2a 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -107,13 +107,13 @@ InputEvent::operator String() const {
} break;
case JOYSTICK_MOTION: {
- str+= "Event: JoyMotion ";
+ str+= "Event: JoystickMotion ";
str=str+"Axis: "+itos(joy_motion.axis)+" Value: " +rtos(joy_motion.axis_value);
return str;
} break;
case JOYSTICK_BUTTON: {
- str+= "Event: JoyButton ";
+ str+= "Event: JoystickButton ";
str=str+"Pressed: "+itos(joy_button.pressed)+" Index: " +itos(joy_button.button_index)+" pressure "+rtos(joy_button.pressure);
return str;
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 8dfb55a6b6..b4e5c04c95 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -2324,8 +2324,8 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
"# Key",
"# MouseMotion",
"# MouseButton",
- "# JoyMotion",
- "# JoyButton",
+ "# JoystickMotion",
+ "# JoystickButton",
"# ScreenTouch",
"# ScreenDrag",
"# Action"
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 344fc5ecde..0bc54b3d43 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -211,6 +211,7 @@ void AnimationPlayer::_notification(int p_what) {
if (!get_tree()->is_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/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index 11e4797747..3836fa710b 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -433,7 +433,7 @@ void DocData::generate(bool p_basic_types) {
if (i==Variant::INPUT_EVENT) {
static const char* ie_type[InputEvent::TYPE_MAX]={
- "","Key","MouseMotion","MouseButton","JoyMotion","JoyButton","ScreenTouch","ScreenDrag","Action"
+ "","Key","MouseMotion","MouseButton","JoystickMotion","JoystickButton","ScreenTouch","ScreenDrag","Action"
};
cname+=ie_type[j];
}
diff --git a/tools/editor/icons/icon_array_data.png b/tools/editor/icons/icon_array_data.png
index 494d4c71a8..447acaab2b 100644
--- a/tools/editor/icons/icon_array_data.png
+++ b/tools/editor/icons/icon_array_data.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_float.png b/tools/editor/icons/icon_array_float.png
index 558be932dc..d1b78b4c3e 100644
--- a/tools/editor/icons/icon_array_float.png
+++ b/tools/editor/icons/icon_array_float.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_int.png b/tools/editor/icons/icon_array_int.png
index 74925553d9..2c4ec5bafb 100644
--- a/tools/editor/icons/icon_array_int.png
+++ b/tools/editor/icons/icon_array_int.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_string.png b/tools/editor/icons/icon_array_string.png
index 2aeded63df..a2e3f11c35 100644
--- a/tools/editor/icons/icon_array_string.png
+++ b/tools/editor/icons/icon_array_string.png
Binary files differ
diff --git a/tools/editor/icons/icon_array_variant.png b/tools/editor/icons/icon_array_variant.png
index 34cb83cadd..ab294898ad 100644
--- a/tools/editor/icons/icon_array_variant.png
+++ b/tools/editor/icons/icon_array_variant.png
Binary files differ
diff --git a/tools/editor/icons/icon_bool.png b/tools/editor/icons/icon_bool.png
index 3381033b00..80b3a9deb7 100644
--- a/tools/editor/icons/icon_bool.png
+++ b/tools/editor/icons/icon_bool.png
Binary files differ
diff --git a/tools/editor/icons/icon_color.png b/tools/editor/icons/icon_color.png
index 08547caa28..3ab87c98ea 100644
--- a/tools/editor/icons/icon_color.png
+++ b/tools/editor/icons/icon_color.png
Binary files differ
diff --git a/tools/editor/icons/icon_integer.png b/tools/editor/icons/icon_integer.png
index 32c8d9885b..b49390aeb1 100644
--- a/tools/editor/icons/icon_integer.png
+++ b/tools/editor/icons/icon_integer.png
Binary files differ
diff --git a/tools/editor/icons/icon_quat.png b/tools/editor/icons/icon_quat.png
index ebb8719d33..f09d2fcaba 100644
--- a/tools/editor/icons/icon_quat.png
+++ b/tools/editor/icons/icon_quat.png
Binary files differ
diff --git a/tools/editor/icons/icon_real.png b/tools/editor/icons/icon_real.png
index 80fbf7017c..7f5bf08ede 100644
--- a/tools/editor/icons/icon_real.png
+++ b/tools/editor/icons/icon_real.png
Binary files differ
diff --git a/tools/editor/icons/icon_rect2.png b/tools/editor/icons/icon_rect2.png
index e9293b5fad..cf3cfe3b22 100644
--- a/tools/editor/icons/icon_rect2.png
+++ b/tools/editor/icons/icon_rect2.png
Binary files differ
diff --git a/tools/editor/icons/icon_rect3.png b/tools/editor/icons/icon_rect3.png
index e1e81f84e7..8eacfff207 100644
--- a/tools/editor/icons/icon_rect3.png
+++ b/tools/editor/icons/icon_rect3.png
Binary files differ
diff --git a/tools/editor/icons/icon_string.png b/tools/editor/icons/icon_string.png
index 48bf753c40..4a747f7c62 100644
--- a/tools/editor/icons/icon_string.png
+++ b/tools/editor/icons/icon_string.png
Binary files differ
diff --git a/tools/editor/icons/icon_vector.png b/tools/editor/icons/icon_vector.png
index 0ee33ba0b7..0bda8ff7c0 100644
--- a/tools/editor/icons/icon_vector.png
+++ b/tools/editor/icons/icon_vector.png
Binary files differ
diff --git a/tools/editor/icons/icon_vector2.png b/tools/editor/icons/icon_vector2.png
index 5920109a55..5bfd08f52a 100644
--- a/tools/editor/icons/icon_vector2.png
+++ b/tools/editor/icons/icon_vector2.png
Binary files 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..5408e43e1a 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -481,10 +481,10 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
float mu = pos-Math::floor(pos);
int ipos = int(Math::floor(pos));
- float y0=data[MAX(0,ipos-i)];
- float y1=data[ipos];
- float y2=data[MIN(len-1,ipos+1)];
- float y3=data[MIN(len-1,ipos+2)];
+ float y0=data[MAX(0,ipos-1)*chans+c];
+ float y1=data[ipos*chans+c];
+ float y2=data[MIN(len-1,ipos+1)*chans+c];
+ float y3=data[MIN(len-1,ipos+2)*chans+c];
float mu2 = mu*mu;
float a0 = y3 - y2 - y0 + y1;