29#ifndef LEGACY_RANDOM_H
30#define LEGACY_RANDOM_H
72double cunningFee(
double value,
double precision);
78#define ranrot_rand() ((int)Ranrot())
150 return ((seed1.
a == seed2.
a)&&(seed1.
b == seed2.
b)&&(seed1.
c == seed2.
c)&&(seed1.
d == seed2.
d)&&(seed1.
e == seed2.
e)&&(seed1.
f == seed2.
f));
162 return ((
x << 1) | (
x >> 7)) & 255;
172 int dy = (y1 - y2)/2;
173 int dist = sqrt(dx*dx + dy*dy);
181 double dy = (y1 - y2) / 2.0;
182 double dist = hypot(dx, dy);
190 return distance * distance;
#define INLINE_CONST_FUNC
RANROTSeed RanrotSeedFromRandomSeed(Random_Seed seed)
const Random_Seed kNilRandomSeed
struct RANROTSeed RANROTSeed
OOINLINE int is_nil_seed(Random_Seed a_seed) INLINE_CONST_FUNC
void make_pseudo_random_seed(Random_Seed *seed_ptr)
RANROTSeed RANROTGetFullSeed(void)
OOINLINE int equal_seeds(Random_Seed seed1, Random_Seed seed2) INLINE_CONST_FUNC
void seed_RNG_only_for_planet_description(Random_Seed s_seed)
void ranrot_srand(uint32_t seed)
OOINLINE int rotate_byte_left(int x) INLINE_CONST_FUNC
void OOSetReallyRandomRANROTSeed(void)
void setRandomSeed(RNG_Seed a_seed)
uint32_t OOReallyRandom(void)
float randfWithSeed(RANROTSeed *ioSeed)
int16_t munge_checksum(long long value)
RNG_Seed currentRandomSeed(void)
void OOInitReallyRandom(uint64_t seed)
struct Random_Seed Random_Seed
void OORestoreRandomState(OORandomState state)
OORandomState OOSaveRandomState(void)
void RANROTSetFullSeed(RANROTSeed seed)
RANROTSeed RanrotSeedFromRNGSeed(RNG_Seed seed)
OOINLINE double travelTimeBetweenPlanetPositions(int x1, int y1, int x2, int y2)
void OOSetReallyRandomRndSeed(void)
unsigned RanrotWithSeed(RANROTSeed *ioSeed)
double cunningFee(double value, double precision)
void clear_checksum(void)
OOINLINE double accurateDistanceBetweenPlanetPositions(int x1, int y1, int x2, int y2) INLINE_CONST_FUNC
void seed_for_planet_description(Random_Seed s_seed)
RANROTSeed MakeRanrotSeed(uint32_t seed)
void OOSetReallyRandomRANROTAndRndSeeds(void)
void rotate_seed(Random_Seed *seed_ptr)
OOINLINE double distanceBetweenPlanetPositions(int x1, int y1, int x2, int y2) INLINE_CONST_FUNC