diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-23 22:22:49 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2021-02-24 16:00:53 -0500 |
commit | b06b259c54e09f1a4026191d6eec9684599bd370 (patch) | |
tree | f31b241c3da5559d388d97bf9e65c2104f4652e8 /src/sprite.h | |
parent | ae654356f843bb42a3c72d57b528d87aa63cf66d (diff) | |
download | tanetane-b06b259c54e09f1a4026191d6eec9684599bd370.tar.gz tanetane-b06b259c54e09f1a4026191d6eec9684599bd370.tar.bz2 tanetane-b06b259c54e09f1a4026191d6eec9684599bd370.zip |
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??
Diffstat (limited to 'src/sprite.h')
-rw-r--r-- | src/sprite.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 { | |||
23 | 23 | ||
24 | struct Animation { | 24 | struct Animation { |
25 | bool looping = true; | 25 | bool looping = true; |
26 | bool manual = false; | ||
26 | std::vector<int> frameIndices; | 27 | std::vector<int> frameIndices; |
27 | }; | 28 | }; |
28 | 29 | ||
@@ -33,9 +34,15 @@ enum class CharacterState { | |||
33 | Running | 34 | Running |
34 | }; | 35 | }; |
35 | 36 | ||
37 | enum class CharacterMedium { | ||
38 | Normal, | ||
39 | Ladder | ||
40 | }; | ||
41 | |||
36 | struct Movement { | 42 | struct Movement { |
37 | vec2i pos; | 43 | vec2i pos; |
38 | Direction dir; | 44 | Direction dir; |
45 | CharacterMedium medium; | ||
39 | }; | 46 | }; |
40 | 47 | ||
41 | class Sprite { | 48 | class Sprite { |
@@ -68,6 +75,7 @@ public: | |||
68 | std::map<std::string, std::map<Direction, int>> nameDirToAnim; | 75 | std::map<std::string, std::map<Direction, int>> nameDirToAnim; |
69 | bool animFinished = false; | 76 | bool animFinished = false; |
70 | bool hasShadow = false; | 77 | bool hasShadow = false; |
78 | bool animPaused = false; | ||
71 | 79 | ||
72 | // Character | 80 | // Character |
73 | bool orientable = false; | 81 | bool orientable = false; |
@@ -75,6 +83,8 @@ public: | |||
75 | std::vector<int> followers; | 83 | std::vector<int> followers; |
76 | std::deque<Movement> trail; | 84 | std::deque<Movement> trail; |
77 | CharacterState characterState = CharacterState::Still; | 85 | CharacterState characterState = CharacterState::Still; |
86 | CharacterMedium characterMedium = CharacterMedium::Normal; | ||
87 | Direction movementDir = Direction::down; | ||
78 | StepType stepType = StepType::none; | 88 | StepType stepType = StepType::none; |
79 | int runningSfxChannel = -1; | 89 | int runningSfxChannel = -1; |
80 | bool clipping = false; | 90 | bool clipping = false; |