From 846f85f1f65be7936301b3f5a0a4ab6c1b13fa06 Mon Sep 17 00:00:00 2001 From: Ethan Adams Date: Sat, 17 Aug 2024 18:06:13 -0400 Subject: [PATCH] Revamped animation system Smoother reloading Added idle atlas for player --- Resources/animations/bubble_anim.xml | 6 + Resources/animations/machine_gun_anim.xml | 10 + Resources/animations/pistol_anim.xml | 6 + Resources/animations/player_anim.xml | 11 + Resources/animations/tmp_enemy_anim.xml | 6 + Resources/scenes/debugScene.xml | 8 +- Resources/sprites/player3AtlasIdle64.png | Bin 0 -> 17106 bytes Resources/sprites/player3AtlasMove64.png | Bin 0 -> 43000 bytes Resources/weapons/bubblegun.xml | 28 +-- YuppleMayham/CMakeLists.txt | 2 +- YuppleMayham/include/gameplay/entity.h | 9 +- YuppleMayham/include/gameplay/gameactor.h | 6 +- .../include/gameplay/weapons/bullet.h | 1 + .../include/gameplay/weapons/weapon.h | 16 +- YuppleMayham/include/graphics/animation.h | 102 +++++++++ YuppleMayham/include/graphics/sprite.h | 85 +++----- YuppleMayham/include/utility/component.h | 62 ++++-- YuppleMayham/include/utility/direction.h | 3 +- YuppleMayham/include/utility/events.h | 40 +++- .../include/utility/resourcemanager.h | 13 +- YuppleMayham/include/utility/xmlloader.h | 57 ++++- YuppleMayham/src/gameplay/gameactor.cpp | 31 ++- YuppleMayham/src/gameplay/scene.cpp | 20 +- YuppleMayham/src/gameplay/weapons/weapon.cpp | 95 +++++++-- YuppleMayham/src/graphics/animation.cpp | 181 ++++++++++++++++ YuppleMayham/src/graphics/sprite.cpp | 125 +++-------- YuppleMayham/src/utility/resourcemanager.cpp | 18 +- YuppleMayham/src/utility/xmlloader.cpp | 197 +++++++++++++----- 28 files changed, 836 insertions(+), 302 deletions(-) create mode 100644 Resources/animations/bubble_anim.xml create mode 100644 Resources/animations/machine_gun_anim.xml create mode 100644 Resources/animations/pistol_anim.xml create mode 100644 Resources/animations/player_anim.xml create mode 100644 Resources/animations/tmp_enemy_anim.xml create mode 100644 Resources/sprites/player3AtlasIdle64.png create mode 100644 Resources/sprites/player3AtlasMove64.png create mode 100644 YuppleMayham/include/graphics/animation.h create mode 100644 YuppleMayham/src/graphics/animation.cpp diff --git a/Resources/animations/bubble_anim.xml b/Resources/animations/bubble_anim.xml new file mode 100644 index 0000000..d5c71bb --- /dev/null +++ b/Resources/animations/bubble_anim.xml @@ -0,0 +1,6 @@ + + + 2 + + + \ No newline at end of file diff --git a/Resources/animations/machine_gun_anim.xml b/Resources/animations/machine_gun_anim.xml new file mode 100644 index 0000000..d308c6f --- /dev/null +++ b/Resources/animations/machine_gun_anim.xml @@ -0,0 +1,10 @@ + + + 4 + + + + 2 + + + diff --git a/Resources/animations/pistol_anim.xml b/Resources/animations/pistol_anim.xml new file mode 100644 index 0000000..d2638ab --- /dev/null +++ b/Resources/animations/pistol_anim.xml @@ -0,0 +1,6 @@ + + + 4 + + + diff --git a/Resources/animations/player_anim.xml b/Resources/animations/player_anim.xml new file mode 100644 index 0000000..0b375f9 --- /dev/null +++ b/Resources/animations/player_anim.xml @@ -0,0 +1,11 @@ + + + 7 + + + + + 5 + + + diff --git a/Resources/animations/tmp_enemy_anim.xml b/Resources/animations/tmp_enemy_anim.xml new file mode 100644 index 0000000..68500ec --- /dev/null +++ b/Resources/animations/tmp_enemy_anim.xml @@ -0,0 +1,6 @@ + + + 7 + + + diff --git a/Resources/scenes/debugScene.xml b/Resources/scenes/debugScene.xml index 62da31c..11d39e8 100644 --- a/Resources/scenes/debugScene.xml +++ b/Resources/scenes/debugScene.xml @@ -35,18 +35,18 @@ - + - +