38 lines
586 B
C
38 lines
586 B
C
#ifndef WINGS
|
|
#define WINGS
|
|
|
|
#define MAX_MISSILES 8
|
|
|
|
// missiles management
|
|
typedef struct Missile
|
|
{
|
|
unsigned char dir[MAX_MISSILES];
|
|
short distance[MAX_MISSILES]; // distance between the plane and the missile
|
|
} Missile;
|
|
|
|
// plane management
|
|
typedef struct Plane
|
|
{
|
|
short x;
|
|
short y;
|
|
unsigned char dir;
|
|
|
|
/* plane direction management
|
|
3 2 1
|
|
4 plane 0
|
|
5 6 7
|
|
*/
|
|
|
|
unsigned char life;
|
|
|
|
struct Missile missiles;
|
|
// align
|
|
} Plane;
|
|
|
|
int menu(void);
|
|
void init(void);
|
|
void *update_frame(void);
|
|
int game(void);
|
|
|
|
#endif
|