summaryrefslogtreecommitdiff
path: root/indra/newview/llhudnametag.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-02-21 21:05:14 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-21 23:14:31 +0200
commit60d3dd98a44230c21803c1606552ee098ed9fa7c (patch)
treeaf0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/llhudnametag.cpp
parent855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff)
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/llhudnametag.cpp')
-rw-r--r--indra/newview/llhudnametag.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 26fc899eb5..a59f737471 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -65,7 +65,7 @@ const F32 LOD_2_SCREEN_COVERAGE = 0.40f;
std::set<LLPointer<LLHUDNameTag> > LLHUDNameTag::sTextObjects;
std::vector<LLPointer<LLHUDNameTag> > LLHUDNameTag::sVisibleTextObjects;
-BOOL LLHUDNameTag::sDisplayText = TRUE ;
+bool LLHUDNameTag::sDisplayText = true ;
const F32 LLHUDNameTag::NAMETAG_MAX_WIDTH = 298.f;
const F32 LLHUDNameTag::HUD_TEXT_MAX_WIDTH = 190.f;
@@ -77,13 +77,13 @@ bool llhudnametag_further_away::operator()(const LLPointer<LLHUDNameTag>& lhs, c
LLHUDNameTag::LLHUDNameTag(const U8 type)
: LLHUDObject(type),
- mDoFade(TRUE),
+ mDoFade(true),
mFadeDistance(8.f),
mFadeRange(4.f),
mLastDistance(0.f),
- mZCompare(TRUE),
- mVisibleOffScreen(FALSE),
- mOffscreen(FALSE),
+ mZCompare(true),
+ mVisibleOffScreen(false),
+ mOffscreen(false),
mColor(1.f, 1.f, 1.f, 1.f),
// mScale(),
mWidth(0.f),
@@ -102,7 +102,7 @@ LLHUDNameTag::LLHUDNameTag(const U8 type)
mTextAlignment(ALIGN_TEXT_CENTER),
mVertAlignment(ALIGN_VERT_CENTER),
mLOD(0),
- mHidden(FALSE)
+ mHidden(false)
{
LLPointer<LLHUDNameTag> ptr(this);
sTextObjects.insert(ptr);
@@ -116,17 +116,17 @@ LLHUDNameTag::~LLHUDNameTag()
}
-BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render)
+bool LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, bool debug_render)
{
if (!mVisible || mHidden)
{
- return FALSE;
+ return false;
}
// don't pick text that isn't bound to a viewerobject
if (!mSourceObject || mSourceObject->mDrawable.isNull())
{
- return FALSE;
+ return false;
}
F32 alpha_factor = 1.f;
@@ -141,7 +141,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4
}
if (text_color.mV[3] < 0.01f)
{
- return FALSE;
+ return false;
}
mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
@@ -176,7 +176,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4
LLVector3 height_vec = mHeight * y_pixel_vec;
LLCoordGL screen_pos;
- LLViewerCamera::getInstance()->projectPosAgentToScreen(position, screen_pos, FALSE);
+ LLViewerCamera::getInstance()->projectPosAgentToScreen(position, screen_pos, false);
LLVector2 screen_offset;
screen_offset = updateScreenPos(mPositionOffset);
@@ -216,11 +216,11 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4
{
dir.mul(t);
intersection.setAdd(start, dir);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void LLHUDNameTag::render()
@@ -230,11 +230,11 @@ void LLHUDNameTag::render()
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
//LLGLDisable gls_stencil(GL_STENCIL_TEST);
- renderText(FALSE);
+ renderText(false);
}
}
-void LLHUDNameTag::renderText(BOOL for_select)
+void LLHUDNameTag::renderText(bool for_select)
{
if (!mVisible || mHidden)
{
@@ -257,7 +257,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
}
- LLGLState gls_blend(GL_BLEND, for_select ? FALSE : TRUE);
+ LLGLState gls_blend(GL_BLEND, for_select ? false : true);
LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
F32 alpha_factor = 1.f;
@@ -296,7 +296,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
mRadius = (width_vec + height_vec).magVec() * 0.5f;
LLCoordGL screen_pos;
- LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE);
+ LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, false);
LLVector2 screen_offset = updateScreenPos(mPositionOffset);
@@ -342,7 +342,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
LLColor4 label_color(0.f, 0.f, 0.f, 1.f);
label_color.mV[VALPHA] = alpha_factor;
- hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, FALSE);
+ hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false);
}
}
@@ -387,7 +387,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
text_color = segment_iter->mColor;
text_color.mV[VALPHA] *= alpha_factor;
- hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, FALSE);
+ hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, false);
}
}
/// Reset the default color to white. The renderer expects this to be the default.
@@ -522,7 +522,7 @@ void LLHUDNameTag::addLabel(const std::string& label_utf8, F32 max_pixels)
}
}
-void LLHUDNameTag::setZCompare(const BOOL zcompare)
+void LLHUDNameTag::setZCompare(const bool zcompare)
{
mZCompare = zcompare;
}
@@ -554,7 +554,7 @@ void LLHUDNameTag::setAlpha(F32 alpha)
}
-void LLHUDNameTag::setDoFade(const BOOL do_fade)
+void LLHUDNameTag::setDoFade(const bool do_fade)
{
mDoFade = do_fade;
}
@@ -571,7 +571,7 @@ void LLHUDNameTag::updateVisibility()
if (!mSourceObject)
{
//LL_WARNS() << "LLHUDNameTag::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL;
- mVisible = TRUE;
+ mVisible = true;
sVisibleTextObjects.push_back(LLPointer<LLHUDNameTag> (this));
return;
}
@@ -579,7 +579,7 @@ void LLHUDNameTag::updateVisibility()
// Not visible if parent object is dead
if (mSourceObject->isDead())
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -590,7 +590,7 @@ void LLHUDNameTag::updateVisibility()
if (dir_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= 0.f)
{ //text is behind camera, don't render
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -607,7 +607,7 @@ void LLHUDNameTag::updateVisibility()
if (mLOD >= 3 || !mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)))
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
@@ -620,21 +620,21 @@ void LLHUDNameTag::updateVisibility()
(x_pixel_vec * mPositionOffset.mV[VX]) +
(y_pixel_vec * mPositionOffset.mV[VY]);
- mOffscreen = FALSE;
+ mOffscreen = false;
if (!LLViewerCamera::getInstance()->sphereInFrustum(render_position, mRadius))
{
if (!mVisibleOffScreen)
{
- mVisible = FALSE;
+ mVisible = false;
return;
}
else
{
- mOffscreen = TRUE;
+ mOffscreen = true;
}
}
- mVisible = TRUE;
+ mVisible = true;
sVisibleTextObjects.push_back(LLPointer<LLHUDNameTag> (this));
}
@@ -646,7 +646,7 @@ LLVector2 LLHUDNameTag::updateScreenPos(LLVector2 &offset)
LLVector3 y_pixel_vec;
LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec);
LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec);
- if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen)
+ if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, false) && mVisibleOffScreen)
{
// bubble off-screen, so find a spot for it along screen edge
LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(world_pos, screen_pos);