mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-13 13:57:25 -05:00
Use decompiled DungeonRand16Bit in dg_random
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user