summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-14 23:02:38 +0000
committerJames Cook <james@lindenlab.com>2009-10-14 23:02:38 +0000
commit8799193fde7e8af1128bb614f89a8de03b78ebd8 (patch)
treeda7e87eba24cdc669de64752b404c087eb77757b /indra/newview
parent69228f1197151bbf3e531290a7c78ae9110d087c (diff)
EXT-946 There is no terrain on the Mini-Map. Unclear if this fixes the problem or not, does not reliably repro for me. Found several uninitialized variables in LLNetMap and fixed those. Reviewed with Richard.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermap.cpp8
-rw-r--r--indra/newview/llnetmap.cpp27
-rw-r--r--indra/newview/llnetmap.h9
3 files changed, 25 insertions, 19 deletions
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index eac1b65f7d..0c9a759f32 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -30,7 +30,6 @@
* $/LicenseInfo$
*/
-#include <string>
#include "llviewerprecompiledheaders.h"
// self include
@@ -52,13 +51,6 @@
#include "llviewermenu.h"
//
-// Constants
-//
-const F32 MAP_SCALE_MIN = 64;
-const F32 MAP_SCALE_MID = 172;
-const F32 MAP_SCALE_MAX = 512;
-
-//
// Member functions
//
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index bd6e6cd0cb..b6b433c28f 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -65,21 +65,30 @@
static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map");
-const F32 MAP_SCALE_MIN = 64;
-const F32 MAP_SCALE_MID = 172;
-const F32 MAP_SCALE_MAX = 512;
const F32 MAP_SCALE_INCREMENT = 16;
const F32 MAP_MIN_PICK_DIST = 4;
const F32 MAX_PRIM_RADIUS = 256.0f; // Don't try to draw giant mega-prims on the mini map
-LLNetMap::LLNetMap (const Params & p) :
- LLUICtrl (p),
- mScale(128.0f),
+LLNetMap::LLNetMap (const Params & p)
+: LLUICtrl (p),
mBackgroundColor (p.bg_color()),
- mRotateMap(FALSE)
+ mScale( MAP_SCALE_MID ),
+ mPixelsPerMeter( MAP_SCALE_MID / REGION_WIDTH_METERS ),
+ mObjectMapTPM(0.f),
+ mObjectMapPixels(0.f),
+ mTargetPanX(0.f),
+ mTargetPanY(0.f),
+ mCurPanX(0.f),
+ mCurPanY(0.f),
+ mUpdateNow(FALSE),
+ mObjectImageCenterGlobal( gAgent.getCameraPositionGlobal() ),
+ mObjectRawImagep(),
+ mObjectImagep(),
+ mClosestAgentToCursor(),
+ mClosestAgentAtLastRightClick(),
+ mRotateMap(FALSE),
+ mToolTipMsg()
{
- mObjectImageCenterGlobal = gAgent.getCameraPositionGlobal();
- mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
}
LLNetMap::~LLNetMap()
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index 821c348835..5ebdd13384 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -38,12 +38,17 @@
#include "v3math.h"
#include "v3dmath.h"
#include "v4color.h"
-#include "llimage.h"
+#include "llpointer.h"
class LLColor4U;
class LLCoordGL;
+class LLImageRaw;
class LLTextBox;
-class LLViewerTexture ;
+class LLViewerTexture;
+
+const F32 MAP_SCALE_MIN = 64.f;
+const F32 MAP_SCALE_MID = 172.f;
+const F32 MAP_SCALE_MAX = 512.f;
class LLNetMap : public LLUICtrl
{