aboutsummaryrefslogtreecommitdiff
path: root/taipan.c
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-05-21 03:03:33 -0400
committerB. Watson <yalhcru@gmail.com>2021-05-21 03:03:33 -0400
commit8c8c219d3e5bf4f2c0af74528de21ebe7783743b (patch)
tree38c1f88330b631c676f121af3b8972fadab1464b /taipan.c
parentc3674c25db53023c65864894bd1b9488e070e1f4 (diff)
downloadtaipan-8c8c219d3e5bf4f2c0af74528de21ebe7783743b.tar.gz
Save 5 bytes, now 8974
Diffstat (limited to 'taipan.c')
-rw-r--r--taipan.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/taipan.c b/taipan.c
index 70996e8..6e8ac49 100644
--- a/taipan.c
+++ b/taipan.c
@@ -1961,8 +1961,7 @@ void retire(void) {
final_stats();
}
-// This didn't work out (revisit someday?)
-// extern void __fastcall__ print_score_msg(long *scoreptr);
+extern void __fastcall__ print_score_msg(long score);
long score_lim[] = {
50000L,
@@ -1990,7 +1989,7 @@ const char const *score_desc[] = {
void final_stats(void) {
char i, unrated = 1;
- int years = year - 1860;
+ int years = year - 1860;
#ifdef BIGNUM
long score;
@@ -2074,6 +2073,7 @@ void final_stats(void) {
crlf();
rvs_off();
+ /* 8969 bytes with this stuff:
if(score < 0)
// cputs("The crew has requested that you stay on\n"
// "shore for their safety!!\n\n");
@@ -2081,9 +2081,12 @@ void final_stats(void) {
else if(score < 100)
// 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);
+ /* Optimized the above stanza, only saved 5 bytes (8874).
+ Compiled code is 45 bytes. Replacing with a function call costs
+ 3 bytes, so the asm function has to be <42 bytes (it is). */
+ print_score_msg(score);
// cputs("Your Rating:\n");
gotox0y(11);