summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermediafocus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermediafocus.cpp')
-rw-r--r--indra/newview/llviewermediafocus.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index 978a9bc6de..dbec66f81d 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -125,7 +125,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
if(mMediaControls.get())
{
- if(face_auto_zoom && ! parcel->getMediaPreventCameraZoom())
+ if(face_auto_zoom && !static_cast<bool>(parcel->getMediaPreventCameraZoom()))
{
// Zoom in on this face
mMediaControls.get()->resetZoomLevel(false);
@@ -211,7 +211,7 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n
LLVector3d camera_pos;
if (object)
{
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(false, ANIMATE);
LLBBox bbox = object->getBoundingBoxAgent();
LLVector3d center = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent());
@@ -241,19 +241,19 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n
if(camera_aspect < 1.0f || invert)
{
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect());
- distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+ distance = width * 0.5f * padding_factor / tanf(angle_of_view * 0.5f );
LL_DEBUGS() << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
}
else
{
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView());
- distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+ distance = height * 0.5f * padding_factor / tanf(angle_of_view * 0.5f );
LL_DEBUGS() << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << LL_ENDL;
}
- distance += depth * 0.5;
+ distance += depth * 0.5f;
// Finally animate the camera to this new position and focal point
LLVector3d target_pos;
@@ -298,7 +298,7 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n
else
{
// If we have no object, focus back on the avatar.
- gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE);
+ gAgentCamera.setFocusOnAvatar(true, ANIMATE);
}
return camera_pos;
}
@@ -321,7 +321,7 @@ void LLViewerMediaFocus::onFocusLost()
LLFocusableElement::onFocusLost();
}
-BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent)
+bool LLViewerMediaFocus::handleKey(KEY key, MASK mask, bool called_from_parent)
{
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if(media_impl)
@@ -346,7 +346,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent)
return true;
}
-BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent)
+bool LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, bool called_from_parent)
{
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if (media_impl)
@@ -358,7 +358,7 @@ BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent
-BOOL LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent)
+bool LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, bool called_from_parent)
{
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if(media_impl)
@@ -366,26 +366,26 @@ BOOL LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, BOOL called_from_pa
return true;
}
-BOOL LLViewerMediaFocus::handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y)
+bool LLViewerMediaFocus::handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y)
{
- BOOL retval = FALSE;
+ bool retval = false;
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if (media_impl && media_impl->hasMedia())
{
- media_impl->scrollWheel(texture_coords, clicks_x, clicks_y, gKeyboard->currentMask(TRUE));
- retval = TRUE;
+ media_impl->scrollWheel(texture_coords, clicks_x, clicks_y, gKeyboard->currentMask(true));
+ retval = true;
}
return retval;
}
-BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
+bool LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y)
{
- BOOL retval = FALSE;
+ bool retval = false;
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if(media_impl && media_impl->hasMedia())
{
- media_impl->scrollWheel(x, y, clicks_x, clicks_y, gKeyboard->currentMask(TRUE));
- retval = TRUE;
+ media_impl->scrollWheel(x, y, clicks_x, clicks_y, gKeyboard->currentMask(true));
+ retval = true;
}
return retval;
}