Skip to content

Commit

Permalink
Fix animation text file bug
Browse files Browse the repository at this point in the history
Animation data text file will no longer be created unless there is animation data
  • Loading branch information
Torphedo committed Jan 8, 2023
1 parent 39ebceb commit 116f950
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions alr_parser/src/parsers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 116f950

Please sign in to comment.