diff options
author | rodri <rgl@antares-labs.eu> | 2023-05-22 09:00:42 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2023-05-22 09:00:42 +0000 |
commit | e095f65376894dcdef067b63103f2e17e55a1f14 (patch) | |
tree | a941d8ed6b6c6149aa1eee503b11a955fdcf7213 /dat.h | |
parent | 1baca76aaf266a2d071af4a173aee5b85efeffd6 (diff) | |
download | musw-e095f65376894dcdef067b63103f2e17e55a1f14.tar.gz musw-e095f65376894dcdef067b63103f2e17e55a1f14.tar.bz2 musw-e095f65376894dcdef067b63103f2e17e55a1f14.zip |
improvements to show a bullet's explosion upon ttl consumption.
implemented a vfx subsystem to handle localized, async animations.
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -59,6 +59,7 @@ enum { typedef struct VModel VModel; typedef struct Sprite Sprite; +typedef struct Vfx Vfx; typedef struct Keymap Keymap; typedef struct State State; typedef struct Particle Particle; @@ -101,6 +102,18 @@ struct Sprite void (*step)(Sprite*, ulong); void (*draw)(Sprite*, Image*, Point); + Sprite *(*clone)(Sprite*); +}; + +struct Vfx +{ + Sprite *a; /* animation */ + Point p; + int times; /* to repeat. -1 loops forever */ + Vfx *prev, *next; + + void (*step)(Vfx*, ulong); + void (*draw)(Vfx*, Image*); }; struct Keymap @@ -133,7 +146,6 @@ struct Bullet struct Ship { Particle; - Kind kind; int fuel; Bullet rounds[10]; VModel *mdl; |