From cf7c38f58f350350580241fae7f5543e44b5d1ad Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 13 Apr 2018 12:37:55 +0200 Subject: Breakable decos. --- src/game/game.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/game/game.hpp') diff --git a/src/game/game.hpp b/src/game/game.hpp index 8a6d2ba..a173b7e 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -88,8 +88,9 @@ namespace game { } fx_assets_t; typedef struct { - render::animated_texture_t stone, eyething; - render::animated_texture_t spike, spike_small; + render::animated_texture_t stone, stone_cracked; + render::animated_texture_t eyething, eyething_dead; + render::animated_texture_t spike, spike_broken, spike_small; render::animated_texture_t wart; } deco_assets_t; @@ -152,6 +153,7 @@ namespace game { void wake(void); void sleep(void); + virtual void damage(int points, unit_t *attacker) = 0; virtual void on_think(void) = 0; virtual void on_spawn(void) = 0; virtual void on_wake(void) = 0; @@ -317,6 +319,7 @@ namespace game { void on_think(void); void on_spawn(void) {}; void on_wake(void) {}; + void damage(int points, unit_t *attacker) {}; void render_late_to(render::state_t *render) {}; }; @@ -386,9 +389,12 @@ namespace game { typedef enum { DECO_STONE, + DECO_STONE_CRACKED, DECO_STONE_SMALL, DECO_EYETHING, + DECO_EYETHING_DEAD, DECO_SPIKE, + DECO_SPIKE_BROKEN, DECO_SPIKE_SMALL, DECO_WART } deco_type_t; @@ -406,5 +412,6 @@ namespace game { void on_think(void) {}; void on_spawn(void) {}; void on_wake(void) {}; + void damage(int points, unit_t *attacker); }; }; -- cgit