diff options
author | ptitSeb | 2017-11-30 22:49:38 +0100 |
---|---|---|
committer | ptitSeb | 2017-11-30 22:49:38 +0100 |
commit | de29b11a88dbdd3af0824e59b51528b91ee73c54 (patch) | |
tree | e1aabf8752043998663279fae4359a18c4b4af07 /src/weapon.h | |
parent | d87f450f51372ddf013e6bac09f1ef588e6f8bea (diff) | |
download | hydracastlelabyrinth-de29b11a88dbdd3af0824e59b51528b91ee73c54.tar.gz hydracastlelabyrinth-de29b11a88dbdd3af0824e59b51528b91ee73c54.tar.bz2 hydracastlelabyrinth-de29b11a88dbdd3af0824e59b51528b91ee73c54.zip |
First commit. Version works on Linux (keyboard only, not configurable)
Diffstat (limited to 'src/weapon.h')
-rw-r--r-- | src/weapon.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/weapon.h b/src/weapon.h new file mode 100644 index 0000000..5f47be6 --- /dev/null +++ b/src/weapon.h @@ -0,0 +1,34 @@ +#ifndef WEAPON_H +#define WEAPON_H + +#include "collision.h" + +#define ARROW 0 +#define AXE 1 +#define BOOMERANG 2 +#define FIREBALL 3 +#define BOMB 4 +#define SWORD 5 + +typedef struct { + int id, type; + + double x, y; + double vsp, hsp; + double grav; + double imageIndex; + int dir; + + int power, timer, state, cooldown, hitflag; + + Mask weaponMask; +} Weapon; + +void addWeapon(int type, int x, int y); +void weaponStep(Weapon* w); +void weaponDraw(Weapon* w); + +void weaponHit(Weapon* w); +void weaponDestroy(int id); + +#endif
\ No newline at end of file |