summaryrefslogtreecommitdiff
path: root/indra/newview/llsurfacepatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsurfacepatch.cpp')
-rw-r--r--indra/newview/llsurfacepatch.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index b71b6ae50c..d2379da7b3 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -47,11 +47,11 @@ extern U64MicrosecondsImplicit gFrameTime;
extern LLPipeline gPipeline;
LLSurfacePatch::LLSurfacePatch()
-: mHasReceivedData(FALSE),
- mSTexUpdate(FALSE),
- mDirty(FALSE),
- mDirtyZStats(TRUE),
- mHeightsGenerated(FALSE),
+: mHasReceivedData(false),
+ mSTexUpdate(false),
+ mDirty(false),
+ mDirtyZStats(true),
+ mHeightsGenerated(false),
mDataOffset(0),
mDataZ(NULL),
mDataNorm(NULL),
@@ -78,7 +78,7 @@ LLSurfacePatch::LLSurfacePatch()
}
for (i = 0; i < 9; i++)
{
- mNormalsInvalid[i] = TRUE;
+ mNormalsInvalid[i] = true;
}
}
@@ -102,12 +102,12 @@ void LLSurfacePatch::dirty()
LL_WARNS("Terrain") << "No viewer object for this surface patch!" << LL_ENDL;
}
- mDirtyZStats = TRUE;
- mHeightsGenerated = FALSE;
+ mDirtyZStats = true;
+ mHeightsGenerated = false;
if (!mDirty)
{
- mDirty = TRUE;
+ mDirty = true;
mSurfacep->dirtySurfacePatch(this);
}
}
@@ -137,7 +137,7 @@ void LLSurfacePatch::disconnectNeighbor(LLSurface *surfacep)
if (getNeighborPatch(i)->mSurfacep == surfacep)
{
setNeighborPatch(i, NULL);
- mNormalsInvalid[i] = TRUE;
+ mNormalsInvalid[i] = true;
}
}
}
@@ -440,14 +440,14 @@ void LLSurfacePatch::updateVerticalStats()
mSurfacep->mMaxZ = llmax(mMaxZ, mSurfacep->mMaxZ);
mSurfacep->mMinZ = llmin(mMinZ, mSurfacep->mMinZ);
- mSurfacep->mHasZData = TRUE;
+ mSurfacep->mHasZData = true;
mSurfacep->getRegion()->calculateCenterGlobal();
if (mVObjp)
{
mVObjp->dirtyPatch();
}
- mDirtyZStats = FALSE;
+ mDirtyZStats = false;
}
@@ -460,7 +460,7 @@ void LLSurfacePatch::updateNormals()
U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge();
U32 grids_per_edge = mSurfacep->getGridsPerEdge();
- BOOL dirty_patch = FALSE;
+ bool dirty_patch = false;
U32 i, j;
// update the east edge
@@ -473,7 +473,7 @@ void LLSurfacePatch::updateNormals()
calcNormal(grids_per_patch_edge - 2, j, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// update the north edge
@@ -486,7 +486,7 @@ void LLSurfacePatch::updateNormals()
calcNormal(i, grids_per_patch_edge - 2, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// update the west edge
@@ -497,7 +497,7 @@ void LLSurfacePatch::updateNormals()
calcNormal(0, j, 2);
calcNormal(1, j, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// update the south edge
@@ -508,7 +508,7 @@ void LLSurfacePatch::updateNormals()
calcNormal(i, 0, 2);
calcNormal(i, 1, 2);
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// Invalidating the northeast corner is different, because depending on what the adjacent neighbors are,
@@ -586,7 +586,7 @@ void LLSurfacePatch::updateNormals()
calcNormal(grids_per_patch_edge, grids_per_patch_edge - 1, 2);
calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge, 2);
calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge - 1, 2);
- dirty_patch = TRUE;
+ dirty_patch = true;
}
// update the middle normals
@@ -599,7 +599,7 @@ void LLSurfacePatch::updateNormals()
calcNormal(i, j, 2);
}
}
- dirty_patch = TRUE;
+ dirty_patch = true;
}
if (dirty_patch)
@@ -609,7 +609,7 @@ void LLSurfacePatch::updateNormals()
for (i = 0; i < 9; i++)
{
- mNormalsInvalid[i] = FALSE;
+ mNormalsInvalid[i] = false;
}
}
@@ -677,7 +677,7 @@ void LLSurfacePatch::updateNorthEdge()
}
-BOOL LLSurfacePatch::updateTexture()
+bool LLSurfacePatch::updateTexture()
{
if (mSTexUpdate) // Update texture as needed
{
@@ -700,11 +700,11 @@ BOOL LLSurfacePatch::updateTexture()
if (comp->generateHeights((F32)origin_region[VX], (F32)origin_region[VY],
patch_size, patch_size))
{
- mHeightsGenerated = TRUE;
+ mHeightsGenerated = true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -718,11 +718,11 @@ BOOL LLSurfacePatch::updateTexture()
}
}
}
- return FALSE;
+ return false;
}
else
{
- return TRUE;
+ return true;
}
}
@@ -742,7 +742,7 @@ void LLSurfacePatch::updateGL()
if (comp->generateTexture((F32)origin_region[VX], (F32)origin_region[VY],
tex_patch_size, tex_patch_size))
{
- mSTexUpdate = FALSE;
+ mSTexUpdate = false;
// Also generate the water texture
mSurfacep->generateWaterTexture((F32)origin_region.mdV[VX], (F32)origin_region.mdV[VY],
@@ -752,13 +752,13 @@ void LLSurfacePatch::updateGL()
void LLSurfacePatch::dirtyZ()
{
- mSTexUpdate = TRUE;
+ mSTexUpdate = true;
// Invalidate all normals in this patch
U32 i;
for (i = 0; i < 9; i++)
{
- mNormalsInvalid[i] = TRUE;
+ mNormalsInvalid[i] = true;
}
// Invalidate normals in this and neighboring patches
@@ -766,12 +766,12 @@ void LLSurfacePatch::dirtyZ()
{
if (getNeighborPatch(i))
{
- getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = TRUE;
+ getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = true;
getNeighborPatch(i)->dirty();
if (i < 4)
{
- getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE;
- getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE;
+ getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = true;
+ getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = true;
}
}
}
@@ -807,7 +807,7 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global)
mCenterRegion.mV[VX] = origin_region.mV[VX] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid();
mCenterRegion.mV[VY] = origin_region.mV[VY] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid();
- mVisInfo.mbIsVisible = FALSE;
+ mVisInfo.mbIsVisible = false;
mVisInfo.mDistance = 512.0f;
mVisInfo.mRenderLevel = 0;
mVisInfo.mRenderStride = mSurfacep->getGridsPerPatchEdge();
@@ -817,8 +817,8 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global)
void LLSurfacePatch::connectNeighbor(LLSurfacePatch *neighbor_patchp, const U32 direction)
{
llassert(neighbor_patchp);
- mNormalsInvalid[direction] = TRUE;
- neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = TRUE;
+ mNormalsInvalid[direction] = true;
+ neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = true;
setNeighborPatch(direction, neighbor_patchp);
neighbor_patchp->setNeighborPatch(gDirOpposite[direction], this);
@@ -909,11 +909,11 @@ void LLSurfacePatch::updateVisibility()
}
}
}
- mVisInfo.mbIsVisible = TRUE;
+ mVisInfo.mbIsVisible = true;
}
else
{
- mVisInfo.mbIsVisible = FALSE;
+ mVisInfo.mbIsVisible = false;
}
}
@@ -928,7 +928,7 @@ LLVector3 LLSurfacePatch::getOriginAgent() const
return gAgent.getPosAgentFromGlobal(mOriginGlobal);
}
-BOOL LLSurfacePatch::getVisible() const
+bool LLSurfacePatch::getVisible() const
{
return mVisInfo.mbIsVisible;
}
@@ -945,10 +945,10 @@ S32 LLSurfacePatch::getRenderLevel() const
void LLSurfacePatch::setHasReceivedData()
{
- mHasReceivedData = TRUE;
+ mHasReceivedData = true;
}
-BOOL LLSurfacePatch::getHasReceivedData() const
+bool LLSurfacePatch::getHasReceivedData() const
{
return mHasReceivedData;
}
@@ -1013,11 +1013,11 @@ F32 LLSurfacePatch::getMaxComposition() const
void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp)
{
mNeighborPatches[direction] = neighborp;
- mNormalsInvalid[direction] = TRUE;
+ mNormalsInvalid[direction] = true;
if (direction < 4)
{
- mNormalsInvalid[gDirAdjacent[direction][0]] = TRUE;
- mNormalsInvalid[gDirAdjacent[direction][1]] = TRUE;
+ mNormalsInvalid[gDirAdjacent[direction][0]] = true;
+ mNormalsInvalid[gDirAdjacent[direction][1]] = true;
}
}