diff options
author | Lars Næsbye Christensen <lars@naesbye.dk> | 2024-02-16 19:29:51 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-02-17 12:23:07 +0200 |
commit | 9e854b697a06abed2a0917fb6120445f176764f0 (patch) | |
tree | 7d430fa151e037525ae05d6030e309e9cdecde61 /indra/llcharacter/llmotioncontroller.cpp | |
parent | d0e82ca55670645eacc61fca39bf8667c0840de9 (diff) |
misc: BOOL to bool
Diffstat (limited to 'indra/llcharacter/llmotioncontroller.cpp')
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 750547da93..115606d863 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -76,7 +76,7 @@ LLMotionRegistry::~LLMotionRegistry() //----------------------------------------------------------------------------- // addMotion() //----------------------------------------------------------------------------- -BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) +bool LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) { // LL_INFOS() << "Registering motion: " << name << LL_ENDL; if (!is_in_map(mMotionTable, id)) @@ -133,13 +133,13 @@ LLMotionController::LLMotionController() mAnimTime(0.f), mPrevTimerElapsed(0.f), mLastTime(0.0f), - mHasRunOnce(FALSE), - mPaused(FALSE), + mHasRunOnce(false), + mPaused(false), mPausedFrame(0), mTimeStep(0.f), mTimeStepCount(0), mLastInterp(0.f), - mIsSelf(FALSE), + mIsSelf(false), mLastCountAfterPurge(0) { } @@ -275,7 +275,7 @@ void LLMotionController::setTimeStep(F32 step) LLMotion* motionp = *iter; F32 activation_time = motionp->mActivationTimestamp; motionp->mActivationTimestamp = (F32)(llfloor(activation_time / step)) * step; - BOOL stopped = motionp->isStopped(); + bool stopped = motionp->isStopped(); motionp->setStopTime((F32)(llfloor(motionp->getStopTime() / step)) * step); motionp->setStopped(stopped); motionp->mSendStopTimestamp = (F32)llfloor(motionp->mSendStopTimestamp / step) * step; @@ -303,7 +303,7 @@ void LLMotionController::setCharacter(LLCharacter *character) //----------------------------------------------------------------------------- // registerMotion() //----------------------------------------------------------------------------- -BOOL LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) +bool LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) { return sRegistry.registerMotion(id, constructor); } @@ -389,7 +389,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) //----------------------------------------------------------------------------- // startMotion() //----------------------------------------------------------------------------- -BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) +bool LLMotionController::startMotion(const LLUUID &id, F32 start_offset) { // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); @@ -431,7 +431,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) //----------------------------------------------------------------------------- // stopMotionLocally() //----------------------------------------------------------------------------- -BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate) +bool LLMotionController::stopMotionLocally(const LLUUID &id, bool stop_immediate) { // if already inactive, return false LLMotion *motion = findMotion(id); @@ -439,7 +439,7 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate return stopMotionInstance(motion, stop_immediate||mPaused); } -BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediate) +bool LLMotionController::stopMotionInstance(LLMotion* motion, bool stop_immediate) { if (!motion) { @@ -459,7 +459,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat } else if (isMotionLoading(motion)) { - motion->setStopped(TRUE); + motion->setStopped(true); return true; } @@ -518,7 +518,7 @@ void LLMotionController::updateIdleMotion(LLMotion* motionp) if (mLastTime <= motionp->mSendStopTimestamp) { mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } else if (mAnimTime >= motionp->mActivationTimestamp) @@ -552,7 +552,7 @@ void LLMotionController::updateIdleActiveMotions() void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - BOOL update_result = TRUE; + bool update_result = true; U8 last_joint_signature[LL_CHARACTER_MAX_ANIMATED_JOINTS]; memset(&last_joint_signature, 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS); @@ -568,11 +568,11 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty continue; } - BOOL update_motion = FALSE; + bool update_motion = false; if (motionp->getPose()->getWeight() < 1.f) { - update_motion = TRUE; + update_motion = true; } else { @@ -584,7 +584,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if ((*current_signature | test_signature) > (*current_signature)) { *current_signature |= test_signature; - update_motion = TRUE; + update_motion = true; } *((U32*)&last_joint_signature[i * 4]) = *(U32*)&(mJointSignature[1][i * 4]); @@ -594,7 +594,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if ((*current_signature | test_signature) > (*current_signature)) { *current_signature |= test_signature; - update_motion = TRUE; + update_motion = true; } } } @@ -620,7 +620,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if (mLastTime <= motionp->mSendStopTimestamp) { mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } @@ -701,7 +701,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if (mLastTime <= motionp->mSendStopTimestamp) { mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } @@ -747,12 +747,12 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty // propagate this to the network // as not all viewers are guaranteed to have access to the same logic mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } - // even if onupdate returns FALSE, add this motion in to the blend one last time + // even if onupdate returns false, add this motion in to the blend one last time mPoseBlender.addMotion(motionp); } } @@ -815,7 +815,7 @@ void LLMotionController::updateMotions(bool force_update) // The use_quantum optimization or possibly the associated code in setTimeStamp() // does not work as implemented. // Currently setting mTimeStep to nonzero is disabled elsewhere. - BOOL use_quantum = (mTimeStep != 0.f); + bool use_quantum = (mTimeStep != 0.f); // Always update mPrevTimerElapsed F32 cur_time = mTimer.getElapsedTimeF32(); @@ -885,7 +885,7 @@ void LLMotionController::updateMotions(bool force_update) if (use_quantum) { - mPoseBlender.blendAndCache(TRUE); + mPoseBlender.blendAndCache(true); } else { @@ -893,7 +893,7 @@ void LLMotionController::updateMotions(bool force_update) } } - mHasRunOnce = TRUE; + mHasRunOnce = true; // LL_INFOS() << "Motion controller time " << motionTimer.getElapsedTimeF32() << LL_ENDL; } @@ -913,13 +913,13 @@ void LLMotionController::updateMotionsMinimal() deactivateStoppedMotions(); - mHasRunOnce = TRUE; + mHasRunOnce = true; } //----------------------------------------------------------------------------- // activateMotionInstance() //----------------------------------------------------------------------------- -BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) +bool LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // It's not clear why the getWeight() line seems to be crashing this, but @@ -932,7 +932,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) if (mLoadingMotions.find(motion) != mLoadingMotions.end()) { // we want to start this motion, but we can't yet, so flag it as started - motion->setStopped(FALSE); + motion->setStopped(false); // report pending animations as activated return true; } @@ -984,7 +984,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) //----------------------------------------------------------------------------- // deactivateMotionInstance() //----------------------------------------------------------------------------- -BOOL LLMotionController::deactivateMotionInstance(LLMotion *motion) +bool LLMotionController::deactivateMotionInstance(LLMotion *motion) { motion->deactivate(); @@ -1009,7 +1009,7 @@ void LLMotionController::deprecateMotionInstance(LLMotion* motion) mDeprecatedMotions.insert(motion); //fade out deprecated motion - stopMotionInstance(motion, FALSE); + stopMotionInstance(motion, false); //no longer canonical mAllMotions.erase(motion->getID()); } @@ -1124,7 +1124,7 @@ void LLMotionController::pauseAllMotions() if (!mPaused) { //LL_INFOS() << "Pausing animations..." << LL_ENDL; - mPaused = TRUE; + mPaused = true; mPausedFrame = LLFrameTimer::getFrameCount(); } @@ -1138,7 +1138,7 @@ void LLMotionController::unpauseAllMotions() if (mPaused) { //LL_INFOS() << "Unpausing animations..." << LL_ENDL; - mPaused = FALSE; + mPaused = false; } } // End |