home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
030.lha
/
Ogre
/
ogrestat.c
< prev
next >
Wrap
C/C++ Source or Header
|
1986-11-10
|
2KB
|
101 lines
#include "ext.h"
disp_ogre_status(redraw)
int redraw;
{
static OGRE last;
char s[80];
if (redraw || last.main_bats != ogre.main_bats)
if (ogre.main_bats > 0)
{
sprintf(s, "Main Batteries: %d (4/3 D4)", ogre.main_bats);
movecur(18, 0);
eeol(18);
Amiga_puts(s);
}
else
{
movecur(18, 0);
eeol(18);
Amiga_puts(" ");
}
if (redraw || last.sec_bats != ogre.sec_bats)
if (ogre.sec_bats > 0)
{
sprintf(s, "Secondary Batteries: %d (3/2 D3)", ogre.sec_bats);
movecur(19, 0);
eeol(19);
Amiga_puts(s);
}
else
{
movecur(19, 0);
eeol(19);
Amiga_puts(" ");
}
if (redraw || last.missiles != ogre.missiles)
if (ogre.missiles > 0)
{
sprintf(s, "Missiles: %d (6/5 D3)", ogre.missiles);
movecur(20, 0);
eeol(20);
Amiga_puts(s);
}
else
{
movecur(20, 0);
eeol(20);
Amiga_puts(" ");
}
if (redraw || last.ap != ogre.ap)
if (ogre.ap > 0)
{
sprintf(s, "Anti-Personnel: %d (1/1 D1)", ogre.ap);
movecur(21, 0);
eeol(21);
Amiga_puts(s);
}
else
{
movecur(21, 0);
eeol(21);
Amiga_puts(" ");
}
if (redraw || last.treads != ogre.treads)
if (ogre.treads > 0)
{
sprintf(s, "Treads: %d (1/* D1)",
ogre.treads);
movecur(22, 0);
eeol(22);
Amiga_puts(s);
movecur(22, 40);
sprintf(s, "Movement: %d",ogre.movement);
Amiga_puts(s);
}
else
{
movecur(22, 0);
eeol(22);
Amiga_puts(" ");
}
/* if (redraw || last.movement != ogre.movement)
{
sprintf(s, "Movement: %d", ogre.movement);
movecur(23, 0);
eeol(23);
Amiga_puts(s);
}
*/
/* Lattice allows structure copying! */
last = ogre;
}