From 273c601a94464bef2161b9c3a29ea3cf901340e9 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 16 Dec 2017 20:17:57 +0000 Subject: Rename aliens to spiders and humans to soldiers. --- src/game/game.hpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/game/game.hpp') 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); -- cgit