Decomp GetRngSeed

This commit is contained in:
Zur3l
2026-07-11 15:59:50 -04:00
parent 5534d0f55d
commit 7e5c2720b8
4 changed files with 6 additions and 10 deletions

View File

@@ -3,5 +3,4 @@
.public FixedPoint64IsZero
.public NATURAL_LOG_VALUE_TABLE
.public NegateFixedPoint64
.public PRNG_SEQUENCE_NUM
.public UFixedPoint64CmpLt

View File

@@ -359,12 +359,3 @@ _02002224: .word NATURAL_LOG_VALUE_TABLE
sub_02002228: ; 0x02002228
bx lr
arm_func_end sub_02002228
arm_func_start GetRngSeed
GetRngSeed: ; 0x0200222C
ldr r0, _02002238 ; =PRNG_SEQUENCE_NUM
ldrh r0, [r0]
bx lr
.align 2, 0
_02002238: .word PRNG_SEQUENCE_NUM
arm_func_end GetRngSeed

View File

@@ -1,6 +1,7 @@
#ifndef PMDSKY_MAIN_0200224C_H
#define PMDSKY_MAIN_0200224C_H
u16 GetRngSeed(void);
void SetRngSeed(u16 seed);
u16 Rand16Bit();
u32 RandInt(u32 n);

View File

@@ -2,6 +2,11 @@
extern u16 PRNG_SEQUENCE_NUM;
u16 GetRngSeed(void)
{
return PRNG_SEQUENCE_NUM;
}
void SetRngSeed(u16 seed)
{
PRNG_SEQUENCE_NUM = seed;