Separate object layers, asign layers to proper slots

This commit is contained in:
2023-11-09 08:38:57 +01:00
parent 4458a26c4f
commit fa79af2a17
9 changed files with 226 additions and 72 deletions

View File

@@ -0,0 +1,20 @@
#ifndef BREEZE_STRING_H
#define BREEZE_STRING_H
#include "../defines.h"
typedef u32 BzStringHashFunc(const char *str);
// djb2 hash algorithm
// From: https://stackoverflow.com/questions/7666509/hash-function-for-string
// http://www.cse.yorku.ca/~oz/hash.html
static u32 bzStringDefaultHash(const char *str) {
u32 hash = 5381;
int c;
while ((c = (int) *str++)) {
hash = ((hash << 5) + hash) + c; /* hash + 33 + c */
}
return hash;
}
#endif //BREEZE_STRING_H