rt-01 mapper should use the new deterministic prng instead of rand()

This commit is contained in:
rainwarrior 2018-01-17 04:52:12 +00:00
parent ad3797655e
commit 2ed3f51b51
1 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,8 @@
#include "mapinc.h"
extern u64 xoroshiro128plus_next(); // deterministic random
static DECLFR(UNLRT01Read) {
// u16 i, prot_areas[2][2] = {
// { 0x8E80, 0x8EFF },
@ -33,7 +35,7 @@ static DECLFR(UNLRT01Read) {
// };
if(((A >= 0xCE80) && (A < 0xCF00)) ||
((A >= 0xFE80) && (A < 0xFF00))) {
return 0xF2 | (rand() & 0x0D);
return 0xF2 | (xoroshiro128plus_next() & 0x0D);
} else
return CartBR(A);
}