aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.txt3
-rw-r--r--taipan.c14
2 files changed, 15 insertions, 2 deletions
diff --git a/README.txt b/README.txt
index f951ca1..5b85282 100644
--- a/README.txt
+++ b/README.txt
@@ -121,6 +121,9 @@ arcade game).
Bugs! At least these:
+- After a battle, the prices don't get reset (or, not always?) when
+ entering the new port.
+
- The BSS overlaps the start of the title screen. Consequences: There
is a momentary graphics glitch when the main game is done loading and
before it shows the "name your firm" screen. Also, we can't go back
diff --git a/taipan.c b/taipan.c
index 44c8f78..c93c6c0 100644
--- a/taipan.c
+++ b/taipan.c
@@ -8,6 +8,11 @@
#include "sounds.h"
+/* define this to use cc65's rand() instead of POKEY's RANDOM
+ register. Leave disabled for now as POKEY never returns 0 (it's an
+ LFSR, I should have known that would happen...) */
+// #define POKEY_RANDOM
+
/* define this for testing sea_battle(). it causes a pirate
attack every time you leave port. Don't leave defined for
a release!! */
@@ -67,14 +72,19 @@ extern void __fastcall__ jsleep(unsigned int j);
/* Atari-specific random number functions from rand.s.
Non-Atari platforms can probably just:
-#define initrand() _randomize();
-#define randi() rand();
+#define initrand() _randomize()
+#define randi() rand()
#define randl() (unsigned long)((randi() << 16) | randi())
*/
+#if POKEY_RANDOM
#define initrand() /* no-op on Atari */
/* random positive int, 0 to 32767 */
extern unsigned int __fastcall__ randi(void);
+#else
+#define initrand() _randomize()
+#define randi() rand()
+#endif
/* random long, 0 to 2**32-1 */
extern unsigned long __fastcall__ randl(void);