summaryrefslogtreecommitdiff
path: root/indra/newview/llworldmapview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llworldmapview.cpp')
-rwxr-xr-xindra/newview/llworldmapview.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 09a18a9825..a0eec1e941 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -255,7 +255,7 @@ void LLWorldMapView::zoom(F32 zoom)
void LLWorldMapView::zoomWithPivot(F32 zoom, S32 x, S32 y)
{
mTargetMapScale = scaleFromZoom(zoom);
- sZoomPivot = LLVector2(x, y);
+ sZoomPivot = LLVector2((F32)x, (F32)y);
if (!sZoomTimer.getStarted() && mMapScale != mTargetMapScale)
{
sZoomTimer.start();
@@ -297,8 +297,8 @@ void LLWorldMapView::setScale(F32 scale, bool snap)
if (!sZoomPivot.isExactlyZero())
{
LLVector2 relative_pivot;
- relative_pivot.mV[VX] = sZoomPivot.mV[VX] - (getRect().getWidth() / 2.0);
- relative_pivot.mV[VY] = sZoomPivot.mV[VY] - (getRect().getHeight() / 2.0);
+ relative_pivot.mV[VX] = sZoomPivot.mV[VX] - (getRect().getWidth() / 2.0f);
+ relative_pivot.mV[VY] = sZoomPivot.mV[VY] - (getRect().getHeight() / 2.0f);
LLVector2 zoom_pan_offset = relative_pivot - (relative_pivot * scale / old_scale);
mPanX += zoom_pan_offset.mV[VX];
mPanY += zoom_pan_offset.mV[VY];
@@ -422,8 +422,8 @@ void LLWorldMapView::draw()
// Find x and y position relative to camera's center.
LLVector3d rel_region_pos = origin_global - camera_global;
- F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * mMapScale;
- F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * mMapScale;
+ F32 relative_x = (F32)(rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * mMapScale;
+ F32 relative_y = (F32)(rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * mMapScale;
// Coordinates of the sim in pixels in the UI panel
// When the view isn't panned, 0,0 = center of rectangle
@@ -514,11 +514,11 @@ void LLWorldMapView::draw()
{
font->renderUTF8(
mesg, 0,
- llfloor(left + 3), llfloor(bottom + 2),
+ (F32)llfloor(left + 3), (F32)llfloor(bottom + 2),
LLColor4::white,
LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW,
S32_MAX, //max_chars
- mMapScale, //max_pixels
+ (S32)mMapScale, //max_pixels
NULL,
/*use_ellipses*/true);
}