From 680ce5519c24dd0fa87ae85dd824000e915974b0 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 21 Dec 2017 18:01:23 +0100 Subject: Add move markers. --- src/game/game.hpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/game/game.hpp') diff --git a/src/game/game.hpp b/src/game/game.hpp index 213e8b1..0143edb 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -82,6 +82,7 @@ namespace game { extern deco_assets_t deco; extern render::animated_texture_t unit_selected; extern render::animated_texture_t unit_selected_halo; + extern render::animated_texture_t move_marker; void load(void); } @@ -101,7 +102,6 @@ namespace game { FOLLOWING_OFF, SAY_GROUP, SAY_NO_PATH, - SAY_BLOCKED, SAY_READY, SAY_READY_GROUP, SAY_MOVING, @@ -148,6 +148,8 @@ namespace game { virtual void on_wake(void) = 0; }; + class fx_move_marker_t; + class unit_t : public entity_t { protected: double next_targetting = -INFINITY; @@ -208,9 +210,14 @@ namespace game { }; class unit_soldier_t : public unit_t { + friend state_t; + + protected: double last_target_time = -INFINITY; v2f_t last_target_x; + std::unique_ptr move_marker; + sf::Color selection_color; double next_fear_test = -INFINITY; @@ -301,6 +308,17 @@ namespace game { void render_to(render::state_t *render); }; + class fx_move_marker_t : public effect_t { + v2f_t x; + + public: + fx_move_marker_t(game::state_t *game_, v2f_t x_); + ~fx_move_marker_t(void); + + void render_to(render::state_t *render); + }; + + typedef enum { DECO_STONE, DECO_STONE_SMALL, -- cgit