From c89875818d478c4a579a2f5af4e64fa35c7f78b6 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 19 May 2021 16:19:35 -0400 Subject: "Play again?" default to Y; save 5 bytes, now 8839 --- taipan.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'taipan.c') diff --git a/taipan.c b/taipan.c index 39a70cb..f23bb86 100644 --- a/taipan.c +++ b/taipan.c @@ -1958,11 +1958,13 @@ void retire(void) { final_stats(); } +// This didn't work out (revisit someday?) +// extern void __fastcall__ print_score_msg(long *scoreptr); + void final_stats(void) { int years = year - 1860, - time = get_time(), - choice; + time = get_time(); #ifdef BIGNUM long score; @@ -2054,6 +2056,9 @@ void final_stats(void) // cputs("Have you considered a land based job?\n\n\n"); print_msg(M_land_based_job); + // Tried to optimize the above stanza, failed to beat the compiler: + // print_score_msg(&score); + // cputs("Your Rating:\n"); gotox0y(11); print_msg(M_your_rating); @@ -2121,9 +2126,8 @@ void final_stats(void) gotox0y22(); // cputs("Play again? "); print_msg(M_play_again); - choice = yngetc(0); - if(choice == 'y') { + if(yngetc('y') == 'y') { init_game(); return; } -- cgit v1.2.3