diff options
author | B. Watson <yalhcru@gmail.com> | 2016-01-07 17:01:49 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-01-07 17:01:49 -0500 |
commit | f219789f03097055be5210166bd35557e3414637 (patch) | |
tree | d7234d8e1af28cbd0038f3d33a7b287efc84147c | |
parent | 1478b0c357fac4cabb574e521f69e062bf0e4d70 (diff) | |
download | taipan-f219789f03097055be5210166bd35557e3414637.tar.gz |
temporarily switch back to cc65's rand()
-rw-r--r-- | README.txt | 3 | ||||
-rw-r--r-- | taipan.c | 14 |
2 files changed, 15 insertions, 2 deletions
@@ -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 @@ -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); |