mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-30 14:18:10 -05:00
Decomp GetRngSeed
This commit is contained in:
@@ -3,5 +3,4 @@
|
||||
.public FixedPoint64IsZero
|
||||
.public NATURAL_LOG_VALUE_TABLE
|
||||
.public NegateFixedPoint64
|
||||
.public PRNG_SEQUENCE_NUM
|
||||
.public UFixedPoint64CmpLt
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
extern u16 PRNG_SEQUENCE_NUM;
|
||||
|
||||
u16 GetRngSeed(void)
|
||||
{
|
||||
return PRNG_SEQUENCE_NUM;
|
||||
}
|
||||
|
||||
void SetRngSeed(u16 seed)
|
||||
{
|
||||
PRNG_SEQUENCE_NUM = seed;
|
||||
|
||||
Reference in New Issue
Block a user