From 6445629ddc43d3815e4fae6f65aab257e12e2a36 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 8 Jan 2016 19:38:33 -0500 Subject: more battle screen cursor cleanups, reinstate exit(0) --- taipan.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/taipan.c b/taipan.c index af6f31b..a30eb93 100644 --- a/taipan.c +++ b/taipan.c @@ -521,6 +521,10 @@ void fancy_numbers(unsigned long num, char *fancy) { } */ +void hide_cursor() { + gotoxy(0,23); cputc(' '); +} + void update_guns() { revers(1); gotoxy(31, 1); @@ -529,6 +533,7 @@ void update_guns() { if(guns < 10) cputc(' '); cprintulong(guns); revers(0); + hide_cursor(); } void fight_stats(int ships, int orders) { @@ -551,6 +556,7 @@ void fight_stats(int ships, int orders) { cputs("Run "); else if(orders == 3) cputs("Throw Cargo"); + hide_cursor(); } /* print an inverse video plus if there are offscreen ships, @@ -558,6 +564,7 @@ void fight_stats(int ships, int orders) { void plus_or_space(unsigned char b) { gotoxy(39, 15); cputc(b ? 0xab : ' '); + hide_cursor(); } int sea_battle(int id, int num_ships) { @@ -1596,10 +1603,13 @@ void final_stats(void) return; } - clrscr(); + // clrscr(); + + /* I can't get cc65's exit() to play nice, just do a coldstart */ + // __asm__("jmp $e477"); - /* I can't get cc65's exit() to play nice, just do a warmstart */ - __asm__("jmp $e474"); + /* exit(0) works in DOS 2.0s and 2.5, known to fail in Sparta */ + exit(0); } void transfer(void) -- cgit v1.2.3