From d920e5d62020d751ccaa3491cc66275ade749011 Mon Sep 17 00:00:00 2001 From: quou Date: Fri, 27 Dec 2024 18:52:48 +1100 Subject: building and running on windows with visual studio --- asset.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'asset.cpp') diff --git a/asset.cpp b/asset.cpp index fc6d22b..fc8abde 100644 --- a/asset.cpp +++ b/asset.cpp @@ -26,7 +26,7 @@ struct Manager { } RLoader* find_loader(const char* magic) { - uint32_t hash = hash_string(magic); + uint32_t hash = fnv1a64((uint8_t*)magic, 4); int bucket = (int)(hash % max_asset_types); int i; for (i = 0; i < max_asset_types; i++) { @@ -68,6 +68,7 @@ void register_asset_loader( void Asset_Arena::init(Arena* arena, const char* pack_name) { p = pack_open(pack_name, arena); + assert(p != 0); a = arena; s = (Arena*)arena_alloc(a, sizeof *s); init_arena( -- cgit v1.2.3-54-g00ecf