mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-17 04:47:07 +00:00
@@ -5,30 +5,35 @@
|
||||
|
||||
class CRandom16;
|
||||
class CGlobalRandom {
|
||||
static CGlobalRandom* gCurrentGlobalRandom;
|
||||
static CGlobalRandom* gCurrentGlobalRandom;
|
||||
|
||||
public:
|
||||
CGlobalRandom(CRandom16& rnd);
|
||||
~CGlobalRandom();
|
||||
CGlobalRandom(CRandom16& rnd);
|
||||
~CGlobalRandom();
|
||||
|
||||
private:
|
||||
CRandom16& mRandom;
|
||||
bool mIsFirst;
|
||||
CGlobalRandom* mPrev;
|
||||
CRandom16& mRandom;
|
||||
bool mIsFirst;
|
||||
CGlobalRandom* mPrev;
|
||||
};
|
||||
|
||||
class CRandom16 {
|
||||
friend class CGlobalRandom;
|
||||
static CRandom16* gRandomNumber;
|
||||
static void _SetRandomNumber(CRandom16* rnd);
|
||||
friend class CGlobalRandom;
|
||||
static CRandom16* gRandomNumber;
|
||||
static void _SetRandomNumber(CRandom16* rnd);
|
||||
|
||||
public:
|
||||
static CRandom16* GetRandomNumber();
|
||||
CRandom16(uint seed = 99);
|
||||
void SetSeed(uint seed);
|
||||
int Range(int min, int max);
|
||||
float Range(float min, float max);
|
||||
int Next();
|
||||
float Float();
|
||||
CRandom16(uint seed = 99);
|
||||
void SetSeed(uint seed);
|
||||
int Range(int min, int max);
|
||||
float Range(float min, float max);
|
||||
int Next();
|
||||
float Float();
|
||||
|
||||
static CRandom16* GetRandomNumber();
|
||||
|
||||
private:
|
||||
uint mSeed;
|
||||
uint mSeed;
|
||||
};
|
||||
|
||||
#endif // __CRANDOM16_HPP__
|
||||
|
||||
Reference in New Issue
Block a user