diff options
Diffstat (limited to 'taipan.c')
-rw-r--r-- | taipan.c | 31 |
1 files changed, 23 insertions, 8 deletions
@@ -1860,10 +1860,21 @@ void final_stats(void) return; } - /* restore ROM character set. TODO: save old PEEK(756) - in newtitle.s, restore that here instead of using - hardcoded value. */ - POKE(756, 224); + + /* exit(0) works by itself in DOS 2.0S or 2.5, or any DUP.SYS + style DOS that reopens the E: device when entering the menu. + However, command-line DOSes (XL and Sparta) don't do this, + which results in garbage on screen and wrong colors. So: */ + + /* restore CHBAS to its original value, generally the ROM font. + This is called fontsave in newtitle.s. */ + POKE(756, PEEK(0x6fc)); + + /* restore COLOR1 and COLOR2. These locations are called + color1save and color2save in newtitle.s. */ + POKE(709, PEEK(0x6fd)); + POKE(710, PEEK(0x6fe)); + exit(0); } @@ -2919,10 +2930,14 @@ void visit_bank(void) continue; } - big_sub(bank, bank, bigamt); - big_add(bigcash, bigcash, bigamt); - big_to_ulong(bigcash, &cash); - break; + if(big_cmp(bank, bigamt) < 0) { + you_only_have(1); + } else { + big_sub(bank, bank, bigamt); + big_add(bigcash, bigcash, bigamt); + big_to_ulong(bigcash, &cash); + break; + } #else if (amount == -1) { |