Skip to content

Commit

Permalink
Support th185 in thmsg
Browse files Browse the repository at this point in the history
  • Loading branch information
muter3000 committed Aug 14, 2022
1 parent 85ad8b0 commit 459cc17
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 2 additions & 3 deletions thmsg/thmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ print_usage(void)
" -V display version information and exit\n"
" -e extract or create ending dialogue\n"
"VERSION can be:\n"
" 6, 7, 8, 9, 95, 10, 11, 12, 125, 128, 13, 14, 143, 15, 16, 165, 17 or 18\n"
/* NEWHU: 18 */
" 6, 7, 8, 9, 95, 10, 11, 12, 125, 128, 13, 14, 143, 15, 16, 165, 17, 18 or 185\n"
"Report bugs to <" PACKAGE_BUGREPORT ">.\n", argv0);
}

Expand Down Expand Up @@ -109,7 +108,7 @@ main(int argc, char* argv[])
case 165:
case 17:
case 18:
/* NEWHU: 18 */
case 185:
module = &th06_msg;
break;
case 95:
Expand Down
13 changes: 10 additions & 3 deletions thmsg/thmsg06.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static const id_format_pair_t th143_msg_fmts[] = {
};

static const id_format_pair_t th16_msg_fmts[] = {
{ 19, "S" },
{ 34, "SS" },
{ 35, "" },
{ 0, NULL }
Expand All @@ -162,7 +163,12 @@ static const id_format_pair_t th18_msg_fmts[] = {
{ 0, NULL }
};

/* NEWHU: 18 */
static const id_format_pair_t th185_msg_fmts[] = {
{ 37, "" },
{ 38, "" },
{ 39, "" },
{ 0, NULL }
};

static const id_format_pair_t th10_msg_ed_fmts[] = {
{ 0, "" },
Expand Down Expand Up @@ -231,7 +237,7 @@ th06_find_format(unsigned int version, int id)
case 16:
case 17:
case 18:
/* NEWHU: 18 */
case 185:
ret = find_format(th10_msg_ed_fmts, id);
break;
default:
Expand All @@ -240,7 +246,8 @@ th06_find_format(unsigned int version, int id)
}
} else {
switch (version) {
/* NEWHU: 18 */
case 185:
if ((ret = find_format(th185_msg_fmts, id))) break; /* fallthrough */
case 18:
if ((ret = find_format(th18_msg_fmts, id))) break; /* fallthrough */
case 17:
Expand Down
2 changes: 1 addition & 1 deletion util/program.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ unsigned int parse_version(char *str) {
{165, "vd"},
{17, "wbawc"},
{18, "um"},
/* NEWHU: 18 */
{185, "bm"},
{0}
};
const struct version_abbr *vp = vers;
Expand Down

0 comments on commit 459cc17

Please sign in to comment.