MCPcopy Create free account
hub / github.com/SimHacker/micropolis / PrimeRandoms

Function PrimeRandoms

MicropolisCore/src/CellEngine/src/cellengine.cpp:109–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107
108
109void PrimeRandoms()
110{
111 if (randomsPrimed) {
112 return;
113 } // if
114
115 randomsPrimed = 1;
116
117 long i;
118 for (i = 0; i < RANDOMS_COUNT; i++) {
119 randoms[i] ^=
120#ifdef MACOS
121 Random() ^
122 (Random() >> 4) ^
123 (Random() << 4);
124#else
125 rand() ^
126 (rand() >> 4) ^
127 (rand() >> 8) ^
128 (rand() << 4);
129#endif
130 }
131
132 randomRead = 0;
133 randomWrite = 0;
134}
135
136
137void FeedRandom(

Callers 1

Rand32Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected