From c1fc60c5a2a4b96b830afc29942648714944b9d7 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 26 Feb 2021 18:54:38 -0500 Subject: Added sprite bobbing (for Lucas underwater) --- src/sprite.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/sprite.h') 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: std::string walkthroughScript; std::string enclosureZone; - // Animation + // Animation (internals) bool isAnimated = false; std::string spritesheet; Direction dir = Direction::down; @@ -76,8 +76,13 @@ public: std::map> nameDirToAnim; bool animFinished = false; bool hasShadow = false; + int bobAmount = 0; + bool bobbingDown = false; + + // Animation (controls) bool normallyHasShadow = false; bool animPaused = false; + bool bobbing = false; // Character bool orientable = false; @@ -92,6 +97,7 @@ public: int runningSfxChannel = -1; bool clipping = false; bool cantCrouch = false; // Use this to prevent running + bool bobsWhenNormal = false; // If enabled, sets the animation bobbing flag whenever medium is Normal // Input bool controllable = false; -- cgit 1.4.1