From b06b259c54e09f1a4026191d6eec9684599bd370 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 23 Feb 2021 22:22:49 -0500 Subject: Started working on ladders TODO: * all the animations are weird. we will need to have an adjustable framerate bc the climbing animation does not look right at the current rate. (also remove the manual animation stuff ig) * does the medium stuff seem good and right? i am kinda not satisfied with it. * running onto a ladder causes the characters to bunch up bc the movement speed is slowed down but the trails are not doubled * no ladder running sound * shadows should vanish while on a ladder * uhh if you end a cutscene while on a ladder it resets the animation to "still" which is wrong. will this ever happen? idk * adding a sprite to your party while you are on a ladder?? --- src/sprite.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/sprite.h') diff --git a/src/sprite.h b/src/sprite.h index 3d2e9df..59d2caf 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -23,6 +23,7 @@ struct SpriteFrame { struct Animation { bool looping = true; + bool manual = false; std::vector frameIndices; }; @@ -33,9 +34,15 @@ enum class CharacterState { Running }; +enum class CharacterMedium { + Normal, + Ladder +}; + struct Movement { vec2i pos; Direction dir; + CharacterMedium medium; }; class Sprite { @@ -68,6 +75,7 @@ public: std::map> nameDirToAnim; bool animFinished = false; bool hasShadow = false; + bool animPaused = false; // Character bool orientable = false; @@ -75,6 +83,8 @@ public: std::vector followers; std::deque trail; CharacterState characterState = CharacterState::Still; + CharacterMedium characterMedium = CharacterMedium::Normal; + Direction movementDir = Direction::down; StepType stepType = StepType::none; int runningSfxChannel = -1; bool clipping = false; -- cgit 1.4.1