diff options
author | quou <quou@disroot.org> | 2024-10-08 19:56:08 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-10-08 19:56:08 +1100 |
commit | 9add408984464bd6b3cc018bb14c3d69ad0a2898 (patch) | |
tree | dde2af5525fd076d03c5c8e14067a4502aa1051e /obj.h | |
parent | b5c69695c9c97c09f7ffa4d5a600d88cc06ee6da (diff) |
New flying enemy that drops arrows
Diffstat (limited to 'obj.h')
-rw-r--r-- | obj.h | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -79,7 +79,8 @@ int update_effect(Effect* e); void ren_effect(const Effect* e, struct Renderer* r); typedef enum { - enemy_demon + enemy_demon, + enemy_fly } Enemy_Type; typedef struct { @@ -87,7 +88,7 @@ typedef struct { int x, y, vx, vy; int hp, frame, anim; int grounded, headbutted, on_ramp; - int state, inv; + int state, inv, timer; Face face; Rect rect; } Enemy; @@ -116,4 +117,23 @@ int update_deathzone(Deathzone* d); void ren_hud(const struct World* w, struct Renderer* r); +typedef struct { + Rect r, s; + int anim, frame; + int x, y, vx, vy; +} Projectile; + +void init_projectile( + Projectile* p, + int x, + int y, + const Rect* r, + int anim +); +int update_projectile( + Projectile* p, + const struct World* w +); +void ren_projectile(const Projectile* p, struct Renderer* r); + #endif |