aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriamcheeseman <[hidden email]>2026-01-15 12:41:07 -0500
committeriamcheeseman <[hidden email]>2026-01-15 12:41:07 -0500
commit3c640e0d8244f87fec9518a60c7e5e95713d7f78 (patch)
tree833ee225a307ad66b784a6cdc55505d2609f9629
parent18dda98bfc5534a9de98811944f967f7c767832a (diff)
Fix memory leaks in the asset compiler
-rw-r--r--compile_assets.o0
-rwxr-xr-xsrc.binbin0 -> 5524024 bytes
-rw-r--r--src/assets.odin4
-rw-r--r--tools/compile_assets/main.odin2
-rw-r--r--tools/compile_assets/tiled.odin4
5 files changed, 3 insertions, 7 deletions
diff --git a/compile_assets.o b/compile_assets.o
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/compile_assets.o
diff --git a/src.bin b/src.bin
new file mode 100755
index 0000000..819cc0c
--- /dev/null
+++ b/src.bin
Binary files differ
diff --git a/src/assets.odin b/src/assets.odin
index ce5d9c5..b072805 100644
--- a/src/assets.odin
+++ b/src/assets.odin
@@ -6,8 +6,6 @@ package demonchime
// This file is autogenerated by tools/compile_assets
// All resource types are defined in 'src/resources.odin'.
-import rl "vendor:raylib"
-
Image_Id :: enum {
BULLET,
PISTOL,
@@ -51,7 +49,7 @@ images: [Image_Id]Image_Resource = {
animations: [Animation_Id]Animation_Resource = {
.NONE = {frame_count=1, frame_durations={100}, tags={}},
- .PLAYER = {frame_count = 23, frame_durations = {100, 100, 100, 100, 100, 100, 75, 75, 75, 75, 75, 75, 75, 75, 100, 100, 100, 100, 100, 100, 100, 100, 100}, tags = {"jump_up"={from = 14, to = 15}, "run"={from = 6, to = 13}, "jump_trans"={from = 16, to = 16}, "jump_down"={from = 17, to = 18}, "idle"={from = 0, to = 5}, "sleep"={from = 19, to = 22}}},
+ .PLAYER = {frame_count = 23, frame_durations = {100, 100, 100, 100, 100, 100, 75, 75, 75, 75, 75, 75, 75, 75, 100, 100, 100, 100, 100, 100, 100, 100, 100}, tags = {"idle"={from = 0, to = 5}, "jump_trans"={from = 16, to = 16}, "run"={from = 6, to = 13}, "jump_down"={from = 17, to = 18}, "jump_up"={from = 14, to = 15}, "sleep"={from = 19, to = 22}}},
}
rooms: [Room_Id]Room_Resource = {
diff --git a/tools/compile_assets/main.odin b/tools/compile_assets/main.odin
index b9c33db..01fdb3f 100644
--- a/tools/compile_assets/main.odin
+++ b/tools/compile_assets/main.odin
@@ -20,8 +20,6 @@ package demonchime
// This file is autogenerated by tools/compile_assets
// All resource types are defined in 'src/resources.odin'.
-import rl "vendor:raylib"
-
Image_Id :: enum {
<image-enum>}
diff --git a/tools/compile_assets/tiled.odin b/tools/compile_assets/tiled.odin
index 9305acc..29a6a69 100644
--- a/tools/compile_assets/tiled.odin
+++ b/tools/compile_assets/tiled.odin
@@ -366,7 +366,7 @@ load_json_tileset :: proc(path: string) {
}
}
- gids := make([]u32, len(local_tiles))
+ gids := make([]u32, len(local_tiles), context.temp_allocator)
for tile, i in local_tiles {
gids[i] = first_gid + u32(i)
}
@@ -407,7 +407,7 @@ load_json_room :: proc(path: string, file: ^os.File) {
gid, exists := gids[tileset_name]
if !exists {
load_json_tileset(strings.concatenate({
- filepath.dir(path),
+ filepath.dir(path, context.temp_allocator),
"/",
tileset.source,
}))