aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-08 16:40:08 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-08 16:40:08 -0500
commitad68c7957beea8e4825c88d4038884e42f46c6f6 (patch)
treeb6245d4254905c138ac1f02faf140c2ca0cad7d7
parent9b4c8b4889b733ac7e6897ffa6f083d3d80b7150 (diff)
downloadtaipan-ad68c7957beea8e4825c88d4038884e42f46c6f6.tar.gz
add define to allow exiting the game (for testing interactions with atari DOSes)
-rw-r--r--taipan.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/taipan.c b/taipan.c
index ec96631..75fdea4 100644
--- a/taipan.c
+++ b/taipan.c
@@ -15,7 +15,7 @@
/* define this for testing sea_battle(). it causes a pirate
attack every time you leave port. Don't leave defined for
a release!! */
-#define COMBAT_TEST
+// #define COMBAT_TEST
/* define this to show internals of damage calculation */
// #define DAMAGE_TEST
@@ -31,6 +31,11 @@
/* define this to start the game in a 99% damaged ship */
// #define ALMOST_DEAD
+/* define this to end the game after 1 turn of gameplay. used
+ for testing whether cc65's exit(0) returns to DOS correctly.
+ use with "make testatr" target. */
+// #define EARLY_WITHDRAWAL
+
/**** atari-specific stuff */
/* values returned by cgetc() for backspace & enter keys */
@@ -1950,6 +1955,10 @@ void quit(void)
cputs("...");
timed_getch(TMOUT_3S);
+#ifdef EARLY_WITHDRAWAL
+ exit(0);
+#endif
+
return;
}