summaryrefslogtreecommitdiff
path: root/src/game/game.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-13 12:37:55 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-13 12:37:55 +0200
commitcf7c38f58f350350580241fae7f5543e44b5d1ad (patch)
tree2e28c61afd9bc7a612bf2198705400274eb08b28 /src/game/game.hpp
parent2cada8d93653324cb90fc81d4eb670bab9af089a (diff)
Breakable decos.
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r--src/game/game.hpp11
1 files changed, 9 insertions, 2 deletions
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);
};
};