aboutsummaryrefslogtreecommitdiff
path: root/taipan.c
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-08 02:10:00 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-08 02:10:00 -0500
commit0de843a9d404d1022ac40ba1e25da0194f367027 (patch)
tree9602d312e26497d16793ea9f9aa08a17de9e9e83 /taipan.c
parentd3fa8aeeb26ece734b54395b743b2d4a341f5613 (diff)
downloadtaipan-0de843a9d404d1022ac40ba1e25da0194f367027.tar.gz
fix POKEY random wrappers, I hope
Diffstat (limited to 'taipan.c')
-rw-r--r--taipan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/taipan.c b/taipan.c
index 6fdd1d2..98f4f06 100644
--- a/taipan.c
+++ b/taipan.c
@@ -11,7 +11,7 @@
/* 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 POKEY_RANDOM
/* define this for testing sea_battle(). it causes a pirate
attack every time you leave port. Don't leave defined for
@@ -73,11 +73,11 @@ 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 randi() ((unsigned int)rand())
#define randl() (unsigned long)((randi() << 16) | randi())
*/
-#if POKEY_RANDOM
+#ifdef POKEY_RANDOM
#define initrand() /* no-op on Atari */
/* random positive int, 0 to 32767 */
extern unsigned int __fastcall__ randi(void);