Added animations

Added new assets for the player
Added lookups for assets
Initial sound testing
Re-enabled temp world drawing
This commit is contained in:
2025-10-06 00:52:16 +01:00
parent 3eb8683ce3
commit c721839dfa
30 changed files with 210 additions and 20 deletions

View File

@@ -29,6 +29,20 @@ Str8 Str8_WrapZ(U8 *data) {
return result;
}
#define FNV_OFFSET_BIAS ((U64) 0xCBF29CE484222325)
#define FNV_PRIME ((U64) 0x100000001B3)
U64 Str8_Hash(Str8 v) {
U64 result = FNV_OFFSET_BIAS;
for (S64 it = 0; it < v.count; ++it) {
result ^= v.data[it];
result *= FNV_PRIME;
}
return result;
}
Str8 Str8_Copy(M_Arena *arena, Str8 s) {
Str8 result;
result.count = s.count;

View File

@@ -36,6 +36,11 @@
#define SLL_PopN(h, next) (((h) != 0) ? (h) = (h)->next : 0)
#define SLL_Enqueue(h, t, n) SLL_EnqueueN(h, t, n, next)
#define SLL_EnqueueFront(h, t, n) SLL_EnqueueFrontN(h, t, n, next)
#define SLL_Dequeue(h, t) SLL_DequeueN(h, t, next)
#define SLL_Push(h, n) SLL_PushN(h, n, next)
#define SLL_Pop(h) (((h) != 0) ? (h) = (h)->next : 0)
#define function static
#define internal static

View File

@@ -11,6 +11,8 @@ function Str8 Str8_Wrap(S64 count, U8 *data);
function Str8 Str8_WrapRange(U8 *start, U8 *end);
function Str8 Str8_WrapZ(U8 *data);
function U64 Str8_Hash(Str8 v);
function Str8 Str8_Copy(M_Arena *arena, Str8 s);
function Str8 Str8_Format(M_Arena *arena, const char *format, ...);