summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-21 15:05:44 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-21 15:05:44 +0200
commitb84b39f099e8a1f66fb95d371b60b1546fb3142a (patch)
tree5c580d0e33cf2ac61b2227ed83bfeaf74310af23 /src
parentf6b478403e73c9d85f32d6ab6014bb45f82dd503 (diff)
Replicator avatar.
Diffstat (limited to 'src')
-rw-r--r--src/game/assets.cpp1
-rw-r--r--src/game/game.hpp2
-rw-r--r--src/game/interface.cpp4
-rw-r--r--src/game/unit_repl.cpp6
4 files changed, 7 insertions, 6 deletions
diff --git a/src/game/assets.cpp b/src/game/assets.cpp
index f92aae0..106387d 100644
--- a/src/game/assets.cpp
+++ b/src/game/assets.cpp
@@ -76,6 +76,7 @@ void load(void)
nest.death.load("assets/units/nest/death.ogg");
repl.idle.load("assets/units/repl/idle_", 4);
+ repl.avatar.load("assets/units/repl/avatar_", 1);
repl.sound.load("assets/units/repl/sound.ogg");
repl.damage.load("assets/units/repl/damage1.ogg");
repl.damage.load("assets/units/repl/damage2.ogg");
diff --git a/src/game/game.hpp b/src/game/game.hpp
index 6d6e773..1cd61aa 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -83,7 +83,7 @@ namespace game {
} nest_assets_t;
typedef struct {
- render::animated_texture_t idle, dead;
+ render::animated_texture_t idle, avatar;
audio::sound_t sound, damage;
} repl_assets_t;
diff --git a/src/game/interface.cpp b/src/game/interface.cpp
index 34bbcf2..1119367 100644
--- a/src/game/interface.cpp
+++ b/src/game/interface.cpp
@@ -358,6 +358,10 @@ static void render_avatar(render::state_t *render, game::unit_t *unit, v2f_t at,
image = &assets::soldier.avatar;
break;
+ case game::unit_t::UNIT_REPL:
+ image = &assets::repl.avatar;
+ break;
+
default:
image = &assets::deco.eyething;
break;
diff --git a/src/game/unit_repl.cpp b/src/game/unit_repl.cpp
index 584778d..08a43d2 100644
--- a/src/game/unit_repl.cpp
+++ b/src/game/unit_repl.cpp
@@ -48,11 +48,7 @@ void unit_repl_t::on_death(void)
void unit_repl_t::render_to(render::state_t *render)
{
- if (!dead)
- render->render(game->now, &assets::repl.idle, render_bounds);
- else
- render->render(game->now, &assets::repl.dead, render_bounds);
-
+ render->render(game->now, &assets::repl.idle, render_bounds);
unit_t::render_to(render);
}