Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define MAX_MISSILES 4
- #define MAX_PLANES 2
- typedef struct Missile
- {
- unsigned char dir;
- unsigned short distance; // distance between the plane and the missile
- unsigned char type;
- } Missile;
- // plane management
- typedef struct Plane
- {
- int x;
- int y;
- /* plane direction management
- 3 2 1
- 4 plane 0
- 5 6 7
- */
- unsigned char dir;
- unsigned char life;
- Missile missiles[MAX_MISSILES];
- // align
- } Plane;
- Plane planes[MAX_PLANES];
- /*
- accés :
- int i = 0; j = 0;
- planes[i].missiles[j].dir ?
- */
Advertisement
Add Comment
Please, Sign In to add comment