summaryrefslogtreecommitdiff
path: root/graphics/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/render.rs')
-rw-r--r--graphics/src/render.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/src/render.rs b/graphics/src/render.rs
index 8202e49..cbeb613 100644
--- a/graphics/src/render.rs
+++ b/graphics/src/render.rs
@@ -141,6 +141,7 @@ struct Textures {
atlas: Texture2D,
// Entity
player: Texture2D,
+ zombie: Texture2D,
// Misc
error: Texture2D,
// Fonts
@@ -150,12 +151,14 @@ impl Textures {
fn new(handle: &mut RaylibHandle, thread: &RaylibThread) -> crate::Result<Self> {
let atlas = load_texture!(handle, thread, "assets/atlas.bmp");
let player = load_texture!(handle, thread, "assets/player.bmp");
+ let zombie = load_texture!(handle, thread, "assets/zombie.bmp");
let error = load_texture!(handle, thread, "assets/error.bmp");
let font = load_texture!(handle, thread, "assets/font.bmp");
Ok(Self {
atlas,
player,
+ zombie,
error,
font,
})
@@ -490,6 +493,7 @@ impl Renderer {
let (fx, fy) = entity.fpos.xy();
let texture = match entity.kind {
EntityKind::Player => &self.textures.player,
+ EntityKind::Zombie(_) => &self.textures.zombie,
_ => &self.textures.error,
};
let (mut ax, ay) = match entity.dir {