blob: ac06819439849fc779f9b1f0088d980638bf9c56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef D_SND_RNG_ID_H
#define D_SND_RNG_ID_H
#include "d/snd/d_snd_rng.h"
/** A class for picking sound ID variants at random without repeats. */
class dSndRngId_c : public dSndRng_c {
public:
dSndRngId_c();
void configure(u32 start, u32 end, u8 genChance);
u32 rndIdNoReuse();
u32 nextIdNoReuse();
u32 rndId();
u32 rndIdNotSame();
void markPicked(u32 id, bool allowReset);
private:
void resetPicked();
u32 rndInt(s32 max);
/* 0x18 */ u32 mBaseId;
/* 0x1C */ u32 mLastPicked;
/* 0x20 */ u32 mPickedMask;
/* 0x24 */ s16 mPickedNum;
/* 0x26 */ u8 mRange;
/* 0x27 */ u8 mGenChance;
/* 0x28 */ bool mIsConfigured;
};
#endif
|