Skip to content

Commit

Permalink
code cleanup: slight code reordering for readability
Browse files Browse the repository at this point in the history
Slight reordering of the call to pie_RotateProject and turn a
todo-message comment in an actual TODO.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
  • Loading branch information
Giel van Schijndel committed Oct 9, 2010
1 parent d6c7690 commit 0a7b147
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/display3d.c
Expand Up @@ -3584,12 +3584,14 @@ SDWORD xShift,yShift, index;
void calcScreenCoords(DROID *psDroid)
{
/* Get it's absolute dimensions */
const Vector3i zero = {0, 0, 0};
const Vector3i origin = {0, 0, 0};
Vector2i center = {0, 0};
SDWORD cZ;
UDWORD radius;

/* How big a box do we want - will ultimately be calculated using xmax, ymax, zmax etc */
/* get the screen corrdinates */
const int cZ = pie_RotateProject(&origin, &center);

// TODO: compute the droid's radius (using min/max for x,y,z)
if(psDroid->droidType == DROID_TRANSPORTER)
{
radius = 45;
Expand All @@ -3599,9 +3601,6 @@ void calcScreenCoords(DROID *psDroid)
radius = 22;
}

/* Pop matrices and get the screen corrdinates */
cZ = pie_RotateProject( &zero, &center );

//Watermelon:added a crash protection hack...
if (cZ != 0)
{
Expand Down

0 comments on commit 0a7b147

Please sign in to comment.