From 076849d61bba0ad62ac899271700e66f9bf5eea2 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 19 Apr 2021 15:56:04 -0400 Subject: Save 92 bytes --- taipan.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'taipan.c') diff --git a/taipan.c b/taipan.c index 36993bc..ac76bc6 100644 --- a/taipan.c +++ b/taipan.c @@ -372,6 +372,8 @@ char *num_buf = (char *) 0x600; // char *item[] = { "Opium", "Silk", "Arms", "General Cargo" }; const char * const item[] = { M_opium, M_silk, M_arms, M_gen_cargo }; +extern void __fastcall__ print_item(char item); + /* const char *location[] = { "At sea", "Hong Kong", "Shanghai", "Nagasaki", "Saigon", "Manila", "Singapore", "Batavia" }; @@ -1287,13 +1289,13 @@ char sea_battle(char id, int num_ships) { cprint_colon_space(); gotoxy(4, 4); // cputs(item[0]); - print_msg(M_opium); + print_item(0); // cputs(": "); cprint_colon_space(); cprintulong(hold_[0]); gotoxy(24, 4); // cputs(item[1]); - print_msg(M_silk); + print_item(1); // cputs(": "); cprint_colon_space(); cprintulong(hold_[1]); @@ -1301,13 +1303,13 @@ char sea_battle(char id, int num_ships) { clrtoeol(); gotox(5); // cputs(item[2]); - print_msg(M_arms); + print_item(2); // cputs(": "); cprint_colon_space(); cprintulong(hold_[2]); gotoxy(21, 5); // cputs(item[3]); - print_msg(M_gen_cargo); + print_item(3); // cputs(": "); cprint_colon_space(); cprintulong(hold_[3]); @@ -2174,7 +2176,7 @@ void transfer(void) { compradores_report(); how_much(); // cputs(item[i]); - print_msg(item[i]); + print_item(i); // cputs(" shall I move\nto the warehouse"); print_msg(M_move_to_whouse); cprint_taipan_prompt(); @@ -2224,7 +2226,7 @@ void transfer(void) { compradores_report(); how_much(); // cputs(item[i]); - print_msg(item[i]); + print_item(i); // cputs(" shall I move\naboard ship"); print_msg(M_move_aboard); cprint_taipan_prompt(); @@ -2837,7 +2839,7 @@ void good_prices(void) { // cputs("!! The price of "); print_msg(M_the_price_of); // cputs(item[i]); - print_msg(item[i]); + print_item(i); // cputs("\n has "); print_msg(M_nl_has_spc); @@ -2880,7 +2882,7 @@ int port_choices(void) { print_msg(M_general_shortname); else // cputs(item[choice]); - print_msg(item[choice]); + print_item(choice); // cputc(':'); cprint_colon_space(); gotox(11 + ((choice & 1) * 18)); @@ -3106,7 +3108,7 @@ void buy(void) { gotox0y22(); how_much(); // cputs(item[choice]); - print_msg(item[choice]); + print_item(choice); // cputs(" shall"); print_msg(M_spc_shall); gotoxy(31, 22); @@ -3160,7 +3162,7 @@ void sell(void) { how_much(); // cputs(item[choice]); - print_msg(item[choice]); + print_item(choice); // cputs(" shall\nI sell, "); print_msg(M_shall_i_sell); cprint_taipan_colon(); -- cgit v1.2.3