aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-08 19:38:33 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-08 19:38:33 -0500
commit6445629ddc43d3815e4fae6f65aab257e12e2a36 (patch)
treec3f6b90ad9d5d6d9d781693b247e6b31b4fd5226
parent0fd2149f32c4a8243d14dd90dde9a9d93443cd56 (diff)
downloadtaipan-6445629ddc43d3815e4fae6f65aab257e12e2a36.tar.gz
more battle screen cursor cleanups, reinstate exit(0)
-rw-r--r--taipan.c16
1 files 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)