Aliens aliens;
int shipnum;
+// todo: move to structure
+static int lowest_ship[ALIENS_MAX_NUMBER_X];
+static int alienshotx[ALIENS_MAX_MISSILES];
+static int alienshoty[ALIENS_MAX_MISSILES];
+static int alienshotnum;
+static int alienBlock[ALIENS_MAX_NUMBER_Y][ALIENS_MAX_NUMBER_X];
+static int bunker[BUNKERHEIGHT][BUNKERWIDTH + 1];
+
/**
* initialize aliens attributes
*/
-void aliensReset()
+void aliensReset(void)
{
int i,j;
/**
* initialize bunkers attributes
*/
-void bunkersReset()
+void bunkersReset(void)
{
int a, b;
* move aliens and test if they've reached the
* bottom of the windows or the bunkers.
*/
-int aliensMove()
+int aliensMove(void)
{
int cx,cy;
/**
* display alien animation, display remaining parts of aliens and bunker
*/
-void render()
+void render(void)
{
int k,row;
int c=0;
* move aliens' missiles and do player/bunker hit testing
* a zero value in alienshotx indicates that the appropriate missile is loaded, but not fired
*/
-int aliensMissileMove()
+int aliensMissileMove(void)
{
int i, tmp;
int fPlayerWasHit = 0;
#define ALIENS_MAX_NUMBER_Y 5
#define ALIENS_MAX_MISSILES 10
-// todo: move to structure
-int lowest_ship[ALIENS_MAX_NUMBER_X];
-int alienshotx[ALIENS_MAX_MISSILES];
-int alienshoty[ALIENS_MAX_MISSILES];
-int alienshotnum;
-int alienBlock[ALIENS_MAX_NUMBER_Y][ALIENS_MAX_NUMBER_X];
-
-int bunker[BUNKERHEIGHT][BUNKERWIDTH + 1];
void aliensReset(void);
/**
* initialize ufo attributes
*/
-void ufoReset()
+void ufoReset(void)
{
ufoClear(ufo.posX, ufo.posY); // clear old position of player
/**
* move ufo and check if it reached the left screen border
*/
-void ufoMoveLeft()
+void ufoMoveLeft(void)
{
// check if space between ufo and screen border is big enough
if (ufo.posX > 1) {
* check if the first screen line is free for the ufo and
* display it randomly
*/
-int ufoShowUfo()
+int ufoShowUfo(void)
{
if (aliens.posY > 0 && fShowUfo == 0) { // aliens one line down
if ((random() % 200) == 0) {