summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llmotion.h
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-09-05 08:37:16 -0400
committerGitHub <noreply@github.com>2024-09-05 08:37:16 -0400
commit7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (patch)
treee96334bd9299102ebdaf229eec9cf4c2165f8c2f /indra/llcharacter/llmotion.h
parent487973d3f0ee9b8583b3d977ca6a405cba5fe518 (diff)
parent6a747e1ce027700a3609f4c377179bfa29c3ce31 (diff)
Merge pull request #2450 from secondlife/lua-merge
Merge updated 'main' branch into release/luau-scripting
Diffstat (limited to 'indra/llcharacter/llmotion.h')
-rw-r--r--indra/llcharacter/llmotion.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h
index d45b8bceb6..4120de76a5 100644
--- a/indra/llcharacter/llmotion.h
+++ b/indra/llcharacter/llmotion.h
@@ -91,21 +91,21 @@ public:
virtual void setStopTime(F32 time);
- BOOL isStopped() const { return mStopped; }
+ bool isStopped() const { return mStopped; }
- void setStopped(BOOL stopped) { mStopped = stopped; }
+ void setStopped(bool stopped) { mStopped = stopped; }
- BOOL isBlending();
+ bool isBlending();
// Activation functions.
// It is OK for other classes to activate a motion,
// but only the controller can deactivate it.
- // Thus, if mActive == TRUE, the motion *may* be on the controllers active list,
- // but if mActive == FALSE, the motion is gauranteed not to be on the active list.
+ // Thus, if mActive == true, the motion *may* be on the controllers active list,
+ // but if mActive == false, the motion is gauranteed not to be on the active list.
protected:
// Used by LLMotionController only
void deactivate();
- BOOL isActive() { return mActive; }
+ bool isActive() { return mActive; }
public:
void activate(F32 time);
@@ -115,7 +115,7 @@ public:
//-------------------------------------------------------------------------
// motions must specify whether or not they loop
- virtual BOOL getLoop() = 0;
+ virtual bool getLoop() = 0;
// motions must report their total duration
virtual F32 getDuration() = 0;
@@ -144,33 +144,33 @@ public:
virtual LLMotionInitStatus onInitialize(LLCharacter *character) = 0;
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 activeTime, U8* joint_mask) = 0;
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ virtual bool onUpdate(F32 activeTime, U8* joint_mask) = 0;
// called when a motion is deactivated
virtual void onDeactivate() = 0;
// can we crossfade this motion with a new instance when restarted?
- // should ultimately always be TRUE, but lack of emote blending, etc
+ // should ultimately always be true, but lack of emote blending, etc
// requires this
- virtual BOOL canDeprecate();
+ virtual bool canDeprecate();
// optional callback routine called when animation deactivated.
void setDeactivateCallback( void (*cb)(void *), void* userdata );
protected:
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- virtual BOOL onActivate() = 0;
+ virtual bool onActivate() = 0;
void addJointState(const LLPointer<LLJointState>& jointState);
protected:
LLPose mPose;
- BOOL mStopped; // motion has been stopped;
- BOOL mActive; // motion is on active list (can be stopped or not stopped)
+ bool mStopped; // motion has been stopped;
+ bool mActive; // motion is on active list (can be stopped or not stopped)
//-------------------------------------------------------------------------
// these are set implicitly by the motion controller and
@@ -199,7 +199,7 @@ public:
LLTestMotion(const LLUUID &id) : LLMotion(id){}
~LLTestMotion() {}
static LLMotion *create(const LLUUID& id) { return new LLTestMotion(id); }
- BOOL getLoop() { return FALSE; }
+ bool getLoop() { return false; }
F32 getDuration() { return 0.0f; }
F32 getEaseInDuration() { return 0.0f; }
F32 getEaseOutDuration() { return 0.0f; }
@@ -208,8 +208,8 @@ public:
F32 getMinPixelArea() { return 0.f; }
LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; }
- BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return TRUE; }
- BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return TRUE; }
+ bool onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; }
+ bool onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; }
void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; }
};
@@ -225,7 +225,7 @@ public:
static LLMotion *create(const LLUUID &id) { return new LLNullMotion(id); }
// motions must specify whether or not they loop
- /*virtual*/ BOOL getLoop() { return TRUE; }
+ /*virtual*/ bool getLoop() { return true; }
// motions must report their total duration
/*virtual*/ F32 getDuration() { return 1.f; }
@@ -251,14 +251,14 @@ public:
/*virtual*/ LLMotionInitStatus onInitialize(LLCharacter *character) { return STATUS_SUCCESS; }
// called when a motion is activated
- // must return TRUE to indicate success, or else
+ // must return true to indicate success, or else
// it will be deactivated
- /*virtual*/ BOOL onActivate() { return TRUE; }
+ /*virtual*/ bool onActivate() { return true; }
// called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- /*virtual*/ BOOL onUpdate(F32 activeTime, U8* joint_mask) { return TRUE; }
+ // must return true while it is active, and
+ // must return false when the motion is completed.
+ /*virtual*/ bool onUpdate(F32 activeTime, U8* joint_mask) { return true; }
// called when a motion is deactivated
/*virtual*/ void onDeactivate() {}