wings/include/wings.h

53 lines
773 B
C
Raw Normal View History

2017-04-17 16:55:21 +02:00
#ifndef WINGS
#define WINGS
2017-04-21 22:32:40 +02:00
#define MAX_MISSILES 2
2017-04-20 12:44:09 +02:00
2017-04-20 22:25:52 +02:00
// missiles management
2017-04-19 22:43:18 +02:00
typedef struct Missile
{
2017-04-21 22:32:40 +02:00
unsigned char dir;
short distance; // distance between the plane and the missile
unsigned char type;
2017-04-19 22:43:18 +02:00
} Missile;
2017-04-20 22:25:52 +02:00
// plane management
2017-04-19 20:30:58 +02:00
typedef struct Plane
{
short x;
short y;
unsigned char dir;
2017-04-19 22:43:18 +02:00
/* plane direction management
2017-04-20 12:44:09 +02:00
3 2 1
4 plane 0
5 6 7
2017-04-19 22:43:18 +02:00
*/
2017-04-19 20:30:58 +02:00
unsigned char life;
2017-04-21 22:32:40 +02:00
unsigned char reload;
2017-04-19 22:43:18 +02:00
2017-04-21 22:32:40 +02:00
Missile missiles[MAX_MISSILES];
2017-04-19 20:30:58 +02:00
// align
} Plane;
2017-04-30 18:09:11 +02:00
typedef struct Cloud
{
short x;
short y;
} Cloud;
typedef enum Type
{
dX = 0,
dY = 2,
} Type;
2017-04-20 22:25:52 +02:00
int menu(void);
void init(void);
2017-04-30 18:09:11 +02:00
char get_decal(unsigned char dir, Type type);
2017-04-20 22:25:52 +02:00
void *update_frame(void);
int game(void);
2017-04-19 22:43:18 +02:00
2017-04-17 16:55:21 +02:00
#endif