summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-02-21 21:05:14 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-21 23:14:31 +0200
commit60d3dd98a44230c21803c1606552ee098ed9fa7c (patch)
treeaf0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/llviewerparcelmgr.cpp
parent855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff)
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--indra/newview/llviewerparcelmgr.cpp162
1 files changed, 81 insertions, 81 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 2e59145bbe..daeb9de1e3 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -116,7 +116,7 @@ struct LLGodForceOwnerData
// Methods
//
LLViewerParcelMgr::LLViewerParcelMgr()
-: mSelected(FALSE),
+: mSelected(false),
mRequestResult(0),
mWestSouth(),
mEastNorth(),
@@ -126,8 +126,8 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mHoverWestSouth(),
mHoverEastNorth(),
mTeleportInProgressPosition(),
- mRenderCollision(FALSE),
- mRenderSelection(TRUE),
+ mRenderCollision(false),
+ mRenderSelection(true),
mCollisionBanned(0),
mCollisionTimer(),
mMediaParcelId(0),
@@ -151,8 +151,8 @@ LLViewerParcelMgr::LLViewerParcelMgr()
// JC: Resolved a merge conflict here, eliminated
// mBlockedImage->setAddressMode(LLTexUnit::TAM_WRAP);
// because it is done in llviewertexturelist.cpp
- mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI);
- mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI);
+ mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI);
+ mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI);
S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / PARCEL_OVERLAY_CHUNKS;
sPackedOverlay = new U8[overlay_size];
@@ -164,7 +164,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mAgentParcelOverlay[i] = 0;
}
- mTeleportInProgress = TRUE; // the initial parcel update is treated like teleport
+ mTeleportInProgress = true; // the initial parcel update is treated like teleport
}
@@ -234,13 +234,13 @@ LLViewerRegion* LLViewerParcelMgr::getSelectionRegion()
void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out,
S32* rent_out,
- BOOL* for_sale_out,
+ bool* for_sale_out,
F32* dwell_out)
{
S32 area = 0;
S32 price = 0;
S32 rent = 0;
- BOOL for_sale = FALSE;
+ bool for_sale = false;
F32 dwell = DWELL_NAN;
if (mSelected)
@@ -257,12 +257,12 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out,
if (mCurrentParcel->getForSale())
{
price = mCurrentParcel->getSalePrice();
- for_sale = TRUE;
+ for_sale = true;
}
else
{
price = area * mCurrentParcel->getClaimPricePerMeter();
- for_sale = FALSE;
+ for_sale = false;
}
rent = mCurrentParcel->getTotalRent();
@@ -432,14 +432,14 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelAt(const LLVector3d& pos_
northeast.mdV[VY] = ll_round( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
// Snap to parcel
- return selectLand( southwest, northeast, TRUE );
+ return selectLand( southwest, northeast, true );
}
// Tries to select the parcel inside the rectangle
LLParcelSelectionHandle LLViewerParcelMgr::selectParcelInRectangle()
{
- return selectLand(mWestSouth, mEastNorth, TRUE);
+ return selectLand(mWestSouth, mEastNorth, true);
}
@@ -476,8 +476,8 @@ void LLViewerParcelMgr::selectCollisionParcel()
mCurrentParcelSelection->setParcel(NULL);
mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel);
- mSelected = TRUE;
- mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ mSelected = true;
+ mCurrentParcelSelection->mWholeParcelSelected = true;
notifyObservers();
return;
}
@@ -485,7 +485,7 @@ void LLViewerParcelMgr::selectCollisionParcel()
// snap_selection = auto-select the hit parcel, if there is exactly one
LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, const LLVector3d &corner2,
- BOOL snap_selection)
+ bool snap_selection)
{
sanitize_corners( corner1, corner2, mWestSouth, mEastNorth );
@@ -493,7 +493,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
F32 delta_x = getSelectionWidth();
if (delta_x * delta_x <= 1.f * 1.f)
{
- mSelected = FALSE;
+ mSelected = false;
notifyObservers();
return NULL;
}
@@ -502,7 +502,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
F32 delta_y = getSelectionHeight();
if (delta_y * delta_y <= 1.f * 1.f)
{
- mSelected = FALSE;
+ mSelected = false;
notifyObservers();
return NULL;
}
@@ -520,14 +520,14 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
if(!region)
{
// just in case they somehow selected no land.
- mSelected = FALSE;
+ mSelected = false;
return NULL;
}
if (region != region_other)
{
LLNotificationsUtil::add("CantSelectLandFromMultipleRegions");
- mSelected = FALSE;
+ mSelected = false;
notifyObservers();
return NULL;
}
@@ -557,7 +557,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1,
mCurrentParcelSelection->setParcel(NULL);
mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel);
- mSelected = TRUE;
+ mSelected = true;
mCurrentParcelSelection->mWholeParcelSelected = snap_selection;
notifyObservers();
return mCurrentParcelSelection;
@@ -576,7 +576,7 @@ void LLViewerParcelMgr::deselectLand()
{
if (mSelected)
{
- mSelected = FALSE;
+ mSelected = false;
// Invalidate the selected parcel
mCurrentParcel->setLocalID(-1);
@@ -631,7 +631,7 @@ void LLViewerParcelMgr::notifyObservers()
//
// ACCESSORS
//
-BOOL LLViewerParcelMgr::selectionEmpty() const
+bool LLViewerParcelMgr::selectionEmpty() const
{
return !mSelected;
}
@@ -741,99 +741,99 @@ bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLP
|| (parcel && parcel->getAllowDamage());
}
-BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isOwned( pos_region );
}
-BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isOwnedSelf( pos_region );
}
-BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isOwnedOther( pos_region );
}
-BOOL LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const
+bool LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global );
- if (!region) return FALSE;
+ if (!region) return false;
LLViewerParcelOverlay* overlay = region->getParcelOverlay();
- if (!overlay) return FALSE;
+ if (!overlay) return false;
LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global );
return overlay->isSoundLocal( pos_region );
}
-BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
+bool LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
{
- BOOL in_agent_parcel = inAgentParcel(pos_global);
+ bool in_agent_parcel = inAgentParcel(pos_global);
if (in_agent_parcel)
{
// In same parcel as the agent
- return TRUE;
+ return true;
}
else
{
if (LLViewerParcelMgr::getInstance()->getAgentParcel()->getSoundLocal())
{
// Not in same parcel, and agent parcel only has local sound
- return FALSE;
+ return false;
}
else if (LLViewerParcelMgr::getInstance()->isSoundLocal(pos_global))
{
// Not in same parcel, and target parcel only has local sound
- return FALSE;
+ return false;
}
else
{
// Not in same parcel, but neither are local sound
- return TRUE;
+ return true;
}
}
}
-BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
+bool LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(pos_global);
LLViewerRegion* agent_region = gAgent.getRegion();
if (!region || !agent_region)
- return FALSE;
+ return false;
if (region != agent_region)
{
// Can't be in the agent parcel if you're not in the same region.
- return FALSE;
+ return false;
}
LLVector3 pos_region = agent_region->getPosRegionFromGlobal(pos_global);
@@ -842,11 +842,11 @@ BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
if (mAgentParcelOverlay[row*mParcelsPerEdge + column])
{
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -912,7 +912,7 @@ void LLViewerParcelMgr::renderParcelCollision()
LLViewerRegion* regionp = gAgent.getRegion();
if (regionp)
{
- BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST);
+ bool use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST);
renderCollisionSegments(mCollisionSegments, use_pass, regionp);
}
}
@@ -1117,9 +1117,9 @@ public:
LLUUID mAgent;
LLUUID mSession;
LLUUID mGroup;
- BOOL mIsGroupOwned;
- BOOL mRemoveContribution;
- BOOL mIsClaim;
+ bool mIsGroupOwned;
+ bool mRemoveContribution;
+ bool mIsClaim;
LLHost mHost;
// for parcel buys
@@ -1138,9 +1138,9 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
const LLUUID& agent_id,
const LLUUID& session_id,
const LLUUID& group_id,
- BOOL is_group_owned,
- BOOL is_claim,
- BOOL remove_contribution)
+ bool is_group_owned,
+ bool is_claim,
+ bool remove_contribution)
{
if (!mSelected || !mCurrentParcel)
{
@@ -1222,7 +1222,7 @@ void LLViewerParcelMgr::sendParcelBuy(ParcelBuyInfo* info)
msg->addBOOL("RemoveContribution", info->mRemoveContribution);
msg->addS32("LocalID", info->mParcelID);
}
- msg->addBOOL("Final", TRUE); // don't allow escrow buys
+ msg->addBOOL("Final", true); // don't allow escrow buys
if (info->mIsClaim)
{
msg->nextBlock("ParcelData");
@@ -1478,7 +1478,7 @@ void LLViewerParcelMgr::setHoverParcel(const LLVector3d& pos)
msg->addF32Fast(_PREHASH_South, south);
msg->addF32Fast(_PREHASH_East, east);
msg->addF32Fast(_PREHASH_North, north);
- msg->addBOOL("SnapSelection", FALSE);
+ msg->addBOOL("SnapSelection", false);
msg->sendReliable(region->getHost());
mHoverRequestResult = PARCEL_RESULT_NO_DATA;
@@ -1688,7 +1688,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
bool environment_changed = (cur_parcel_environment_version != parcel_environment_version);
parcel->init(owner_id,
- FALSE, FALSE, FALSE,
+ false, false, false,
claim_date, claim_price_per_meter, rent_price_per_meter,
area, other_prims, parcel_prim_bonus, is_group_owned);
parcel->setLocalID(local_id);
@@ -1736,7 +1736,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (instance->mTeleportInProgress)
{
- instance->mTeleportInProgress = FALSE;
+ instance->mTeleportInProgress = false;
if(instance->mTeleportInProgressPosition.isNull())
{
//initial update
@@ -1752,7 +1752,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
// Notify anything that wants to know when the agent changes parcels
gAgent.changeParcels();
- instance->mTeleportInProgress = FALSE;
+ instance->mTeleportInProgress = false;
}
else if (agent_parcel_update)
{
@@ -1795,7 +1795,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
west_south.mV[VY],
east_north.mV[VX],
east_north.mV[VY] );
- parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = FALSE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = false;
}
else if (0 == local_id)
{
@@ -1809,7 +1809,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
aabb_min.mV[VY],
aabb_max.mV[VX],
aabb_max.mV[VY] );
- parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = true;
}
else
{
@@ -1829,7 +1829,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
delete[] bitmap;
bitmap = NULL;
- parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = true;
}
// Request access list information for this land
@@ -1842,7 +1842,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
parcel_mgr.sendParcelDwellRequest();
}
- parcel_mgr.mSelected = TRUE;
+ parcel_mgr.mSelected = true;
parcel_mgr.notifyObservers();
}
}
@@ -2146,8 +2146,8 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
S32 count = entries.size();
S32 num_sections = (S32) ceil(count/PARCEL_MAX_ENTRIES_PER_PACKET);
S32 sequence_id = 1;
- BOOL start_message = TRUE;
- BOOL initial = TRUE;
+ bool start_message = true;
+ bool initial = true;
LLUUID transactionUUID;
transactionUUID.generate();
@@ -2171,7 +2171,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
msg->addUUIDFast(_PREHASH_TransactionID, transactionUUID);
msg->addS32Fast(_PREHASH_SequenceID, sequence_id);
msg->addS32Fast(_PREHASH_Sections, num_sections);
- start_message = FALSE;
+ start_message = false;
if (initial && (cit == end))
{
@@ -2182,7 +2182,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
msg->addU32Fast(_PREHASH_Flags, 0 );
}
- initial = FALSE;
+ initial = false;
sequence_id++;
}
@@ -2198,7 +2198,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr
++cit;
}
- start_message = TRUE;
+ start_message = true;
msg->sendReliable( region->getHost() );
}
}
@@ -2344,7 +2344,7 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
&& ((parcel->getSalePrice() > 0) || (authorizeBuyer.notNull()));
bool isEmpowered
- = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) == TRUE : true;
+ = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) == true : true;
bool isOwner
= parcelOwner == (forGroup ? gAgent.getGroupID() : gAgent.getID());
@@ -2359,9 +2359,9 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
}
-void LLViewerParcelMgr::startBuyLand(BOOL is_for_group)
+void LLViewerParcelMgr::startBuyLand(bool is_for_group)
{
- LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group == TRUE);
+ LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group == true);
}
void LLViewerParcelMgr::startSellLand()
@@ -2583,39 +2583,39 @@ void LLViewerParcelMgr::buyPass()
}
//Tells whether we are allowed to buy a pass or not
-BOOL LLViewerParcelMgr::isCollisionBanned()
+bool LLViewerParcelMgr::isCollisionBanned()
{
if ((mCollisionBanned == BA_ALLOWED) || (mCollisionBanned == BA_NOT_ON_LIST) || (mCollisionBanned == BA_NOT_IN_GROUP))
- return FALSE;
+ return false;
else
- return TRUE;
+ return true;
}
// This implementation should mirror LLSimParcelMgr::isParcelOwnedBy
// static
-BOOL LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power)
+bool LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power)
{
if (!parcelp)
{
- return FALSE;
+ return false;
}
// Gods can always assume ownership.
if (gAgent.isGodlike())
{
- return TRUE;
+ return true;
}
// The owner of a parcel automatically gets all powersr.
if (parcelp->getOwnerID() == gAgent.getID())
{
- return TRUE;
+ return true;
}
// Only gods can assume 'ownership' of public land.
if (parcelp->isPublic())
{
- return FALSE;
+ return false;
}
// Return whether or not the agent has group_proxy_power powers in the
@@ -2625,10 +2625,10 @@ BOOL LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_
// This implementation should mirror llSimParcelMgr::isParcelModifiableBy
// static
-BOOL LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power)
+bool LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power)
{
// If the agent can assume ownership, it is probably modifiable.
- BOOL rv = FALSE;
+ bool rv = false;
if (parcelp)
{
// *NOTE: This should only work for leased parcels, but group owned
@@ -2640,7 +2640,7 @@ BOOL LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 g
&& !gAgent.isGodlike()
&& (parcelp->getOwnershipStatus() != LLParcel::OS_LEASED) )
{
- rv = FALSE;
+ rv = false;
}
}
return rv;
@@ -2712,7 +2712,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos
// The agent parcel data has not been updated yet.
// Let's wait for the update and then emit the signal.
mTeleportInProgressPosition = new_pos;
- mTeleportInProgress = TRUE;
+ mTeleportInProgress = true;
}
}