diff options
author | Emmaker <79481373+Emmaker@users.noreply.github.com> | 2025-06-02 18:09:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-02 18:09:06 -0400 |
commit | e8fcbabb7a71134fcd58cc2251d7eb3aa443039f (patch) | |
tree | 245f6fd717a704d648756117e134c7b738e9d512 /source/base/StarAnimatedPartSet.hpp | |
parent | 00d70f62235437bd7f473d43c506a1c652236362 (diff) | |
parent | 4048e211c50af86dc278f13b1b2eb2a9ec00b7bf (diff) |
Merge branch 'OpenStarbound:main' into main
Diffstat (limited to 'source/base/StarAnimatedPartSet.hpp')
-rw-r--r-- | source/base/StarAnimatedPartSet.hpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/source/base/StarAnimatedPartSet.hpp b/source/base/StarAnimatedPartSet.hpp index 43755be..a608924 100644 --- a/source/base/StarAnimatedPartSet.hpp +++ b/source/base/StarAnimatedPartSet.hpp @@ -2,7 +2,6 @@ #include "StarOrderedMap.hpp" #include "StarJson.hpp" -#include "StarMatrix3.hpp" namespace Star { @@ -47,11 +46,7 @@ public: String stateName; float timer; unsigned frame; - float frameProgress; JsonObject properties; - bool reverse; - unsigned nextFrame; - JsonObject nextProperties; }; struct ActivePartInformation { @@ -59,18 +54,6 @@ public: // If a state match is found, this will be set. Maybe<ActiveStateInformation> activeState; JsonObject properties; - JsonObject nextProperties; - - Mat3F animationAffineTransform() const; - void setAnimationAffineTransform(Mat3F const& matrix); - void setAnimationAffineTransform(Mat3F const& mat1, Mat3F const& mat2, float progress); - - float xTranslationAnimation; - float yTranslationAnimation; - float xScaleAnimation; - float yScaleAnimation; - float xShearAnimation; - float yShearAnimation; }; enum AnimationMode { @@ -114,7 +97,7 @@ public: }; AnimatedPartSet(); - AnimatedPartSet(Json config, uint8_t animatiorVersion); + AnimatedPartSet(Json config); // Returns the available state types. StringList stateTypes() const; @@ -135,7 +118,7 @@ public: // beginning. If alwaysStart is true, then starts the state animation off at // the beginning even if no state change has occurred. Returns true if a // state animation reset was done. - bool setActiveState(String const& stateTypeName, String const& stateName, bool alwaysStart = false, bool reverse = false); + bool setActiveState(String const& stateTypeName, String const& stateName, bool alwaysStart = false); // Restart this given state type's timer off at the beginning. void restartState(String const& stateTypeName); @@ -158,8 +141,7 @@ public: // state type is ordered, it is possible to simply serialize and deserialize // the state index for that state type. size_t activeStateIndex(String const& stateTypeName) const; - bool activeStateReverse(String const& stateTypeName) const; - bool setActiveStateIndex(String const& stateTypeName, size_t stateIndex, bool alwaysStart = false, bool reverse = false); + bool setActiveStateIndex(String const& stateTypeName, size_t stateIndex, bool alwaysStart = false); // Animate each state type forward 'dt' time, and either change state frames // or transition to new states, depending on the config. @@ -168,8 +150,6 @@ public: // Pushes all the animations into their final state void finishAnimations(); - uint8_t version() const; - private: static AnimationMode stringToAnimationMode(String const& string); @@ -178,8 +158,6 @@ private: OrderedHashMap<String, StateType> m_stateTypes; StringMap<Part> m_parts; - - uint8_t m_animatorVersion; }; } |