Walk and attack animations for knight and kobold; the dead topple, sink and fade (death animations where drawn)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
16e299d1f1
commit
fb71009110
29 files changed
+697
-3
No files matched your search
+15
-2
@@ -1780,6 +1780,7 @@ pub enum HdAnim {
|
||||
Hack,
|
||||
Walk,
|
||||
Attack,
|
||||
Die,
|
||||
}
|
||||
pub const ANIM_FRAMES: u32 = 4;
|
||||
struct HdSprite {
|
||||
@@ -1797,6 +1798,18 @@ macro_rules! hd_sprite {
|
||||
anims: &[],
|
||||
}
|
||||
};
|
||||
// with walking and attacking (assets/sprites/<name>-walk-64.png etc.)
|
||||
($kind:expr, $name:literal, animated) => {
|
||||
HdSprite {
|
||||
kind: $kind,
|
||||
idle: include_bytes!(concat!("../assets/sprites/", $name, "-64.png")),
|
||||
idle_32: include_bytes!(concat!("../assets/sprites/", $name, "-32.png")),
|
||||
anims: &[
|
||||
(HdAnim::Walk, include_bytes!(concat!("../assets/sprites/", $name, "-walk-64.png")), include_bytes!(concat!("../assets/sprites/", $name, "-walk-32.png"))),
|
||||
(HdAnim::Attack, include_bytes!(concat!("../assets/sprites/", $name, "-attack-64.png")), include_bytes!(concat!("../assets/sprites/", $name, "-attack-32.png"))),
|
||||
],
|
||||
}
|
||||
};
|
||||
}
|
||||
const HD_SPRITES: [HdSprite; 31] = [
|
||||
HdSprite {
|
||||
@@ -1805,11 +1818,11 @@ const HD_SPRITES: [HdSprite; 31] = [
|
||||
idle_32: include_bytes!("../assets/sprites/imp-32.png"),
|
||||
anims: &[(HdAnim::Hack, include_bytes!("../assets/sprites/imp-hack-64.png"), include_bytes!("../assets/sprites/imp-hack-32.png"))],
|
||||
},
|
||||
hd_sprite!(EK::Kobold, "kobold"),
|
||||
hd_sprite!(EK::Kobold, "kobold", animated),
|
||||
hd_sprite!(EK::Spider, "spider"),
|
||||
hd_sprite!(EK::Mage, "mage"),
|
||||
hd_sprite!(EK::Ogre, "ogre"),
|
||||
hd_sprite!(EK::Knight, "knight"),
|
||||
hd_sprite!(EK::Knight, "knight", animated),
|
||||
hd_sprite!(EK::Archer, "archer"),
|
||||
hd_sprite!(EK::Priest, "priest"),
|
||||
hd_sprite!(EK::Dwarf, "dwarf"),
|
||||
|
||||
Reference in new issue
Block a user