Cleanups
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1835 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -530,10 +530,8 @@ char scolor[] = {'B', 'G', 'O', 'R', 'W', 'Y'};
|
||||
if (TypesDefined)
|
||||
rand_val = 0;
|
||||
else
|
||||
pPD->data_index = (BYTE)(
|
||||
HIBYTE (LOWORD (rand_val))
|
||||
% MaxPlanet
|
||||
);
|
||||
pPD->data_index =
|
||||
(BYTE)(HIBYTE (LOWORD (rand_val)) % MaxPlanet);
|
||||
|
||||
chance = PLANET_NEVER;
|
||||
switch (StarColor)
|
||||
@@ -578,8 +576,8 @@ RelocatePlanet:
|
||||
}
|
||||
else
|
||||
{
|
||||
pPD->radius = (LOWORD (rand_val)
|
||||
% (MAX_PLANET_RADIUS - min_radius))
|
||||
pPD->radius =
|
||||
(LOWORD (rand_val) % (MAX_PLANET_RADIUS - min_radius))
|
||||
+ min_radius;
|
||||
for (pLocPD = pPD - 1; pLocPD >= pBaseDesc; --pLocPD)
|
||||
{
|
||||
@@ -594,14 +592,9 @@ RelocatePlanet:
|
||||
|
||||
rand_val = TFB_Random ();
|
||||
angle = NORMALIZE_ANGLE (LOWORD (rand_val));
|
||||
pPD->location.x =
|
||||
COSINE (angle, pPD->radius);
|
||||
pPD->location.y =
|
||||
SINE (angle, pPD->radius);
|
||||
pPD->rand_seed = MAKE_DWORD (
|
||||
pPD->location.x,
|
||||
pPD->location.y
|
||||
);
|
||||
pPD->location.x = COSINE (angle, pPD->radius);
|
||||
pPD->location.y = SINE (angle, pPD->radius);
|
||||
pPD->rand_seed = MAKE_DWORD (pPD->location.x, pPD->location.y);
|
||||
|
||||
++pPD;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user