One of my first programming projects. I tried to learn C and use curses...it is quite embarrassing looking back at it now :D
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

56 lines
776 B

#ifndef _STRUCTS
#define _STRUCTS
struct Weapon{
char *type;
int isAlive;
int range;
int maxCapacity;
int curCapacity;
int curMags;
char projectileSymbol;
char symbols[8];
};
struct Entity {
char *type;
char *behavior;
char symbol;
int curYpos, curXpos;
int nextYpos, nextXpos;
struct Weapon weapons[9];
int curWeapon;
int isAlive;
int killCount;
int projectilesFired;
};
struct Item{
char *type;
char symbol;
int isAlive;
int curYpos;
int curXpos;
};
struct Projectile{
int isAlive;
char symbol;
int curYpos;
int curXpos;
int prevYpos;
int prevXpos;
int nextYpos;
int nextXpos;
int range;
char direction;
int distanceTraveled;
};
struct CollisionEvent{
struct Entity * collidedWithEntity;
struct Item * collidedWithItem;
};
#endif