Misc. code clean up.

This commit is contained in:
Steve 2016-05-25 07:57:13 +01:00
parent 0088dfdee3
commit fcb4d815df
3 changed files with 5 additions and 21 deletions

View File

@ -649,8 +649,7 @@ static int isPriorityMissionTarget(Entity *e, int dist, int closest)
static void cycleRadarZoom(void)
{
battle.radarRange++;
battle.radarRange %= 3;
battle.radarRange = (battle.radarRange + 1) % 3;
}
int playerHasGun(int type)

View File

@ -47,25 +47,8 @@ void doStars(float dx, float dy)
stars[i].x -= (dx * stars[i].speed);
stars[i].y -= (dy * stars[i].speed);
if (stars[i].x >= SCREEN_WIDTH)
{
stars[i].x = 0;
}
if (stars[i].x < 0)
{
stars[i].x = SCREEN_WIDTH - 1;
}
if (stars[i].y >= SCREEN_HEIGHT)
{
stars[i].y = 0;
}
if (stars[i].y < 0)
{
stars[i].y = SCREEN_HEIGHT - 1;
}
stars[i].x = mod(stars[i].x, SCREEN_WIDTH - 1);
stars[i].y = mod(stars[i].y, SCREEN_HEIGHT - 1);
}
}

View File

@ -20,4 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../common.h"
extern float mod(float n, float x);
extern App app;