home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
030.lha
/
Ogre
/
InitRound.c
< prev
next >
Wrap
C/C++ Source or Header
|
1986-11-10
|
1KB
|
78 lines
#include "ext.h"
init_round()
{
int i;
for (i = 0; i < n_units; ++i)
{
unit[i].moves_left = unit[i].movement;
if (unit[i].status == DISABLED)
{
unit[i].status = OK;
update_hex(unit[i].l_hex, unit[i].r_hex);
}
unit[i].range_to_ogre =
range(ogre.l_hex, ogre.r_hex, unit[i].l_hex, unit[i].r_hex);
}
}
init_move_ogre()
{
int i;
for (i = 0; i < n_units; ++i)
{
unit[i].range_to_ogre =
range(ogre.l_hex, ogre.r_hex, unit[i].l_hex, unit[i].r_hex);
}
}
init_def_attack()
{
int i;
for (i = 0; i < n_units; ++i)
{
if (unit[i].status == OK)
{
unit[i].fired = FALSE;
unit[i].range_to_ogre =
range(ogre.l_hex, ogre.r_hex, unit[i].l_hex, unit[i].r_hex);
}
}
}
init_ogre_attack()
{
int i;
for (i = 0; i < n_units; ++i)
{
unit[i].fired = 0;
unit[i].range_to_ogre =
range(ogre.l_hex, ogre.r_hex, unit[i].l_hex, unit[i].r_hex);
}
}
init_gev2()
{
int i;
for (i = 0; i < n_units; ++i)
if (unit[i].status == OK && unit[i].type == GEV)
unit[i].moves_left = 3;
}
display_range(i)
int i;
{
char c[80];
movecur(18,0);
eeol(18);
sprintf(c,"range from unit %d to Ogre %d.",i,unit[i].range_to_ogre);
Amiga_puts(c);
cycle();
}