From 116f950a0cad0d186fc5a738ef2e041b10ddf278 Mon Sep 17 00:00:00 2001 From: Torphedo <73564623+Torphedo@users.noreply.github.com> Date: Sat, 7 Jan 2023 22:16:07 -0500 Subject: [PATCH] Fix animation text file bug Animation data text file will no longer be created unless there is animation data --- alr_parser/src/parsers.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/alr_parser/src/parsers.c b/alr_parser/src/parsers.c index de4a484..216e15c 100644 --- a/alr_parser/src/parsers.c +++ b/alr_parser/src/parsers.c @@ -76,6 +76,9 @@ bool split_alr(char* alr_filename) static void block_animation(arena_t* arena, unsigned int texture_buffer_ptr) { if (!info_mode) { + if (animation_out == NULL) { + animation_out = fopen("animation_out.txt", "wb"); + } fprintf(animation_out, "\n=== Animation Block ===\n"); } uint64_t block_start_pos = arena->pos; @@ -249,11 +252,6 @@ static void (*function_ptrs[23]) (arena_t*, unsigned int) = { bool block_parse_all(char* alr_filename) { - - if (!info_mode) { - animation_out = fopen("animation_out.txt", "wb"); - } - // Read header FILE* alr = fopen(alr_filename, "rb"); if (alr != NULL) {