From 15f4780dd94a06bec5616155c05810c731d2e4af Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Wed, 13 Dec 2017 12:02:48 +0100 Subject: Add the alien. --- src/game/game.hpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/game/game.hpp') diff --git a/src/game/game.hpp b/src/game/game.hpp index fa75da1..f45aecf 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -22,9 +22,12 @@ namespace game { render::oriented_sprite_4M2_t legs_idle, legs_walking; } human_assets_t; + typedef struct { + render::oriented_sprite_4M_t idle, walking; + } alien_assets_t; + extern human_assets_t human; - extern sf::Texture tile_dirt; - extern sf::Texture tile_wall; + extern alien_assets_t alien; void load(void); } @@ -59,9 +62,10 @@ namespace game { const wchar_t *say_text; double say_time = -INFINITY; + void render_to(render::state_t *render); void say(const wchar_t *wstr, double now); void place(world::world_t *world_, v2f_t x_); - void keep_moving(double now, double dt); + bool keep_moving(double now, double dt); bool start_moving(v2f_t dst_, double now); }; @@ -69,5 +73,12 @@ namespace game { public: human_t(); void render_to(render::state_t *render); + bool keep_moving(double now, double dt); + }; + + class alien_t : public unit_t { + public: + alien_t(); + void render_to(render::state_t *render); }; }; -- cgit