From 847087affbcf2fb5c18b47ae1ee7b5471fc32378 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 31 May 2021 23:30:54 -0400 Subject: Semi-random ship damage --- taipan.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'taipan.c') diff --git a/taipan.c b/taipan.c index a7518e6..7dbb0d3 100644 --- a/taipan.c +++ b/taipan.c @@ -1005,7 +1005,8 @@ unsigned int gunamt(void) { void new_ship(void) { unsigned long amount; - amount = gunamt() * (capacity / 50) + 1000; + /* TODO: check against applesoft, line 1060 */ + amount = gunamt() * (capacity / 50) + 1000; if(cash < amount) { return; @@ -3405,16 +3406,14 @@ int main(void) { #endif #ifdef LORCHA_TEST + gotox0y(0); + clrtoeol(); + for(choice = 0; choice < 10; choice++) { + draw_lorcha(choice); + } while(1) { - gotox0y(0); - clrtoeol(); - for(choice = 0; choice < 10; choice++) { - draw_lorcha(choice); - sink_lorcha(choice); - cprintuint(PEEK(0xda)); - cspace(); - } - agetc(); + choice = agetc() % 10; + damage_lorcha(choice); } #endif -- cgit v1.2.3