-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
|
@ -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;
|
||||
}
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
||||
|
|
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 172 B |
|
@ -481,7 +481,7 @@ 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 y0=data[MAX(0,ipos-1)];
|
||||
float y1=data[ipos];
|
||||
float y2=data[MIN(len-1,ipos+1)];
|
||||
float y3=data[MIN(len-1,ipos+2)];
|
||||
|
|