diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-01 13:46:47 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-01 13:46:47 +0200 |
commit | be628dc7f9c32ca84674c8717f07cc15a40f333c (patch) | |
tree | 09c54df1ce9e5905a1a3d90434b8c9fea021eb1b /src/common.hpp | |
parent | 6c46e70e3576ae9d27c3ad5c8c95c3198c9be501 (diff) |
Improve selecting.
Diffstat (limited to 'src/common.hpp')
-rw-r--r-- | src/common.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/common.hpp b/src/common.hpp index fcda5e5..0f51590 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -248,8 +248,15 @@ namespace game { die_t(size_t count_, size_t sides_, size_t bonus_); }; + enum { + SELECT_NEW, + SELECT_OR, + SELECT_XOR + }; + class state_t { void group_say(std::string text); + void select_unit(unit_t *unit, int type); public: world::world_t world; @@ -274,7 +281,7 @@ namespace game { void resume(void); // These are called by the interface. - void select(rectf_t rect); + void select(rectf_t rect, int type); bool populate_pie_menu(std::vector<interface::pie_item_t> &items); void command(v2f_t x, int number); void spawn_soldier(v2f_t x); @@ -323,6 +330,7 @@ namespace interface { struct { bool selecting = false; + int type; rectf_t rect; } select; @@ -394,6 +402,8 @@ namespace render { } text_align_t; void register_tile(uint8_t type, const char *top, const char *side, float height); + bool rendering_order(const world::entity_t *x, const world::entity_t *y); + bool visibility_order(const world::entity_t *x, const world::entity_t *y); class state_t { sf::RenderWindow *window; |