diff --git a/sc2/src/sc2code/battle.c b/sc2/src/sc2code/battle.c index 49319bd8c..7d444880f 100644 --- a/sc2/src/sc2code/battle.c +++ b/sc2/src/sc2code/battle.c @@ -174,11 +174,11 @@ Battle (void) SetResourceIndex (hResIndex); #if !(DEMO_MODE || CREATE_JOURNAL) - SeedRandom (GetTimeCounter ()); + TFB_SeedRandom (GetTimeCounter ()); #else /* DEMO_MODE */ if (BattleSeed == 0) BattleSeed = TFB_Random (); - SeedRandom (BattleSeed); + TFB_SeedRandom (BattleSeed); BattleSeed = TFB_Random (); /* get next battle seed */ #endif /* DEMO_MODE */ diff --git a/sc2/src/sc2code/demo.c b/sc2/src/sc2code/demo.c index 0cefb9301..ec26cb7db 100644 --- a/sc2/src/sc2code/demo.c +++ b/sc2/src/sc2code/demo.c @@ -103,7 +103,7 @@ OpenJournal (void) FlushInput (); cread ((PBYTE)&start_seed, sizeof (start_seed), 1, journal_fh); - SeedRandom (start_seed); + TFB_SeedRandom (start_seed); } } } diff --git a/sc2/src/sc2code/libs/math/fastrand.c b/sc2/src/sc2code/libs/math/fastrand.c index 76d6e76df..0ee933677 100644 --- a/sc2/src/sc2code/libs/math/fastrand.c +++ b/sc2/src/sc2code/libs/math/fastrand.c @@ -48,7 +48,7 @@ seed_fast_random(DWORD seed) DWORD retval; COUNT index; - retval = SeedRandom(seed); + retval = TFB_SeedRandom(seed); for( index = 0; index < TABLE_SIZE; index++ ) random_table[index] = TFB_Random(); diff --git a/sc2/src/sc2code/libs/math/random.c b/sc2/src/sc2code/libs/math/random.c index a2dbe99d2..82a4e4a76 100644 --- a/sc2/src/sc2code/libs/math/random.c +++ b/sc2/src/sc2code/libs/math/random.c @@ -70,7 +70,7 @@ TFB_Random (void) } /***************************************************************************** -* FUNC: DWORD SeedRandom(DWORD l) +* FUNC: DWORD TFB_SeedRandom(DWORD l) * * DESC: set the seed for the random number generator to parameter "l", and * return the value of the previously active seed, to allow for multiple @@ -83,7 +83,7 @@ TFB_Random (void) *****************************************************************************/ DWORD -SeedRandom (DWORD new_seed) +TFB_SeedRandom (DWORD new_seed) { DWORD old_seed; diff --git a/sc2/src/sc2code/libs/mathlib.h b/sc2/src/sc2code/libs/mathlib.h index f9af4d5fe..9edae67d4 100644 --- a/sc2/src/sc2code/libs/mathlib.h +++ b/sc2/src/sc2code/libs/mathlib.h @@ -21,7 +21,7 @@ #include "compiler.h" -extern DWORD SeedRandom (DWORD seed); +extern DWORD TFB_SeedRandom (DWORD seed); extern DWORD TFB_Random (void); extern COUNT square_root (DWORD value); diff --git a/sc2/src/sc2code/planets/calc.c b/sc2/src/sc2code/planets/calc.c index d6d0ee691..c11be420d 100644 --- a/sc2/src/sc2code/planets/calc.c +++ b/sc2/src/sc2code/planets/calc.c @@ -227,7 +227,7 @@ DoPlanetaryAnalysis (SYSTEM_INFOPTR SysInfoPtr, PPLANET_DESC if (pPlanetDesc->data_index == (BYTE)~0) return (0); - old_seed = SeedRandom (pPlanetDesc->rand_seed); + old_seed = TFB_SeedRandom (pPlanetDesc->rand_seed); CalcSysInfo (SysInfoPtr); @@ -394,6 +394,6 @@ DoPlanetaryAnalysis (SYSTEM_INFOPTR SysInfoPtr, PPLANET_DESC #endif /* DEBUG */ } - return (SeedRandom (old_seed)); + return (TFB_SeedRandom (old_seed)); } diff --git a/sc2/src/sc2code/planets/genburv.c b/sc2/src/sc2code/planets/genburv.c index fee20c488..5f3d99546 100644 --- a/sc2/src/sc2code/planets/genburv.c +++ b/sc2/src/sc2code/planets/genburv.c @@ -34,7 +34,7 @@ GenerateBurvixes (BYTE control) { COUNT which_node; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -56,14 +56,14 @@ GenerateBurvixes (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } else if (pSolarSysState->pOrbitalDesc->pPrevDesc == &pSolarSysState->PlanetDesc[0] && pSolarSysState->pOrbitalDesc == &pSolarSysState->MoonDesc[0] && !GET_GAME_STATE (BURVIXESE_BROADCASTERS)) { - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -89,7 +89,7 @@ GenerateBurvixes (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/gendru.c b/sc2/src/sc2code/planets/gendru.c index 088a40036..d14e77074 100644 --- a/sc2/src/sc2code/planets/gendru.c +++ b/sc2/src/sc2code/planets/gendru.c @@ -30,7 +30,7 @@ GenerateDruuge (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -69,7 +69,7 @@ GenerateDruuge (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genilw.c b/sc2/src/sc2code/planets/genilw.c index b89ec5165..8533ecb58 100644 --- a/sc2/src/sc2code/planets/genilw.c +++ b/sc2/src/sc2code/planets/genilw.c @@ -29,7 +29,7 @@ GenerateIlwrath (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -51,7 +51,7 @@ GenerateIlwrath (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genmyc.c b/sc2/src/sc2code/planets/genmyc.c index 2ba02a57f..a7b2454cc 100644 --- a/sc2/src/sc2code/planets/genmyc.c +++ b/sc2/src/sc2code/planets/genmyc.c @@ -32,7 +32,7 @@ GenerateMycon (BYTE control) { DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -90,7 +90,7 @@ GenerateMycon (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genorz.c b/sc2/src/sc2code/planets/genorz.c index 5f30d6d13..39ebf73de 100644 --- a/sc2/src/sc2code/planets/genorz.c +++ b/sc2/src/sc2code/planets/genorz.c @@ -32,7 +32,7 @@ GenerateAndrosynth (BYTE control) { COUNT i, which_node; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -95,7 +95,7 @@ GenerateAndrosynth (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; @@ -197,7 +197,7 @@ GenerateOrz (BYTE control) && pSolarSysState->pOrbitalDesc == &pSolarSysState->MoonDesc[2] && !GET_GAME_STATE (TAALO_PROTECTOR)) { - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -223,7 +223,7 @@ GenerateOrz (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } else if (CurStarDescPtr->Index == ORZ_DEFINED @@ -231,7 +231,7 @@ GenerateOrz (BYTE control) { COUNT i, which_node; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -253,7 +253,7 @@ GenerateOrz (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genpet.c b/sc2/src/sc2code/planets/genpet.c index 68752341e..c0025c370 100644 --- a/sc2/src/sc2code/planets/genpet.c +++ b/sc2/src/sc2code/planets/genpet.c @@ -112,7 +112,7 @@ GenerateTalkingPet (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -134,7 +134,7 @@ GenerateTalkingPet (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genpku.c b/sc2/src/sc2code/planets/genpku.c index 36c9b0f88..a904d4ff4 100644 --- a/sc2/src/sc2code/planets/genpku.c +++ b/sc2/src/sc2code/planets/genpku.c @@ -30,7 +30,7 @@ GeneratePkunk (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -69,7 +69,7 @@ GeneratePkunk (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/gensol.c b/sc2/src/sc2code/planets/gensol.c index cea248123..fe35cfccc 100644 --- a/sc2/src/sc2code/planets/gensol.c +++ b/sc2/src/sc2code/planets/gensol.c @@ -135,7 +135,7 @@ generate_tractors (void) COUNT i, which_node; DWORD old_rand, rand_val; - old_rand = SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); + old_rand = TFB_SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); which_node = i = 0; do @@ -154,7 +154,7 @@ generate_tractors (void) } while (++i < 10); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); } } @@ -491,7 +491,7 @@ GenerateSOL (BYTE control) case GENERATE_PLANETS: { #define SOL_SEED 334241042L - SeedRandom (SOL_SEED); + TFB_SeedRandom (SOL_SEED); pSolarSysState->SunDesc[0].NumPlanets = 9; for (i = 0, pCurDesc = pSolarSysState->PlanetDesc; i < 9; ++i, ++pCurDesc) diff --git a/sc2/src/sc2code/planets/genspa.c b/sc2/src/sc2code/planets/genspa.c index 5b7b9c8df..b5e4ca6dc 100644 --- a/sc2/src/sc2code/planets/genspa.c +++ b/sc2/src/sc2code/planets/genspa.c @@ -33,7 +33,7 @@ GenerateSpathi (BYTE control) { DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -59,7 +59,7 @@ GenerateSpathi (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; @@ -108,7 +108,7 @@ GenerateSpathi (BYTE control) COUNT which_node; DWORD old_rand; - old_rand = SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); + old_rand = TFB_SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); which_node = i = 0; do @@ -134,7 +134,7 @@ GenerateSpathi (BYTE control) SET_GAME_STATE (SPATHI_CREATURES_ELIMINATED, 1); } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/gensup.c b/sc2/src/sc2code/planets/gensup.c index 28ece1cea..a7ea7b77d 100644 --- a/sc2/src/sc2code/planets/gensup.c +++ b/sc2/src/sc2code/planets/gensup.c @@ -30,7 +30,7 @@ GenerateSupox (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -68,7 +68,7 @@ GenerateSupox (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genthrad.c b/sc2/src/sc2code/planets/genthrad.c index 82f2e64fc..ee4849441 100644 --- a/sc2/src/sc2code/planets/genthrad.c +++ b/sc2/src/sc2code/planets/genthrad.c @@ -32,7 +32,7 @@ GenerateThradd (BYTE control) { COUNT i, which_node; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -54,12 +54,12 @@ GenerateThradd (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } else if (!GET_GAME_STATE (AQUA_HELIX)) { - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -87,7 +87,7 @@ GenerateThradd (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } } diff --git a/sc2/src/sc2code/planets/genutw.c b/sc2/src/sc2code/planets/genutw.c index 95980463f..fd313396d 100644 --- a/sc2/src/sc2code/planets/genutw.c +++ b/sc2/src/sc2code/planets/genutw.c @@ -60,7 +60,7 @@ GenerateUtwig (BYTE control) { COUNT i, which_node; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -82,7 +82,7 @@ GenerateUtwig (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } else if (CurStarDescPtr->Index == BOMB_DEFINED @@ -90,7 +90,7 @@ GenerateUtwig (BYTE control) && pSolarSysState->pOrbitalDesc == &pSolarSysState->MoonDesc[1] && !GET_GAME_STATE (UTWIG_BOMB)) { - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -119,7 +119,7 @@ GenerateUtwig (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genvault.c b/sc2/src/sc2code/planets/genvault.c index f308ada75..9ff735505 100644 --- a/sc2/src/sc2code/planets/genvault.c +++ b/sc2/src/sc2code/planets/genvault.c @@ -30,7 +30,7 @@ GenerateShipVault (BYTE control) { DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -65,7 +65,7 @@ GenerateShipVault (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genvux.c b/sc2/src/sc2code/planets/genvux.c index d2b399c8a..46d5a2397 100644 --- a/sc2/src/sc2code/planets/genvux.c +++ b/sc2/src/sc2code/planets/genvux.c @@ -59,7 +59,7 @@ GenerateVUX (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -81,7 +81,7 @@ GenerateVUX (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } } @@ -252,7 +252,7 @@ GenerateVUX (BYTE control) COUNT i; DWORD old_rand; - old_rand = SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); + old_rand = TFB_SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); i = 0; do @@ -275,7 +275,7 @@ GenerateVUX (BYTE control) } while (++i < 12); pSolarSysState->CurNode = i; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } else if (CurStarDescPtr->Index == VUX_BEAST_DEFINED @@ -284,7 +284,7 @@ GenerateVUX (BYTE control) COUNT i; DWORD old_rand; - old_rand = SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); + old_rand = TFB_SeedRandom (pSolarSysState->SysInfo.PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); i = 0; do @@ -325,7 +325,7 @@ GenerateVUX (BYTE control) } while (++i < 11); pSolarSysState->CurNode = i; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } default: diff --git a/sc2/src/sc2code/planets/genwreck.c b/sc2/src/sc2code/planets/genwreck.c index 3e3e76cc1..a8cf1a3df 100644 --- a/sc2/src/sc2code/planets/genwreck.c +++ b/sc2/src/sc2code/planets/genwreck.c @@ -29,7 +29,7 @@ GenerateUrquanWreck (BYTE control) { DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -59,7 +59,7 @@ GenerateUrquanWreck (BYTE control) } } - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genyeh.c b/sc2/src/sc2code/planets/genyeh.c index ed18f548e..d3e99c729 100644 --- a/sc2/src/sc2code/planets/genyeh.c +++ b/sc2/src/sc2code/planets/genyeh.c @@ -29,7 +29,7 @@ GenerateYehat (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -51,7 +51,7 @@ GenerateYehat (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/genzoq.c b/sc2/src/sc2code/planets/genzoq.c index f69922e27..e0e0a3eb0 100644 --- a/sc2/src/sc2code/planets/genzoq.c +++ b/sc2/src/sc2code/planets/genzoq.c @@ -115,7 +115,7 @@ GenerateZoqFotPik (BYTE control) COUNT i, which_node; DWORD rand_val, old_rand; - old_rand = SeedRandom ( + old_rand = TFB_SeedRandom ( pSolarSysState->SysInfo.PlanetInfo.ScanSeed[ENERGY_SCAN] ); @@ -137,7 +137,7 @@ GenerateZoqFotPik (BYTE control) } while (++i < 16); pSolarSysState->CurNode = which_node; - SeedRandom (old_rand); + TFB_SeedRandom (old_rand); break; } pSolarSysState->CurNode = 0; diff --git a/sc2/src/sc2code/planets/plangen.c b/sc2/src/sc2code/planets/plangen.c index e3907e263..393d54f04 100644 --- a/sc2/src/sc2code/planets/plangen.c +++ b/sc2/src/sc2code/planets/plangen.c @@ -1170,7 +1170,7 @@ GeneratePlanetMask (PPLANET_DESC pPlanetDesc, BOOLEAN IsEarth) POINT loc; CONTEXT OldContext; - old_seed = SeedRandom (pPlanetDesc->rand_seed); + old_seed = TFB_SeedRandom (pPlanetDesc->rand_seed); OldContext = SetContext (TaskContext); pSolarSysState->isPFADefined = (BYTE *)HCalloc (sizeof(BYTE) * 255); @@ -1323,7 +1323,7 @@ GeneratePlanetMask (PPLANET_DESC pPlanetDesc, BOOLEAN IsEarth) SetContext (OldContext); - SeedRandom (old_seed); + TFB_SeedRandom (old_seed); SetPlanetMusic ((UBYTE)(pPlanetDesc->data_index & ~PLANET_SHIELDED)); } diff --git a/sc2/src/sc2code/planets/solarsys.c b/sc2/src/sc2code/planets/solarsys.c index 10370b63f..9c556d3e0 100644 --- a/sc2/src/sc2code/planets/solarsys.c +++ b/sc2/src/sc2code/planets/solarsys.c @@ -65,7 +65,7 @@ GenerateMoons (void) - (SIS_SCREEN_HEIGHT >> 1)) * MAX_ZOOM_RADIUS / (DISPLAY_FACTOR >> 1)); pCurDesc = pSolarSysState->pBaseDesc; - old_seed = SeedRandom (pCurDesc->rand_seed); + old_seed = TFB_SeedRandom (pCurDesc->rand_seed); (*pSolarSysState->GenFunc) (GENERATE_NAME); (*pSolarSysState->GenFunc) (GENERATE_MOONS); @@ -105,7 +105,7 @@ GenerateMoons (void) } pSolarSysState->pBaseDesc = pSolarSysState->MoonDesc; - SeedRandom (old_seed); + TFB_SeedRandom (old_seed); } void @@ -180,7 +180,7 @@ LoadSolarSys (void) // LoadIPData (); } - old_seed = SeedRandom ( + old_seed = TFB_SeedRandom ( MAKE_DWORD (CurStarDescPtr->star_pt.x, CurStarDescPtr->star_pt.y) ); @@ -324,7 +324,7 @@ LoadSolarSys (void) SetAbsFrameIndex (SISIPFrame, i - 1); } - SeedRandom (old_seed); + TFB_SeedRandom (old_seed); } static void @@ -1768,7 +1768,7 @@ DrawStarBackGround (BOOLEAN ForPlanet) ClearDrawable (); - old_seed = SeedRandom ( + old_seed = TFB_SeedRandom ( MAKE_DWORD (CurStarDescPtr->star_pt.x, CurStarDescPtr->star_pt.y) ); @@ -1851,7 +1851,7 @@ DrawStarBackGround (BOOLEAN ForPlanet) UnbatchGraphics (); } - SeedRandom (old_seed); + TFB_SeedRandom (old_seed); } void diff --git a/sc2/src/sc2code/planets/surface.c b/sc2/src/sc2code/planets/surface.c index c255126d2..f199483e1 100644 --- a/sc2/src/sc2code/planets/surface.c +++ b/sc2/src/sc2code/planets/surface.c @@ -96,9 +96,9 @@ GenerateMineralDeposits (SYSTEM_INFOPTR SysInfoPtr, PCOUNT { DWORD old_rand; - old_rand = SeedRandom (SysInfoPtr->PlanetInfo.ScanSeed[MINERAL_SCAN]); + old_rand = TFB_SeedRandom (SysInfoPtr->PlanetInfo.ScanSeed[MINERAL_SCAN]); *pwhich_deposit = CalcMineralDeposits (SysInfoPtr, *pwhich_deposit); - return (SeedRandom (old_rand)); + return (TFB_SeedRandom (old_rand)); } static COUNT @@ -250,9 +250,9 @@ GenerateLifeForms (SYSTEM_INFOPTR SysInfoPtr, PCOUNT pwhich_life) { DWORD old_rand; - old_rand = SeedRandom (SysInfoPtr->PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); + old_rand = TFB_SeedRandom (SysInfoPtr->PlanetInfo.ScanSeed[BIOLOGICAL_SCAN]); *pwhich_life = CalcLifeForms (SysInfoPtr, *pwhich_life); - return (SeedRandom (old_rand)); + return (TFB_SeedRandom (old_rand)); } diff --git a/sc2/src/sc2code/utils.c b/sc2/src/sc2code/utils.c index 712d73432..6583007ee 100644 --- a/sc2/src/sc2code/utils.c +++ b/sc2/src/sc2code/utils.c @@ -98,7 +98,7 @@ SeedRandomNumbers (void) { DWORD cur_time; - SeedRandom (cur_time = GetTimeCounter ()); + TFB_SeedRandom (cur_time = GetTimeCounter ()); return (cur_time); }