diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-24 08:55:20 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-24 08:55:20 -0400 |
commit | 3ae8a821c3b627f3b02df636e7649f28b97d6f57 (patch) | |
tree | 79d5d3f2b262b7f5d60cc6135b80221878aa74b8 /indra/newview/llnetmap.cpp | |
parent | 39b17157f9c31a4b911113561d4fc8f86396c430 (diff) | |
parent | fde0868231a25b8c9ce03a86cb53f1738d35688d (diff) |
merge
Diffstat (limited to 'indra/newview/llnetmap.cpp')
-rwxr-xr-x | indra/newview/llnetmap.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 1685a18e26..d7e7f13e87 100755 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -67,7 +67,6 @@ const F32 LLNetMap::MAP_SCALE_MIN = 32; const F32 LLNetMap::MAP_SCALE_MID = 1024; const F32 LLNetMap::MAP_SCALE_MAX = 4096; -const F32 MAP_SCALE_INCREMENT = 16; const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%) const F32 MIN_DOT_RADIUS = 3.5f; const F32 DOT_SCALE = 0.75f; @@ -210,7 +209,7 @@ void LLNetMap::draw() } // figure out where agent is - S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters()); + S32 region_width = ll_round(LLWorld::getInstance()->getRegionWidthInMeters()); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -381,8 +380,8 @@ void LLNetMap::draw() (pos_map.mV[VX] >= getRect().getWidth()) || (pos_map.mV[VY] >= getRect().getHeight()) ) { - S32 x = llround( pos_map.mV[VX] ); - S32 y = llround( pos_map.mV[VY] ); + S32 x = ll_round( pos_map.mV[VX] ); + S32 y = ll_round( pos_map.mV[VY] ); LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10); } else { @@ -422,12 +421,12 @@ void LLNetMap::draw() // Draw dot for self avatar position LLVector3d pos_global = gAgent.getPositionGlobal(); pos_map = globalPosToView(pos_global); - S32 dot_width = llround(mDotRadius * 2.f); + S32 dot_width = ll_round(mDotRadius * 2.f); LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage; if (you) { - you->draw(llround(pos_map.mV[VX] - mDotRadius), - llround(pos_map.mV[VY] - mDotRadius), + you->draw(ll_round(pos_map.mV[VX] - mDotRadius), + ll_round(pos_map.mV[VY] - mDotRadius), dot_width, dot_width); @@ -531,8 +530,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, { if (draw_arrow) { - S32 x = llround( pos_local.mV[VX] ); - S32 y = llround( pos_local.mV[VY] ); + S32 x = ll_round( pos_local.mV[VX] ); + S32 y = ll_round( pos_local.mV[VY] ); LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10 ); LLWorldMapView::drawTrackingArrow( getRect(), x, y, color ); } @@ -548,8 +547,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y ) { - x -= llround(getRect().getWidth() / 2 + mCurPan.mV[VX]); - y -= llround(getRect().getHeight() / 2 + mCurPan.mV[VY]); + x -= ll_round(getRect().getWidth() / 2 + mCurPan.mV[VX]); + y -= ll_round(getRect().getHeight() / 2 + mCurPan.mV[VY]); LLVector3 pos_local( (F32)x, (F32)y, 0 ); @@ -685,7 +684,7 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U & LLVector3 local_pos; local_pos.setVec( pos - mObjectImageCenterGlobal ); - S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM); + S32 diameter_pixels = ll_round(2 * radius_meters * mObjectMapTPM); renderPoint( local_pos, color, diameter_pixels ); } @@ -701,8 +700,8 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, const S32 image_width = (S32)mObjectImagep->getWidth(); const S32 image_height = (S32)mObjectImagep->getHeight(); - S32 x_offset = llround(pos_local.mV[VX] * mObjectMapTPM + image_width / 2); - S32 y_offset = llround(pos_local.mV[VY] * mObjectMapTPM + image_height / 2); + S32 x_offset = ll_round(pos_local.mV[VX] * mObjectMapTPM + image_width / 2); + S32 y_offset = ll_round(pos_local.mV[VY] * mObjectMapTPM + image_height / 2); if ((x_offset < 0) || (x_offset >= image_width)) { @@ -781,7 +780,7 @@ void LLNetMap::createObjectImage() // ... which is, the diagonal of the rect. F32 width = (F32)getRect().getWidth(); F32 height = (F32)getRect().getHeight(); - S32 square_size = llround( sqrt(width*width + height*height) ); + S32 square_size = ll_round( sqrt(width*width + height*height) ); // Find the least power of two >= the minimum size. const S32 MIN_SIZE = 64; |