From 97e7909e4d730524b3ea319fa86520ed3bb3df5c Mon Sep 17 00:00:00 2001 From: iamcheeseman <[hidden email]> Date: Fri, 27 Feb 2026 23:23:16 -0500 Subject: use odin's new handle maps rather than my own --- tools/compile_assets/loaders.odin | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tools/compile_assets/loaders.odin') diff --git a/tools/compile_assets/loaders.odin b/tools/compile_assets/loaders.odin index eadbc44..88ddd08 100644 --- a/tools/compile_assets/loaders.odin +++ b/tools/compile_assets/loaders.odin @@ -1,6 +1,6 @@ package assets_gen -import os "core:os/os2" +import "core:os" import "core:fmt" import "core:strings" import "core:path/filepath" @@ -78,11 +78,11 @@ load_png :: proc(path: string, png_file: ^os.File, output: ^os.File) { die("Could not convert PNG to QOI (%v)", qoi_err) } - abs_path, found_abs := filepath.abs( + abs_path, abs_err := filepath.abs( compiled_path, context.temp_allocator ) - if !found_abs { + if abs_err != nil { die("Could not find absolute path for %v", compiled_path) } @@ -159,11 +159,11 @@ _load_sprite_sheet :: proc( die("Could not save spritesheet %v (%v)", path, qoi_err) } - abs_path, found_abs := filepath.abs( + abs_path, abs_err := filepath.abs( compiled_path, context.temp_allocator ) - if !found_abs { + if abs_err != nil { die("Could not find absolute path for %v", compiled_path) } @@ -240,7 +240,8 @@ load_ase :: proc(path: string, ase_file: ^os.File, output: ^os.File) { unmarshal_err := ase.unmarshal(&doc, path, alloc = context.temp_allocator) if unmarshal_err != nil { - die("Could not unmarshal aseprite file %v (%v)", path, unmarshal_err) + // FIXME: Odin bug? Had to not die here because the condition above is borked + fmt.eprintfln("Could not unmarshal aseprite file %v (%v)", path, unmarshal_err) } // Load animation -- cgit v1.3-2-g0d8e