diff options
Diffstat (limited to 'src/misc.zig')
-rw-r--r-- | src/misc.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/misc.zig b/src/misc.zig index caa0319..2bbb9f0 100644 --- a/src/misc.zig +++ b/src/misc.zig @@ -66,7 +66,9 @@ export fn loadAnimation(name: [*:0]const u8) extern struct { } { var dir = cwd().openDir(data_dir ++ "animations", .{}) catch unreachable; defer dir.close(); - const anim_file = readFile(dir, "{s}.tsv", .{ name }) catch unreachable; + const anim_file = readFile(dir, "{s}{c}index.tsv", .{ + name, sep, // $animation/index.tsv + }) catch unreachable; defer allocator.free(anim_file); const length = count(u8, anim_file, "\t") - 1; const frames = allocator.alloc(Frame, length) catch unreachable; @@ -76,8 +78,8 @@ export fn loadAnimation(name: [*:0]const u8) extern struct { var i = @as(usize, 0); while (i < length) : (i += 1) { var values = tokenize(anim.next().?, "\t"); - const frame_file = readFile(dir, "frames{c}{s}{c}{s}.tsv", .{ - sep, name, sep, values.next().?, // frames/$animation/$frame.tsv + const frame_file = readFile(dir, "{s}{c}frames{c}{s}.tsv", .{ + name, sep, sep, values.next().?, // $animation/frames/$frame.tsv }) catch unreachable; defer allocator.free(frame_file); |