diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 18:54:38 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 18:54:38 -0500 |
commit | c1fc60c5a2a4b96b830afc29942648714944b9d7 (patch) | |
tree | 8460df9e93491b8ba138f7f1cba41572b65fc537 /src/sprite.h | |
parent | af49b5366d35173702a2b3bd70ac4254b8855538 (diff) | |
download | tanetane-c1fc60c5a2a4b96b830afc29942648714944b9d7.tar.gz tanetane-c1fc60c5a2a4b96b830afc29942648714944b9d7.tar.bz2 tanetane-c1fc60c5a2a4b96b830afc29942648714944b9d7.zip |
Added sprite bobbing (for Lucas underwater)
Diffstat (limited to 'src/sprite.h')
-rw-r--r-- | src/sprite.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sprite.h b/src/sprite.h index 657a692..570a906 100644 --- a/src/sprite.h +++ b/src/sprite.h | |||
@@ -64,7 +64,7 @@ public: | |||
64 | std::string walkthroughScript; | 64 | std::string walkthroughScript; |
65 | std::string enclosureZone; | 65 | std::string enclosureZone; |
66 | 66 | ||
67 | // Animation | 67 | // Animation (internals) |
68 | bool isAnimated = false; | 68 | bool isAnimated = false; |
69 | std::string spritesheet; | 69 | std::string spritesheet; |
70 | Direction dir = Direction::down; | 70 | Direction dir = Direction::down; |
@@ -76,8 +76,13 @@ public: | |||
76 | std::map<std::string, std::map<Direction, int>> nameDirToAnim; | 76 | std::map<std::string, std::map<Direction, int>> nameDirToAnim; |
77 | bool animFinished = false; | 77 | bool animFinished = false; |
78 | bool hasShadow = false; | 78 | bool hasShadow = false; |
79 | int bobAmount = 0; | ||
80 | bool bobbingDown = false; | ||
81 | |||
82 | // Animation (controls) | ||
79 | bool normallyHasShadow = false; | 83 | bool normallyHasShadow = false; |
80 | bool animPaused = false; | 84 | bool animPaused = false; |
85 | bool bobbing = false; | ||
81 | 86 | ||
82 | // Character | 87 | // Character |
83 | bool orientable = false; | 88 | bool orientable = false; |
@@ -92,6 +97,7 @@ public: | |||
92 | int runningSfxChannel = -1; | 97 | int runningSfxChannel = -1; |
93 | bool clipping = false; | 98 | bool clipping = false; |
94 | bool cantCrouch = false; // Use this to prevent running | 99 | bool cantCrouch = false; // Use this to prevent running |
100 | bool bobsWhenNormal = false; // If enabled, sets the animation bobbing flag whenever medium is Normal | ||
95 | 101 | ||
96 | // Input | 102 | // Input |
97 | bool controllable = false; | 103 | bool controllable = false; |