summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbvhpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterbvhpreview.cpp')
-rw-r--r--indra/newview/llfloaterbvhpreview.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index 6e29450ff3..a21ed1ac90 100644
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -188,14 +188,14 @@ std::map <std::string, std::string> LLFloaterBvhPreview::getJointAliases()
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::postBuild()
+bool LLFloaterBvhPreview::postBuild()
{
LLKeyframeMotion* motionp = NULL;
LLBVHLoader* loaderp = NULL;
if (!LLFloaterNameDesc::postBuild())
{
- return FALSE;
+ return false;
}
getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitName, this));
@@ -220,7 +220,7 @@ BOOL LLFloaterBvhPreview::postBuild()
mStopButton = getChild<LLButton>( "stop_btn");
mStopButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnStop, this));
- getChildView("bad_animation_text")->setVisible(FALSE);
+ getChildView("bad_animation_text")->setVisible(false);
mAnimPreview = new LLPreviewAnimation(256, 256);
@@ -294,7 +294,7 @@ BOOL LLFloaterBvhPreview::postBuild()
loaderp->serialize(dp);
dp.reset();
LL_INFOS("BVH") << "Deserializing motionp" << LL_ENDL;
- BOOL success = motionp && motionp->deserialize(dp, mMotionID, false);
+ bool success = motionp && motionp->deserialize(dp, mMotionID, false);
LL_INFOS("BVH") << "Done" << LL_ENDL;
delete []buffer;
@@ -331,7 +331,7 @@ BOOL LLFloaterBvhPreview::postBuild()
getChild<LLUICtrl>("hand_pose_combo")->setValue(LLHandMotion::getHandPoseName(motionp->getHandPose()));
getChild<LLUICtrl>("ease_in_time")->setValue(LLSD(motionp->getEaseInDuration()));
getChild<LLUICtrl>("ease_out_time")->setValue(LLSD(motionp->getEaseOutDuration()));
- setEnabled(TRUE);
+ setEnabled(true);
std::string seconds_string;
seconds_string = llformat(" - %.2f seconds", motionp->getDuration());
@@ -363,7 +363,7 @@ BOOL LLFloaterBvhPreview::postBuild()
}
}
- //setEnabled(FALSE);
+ //setEnabled(false);
mMotionID.setNull();
mAnimPreview = NULL;
}
@@ -372,7 +372,7 @@ BOOL LLFloaterBvhPreview::postBuild()
delete loaderp;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -382,7 +382,7 @@ LLFloaterBvhPreview::~LLFloaterBvhPreview()
{
mAnimPreview = NULL;
- setEnabled(FALSE);
+ setEnabled(false);
}
//-----------------------------------------------------------------------------
@@ -433,7 +433,7 @@ void LLFloaterBvhPreview::resetMotion()
return;
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
- BOOL paused = avatarp->areAnimationsPaused();
+ bool paused = avatarp->areAnimationsPaused();
LLKeyframeMotion* motionp = dynamic_cast<LLKeyframeMotion*>(avatarp->findMotion(mMotionID));
if( motionp )
@@ -471,7 +471,7 @@ void LLFloaterBvhPreview::resetMotion()
//-----------------------------------------------------------------------------
// handleMouseDown()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mPreviewRect.pointInRect(x, y))
{
@@ -480,7 +480,7 @@ BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
mLastMouseX = x;
mLastMouseY = y;
- return TRUE;
+ return true;
}
return LLFloater::handleMouseDown(x, y, mask);
@@ -489,9 +489,9 @@ BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleMouseUp()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
- gFocusMgr.setMouseCapture(FALSE);
+ gFocusMgr.setMouseCapture(nullptr);
gViewerWindow->showCursor();
return LLFloater::handleMouseUp(x, y, mask);
}
@@ -499,7 +499,7 @@ BOOL LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleHover()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
+bool LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
{
MASK local_mask = mask & ~MASK_ALT;
@@ -548,13 +548,13 @@ BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
-BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (!mAnimPreview)
return false;
@@ -562,7 +562,7 @@ BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
mAnimPreview->zoom((F32)clicks * -0.2f);
mAnimPreview->requestUpdate();
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -672,13 +672,13 @@ void LLFloaterBvhPreview::onCommitBaseAnim()
{
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
- BOOL paused = avatarp->areAnimationsPaused();
+ bool paused = avatarp->areAnimationsPaused();
// stop all other possible base motions
- avatarp->stopMotion(mIDList["Standing"], TRUE);
- avatarp->stopMotion(mIDList["Walking"], TRUE);
- avatarp->stopMotion(mIDList["Sitting"], TRUE);
- avatarp->stopMotion(mIDList["Flying"], TRUE);
+ avatarp->stopMotion(mIDList["Standing"], true);
+ avatarp->stopMotion(mIDList["Walking"], true);
+ avatarp->stopMotion(mIDList["Sitting"], true);
+ avatarp->stopMotion(mIDList["Flying"], true);
resetMotion();
@@ -723,7 +723,7 @@ void LLFloaterBvhPreview::onCommitLoopIn()
{
motionp->setLoopIn((F32)getChild<LLUICtrl>("loop_in_point")->getValue().asReal() / 100.f);
resetMotion();
- getChild<LLUICtrl>("loop_check")->setValue(LLSD(TRUE));
+ getChild<LLUICtrl>("loop_check")->setValue(LLSD(true));
onCommitLoop();
}
}
@@ -743,7 +743,7 @@ void LLFloaterBvhPreview::onCommitLoopOut()
{
motionp->setLoopOut((F32)getChild<LLUICtrl>("loop_out_point")->getValue().asReal() * 0.01f * motionp->getDuration());
resetMotion();
- getChild<LLUICtrl>("loop_check")->setValue(LLSD(TRUE));
+ getChild<LLUICtrl>("loop_check")->setValue(LLSD(true));
onCommitLoop();
}
}
@@ -939,22 +939,22 @@ void LLFloaterBvhPreview::refresh()
bool show_play = true;
if (!mAnimPreview)
{
- getChildView("bad_animation_text")->setVisible(TRUE);
+ getChildView("bad_animation_text")->setVisible(true);
// play button visible but disabled
- mPlayButton->setEnabled(FALSE);
- mStopButton->setEnabled(FALSE);
- getChildView("ok_btn")->setEnabled(FALSE);
+ mPlayButton->setEnabled(false);
+ mStopButton->setEnabled(false);
+ getChildView("ok_btn")->setEnabled(false);
}
else
{
- getChildView("bad_animation_text")->setVisible(FALSE);
+ getChildView("bad_animation_text")->setVisible(false);
// re-enabled in case previous animation was bad
- mPlayButton->setEnabled(TRUE);
- mStopButton->setEnabled(TRUE);
+ mPlayButton->setEnabled(true);
+ mStopButton->setEnabled(true);
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
if (avatarp->isMotionActive(mMotionID))
{
- mStopButton->setEnabled(TRUE);
+ mStopButton->setEnabled(true);
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID);
if (!avatarp->areAnimationsPaused())
{
@@ -972,7 +972,7 @@ void LLFloaterBvhPreview::refresh()
// Motion just finished playing
mPauseRequest = avatarp->requestPause();
}
- getChildView("ok_btn")->setEnabled(TRUE);
+ getChildView("ok_btn")->setEnabled(true);
mAnimPreview->requestUpdate();
}
mPlayButton->setVisible(show_play);
@@ -1036,9 +1036,9 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
//-----------------------------------------------------------------------------
// LLPreviewAnimation
//-----------------------------------------------------------------------------
-LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
+LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false)
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
mCameraDistance = PREVIEW_CAMERA_DISTANCE;
mCameraYaw = 0.f;
mCameraPitch = 0.f;
@@ -1055,10 +1055,10 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicT
mDummyAvatar->hideSkirt();
// stop extraneous animations
- mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE );
- mDummyAvatar->stopMotion( ANIM_AGENT_EYE, TRUE );
- mDummyAvatar->stopMotion( ANIM_AGENT_BODY_NOISE, TRUE );
- mDummyAvatar->stopMotion( ANIM_AGENT_BREATHE_ROT, TRUE );
+ mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, true );
+ mDummyAvatar->stopMotion( ANIM_AGENT_EYE, true );
+ mDummyAvatar->stopMotion( ANIM_AGENT_BODY_NOISE, true );
+ mDummyAvatar->stopMotion( ANIM_AGENT_BREATHE_ROT, true );
}
//-----------------------------------------------------------------------------
@@ -1078,9 +1078,9 @@ S8 LLPreviewAnimation::getType() const
//-----------------------------------------------------------------------------
// update()
//-----------------------------------------------------------------------------
-BOOL LLPreviewAnimation::render()
+bool LLPreviewAnimation::render()
{
- mNeedsUpdate = FALSE;
+ mNeedsUpdate = false;
LLVOAvatar* avatarp = mDummyAvatar;
gGL.matrixMode(LLRender::MM_PROJECTION);
@@ -1123,7 +1123,7 @@ BOOL LLPreviewAnimation::render()
camera->setViewNoBroadcast(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
camera->setAspect((F32) mFullWidth / (F32) mFullHeight);
- camera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
+ camera->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false);
//SJB: Animation is updated in LLVOAvatar::updateCharacter
@@ -1145,7 +1145,7 @@ BOOL LLPreviewAnimation::render()
}
gGL.color4f(1,1,1,1);
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -1153,7 +1153,7 @@ BOOL LLPreviewAnimation::render()
//-----------------------------------------------------------------------------
void LLPreviewAnimation::requestUpdate()
{
- mNeedsUpdate = TRUE;
+ mNeedsUpdate = true;
}
//-----------------------------------------------------------------------------