diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-21 18:01:23 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-21 18:01:23 +0100 |
commit | 680ce5519c24dd0fa87ae85dd824000e915974b0 (patch) | |
tree | be42a1b9915c28944829a94f54c3296722b71170 /src/game/game.hpp | |
parent | 6eed8de736ff18a2aed65cd9ba62c6a7b5d18c59 (diff) |
Add move markers.
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r-- | src/game/game.hpp | 20 |
1 files changed, 19 insertions, 1 deletions
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<fx_move_marker_t> 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, |