Use decompiled DungeonRand16Bit in dg_random

This commit is contained in:
Chesyon
2026-05-06 08:27:02 -04:00
parent bf88ff37fc
commit fcf64194a0
3 changed files with 3 additions and 4 deletions

View File

@@ -12,6 +12,6 @@ typedef struct prng_state {
} prng_state;
void InitDungeonRng(u32 seed);
u32 DungeonRand16Bit(void);
u16 DungeonRand16Bit(void);
#endif //PMDSKY_OVERLAY_29_022EA9EC_H

View File

@@ -1,9 +1,8 @@
#include "dg_random.h"
#include "overlay_29_022EA9EC.h"
// file starts at 0x022ea968
extern s16 DungeonRand16Bit(void);
s32 DungeonRandInt(s32 end)
{
s32 entropy = DungeonRand16Bit();

View File

@@ -15,7 +15,7 @@ void InitDungeonRng(u32 seed) {
} while (scratch_0<5);
}
u32 DungeonRand16Bit(void) {
u16 DungeonRand16Bit(void) {
u32 mult = DUNGEON_PRNG_LCG_MULTIPLIER;
if (DUNGEON_PRNG_STATE.use_secondary) {