Skip to content

Commit

Permalink
thanm: s/th19_unk/jpeg_quality
Browse files Browse the repository at this point in the history
  • Loading branch information
DankRank committed Sep 7, 2023
1 parent 8aece65 commit 06e3387
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extlib/thtypes
Submodule thtypes updated 1 files
+2 −2 anm_types.h
4 changes: 2 additions & 2 deletions thanm/anmparse.y
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ Entry:
OPTIONAL("hasData", 'S', $prop_list);
entry->header->hasdata = prop ? prop->value->val.S : 1;

OPTIONAL("th19_unk", 'S', $prop_list);
entry->header->th19_unk = prop ? prop->value->val.S : 0;
OPTIONAL("jpeg_quality", 'S', $prop_list);
entry->header->jpeg_quality = prop ? prop->value->val.S : 0;

if (entry->header->hasdata) {
OPTIONAL("THTXSize", 'S', $prop_list);
Expand Down
10 changes: 5 additions & 5 deletions thanm/thanm.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ convert_header_to_old(
header->thtxoffset = th11.thtxoffset;
header->hasdata = th11.hasdata;
header->lowresscale = th11.lowresscale;
header->th19_unk = th11.th19_unk;
header->jpeg_quality = th11.jpeg_quality;
header->nextoffset = th11.nextoffset;
header->w_max = th11.w_max;
header->h_max = th11.h_max;
Expand Down Expand Up @@ -628,7 +628,7 @@ convert_header_to_11(
th11->thtxoffset = header.thtxoffset;
th11->hasdata = header.hasdata;
th11->lowresscale = header.lowresscale;
th11->th19_unk = header.th19_unk;
th11->jpeg_quality = header.jpeg_quality;
th11->nextoffset = header.nextoffset;
th11->w_max = header.w_max;
th11->h_max = header.h_max;
Expand Down Expand Up @@ -1088,7 +1088,7 @@ anm_read_file(
if(header->version == 8)
assert(header->lowresscale == 0 || header->lowresscale == 1);
/* NEWHU: 19 */
assert(version == 19 || header->th19_unk == 0);
assert(version == 19 || header->jpeg_quality == 0);

/* Lengths, including padding, observed are: 16, 32, 48. */
entry->name = anm_get_name(archive, (const char*)map + header->nameoffset);
Expand Down Expand Up @@ -1321,8 +1321,8 @@ anm_dump(
if (entry->header->version >= 8)
fprintf(stream, " lowResScale: %u,\n", entry->header->lowresscale);
/* NEWHU: 19 */
if (version == 19 && entry->header->th19_unk != 0)
fprintf(stream, " th19_unk: %u,\n", entry->header->th19_unk);
if (version == 19 && entry->header->jpeg_quality != 0)
fprintf(stream, " jpeg_quality: %u,\n", entry->header->jpeg_quality);

fprintf(stream, " hasData: %u,\n", entry->header->hasdata);
if (entry->header->hasdata) {
Expand Down

0 comments on commit 06e3387

Please sign in to comment.