my suggestion:
(as i don't see x changing, throw ejex out)
Code:
case 'd':
if (x<whaeva_limit_fits)
{
x+=7;
ship(x,y);
}
....
word of advice: dont use delay, use some sort of time calc to make it smooth.
then declaration shold be (for no warnings)
Code:
void salida (void);
void menu (void);
if you want enemies you should rename your prog to cpp and
Code:
class Enemy{
int x,y,size,alive,etc...
Enemy (x,y){ alive=-1; /*constructor stuff....*/}
~Enemy (){alive_=0; /*destructor stuff...*/}
Draw(){ ...}...
}
and you can call it from prog
Enemy sharman(1,0);
if (sharman.alive) { sharman.Draw(); }...
Bookmarks