aboutsummaryrefslogtreecommitdiff
path: root/tools/compile_assets
diff options
context:
space:
mode:
authoriamcheeseman <[hidden email]>2026-01-16 14:08:51 -0500
committeriamcheeseman <[hidden email]>2026-01-16 14:08:51 -0500
commit30a49954e4cb434a1c47503c839feb20558a202b (patch)
treed18228602676dbc7cd9790e18444b15a8a2157d3 /tools/compile_assets
parent64e3dc9c109f4f76d5d1f65a9082340213985361 (diff)
Rename enums to use Ada_Case
Diffstat (limited to 'tools/compile_assets')
-rw-r--r--tools/compile_assets/loaders.odin6
-rw-r--r--tools/compile_assets/main.odin6
-rw-r--r--tools/compile_assets/tiled.odin8
3 files changed, 10 insertions, 10 deletions
diff --git a/tools/compile_assets/loaders.odin b/tools/compile_assets/loaders.odin
index a7c31fd..097c483 100644
--- a/tools/compile_assets/loaders.odin
+++ b/tools/compile_assets/loaders.odin
@@ -39,7 +39,7 @@ load_qoi :: proc(path: string, qoi: ^os.File, output: ^os.File) {
)
}
- line := fmt.aprintf("{{data = #load(%w), anim = .NONE}}", rel_path)
+ line := fmt.aprintf("{{data = #load(%w), anim = .None}}", rel_path)
images[filepath.stem(path)] = line
paths_to_res_type[path] = "Image_Id"
@@ -97,7 +97,7 @@ load_png :: proc(path: string, png_file: ^os.File, output: ^os.File) {
)
}
- line := fmt.aprintf("{{data = #load(%w), anim = .NONE}}", rel_path)
+ line := fmt.aprintf("{{data = #load(%w), anim = .None}}", rel_path)
images[filepath.stem(path)] = line
paths_to_res_type[path] = "Image_Id"
@@ -178,7 +178,7 @@ _load_sprite_sheet :: proc(
)
}
- anim_name := strings.to_screaming_snake_case(
+ anim_name := strings.to_ada_case(
filepath.stem(path),
allocator = context.temp_allocator,
)
diff --git a/tools/compile_assets/main.odin b/tools/compile_assets/main.odin
index b82b5f3..67121fd 100644
--- a/tools/compile_assets/main.odin
+++ b/tools/compile_assets/main.odin
@@ -159,7 +159,7 @@ create_enum :: proc(
ids = strings.concatenate({
ids,
" ",
- strings.to_upper_snake_case(key, context.temp_allocator),
+ strings.to_ada_case(key, context.temp_allocator),
",\n"
}, allocator = context.temp_allocator)
}
@@ -186,7 +186,7 @@ create_loads :: proc(
load = strings.concatenate({
load,
" .",
- strings.to_upper_snake_case(key, context.temp_allocator),
+ strings.to_ada_case(key, context.temp_allocator),
" = ",
elements[key],
",\n",
@@ -352,7 +352,7 @@ main :: proc() {
continue
}
- res_name := strings.to_upper_snake_case(
+ res_name := strings.to_ada_case(
filepath.stem(file.fullpath),
context.temp_allocator,
)
diff --git a/tools/compile_assets/tiled.odin b/tools/compile_assets/tiled.odin
index 621e988..a5b6bed 100644
--- a/tools/compile_assets/tiled.odin
+++ b/tools/compile_assets/tiled.odin
@@ -259,7 +259,7 @@ load_json_world :: proc(path: string) {
}
for room in json_dat.maps {
- room_name := strings.to_screaming_snake_case(
+ room_name := strings.to_ada_case(
filepath.stem(room.file_name),
allocator = context.temp_allocator,
)
@@ -308,12 +308,12 @@ load_json_tileset :: proc(path: string) {
die("Failed to parse tileset %v (%v)", path, unmarshal_err)
}
- tileset_enum := strings.to_screaming_snake_case(
+ tileset_enum := strings.to_ada_case(
filepath.stem(path),
allocator = context.temp_allocator,
)
- image_enum := strings.to_screaming_snake_case(
+ image_enum := strings.to_ada_case(
filepath.stem(json_dat.image),
allocator = context.temp_allocator,
)
@@ -449,7 +449,7 @@ load_json_room :: proc(path: string, file: ^os.File) {
parallax := [2]f32{f32(layer.parallaxx), f32(layer.parallaxy)}
for obj in layer.objects {
- type_name := strings.to_screaming_snake_case(obj.type)
+ type_name := strings.to_ada_case(obj.type)
// `object_type_names` now owns `type_name`; freed in main
if type_name in object_type_names {