diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-16 20:17:57 +0000 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-16 20:17:57 +0000 |
commit | 273c601a94464bef2161b9c3a29ea3cf901340e9 (patch) | |
tree | 9b3c4907c69dddf3b2dc421d89841081a735ac0d /src/game/game.hpp | |
parent | d96a70e50f7b3b19f3424aa9b97123db681269a8 (diff) |
Rename aliens to spiders and humans to soldiers.
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r-- | src/game/game.hpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp index c17de64..df027ce 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -32,12 +32,12 @@ namespace game { render::oriented_sprite_4M_t body_aiming, body_firing; render::oriented_sprite_4M2_t legs_idle, legs_walking; render::animated_texture_t dead; - } human_assets_t; + } soldier_assets_t; typedef struct { render::oriented_sprite_4M_t idle, walking; render::animated_texture_t dead; - } alien_assets_t; + } spider_assets_t; typedef struct { render::animated_texture_t blood; @@ -47,8 +47,8 @@ namespace game { render::animated_texture_t stone, eyething, nest; } deco_assets_t; - extern human_assets_t human; - extern alien_assets_t alien; + extern soldier_assets_t soldier; + extern spider_assets_t spider; extern fx_assets_t fx; extern deco_assets_t deco; @@ -88,8 +88,8 @@ namespace game { size_t selected = 0; typedef enum { - UNIT_HUMAN, - UNIT_ALIEN + UNIT_SOLDIER, + UNIT_SPIDER } type_t; type_t type; @@ -97,6 +97,9 @@ namespace game { unit_t(game::state_t *game_, type_t type_); + bool friendly = false; + bool controllable = false; + struct { bool moving = false; v2f_t dst; @@ -134,13 +137,13 @@ namespace game { }; - class human_t : public unit_t { + class unit_soldier_t : public unit_t { double last_target_time = -INFINITY; v2f_t last_target_x; public: - human_t(game::state_t *game_); - ~human_t(void) {}; + unit_soldier_t(game::state_t *game_); + ~unit_soldier_t(void) {}; void render_to(render::state_t *render); void on_think(void); @@ -149,10 +152,10 @@ namespace game { void on_death(void); }; - class alien_t : public unit_t { + class unit_spider_t : public unit_t { public: - alien_t(game::state_t *game_); - ~alien_t(void) {}; + unit_spider_t(game::state_t *game_); + ~unit_spider_t(void) {}; void render_to(render::state_t *render); void on_think(void); |