Oolite 1.91.0.7645-241119-222d325
|
Go to the source code of this file.
Classes | |
struct | Random_Seed |
struct | RNG_Seed |
struct | RANROTSeed |
struct | OORandomState |
Macros | |
#define | ranrot_rand() |
Typedefs | |
typedef struct Random_Seed | Random_Seed |
typedef struct RNG_Seed | RNG_Seed |
typedef struct RANROTSeed | RANROTSeed |
Variables | |
const Random_Seed | kNilRandomSeed |
#define ranrot_rand | ( | ) |
Definition at line 78 of file legacy_random.h.
Referenced by PlayerSetEscapePodDestination().
typedef struct Random_Seed Random_Seed |
typedef struct RANROTSeed RANROTSeed |
typedef struct RNG_Seed RNG_Seed |
Definition at line 178 of file legacy_random.h.
float bellf | ( | int | n | ) |
Definition at line 168 of file legacy_random.c.
References EXPECT_NOT, and Ranrot().
void clear_checksum | ( | void | ) |
Definition at line 42 of file legacy_random.c.
References checksum.
double cunningFee | ( | double | value, |
double | precision ) |
Definition at line 62 of file legacy_random.c.
RNG_Seed currentRandomSeed | ( | void | ) |
Definition at line 213 of file legacy_random.c.
References rnd_seed.
Referenced by GlobalRandomName().
Definition at line 169 of file legacy_random.h.
Referenced by SystemInfoDistanceToSystem(), and travelTimeBetweenPlanetPositions().
OOINLINE int equal_seeds | ( | Random_Seed | seed1, |
Random_Seed | seed2 ) |
Definition at line 148 of file legacy_random.h.
References Random_Seed::a, Random_Seed::b, Random_Seed::c, Random_Seed::d, Random_Seed::e, and Random_Seed::f.
Referenced by is_nil_seed().
int gen_rnd_number | ( | void | ) |
Definition at line 225 of file legacy_random.c.
References RNG_Seed::a, RNG_Seed::b, RNG_Seed::c, RNG_Seed::d, rnd_seed, and x.
Referenced by make_pseudo_random_seed(), and OldRandomDigrams().
OOINLINE int is_nil_seed | ( | Random_Seed | a_seed | ) |
Definition at line 154 of file legacy_random.h.
References equal_seeds(), and kNilRandomSeed.
void make_pseudo_random_seed | ( | Random_Seed * | seed_ptr | ) |
Definition at line 309 of file legacy_random.c.
References Random_Seed::a, Random_Seed::b, Random_Seed::c, Random_Seed::d, Random_Seed::e, Random_Seed::f, and gen_rnd_number().
Referenced by GlobalRandomInhabitantsDescription().
RANROTSeed MakeRanrotSeed | ( | uint32_t | seed | ) |
Definition at line 113 of file legacy_random.c.
References RanrotWithSeed().
Referenced by ranrot_srand(), and RanrotSeedFromRNGSeed().
void OOInitReallyRandom | ( | uint64_t | seed | ) |
Definition at line 256 of file legacy_random.c.
References RANROTSeed::high, RANROTSeed::low, OOReallyRandom(), sReallyRandomInited, and sReallyRandomSeed.
uint32_t OOReallyRandom | ( | void | ) |
Definition at line 249 of file legacy_random.c.
References RanrotWithSeed(), sReallyRandomInited, and sReallyRandomSeed.
Referenced by OOInitReallyRandom(), OOSetReallyRandomRANROTSeed(), and OOSetReallyRandomRndSeed().
void OORestoreRandomState | ( | OORandomState | state | ) |
Definition at line 302 of file legacy_random.c.
References OORandomState::ranrot, OORandomState::rnd, rnd_seed, and sRANROT.
Referenced by OOExpandDescriptionString().
OORandomState OOSaveRandomState | ( | void | ) |
Definition at line 292 of file legacy_random.c.
References rnd_seed, and sRANROT.
Referenced by OOExpandDescriptionString().
void OOSetReallyRandomRANROTAndRndSeeds | ( | void | ) |
Definition at line 285 of file legacy_random.c.
References OOSetReallyRandomRANROTSeed(), and OOSetReallyRandomRndSeed().
Referenced by OOExpandDescriptionString().
void OOSetReallyRandomRANROTSeed | ( | void | ) |
Definition at line 267 of file legacy_random.c.
References OOReallyRandom(), sRANROT, sReallyRandomInited, and sReallyRandomSeed.
Referenced by OOSetReallyRandomRANROTAndRndSeeds().
void OOSetReallyRandomRndSeed | ( | void | ) |
Definition at line 275 of file legacy_random.c.
References RNG_Seed::a, RNG_Seed::b, RNG_Seed::c, RNG_Seed::d, OOReallyRandom(), and rnd_seed.
Referenced by OOSetReallyRandomRANROTAndRndSeeds().
float randf | ( | void | ) |
Definition at line 156 of file legacy_random.c.
References Ranrot().
Referenced by WormholeEntity::DrawWormholeCorona, fillRanNoiseBuffer(), OOFuzzyBooleanFromObject(), OOHPRandomPositionInBoundingBox(), OOHPVectorRandomRadial(), OOHPVectorRandomSpatial(), OORandomPositionInBoundingBox(), OORandomPositionInCylinder(), OORandomUnitHPVector(), OORandomUnitVector(), OOVectorRandomRadial(), and OOVectorRandomSpatial().
float randfWithSeed | ( | RANROTSeed * | ioSeed | ) |
Definition at line 162 of file legacy_random.c.
References RanrotWithSeed().
unsigned Ranrot | ( | void | ) |
Definition at line 93 of file legacy_random.c.
References RANROTSeed::high, RANROTSeed::low, and sRANROT.
Referenced by bellf(), GlobalRandomName(), quaternion_set_random(), randf(), Octree::randomFullNodeFrom, StationAddShipToShipyard(), and SVGDumpBeginPrimitive().
void ranrot_srand | ( | uint32_t | seed | ) |
Definition at line 150 of file legacy_random.c.
References MakeRanrotSeed(), and sRANROT.
RANROTSeed RANROTGetFullSeed | ( | void | ) |
Definition at line 185 of file legacy_random.c.
References sRANROT.
Referenced by fillRanNoiseBuffer().
RANROTSeed RanrotSeedFromRandomSeed | ( | Random_Seed | seed | ) |
Definition at line 136 of file legacy_random.c.
References Random_Seed::c, Random_Seed::d, Random_Seed::e, Random_Seed::f, and RanrotSeedFromRNGSeed().
RANROTSeed RanrotSeedFromRNGSeed | ( | RNG_Seed | seed | ) |
Definition at line 130 of file legacy_random.c.
References RNG_Seed::a, RNG_Seed::b, RNG_Seed::c, RNG_Seed::d, and MakeRanrotSeed().
Referenced by RanrotSeedFromRandomSeed(), and seed_for_planet_description().
void RANROTSetFullSeed | ( | RANROTSeed | seed | ) |
unsigned RanrotWithSeed | ( | RANROTSeed * | ioSeed | ) |
Definition at line 102 of file legacy_random.c.
References RANROTSeed::high, and RANROTSeed::low.
Referenced by MakeRanrotSeed(), OOReallyRandom(), and randfWithSeed().
Definition at line 160 of file legacy_random.h.
References x.
void rotate_seed | ( | Random_Seed * | seed_ptr | ) |
Definition at line 320 of file legacy_random.c.
References Random_Seed::a, Random_Seed::b, Random_Seed::c, Random_Seed::d, Random_Seed::e, Random_Seed::f, x, and y.
void seed_for_planet_description | ( | Random_Seed | s_seed | ) |
Definition at line 206 of file legacy_random.c.
References RanrotSeedFromRNGSeed(), rnd_seed, seed_RNG_only_for_planet_description(), and sRANROT.
void seed_RNG_only_for_planet_description | ( | Random_Seed | s_seed | ) |
Definition at line 197 of file legacy_random.c.
References RNG_Seed::a, RNG_Seed::b, Random_Seed::c, RNG_Seed::c, Random_Seed::d, RNG_Seed::d, Random_Seed::e, Random_Seed::f, and rnd_seed.
Referenced by OOGenerateSystemDescription(), and seed_for_planet_description().
void setRandomSeed | ( | RNG_Seed | a_seed | ) |
Definition at line 219 of file legacy_random.c.
References rnd_seed.
Referenced by GlobalRandomName().
Definition at line 187 of file legacy_random.h.
References distanceBetweenPlanetPositions().
|
extern |
Definition at line 34 of file legacy_random.c.
Referenced by GlobalExpandDescription(), GlobalExpandMissionText(), is_nil_seed(), and RandomSeedFromString().