From 0fd2149f32c4a8243d14dd90dde9a9d93443cd56 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 8 Jan 2016 19:02:01 -0500 Subject: warmstart instead of exit(0) --- taipan.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'taipan.c') diff --git a/taipan.c b/taipan.c index 75fdea4..af6f31b 100644 --- a/taipan.c +++ b/taipan.c @@ -12,9 +12,12 @@ register. No need to disable this now */ #define POKEY_RANDOM +/**** These defines should be disabled for normal gameplay. + Don't leave any of them enabled for a release or a + normal test build. */ + /* define this for testing sea_battle(). it causes a pirate - attack every time you leave port. Don't leave defined for - a release!! */ + attack every time you leave port. */ // #define COMBAT_TEST /* define this to show internals of damage calculation */ @@ -31,11 +34,6 @@ /* 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 */ @@ -1600,11 +1598,15 @@ void final_stats(void) clrscr(); - exit(0); + /* I can't get cc65's exit() to play nice, just do a warmstart */ + __asm__("jmp $e474"); } void transfer(void) { + /* you might think making i an unsigned char would save + a few bytes of code... but it makes the code a little + bigger instead! */ int i, in_use; long amount = 0; @@ -1714,9 +1716,9 @@ void transfer(void) void quit(void) { - unsigned char choice; + unsigned char choice, sunk; int result = 0, - damagepct, sunk; + damagepct; compradores_report(); cputs("Taipan, do you wish me to go to:\r\n"); @@ -1955,10 +1957,6 @@ void quit(void) cputs("..."); timed_getch(TMOUT_3S); -#ifdef EARLY_WITHDRAWAL - exit(0); -#endif - return; } -- cgit v1.2.3