summaryrefslogtreecommitdiff
path: root/indra/newview/llsurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsurface.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llsurface.cpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index ec11a23eb8..503dd6747d 100644..100755
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -34,7 +34,7 @@
#include "llpatchvertexarray.h"
#include "patch_dct.h"
#include "patch_code.h"
-#include "bitpack.h"
+#include "llbitpack.h"
#include "llviewerobjectlist.h"
#include "llregionhandle.h"
#include "llagent.h"
@@ -123,7 +123,7 @@ LLSurface::~LLSurface()
LLDrawPoolTerrain *poolp = (LLDrawPoolTerrain*) gPipeline.findPool(LLDrawPool::POOL_TERRAIN, mSTexturep);
if (!poolp)
{
- llwarns << "No pool for terrain on destruction!" << llendl;
+ LL_WARNS() << "No pool for terrain on destruction!" << LL_ENDL;
}
else if (poolp->mReferences.empty())
{
@@ -140,7 +140,7 @@ LLSurface::~LLSurface()
}
else
{
- llerrs << "Terrain pool not empty!" << llendl;
+ LL_ERRS() << "Terrain pool not empty!" << LL_ENDL;
}
}
@@ -709,7 +709,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
if ((i >= mPatchesPerEdge) || (j >= mPatchesPerEdge))
{
- llwarns << "Received invalid terrain packet - patch header patch ID incorrect!"
+ LL_WARNS() << "Received invalid terrain packet - patch header patch ID incorrect!"
<< " patches per edge " << mPatchesPerEdge
<< " i " << i
<< " j " << j
@@ -717,7 +717,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
<< " range " << (S32)ph.range
<< " quant_wbits " << (S32)ph.quant_wbits
<< " patchids " << (S32)ph.patchids
- << llendl;
+ << LL_ENDL;
LLAppViewer::instance()->badNetworkHandler();
return;
}
@@ -955,13 +955,13 @@ LLSurfacePatch *LLSurface::resolvePatchRegion(const F32 x, const F32 y) const
{
if(0 == mNumberOfPatches)
{
- llwarns << "No patches for current region!" << llendl;
+ LL_WARNS() << "No patches for current region!" << LL_ENDL;
return NULL;
}
S32 old_index = index;
index = llclamp(old_index, 0, (mNumberOfPatches - 1));
- llwarns << "Clamping out of range patch index " << old_index
- << " to " << index << llendl;
+ LL_WARNS() << "Clamping out of range patch index " << old_index
+ << " to " << index << LL_ENDL;
}
return &(mPatchList[index]);
}
@@ -1150,12 +1150,12 @@ LLSurfacePatch *LLSurface::getPatch(const S32 x, const S32 y) const
{
if ((x < 0) || (x >= mPatchesPerEdge))
{
- llerrs << "Asking for patch out of bounds" << llendl;
+ LL_ERRS() << "Asking for patch out of bounds" << LL_ENDL;
return NULL;
}
if ((y < 0) || (y >= mPatchesPerEdge))
{
- llerrs << "Asking for patch out of bounds" << llendl;
+ LL_ERRS() << "Asking for patch out of bounds" << LL_ENDL;
return NULL;
}
@@ -1194,7 +1194,7 @@ void LLSurface::setWaterHeight(F32 height)
}
else
{
- llwarns << "LLSurface::setWaterHeight with no water object!" << llendl;
+ LL_WARNS() << "LLSurface::setWaterHeight with no water object!" << LL_ENDL;
}
}
@@ -1232,10 +1232,10 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
S32 x_begin, y_begin, x_end, y_end;
- x_begin = llround(x * scale_inv);
- y_begin = llround(y * scale_inv);
- x_end = llround((x + width) * scale_inv);
- y_end = llround((y + width) * scale_inv);
+ x_begin = ll_round(x * scale_inv);
+ y_begin = ll_round(y * scale_inv);
+ x_end = ll_round((x + width) * scale_inv);
+ y_end = ll_round((y + width) * scale_inv);
if (x_end > tex_width)
{
@@ -1246,8 +1246,6 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
y_end = tex_width;
}
- LLVector3d origin_global = from_region_handle(getRegion()->getHandle());
-
// OK, for now, just have the composition value equal the height at the point.
LLVector3 location;
LLColor4U coloru;
@@ -1285,9 +1283,9 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
// Want non-linear curve for transparency gradient
coloru = MAX_WATER_COLOR;
const F32 frac = 1.f - 2.f/(2.f - (height - WATER_HEIGHT));
- S32 alpha = 64 + llround((255-64)*frac);
+ S32 alpha = 64 + ll_round((255-64)*frac);
- alpha = llmin(llround((F32)MAX_WATER_COLOR.mV[3]), alpha);
+ alpha = llmin(ll_round((F32)MAX_WATER_COLOR.mV[3]), alpha);
alpha = llmax(64, alpha);
coloru.mV[3] = alpha;