From 3505ea037d50c3d3fc52b57037f0020072b6a75e Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 7 Feb 2016 19:30:26 -0500 Subject: save another 24 bytes, now 4626 free --- taipan-applesoft-annotated.txt | 2 +- taipan.c | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/taipan-applesoft-annotated.txt b/taipan-applesoft-annotated.txt index a6d0b97..fe54c00 100644 --- a/taipan-applesoft-annotated.txt +++ b/taipan-applesoft-annotated.txt @@ -1631,7 +1631,7 @@ VTAB 18: PRINT IV$;: & 32,42: - PRINT "Please limit your Firm's name to 22 chara cters or less.";: + PRINT "Please limit your Firm's name to 22 characters or less.";: & 32,59: PRINT NV$: CALL 2518: diff --git a/taipan.c b/taipan.c index 6621885..9cc1916 100644 --- a/taipan.c +++ b/taipan.c @@ -731,25 +731,35 @@ void update_guns() { } void fight_stats(int ships, int orders) { - // cursor(0); gotoxy(0, 0); justify_int(ships); cputs(" ship"); if(ships != 1) cputc_s(); - // cputs(" attacking, Taipan! \r\n"); cputs(" attacking"); cprint_taipan_bang(); cspace(); crlf(); cputs("Your orders are: "); + cblank(11); + switch(orders) { + case 1: cputs("Fight"); break; + case 2: cputs("Run"); break; + case 3: cputs("Throw Cargo"); break; + default: break; + } + + /* + // switch() saves 15 bytes over this: if(orders == 1) - cputs("Fight "); + cputs("Fight"); else if(orders == 2) - cputs("Run "); + cputs("Run"); else if(orders == 3) cputs("Throw Cargo"); + */ + hide_cursor(); } -- cgit v1.2.3