diff options
author | McCabe Maxsted | 2009-09-22 09:46:20 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-22 09:46:20 -0700 |
commit | 0a700b3b3a145733345d88ba1f6a6cd34c10ac3e (patch) | |
tree | ab02f29c1a453a354561faca5c2bf33e5b22cb2f /linden/indra/newview/llworldmapview.cpp | |
parent | Fixed map textures displaying as X (diff) | |
parent | Applied Aimee's minimap zoom patch (diff) | |
download | meta-impy-0a700b3b3a145733345d88ba1f6a6cd34c10ac3e.zip meta-impy-0a700b3b3a145733345d88ba1f6a6cd34c10ac3e.tar.gz meta-impy-0a700b3b3a145733345d88ba1f6a6cd34c10ac3e.tar.bz2 meta-impy-0a700b3b3a145733345d88ba1f6a6cd34c10ac3e.tar.xz |
Merged 1.2.0-minimap-magnify into 1.2.0-radarzoom
Diffstat (limited to 'linden/indra/newview/llworldmapview.cpp')
-rw-r--r-- | linden/indra/newview/llworldmapview.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp index 90977ed..947bdfd 100644 --- a/linden/indra/newview/llworldmapview.cpp +++ b/linden/indra/newview/llworldmapview.cpp | |||
@@ -71,9 +71,10 @@ const S32 SCROLL_HINT_WIDTH = 65; | |||
71 | const F32 BIG_DOT_RADIUS = 5.f; | 71 | const F32 BIG_DOT_RADIUS = 5.f; |
72 | BOOL LLWorldMapView::sHandledLastClick = FALSE; | 72 | BOOL LLWorldMapView::sHandledLastClick = FALSE; |
73 | 73 | ||
74 | LLUIImagePtr LLWorldMapView::sAvatarYouSmallImage = NULL; | ||
75 | LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; | 74 | LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; |
76 | LLUIImagePtr LLWorldMapView::sAvatarLargeImage = NULL; | 75 | LLUIImagePtr LLWorldMapView::sAvatarYouImage = NULL; |
76 | LLUIImagePtr LLWorldMapView::sAvatarYouLargeImage = NULL; | ||
77 | LLUIImagePtr LLWorldMapView::sAvatarLevelImage = NULL; | ||
77 | LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL; | 78 | LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL; |
78 | LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL; | 79 | LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL; |
79 | 80 | ||
@@ -113,11 +114,12 @@ std::map<std::string,std::string> LLWorldMapView::sStringsMap; | |||
113 | 114 | ||
114 | void LLWorldMapView::initClass() | 115 | void LLWorldMapView::initClass() |
115 | { | 116 | { |
116 | sAvatarYouSmallImage = LLUI::getUIImage("map_avatar_you_8.tga"); | ||
117 | sAvatarSmallImage = LLUI::getUIImage("map_avatar_8.tga"); | 117 | sAvatarSmallImage = LLUI::getUIImage("map_avatar_8.tga"); |
118 | sAvatarLargeImage = LLUI::getUIImage("map_avatar_16.tga"); | 118 | sAvatarYouImage = LLUI::getUIImage("map_avatar_16.tga"); |
119 | sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_8.tga"); | 119 | sAvatarYouLargeImage = LLUI::getUIImage("map_avatar_you_32.tga"); |
120 | sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_8.tga"); | 120 | sAvatarLevelImage = LLUI::getUIImage("map_avatar_32.tga"); |
121 | sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_32.tga"); | ||
122 | sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_32.tga"); | ||
121 | 123 | ||
122 | sHomeImage = LLUI::getUIImage("map_home.tga"); | 124 | sHomeImage = LLUI::getUIImage("map_home.tga"); |
123 | sTelehubImage = LLUI::getUIImage("map_telehub.tga"); | 125 | sTelehubImage = LLUI::getUIImage("map_telehub.tga"); |
@@ -137,9 +139,10 @@ void LLWorldMapView::initClass() | |||
137 | // static | 139 | // static |
138 | void LLWorldMapView::cleanupClass() | 140 | void LLWorldMapView::cleanupClass() |
139 | { | 141 | { |
140 | sAvatarYouSmallImage = NULL; | ||
141 | sAvatarSmallImage = NULL; | 142 | sAvatarSmallImage = NULL; |
142 | sAvatarLargeImage = NULL; | 143 | sAvatarYouImage = NULL; |
144 | sAvatarYouLargeImage = NULL; | ||
145 | sAvatarLevelImage = NULL; | ||
143 | sAvatarAboveImage = NULL; | 146 | sAvatarAboveImage = NULL; |
144 | sAvatarBelowImage = NULL; | 147 | sAvatarBelowImage = NULL; |
145 | 148 | ||
@@ -764,7 +767,7 @@ void LLWorldMapView::draw() | |||
764 | 767 | ||
765 | // Now draw your avatar after all that other stuff. | 768 | // Now draw your avatar after all that other stuff. |
766 | LLVector3d pos_global = gAgent.getPositionGlobal(); | 769 | LLVector3d pos_global = gAgent.getPositionGlobal(); |
767 | drawImage(pos_global, sAvatarLargeImage); | 770 | drawImage(pos_global, sAvatarYouImage); |
768 | 771 | ||
769 | LLVector3 pos_map = globalPosToView(pos_global); | 772 | LLVector3 pos_map = globalPosToView(pos_global); |
770 | if (!pointInView(llround(pos_map.mV[VX]), llround(pos_map.mV[VY]))) | 773 | if (!pointInView(llround(pos_map.mV[VX]), llround(pos_map.mV[VY]))) |
@@ -1273,7 +1276,7 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, | |||
1273 | F32 dot_radius) | 1276 | F32 dot_radius) |
1274 | { | 1277 | { |
1275 | const F32 HEIGHT_THRESHOLD = 7.f; | 1278 | const F32 HEIGHT_THRESHOLD = 7.f; |
1276 | LLUIImagePtr dot_image = sAvatarSmallImage; | 1279 | LLUIImagePtr dot_image = sAvatarLevelImage; |
1277 | if(relative_z < -HEIGHT_THRESHOLD) | 1280 | if(relative_z < -HEIGHT_THRESHOLD) |
1278 | { | 1281 | { |
1279 | dot_image = sAvatarBelowImage; | 1282 | dot_image = sAvatarBelowImage; |
@@ -1282,9 +1285,13 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, | |||
1282 | { | 1285 | { |
1283 | dot_image = sAvatarAboveImage; | 1286 | dot_image = sAvatarAboveImage; |
1284 | } | 1287 | } |
1288 | |||
1289 | S32 dot_width = llround(dot_radius * 2.f); | ||
1285 | dot_image->draw( | 1290 | dot_image->draw( |
1286 | llround(x_pixels) - dot_image->getWidth()/2, | 1291 | llround(x_pixels - dot_radius), |
1287 | llround(y_pixels) - dot_image->getHeight()/2, | 1292 | llround(y_pixels - dot_radius), |
1293 | dot_width, | ||
1294 | dot_width, | ||
1288 | color); | 1295 | color); |
1289 | } | 1296 | } |
1290 | 1297 | ||