summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llappearance')
-rw-r--r--indra/llappearance/llavatarappearance.cpp294
-rw-r--r--indra/llappearance/llavatarappearance.h142
-rw-r--r--indra/llappearance/llavatarappearancedefines.cpp106
-rw-r--r--indra/llappearance/llavatarappearancedefines.h10
-rw-r--r--indra/llappearance/llavatarjoint.cpp38
-rw-r--r--indra/llappearance/llavatarjoint.h30
-rw-r--r--indra/llappearance/llavatarjointmesh.cpp24
-rw-r--r--indra/llappearance/llavatarjointmesh.h17
-rw-r--r--indra/llappearance/lldriverparam.cpp30
-rw-r--r--indra/llappearance/lldriverparam.h12
-rw-r--r--indra/llappearance/lllocaltextureobject.cpp34
-rw-r--r--indra/llappearance/lllocaltextureobject.h14
-rw-r--r--indra/llappearance/llpolymesh.cpp68
-rw-r--r--indra/llappearance/llpolymesh.h20
-rw-r--r--indra/llappearance/llpolymorph.cpp60
-rw-r--r--indra/llappearance/llpolymorph.h18
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.cpp20
-rw-r--r--indra/llappearance/llpolyskeletaldistortion.h10
-rw-r--r--indra/llappearance/lltexglobalcolor.cpp16
-rw-r--r--indra/llappearance/lltexglobalcolor.h4
-rw-r--r--indra/llappearance/lltexlayer.cpp238
-rw-r--r--indra/llappearance/lltexlayer.h74
-rw-r--r--indra/llappearance/lltexlayerparams.cpp82
-rw-r--r--indra/llappearance/lltexlayerparams.h24
-rw-r--r--indra/llappearance/llviewervisualparam.cpp24
-rw-r--r--indra/llappearance/llviewervisualparam.h14
-rw-r--r--indra/llappearance/llwearable.cpp22
-rw-r--r--indra/llappearance/llwearable.h6
-rw-r--r--indra/llappearance/llwearabledata.cpp28
-rw-r--r--indra/llappearance/llwearabledata.h8
-rw-r--r--indra/llappearance/llwearabletype.cpp50
-rw-r--r--indra/llappearance/llwearabletype.h12
32 files changed, 767 insertions, 782 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 83e43b11b7..95d55c835f 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -64,19 +64,19 @@ class LLAvatarBoneInfo
friend class LLAvatarAppearance;
friend class LLAvatarSkeletonInfo;
public:
- LLAvatarBoneInfo() : mIsJoint(FALSE) {}
+ LLAvatarBoneInfo() : mIsJoint(false) {}
~LLAvatarBoneInfo()
{
std::for_each(mChildren.begin(), mChildren.end(), DeletePointer());
mChildren.clear();
}
- BOOL parseXml(LLXmlTreeNode* node);
+ bool parseXml(LLXmlTreeNode* node);
private:
std::string mName;
std::string mSupport;
std::string mAliases;
- BOOL mIsJoint;
+ bool mIsJoint;
LLVector3 mPos;
LLVector3 mEnd;
LLVector3 mRot;
@@ -101,7 +101,7 @@ public:
std::for_each(mBoneInfoList.begin(), mBoneInfoList.end(), DeletePointer());
mBoneInfoList.clear();
}
- BOOL parseXml(LLXmlTreeNode* node);
+ bool parseXml(LLXmlTreeNode* node);
S32 getNumBones() const { return mNumBones; }
S32 getNumCollisionVolumes() const { return mNumCollisionVolumes; }
@@ -164,19 +164,7 @@ LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary* LLAvatarAppearance::sAv
LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
LLCharacter(),
- mIsDummy(FALSE),
- mTexSkinColor( NULL ),
- mTexHairColor( NULL ),
- mTexEyeColor( NULL ),
- mPelvisToFoot(0.f),
- mHeadOffset(),
- mRoot(NULL),
- mWearableData(wearable_data),
- mNumBones(0),
- mNumCollisionVolumes(0),
- mCollisionVolumes(NULL),
- mIsBuilt(FALSE),
- mInitFlags(0)
+ mWearableData(wearable_data)
{
llassert_always(mWearableData);
mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
@@ -222,14 +210,14 @@ void LLAvatarAppearance::initInstance()
mesh->setName(mesh_name);
mesh->setMeshID(mesh_index);
mesh->setPickName(mesh_dict->mPickName);
- mesh->setIsTransparent(FALSE);
+ mesh->setIsTransparent(false);
switch((S32)mesh_index)
{
case MESH_ID_HAIR:
- mesh->setIsTransparent(TRUE);
+ mesh->setIsTransparent(true);
break;
case MESH_ID_SKIRT:
- mesh->setIsTransparent(TRUE);
+ mesh->setIsTransparent(true);
break;
case MESH_ID_EYEBALL_LEFT:
case MESH_ID_EYEBALL_RIGHT:
@@ -331,7 +319,7 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
avatar_file_name = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,AVATAR_DEFAULT_CHAR + "_lad.xml");
}
LLXmlTree xml_tree;
- BOOL success = xml_tree.parseFile( avatar_file_name, FALSE );
+ bool success = xml_tree.parseFile( avatar_file_name, false );
if (!success)
{
LL_ERRS() << "Problem reading avatar configuration file:" << avatar_file_name << LL_ENDL;
@@ -537,11 +525,11 @@ void LLAvatarAppearance::computeBodySize()
new_body_size.mV[VZ] = mPelvisToFoot +
// the sqrt(2) correction below is an approximate
// correction to get to the top of the head
- F_SQRT2 * (skull.mV[VZ] * head_scale.mV[VZ]) +
- head.mV[VZ] * neck_scale.mV[VZ] +
- neck.mV[VZ] * chest_scale.mV[VZ] +
- chest.mV[VZ] * torso_scale.mV[VZ] +
- torso.mV[VZ] * pelvis_scale.mV[VZ];
+ F_SQRT2 * (skull.mV[VZ] * head_scale.mV[VZ]) +
+ head.mV[VZ] * neck_scale.mV[VZ] +
+ neck.mV[VZ] * chest_scale.mV[VZ] +
+ chest.mV[VZ] * torso_scale.mV[VZ] +
+ torso.mV[VZ] * pelvis_scale.mV[VZ];
// TODO -- measure the real depth and width
new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
@@ -561,17 +549,17 @@ void LLAvatarAppearance::computeBodySize()
//-----------------------------------------------------------------------------
// parseSkeletonFile()
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree)
+bool LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree)
{
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
- BOOL parsesuccess = skeleton_xml_tree.parseFile( filename, FALSE );
+ bool parsesuccess = skeleton_xml_tree.parseFile( filename, false );
if (!parsesuccess)
{
LL_ERRS() << "Can't parse skeleton file: " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
// now sanity check xml file
@@ -579,13 +567,13 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTre
if (!root)
{
LL_ERRS() << "No root node found in avatar skeleton file: " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
if( !root->hasName( "linden_skeleton" ) )
{
LL_ERRS() << "Invalid avatar skeleton file header: " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
std::string version;
@@ -593,16 +581,16 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTre
if( !root->getFastAttributeString( version_string, version ) || ((version != "1.0") && (version != "2.0")))
{
LL_ERRS() << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// setupBone()
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num)
+bool LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num)
{
LLJoint* joint = NULL;
@@ -618,7 +606,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
if (!joint)
{
LL_WARNS() << "Too many bones" << LL_ENDL;
- return FALSE;
+ return false;
}
joint->setName( info->mName );
}
@@ -627,7 +615,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
if (volume_num >= (S32)mNumCollisionVolumes)
{
LL_WARNS() << "Too many collision volumes" << LL_ENDL;
- return FALSE;
+ return false;
}
joint = (&mCollisionVolumes[volume_num]);
joint->setName( info->mName );
@@ -667,17 +655,17 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
{
if (!setupBone(child_info, joint, volume_num, joint_num))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// allocateCharacterJoints()
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num )
+bool LLAvatarAppearance::allocateCharacterJoints( U32 num )
{
if (mSkeleton.size() != num)
{
@@ -686,14 +674,14 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num )
mNumBones = num;
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// buildSkeleton()
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
+bool LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
{
LL_DEBUGS("BVH") << "numBones " << info->mNumBones << " numCollisionVolumes " << info->mNumCollisionVolumes << LL_ENDL;
@@ -701,7 +689,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
if (!allocateCharacterJoints(info->mNumBones))
{
LL_ERRS() << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL;
- return FALSE;
+ return false;
}
// allocate volumes
@@ -710,7 +698,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
if (!allocateCollisionVolumes(info->mNumCollisionVolumes))
{
LL_ERRS() << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -721,11 +709,11 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
if (!setupBone(bone_info, NULL, current_volume_num, current_joint_num))
{
LL_ERRS() << "Error parsing bone in skeleton file" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -790,7 +778,7 @@ void LLAvatarAppearance::buildCharacter()
//-------------------------------------------------------------------------
mRoot->removeAllChildren();
mJointMap.clear();
- mIsBuilt = FALSE;
+ mIsBuilt = false;
//-------------------------------------------------------------------------
// clear mesh data
@@ -808,10 +796,10 @@ void LLAvatarAppearance::buildCharacter()
//-------------------------------------------------------------------------
LLTimer timer;
- BOOL status = loadAvatar();
+ bool status = loadAvatar();
stop_glerror();
-// gPrintMessagesThisFrame = TRUE;
+// gPrintMessagesThisFrame = true;
LL_DEBUGS() << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL;
if (!status)
@@ -881,12 +869,12 @@ void LLAvatarAppearance::buildCharacter()
// SL-315
mPelvisp->setPosition( LLVector3(0.0f, 0.0f, 0.0f) );
- mIsBuilt = TRUE;
+ mIsBuilt = true;
stop_glerror();
}
-BOOL LLAvatarAppearance::loadAvatar()
+bool LLAvatarAppearance::loadAvatar()
{
// LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR);
@@ -894,7 +882,7 @@ BOOL LLAvatarAppearance::loadAvatar()
if( !buildSkeleton(sAvatarSkeletonInfo) )
{
LL_ERRS() << "avatar file: buildSkeleton() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
// initialize mJointAliasMap
@@ -904,14 +892,14 @@ BOOL LLAvatarAppearance::loadAvatar()
if( !loadSkeletonNode() )
{
LL_ERRS() << "avatar file: loadNodeSkeleton() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
// avatar_lad.xml : <mesh>
if( !loadMeshNodes() )
{
LL_ERRS() << "avatar file: loadNodeMesh() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
// avatar_lad.xml : <global_color>
@@ -921,13 +909,13 @@ BOOL LLAvatarAppearance::loadAvatar()
if( !mTexSkinColor->setInfo( sAvatarXmlInfo->mTexSkinColorInfo ) )
{
LL_ERRS() << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
{
LL_ERRS() << "<global_color> name=\"skin_color\" not found" << LL_ENDL;
- return FALSE;
+ return false;
}
if( sAvatarXmlInfo->mTexHairColorInfo )
{
@@ -935,13 +923,13 @@ BOOL LLAvatarAppearance::loadAvatar()
if( !mTexHairColor->setInfo( sAvatarXmlInfo->mTexHairColorInfo ) )
{
LL_ERRS() << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
{
LL_ERRS() << "<global_color> name=\"hair_color\" not found" << LL_ENDL;
- return FALSE;
+ return false;
}
if( sAvatarXmlInfo->mTexEyeColorInfo )
{
@@ -949,26 +937,26 @@ BOOL LLAvatarAppearance::loadAvatar()
if( !mTexEyeColor->setInfo( sAvatarXmlInfo->mTexEyeColorInfo ) )
{
LL_ERRS() << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
{
LL_ERRS() << "<global_color> name=\"eye_color\" not found" << LL_ENDL;
- return FALSE;
+ return false;
}
// avatar_lad.xml : <layer_set>
if (sAvatarXmlInfo->mLayerInfoList.empty())
{
LL_ERRS() << "avatar file: missing <layer_set> node" << LL_ENDL;
- return FALSE;
+ return false;
}
if (sAvatarXmlInfo->mMorphMaskInfoList.empty())
{
LL_ERRS() << "avatar file: missing <morph_masks> node" << LL_ENDL;
- return FALSE;
+ return false;
}
// avatar_lad.xml : <morph_masks>
@@ -982,7 +970,7 @@ BOOL LLAvatarAppearance::loadAvatar()
morph_param = getVisualParam(name->c_str());
if (morph_param)
{
- BOOL invert = info->mInvert;
+ bool invert = info->mInvert;
addMaskedMorph(baked, morph_param, invert, info->mLayer);
}
}
@@ -1010,24 +998,24 @@ BOOL LLAvatarAppearance::loadAvatar()
{
delete driver_param;
LL_WARNS() << "avatar file: driver_param->parseData() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// loadSkeletonNode(): loads <skeleton> node from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::loadSkeletonNode ()
+bool LLAvatarAppearance::loadSkeletonNode ()
{
mRoot->addChild( mSkeleton[0] );
// make meshes children before calling parent version of the function
for (LLAvatarJoint* joint : mMeshLOD)
{
- joint->mUpdateXform = FALSE;
+ joint->mUpdateXform = false;
joint->setMeshesToChildren();
}
@@ -1064,7 +1052,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode ()
if (!param->setInfo(info))
{
delete param;
- return FALSE;
+ return false;
}
else
{
@@ -1075,13 +1063,13 @@ BOOL LLAvatarAppearance::loadSkeletonNode ()
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// loadMeshNodes(): loads <mesh> nodes from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::loadMeshNodes()
+bool LLAvatarAppearance::loadMeshNodes()
{
for (const LLAvatarXmlInfo::LLAvatarMeshInfo* info : sAvatarXmlInfo->mMeshInfoList)
{
@@ -1090,7 +1078,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
LLAvatarJointMesh* mesh = NULL;
U8 mesh_id = 0;
- BOOL found_mesh_id = FALSE;
+ bool found_mesh_id = false;
/* if (type == "hairMesh")
switch(lod)
@@ -1103,7 +1091,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
if (type.compare(mesh_dict->mName) == 0)
{
mesh_id = mesh_index;
- found_mesh_id = TRUE;
+ found_mesh_id = true;
break;
}
}
@@ -1117,13 +1105,13 @@ BOOL LLAvatarAppearance::loadMeshNodes()
else
{
LL_WARNS() << "Avatar file: <mesh> has invalid lod setting " << lod << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
{
LL_WARNS() << "Ignoring unrecognized mesh type: " << type << LL_ENDL;
- return FALSE;
+ return false;
}
// LL_INFOS() << "Parsing mesh data for " << type << "..." << LL_ENDL;
@@ -1146,7 +1134,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
{
// This should never happen
LL_WARNS("Avatar") << "Could not find avatar mesh: " << info->mReferenceMeshName << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
@@ -1158,7 +1146,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
if( !poly_mesh )
{
LL_WARNS() << "Failed to load mesh of type " << type << LL_ENDL;
- return FALSE;
+ return false;
}
// Multimap insert
@@ -1173,7 +1161,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
if (!param->setInfo((LLPolyMorphTargetInfo*)info_pair.first))
{
delete param;
- return FALSE;
+ return false;
}
else
{
@@ -1191,15 +1179,15 @@ BOOL LLAvatarAppearance::loadMeshNodes()
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// loadLayerSets()
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::loadLayersets()
+bool LLAvatarAppearance::loadLayersets()
{
- BOOL success = TRUE;
+ bool success = true;
for (LLTexLayerSetInfo* layerset_info : sAvatarXmlInfo->mLayerInfoList)
{
if (isSelf())
@@ -1212,7 +1200,7 @@ BOOL LLAvatarAppearance::loadLayersets()
stop_glerror();
delete layer_set;
LL_WARNS() << "avatar file: layer_set->setInfo() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
// scan baked textures and associate the layerset with the appropriate one
@@ -1234,7 +1222,7 @@ BOOL LLAvatarAppearance::loadLayersets()
{
LL_WARNS() << "<layer_set> has invalid body_region attribute" << LL_ENDL;
delete layer_set;
- return FALSE;
+ return false;
}
// scan morph masks and let any affected layers know they have an associated morph
@@ -1243,12 +1231,12 @@ BOOL LLAvatarAppearance::loadLayersets()
LLTexLayerInterface* layer = layer_set->findLayerByName(morph->mLayer);
if (layer)
{
- layer->setHasMorph(TRUE);
+ layer->setHasMorph(true);
}
else
{
LL_WARNS() << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL;
- success = FALSE;
+ success = false;
}
}
}
@@ -1341,19 +1329,19 @@ LLPolyMesh* LLAvatarAppearance::getUpperBodyMesh()
// virtual
-BOOL LLAvatarAppearance::isValid() const
+bool LLAvatarAppearance::isValid() const
{
// This should only be called on ourself.
if (!isSelf())
{
LL_ERRS() << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL;
}
- return TRUE;
+ return true;
}
// adds a morph mask to the appropriate baked texture structure
-void LLAvatarAppearance::addMaskedMorph(EBakedTextureIndex index, LLVisualParam* morph_target, BOOL invert, std::string layer)
+void LLAvatarAppearance::addMaskedMorph(EBakedTextureIndex index, LLVisualParam* morph_target, bool invert, std::string layer)
{
if (index < BAKED_NUM_INDICES)
{
@@ -1364,7 +1352,7 @@ void LLAvatarAppearance::addMaskedMorph(EBakedTextureIndex index, LLVisualParam*
//static
-BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
+bool LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
{
switch( te )
{
@@ -1448,10 +1436,10 @@ BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
default:
llassert(0);
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_color)
@@ -1459,9 +1447,9 @@ void LLAvatarAppearance::setClothesColor( ETextureIndex te, const LLColor4& new_
U32 param_name[3];
if( teToColorParams( te, param_name ) )
{
- setVisualParamWeight( param_name[0], new_color.mV[VX]);
- setVisualParamWeight( param_name[1], new_color.mV[VY]);
- setVisualParamWeight( param_name[2], new_color.mV[VZ]);
+ setVisualParamWeight( param_name[0], new_color.mV[VRED]);
+ setVisualParamWeight( param_name[1], new_color.mV[VGREEN]);
+ setVisualParamWeight( param_name[2], new_color.mV[VBLUE]);
}
}
@@ -1471,9 +1459,9 @@ LLColor4 LLAvatarAppearance::getClothesColor( ETextureIndex te )
U32 param_name[3];
if( teToColorParams( te, param_name ) )
{
- color.mV[VX] = getVisualParamWeight( param_name[0] );
- color.mV[VY] = getVisualParamWeight( param_name[1] );
- color.mV[VZ] = getVisualParamWeight( param_name[2] );
+ color.mV[VRED] = getVisualParamWeight( param_name[0] );
+ color.mV[VGREEN] = getVisualParamWeight( param_name[1] );
+ color.mV[VBLUE] = getVisualParamWeight( param_name[2] );
}
return color;
}
@@ -1507,7 +1495,7 @@ LLColor4 LLAvatarAppearance::getGlobalColor( const std::string& color_name ) con
// Unlike most wearable functions, this works for both self and other.
// virtual
-BOOL LLAvatarAppearance::isWearingWearableType(LLWearableType::EType type) const
+bool LLAvatarAppearance::isWearingWearableType(LLWearableType::EType type) const
{
return mWearableData->getWearableCount(type) > 0;
}
@@ -1524,7 +1512,7 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in
//-----------------------------------------------------------------------------
// allocateCollisionVolumes()
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
+bool LLAvatarAppearance::allocateCollisionVolumes( U32 num )
{
if (mNumCollisionVolumes !=num)
{
@@ -1535,27 +1523,27 @@ BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
if (!mCollisionVolumes)
{
LL_WARNS() << "Failed to allocate collision volumes" << LL_ENDL;
- return FALSE;
+ return false;
}
mNumCollisionVolumes = num;
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// LLAvatarBoneInfo::parseXml()
//-----------------------------------------------------------------------------
-BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
+bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
{
if (node->hasName("bone"))
{
- mIsJoint = TRUE;
+ mIsJoint = true;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
LL_WARNS() << "Bone without name" << LL_ENDL;
- return FALSE;
+ return false;
}
static LLStdStringHandle aliases_string = LLXmlTree::addAttributeString("aliases");
@@ -1563,7 +1551,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
}
else if (node->hasName("collision_volume"))
{
- mIsJoint = FALSE;
+ mIsJoint = false;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
@@ -1573,28 +1561,28 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
else
{
LL_WARNS() << "Invalid node " << node->getName() << LL_ENDL;
- return FALSE;
+ return false;
}
static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos");
if (!node->getFastAttributeVector3(pos_string, mPos))
{
LL_WARNS() << "Bone without position" << LL_ENDL;
- return FALSE;
+ return false;
}
static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot");
if (!node->getFastAttributeVector3(rot_string, mRot))
{
LL_WARNS() << "Bone without rotation" << LL_ENDL;
- return FALSE;
+ return false;
}
static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale");
if (!node->getFastAttributeVector3(scale_string, mScale))
{
LL_WARNS() << "Bone without scale" << LL_ENDL;
- return FALSE;
+ return false;
}
static LLStdStringHandle end_string = LLXmlTree::addAttributeString("end");
@@ -1617,7 +1605,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
if (!node->getFastAttributeVector3(pivot_string, mPivot))
{
LL_WARNS() << "Bone without pivot" << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -1629,23 +1617,23 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
if (!child_info->parseXml(child))
{
delete child_info;
- return FALSE;
+ return false;
}
mChildren.push_back(child_info);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// LLAvatarSkeletonInfo::parseXml()
//-----------------------------------------------------------------------------
-BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
+bool LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
{
static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones");
if (!node->getFastAttributeS32(num_bones_string, mNumBones))
{
LL_WARNS() << "Couldn't find number of bones." << LL_ENDL;
- return FALSE;
+ return false;
}
static LLStdStringHandle num_collision_volumes_string = LLXmlTree::addAttributeString("num_collision_volumes");
@@ -1659,11 +1647,11 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
{
delete info;
LL_WARNS() << "Error parsing bone in skeleton file" << LL_ENDL;
- return FALSE;
+ return false;
}
mBoneInfoList.push_back(info);
}
- return TRUE;
+ return true;
}
//Make aliases for joint and push to map.
@@ -1731,13 +1719,13 @@ const LLAvatarAppearance::joint_alias_map_t& LLAvatarAppearance::getJointAliases
//-----------------------------------------------------------------------------
// parseXmlSkeletonNode(): parses <skeleton> nodes from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* root)
+bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* root)
{
LLXmlTreeNode* node = root->getChildByName( "skeleton" );
if( !node )
{
LL_WARNS() << "avatar file: missing <skeleton>" << LL_ENDL;
- return FALSE;
+ return false;
}
LLXmlTreeNode* child;
@@ -1757,14 +1745,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
{
LL_WARNS() << "Unknown param type." << LL_ENDL;
}
- return FALSE;
+ return false;
}
LLPolySkeletalDistortionInfo *info = new LLPolySkeletalDistortionInfo;
if (!info->parseXml(child))
{
delete info;
- return FALSE;
+ return false;
}
mSkeletalDistortionInfoList.push_back(info);
@@ -1782,7 +1770,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
{
LL_WARNS() << "No name supplied for attachment point." << LL_ENDL;
delete info;
- return FALSE;
+ return false;
}
static LLStdStringHandle joint_string = LLXmlTree::addAttributeString("joint");
@@ -1790,19 +1778,19 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
{
LL_WARNS() << "No bone declared in attachment point " << info->mName << LL_ENDL;
delete info;
- return FALSE;
+ return false;
}
static LLStdStringHandle position_string = LLXmlTree::addAttributeString("position");
if (child->getFastAttributeVector3(position_string, info->mPosition))
{
- info->mHasPosition = TRUE;
+ info->mHasPosition = true;
}
static LLStdStringHandle rotation_string = LLXmlTree::addAttributeString("rotation");
if (child->getFastAttributeVector3(rotation_string, info->mRotationEuler))
{
- info->mHasRotation = TRUE;
+ info->mHasRotation = true;
}
static LLStdStringHandle group_string = LLXmlTree::addAttributeString("group");
if (child->getFastAttributeS32(group_string, info->mGroup))
@@ -1816,7 +1804,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
{
LL_WARNS() << "No id supplied for attachment point " << info->mName << LL_ENDL;
delete info;
- return FALSE;
+ return false;
}
static LLStdStringHandle slot_string = LLXmlTree::addAttributeString("pie_slice");
@@ -1831,13 +1819,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
mAttachmentInfoList.push_back(info);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// parseXmlMeshNodes(): parses <mesh> nodes from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
+bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
for (LLXmlTreeNode* node = root->getChildByName( "mesh" );
node;
@@ -1851,7 +1839,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
LL_WARNS() << "Avatar file: <mesh> is missing type attribute. Ignoring element. " << LL_ENDL;
delete info;
- return FALSE; // Ignore this element
+ return false; // Ignore this element
}
static LLStdStringHandle lod_string = LLXmlTree::addAttributeString("lod");
@@ -1859,7 +1847,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
LL_WARNS() << "Avatar file: <mesh> is missing lod attribute. Ignoring element. " << LL_ENDL;
delete info;
- return FALSE; // Ignore this element
+ return false; // Ignore this element
}
static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name");
@@ -1867,7 +1855,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
LL_WARNS() << "Avatar file: <mesh> is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL;
delete info;
- return FALSE; // Ignore this element
+ return false; // Ignore this element
}
static LLStdStringHandle reference_string = LLXmlTree::addAttributeString("reference");
@@ -1902,7 +1890,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
LL_WARNS() << "Unknown param type." << LL_ENDL;
}
- return FALSE;
+ return false;
}
LLPolyMorphTargetInfo *morphinfo = new LLPolyMorphTargetInfo();
@@ -1910,9 +1898,9 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
delete morphinfo;
delete info;
- return -1;
+ return false;
}
- BOOL shared = FALSE;
+ bool shared = false;
static LLStdStringHandle shared_string = LLXmlTree::addAttributeString("shared");
child->getFastAttributeBOOL(shared_string, shared);
@@ -1921,13 +1909,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
mMeshInfoList.push_back(info);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// parseXmlColorNodes(): parses <global_color> nodes from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root)
+bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root)
{
for (LLXmlTreeNode* color_node = root->getChildByName( "global_color" );
color_node;
@@ -1942,14 +1930,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
if (mTexSkinColorInfo)
{
LL_WARNS() << "avatar file: multiple instances of skin_color" << LL_ENDL;
- return FALSE;
+ return false;
}
mTexSkinColorInfo = new LLTexGlobalColorInfo;
if( !mTexSkinColorInfo->parseXml( color_node ) )
{
delete_and_clear(mTexSkinColorInfo);
LL_WARNS() << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
else if( global_color_name == "hair_color" )
@@ -1957,14 +1945,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
if (mTexHairColorInfo)
{
LL_WARNS() << "avatar file: multiple instances of hair_color" << LL_ENDL;
- return FALSE;
+ return false;
}
mTexHairColorInfo = new LLTexGlobalColorInfo;
if( !mTexHairColorInfo->parseXml( color_node ) )
{
delete_and_clear(mTexHairColorInfo);
LL_WARNS() << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
else if( global_color_name == "eye_color" )
@@ -1972,24 +1960,24 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
if (mTexEyeColorInfo)
{
LL_WARNS() << "avatar file: multiple instances of eye_color" << LL_ENDL;
- return FALSE;
+ return false;
}
mTexEyeColorInfo = new LLTexGlobalColorInfo;
if( !mTexEyeColorInfo->parseXml( color_node ) )
{
LL_WARNS() << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// parseXmlLayerNodes(): parses <layer_set> nodes from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root)
+bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root)
{
for (LLXmlTreeNode* layer_node = root->getChildByName( "layer_set" );
layer_node;
@@ -2004,16 +1992,16 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root
{
delete layer_info;
LL_WARNS() << "avatar file: layer_set->parseXml() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// parseXmlDriverNodes(): parses <driver_parameters> nodes from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* root)
+bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* root)
{
LLXmlTreeNode* driver = root->getChildByName( "driver_parameters" );
if( driver )
@@ -2033,23 +2021,23 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* roo
{
delete driver_info;
LL_WARNS() << "avatar file: driver_param->parseXml() failed" << LL_ENDL;
- return FALSE;
+ return false;
}
}
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// parseXmlDriverNodes(): parses <driver_parameters> nodes from XML tree
//-----------------------------------------------------------------------------
-BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root)
+bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root)
{
LLXmlTreeNode* masks = root->getChildByName( "morph_masks" );
if( !masks )
{
- return FALSE;
+ return false;
}
for (LLXmlTreeNode* grand_child = masks->getChildByName( "mask" );
@@ -2063,7 +2051,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
{
LL_WARNS() << "No name supplied for morph mask." << LL_ENDL;
delete info;
- return FALSE;
+ return false;
}
static LLStdStringHandle region_string = LLXmlTree::addAttributeString("body_region");
@@ -2071,7 +2059,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
{
LL_WARNS() << "No region supplied for morph mask." << LL_ENDL;
delete info;
- return FALSE;
+ return false;
}
static LLStdStringHandle layer_string = LLXmlTree::addAttributeString("layer");
@@ -2079,7 +2067,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
{
LL_WARNS() << "No layer supplied for morph mask." << LL_ENDL;
delete info;
- return FALSE;
+ return false;
}
// optional parameter. don't throw a warning if not present.
@@ -2089,11 +2077,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
mMorphMaskInfoList.push_back(info);
}
- return TRUE;
+ return true;
}
//virtual
-LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer) :
+LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer) :
mMorphTarget(morph_target),
mInvert(invert),
mLayer(layer)
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index dc2d48fb74..13e504e639 100644
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -70,10 +70,10 @@ public:
static void initClass();
static void cleanupClass(); // Cleanup data that's only init'd once per class.
virtual void initInstance(); // Called after construction to initialize the instance.
- S32 mInitFlags;
- virtual BOOL loadSkeletonNode();
- BOOL loadMeshNodes();
- BOOL loadLayersets();
+ S32 mInitFlags{ 0 };
+ virtual bool loadSkeletonNode();
+ bool loadMeshNodes();
+ bool loadLayersets();
/** Initialization
@@ -108,9 +108,9 @@ public:
**/
public:
virtual bool isSelf() const { return false; } // True if this avatar is for this viewer's agent
- virtual BOOL isValid() const;
- virtual BOOL isUsingLocalAppearance() const = 0;
- virtual BOOL isEditingAppearance() const = 0;
+ virtual bool isValid() const;
+ virtual bool isUsingLocalAppearance() const = 0;
+ virtual bool isEditingAppearance() const = 0;
bool isBuilt() const { return mIsBuilt; }
@@ -135,8 +135,8 @@ public:
F32 getPelvisToFoot() const { return mPelvisToFoot; }
/*virtual*/ LLJoint* getRootJoint() { return mRoot; }
- LLVector3 mHeadOffset; // current head position
- LLAvatarJoint *mRoot;
+ LLVector3 mHeadOffset{}; // current head position
+ LLAvatarJoint* mRoot{ nullptr };
typedef std::map<std::string, LLJoint*> joint_map_t;
joint_map_t mJointMap;
@@ -146,7 +146,7 @@ public:
joint_state_map_t mCurrBodySizeState;
void compareJointStateMaps(joint_state_map_t& last_state,
joint_state_map_t& curr_state);
- void computeBodySize();
+ void computeBodySize();
public:
typedef std::vector<LLAvatarJoint*> avatar_joint_list_t;
@@ -156,16 +156,16 @@ public:
protected:
- static BOOL parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree);
+ static bool parseSkeletonFile(const std::string& filename, LLXmlTree& skeleton_xml_tree);
virtual void buildCharacter();
- virtual BOOL loadAvatar();
+ virtual bool loadAvatar();
- BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &current_volume_num, S32 &current_joint_num);
- BOOL allocateCharacterJoints(U32 num);
- BOOL buildSkeleton(const LLAvatarSkeletonInfo *info);
+ bool setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &current_volume_num, S32 &current_joint_num);
+ bool allocateCharacterJoints(U32 num);
+ bool buildSkeleton(const LLAvatarSkeletonInfo *info);
void clearSkeleton();
- BOOL mIsBuilt; // state of deferred character building
+ bool mIsBuilt{ false }; // state of deferred character building
avatar_joint_list_t mSkeleton;
LLVector3OverrideMap mPelvisFixups;
joint_alias_map_t mJointAliasMap;
@@ -182,30 +182,30 @@ public:
LLVector3 mBodySize;
LLVector3 mAvatarOffset;
protected:
- F32 mPelvisToFoot;
+ F32 mPelvisToFoot{ 0.f };
//--------------------------------------------------------------------
// Cached pointers to well known joints
//--------------------------------------------------------------------
public:
- LLJoint* mPelvisp;
- LLJoint* mTorsop;
- LLJoint* mChestp;
- LLJoint* mNeckp;
- LLJoint* mHeadp;
- LLJoint* mSkullp;
- LLJoint* mEyeLeftp;
- LLJoint* mEyeRightp;
- LLJoint* mHipLeftp;
- LLJoint* mHipRightp;
- LLJoint* mKneeLeftp;
- LLJoint* mKneeRightp;
- LLJoint* mAnkleLeftp;
- LLJoint* mAnkleRightp;
- LLJoint* mFootLeftp;
- LLJoint* mFootRightp;
- LLJoint* mWristLeftp;
- LLJoint* mWristRightp;
+ LLJoint* mPelvisp{nullptr};
+ LLJoint* mTorsop{ nullptr };
+ LLJoint* mChestp{ nullptr };
+ LLJoint* mNeckp{ nullptr };
+ LLJoint* mHeadp{ nullptr };
+ LLJoint* mSkullp{ nullptr };
+ LLJoint* mEyeLeftp{ nullptr };
+ LLJoint* mEyeRightp{ nullptr };
+ LLJoint* mHipLeftp{ nullptr };
+ LLJoint* mHipRightp{ nullptr };
+ LLJoint* mKneeLeftp{ nullptr };
+ LLJoint* mKneeRightp{ nullptr };
+ LLJoint* mAnkleLeftp{ nullptr };
+ LLJoint* mAnkleRightp{ nullptr };
+ LLJoint* mFootLeftp{ nullptr };
+ LLJoint* mFootRightp{ nullptr };
+ LLJoint* mWristLeftp{ nullptr };
+ LLJoint* mWristRightp{ nullptr };
//--------------------------------------------------------------------
// XML parse tree
@@ -225,14 +225,14 @@ protected:
** RENDERING
**/
public:
- BOOL mIsDummy; // for special views and animated object controllers; local to viewer
+ bool mIsDummy{ false }; // for special views and animated object controllers; local to viewer
//--------------------------------------------------------------------
// Morph masks
//--------------------------------------------------------------------
public:
- void addMaskedMorph(LLAvatarAppearanceDefines::EBakedTextureIndex index, LLVisualParam* morph_target, BOOL invert, std::string layer);
- virtual void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES) = 0;
+ void addMaskedMorph(LLAvatarAppearanceDefines::EBakedTextureIndex index, LLVisualParam* morph_target, bool invert, std::string layer);
+ virtual void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES) = 0;
/** Rendering
** **
@@ -279,7 +279,7 @@ protected:
public:
void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color);
LLColor4 getClothesColor(LLAvatarAppearanceDefines::ETextureIndex te);
- static BOOL teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name);
+ static bool teToColorParams(LLAvatarAppearanceDefines::ETextureIndex te, U32 *param_name);
//--------------------------------------------------------------------
// Global colors
@@ -288,9 +288,9 @@ public:
LLColor4 getGlobalColor(const std::string& color_name ) const;
virtual void onGlobalColorChanged(const LLTexGlobalColor* global_color) = 0;
protected:
- LLTexGlobalColor* mTexSkinColor;
- LLTexGlobalColor* mTexHairColor;
- LLTexGlobalColor* mTexEyeColor;
+ LLTexGlobalColor* mTexSkinColor{ nullptr };
+ LLTexGlobalColor* mTexHairColor{ nullptr };
+ LLTexGlobalColor* mTexEyeColor{ nullptr };
//--------------------------------------------------------------------
// Visibility
@@ -309,11 +309,11 @@ public:
public:
LLWearableData* getWearableData() { return mWearableData; }
const LLWearableData* getWearableData() const { return mWearableData; }
- virtual BOOL isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index = 0 ) const = 0;
- virtual BOOL isWearingWearableType(LLWearableType::EType type ) const;
+ virtual bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U32 index = 0 ) const = 0;
+ virtual bool isWearingWearableType(LLWearableType::EType type ) const;
private:
- LLWearableData* mWearableData;
+ LLWearableData* mWearableData{ nullptr };
/********************************************************************************
** **
@@ -331,11 +331,11 @@ protected:
struct BakedTextureData
{
LLUUID mLastTextureID;
- LLTexLayerSet* mTexLayerSet; // Only exists for self
- bool mIsLoaded;
- bool mIsUsed;
- LLAvatarAppearanceDefines::ETextureIndex mTextureIndex;
- U32 mMaskTexName;
+ LLTexLayerSet* mTexLayerSet{ nullptr }; // Only exists for self
+ bool mIsLoaded{ false };
+ bool mIsUsed{ false };
+ LLAvatarAppearanceDefines::ETextureIndex mTextureIndex{ LLAvatarAppearanceDefines::ETextureIndex::TEX_INVALID };
+ U32 mMaskTexName{ 0 };
// Stores pointers to the joint meshes that this baked texture deals with
avatar_joint_mesh_list_t mJointMeshes;
morph_list_t mMaskedMorphs;
@@ -352,11 +352,11 @@ protected:
// Collision volumes
//--------------------------------------------------------------------
public:
- S32 mNumBones;
- S32 mNumCollisionVolumes;
- LLAvatarJointCollisionVolume* mCollisionVolumes;
+ S32 mNumBones{ 0 };
+ S32 mNumCollisionVolumes{ 0 };
+ LLAvatarJointCollisionVolume* mCollisionVolumes{ nullptr };
protected:
- BOOL allocateCollisionVolumes(U32 num);
+ bool allocateCollisionVolumes(U32 num);
/** Physics
** **
@@ -372,16 +372,16 @@ protected:
LLAvatarXmlInfo();
~LLAvatarXmlInfo();
- BOOL parseXmlSkeletonNode(LLXmlTreeNode* root);
- BOOL parseXmlMeshNodes(LLXmlTreeNode* root);
- BOOL parseXmlColorNodes(LLXmlTreeNode* root);
- BOOL parseXmlLayerNodes(LLXmlTreeNode* root);
- BOOL parseXmlDriverNodes(LLXmlTreeNode* root);
- BOOL parseXmlMorphNodes(LLXmlTreeNode* root);
+ bool parseXmlSkeletonNode(LLXmlTreeNode* root);
+ bool parseXmlMeshNodes(LLXmlTreeNode* root);
+ bool parseXmlColorNodes(LLXmlTreeNode* root);
+ bool parseXmlLayerNodes(LLXmlTreeNode* root);
+ bool parseXmlDriverNodes(LLXmlTreeNode* root);
+ bool parseXmlMorphNodes(LLXmlTreeNode* root);
struct LLAvatarMeshInfo
{
- typedef std::pair<LLViewerVisualParamInfo*,BOOL> morph_info_pair_t; // LLPolyMorphTargetInfo stored here
+ typedef std::pair<LLViewerVisualParamInfo*,bool> morph_info_pair_t; // LLPolyMorphTargetInfo stored here
typedef std::vector<morph_info_pair_t> morph_info_list_t;
LLAvatarMeshInfo() : mLOD(0), mMinPixelArea(.1f) {}
@@ -410,8 +410,8 @@ protected:
struct LLAvatarAttachmentInfo
{
LLAvatarAttachmentInfo()
- : mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(FALSE),
- mIsHUDAttachment(FALSE), mHasPosition(FALSE), mHasRotation(FALSE) {}
+ : mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(false),
+ mIsHUDAttachment(false), mHasPosition(false), mHasRotation(false) {}
std::string mName;
std::string mJointName;
LLVector3 mPosition;
@@ -419,10 +419,10 @@ protected:
S32 mGroup;
S32 mAttachmentID;
S32 mPieMenuSlice;
- BOOL mVisibleFirstPerson;
- BOOL mIsHUDAttachment;
- BOOL mHasPosition;
- BOOL mHasRotation;
+ bool mVisibleFirstPerson;
+ bool mIsHUDAttachment;
+ bool mHasPosition;
+ bool mHasRotation;
};
typedef std::vector<LLAvatarAttachmentInfo*> attachment_info_list_t;
attachment_info_list_t mAttachmentInfoList;
@@ -440,11 +440,11 @@ protected:
struct LLAvatarMorphInfo
{
LLAvatarMorphInfo()
- : mInvert(FALSE) {}
+ : mInvert(false) {}
std::string mName;
std::string mRegion;
std::string mLayer;
- BOOL mInvert;
+ bool mInvert;
};
typedef std::vector<LLAvatarMorphInfo*> morph_info_list_t;
@@ -455,10 +455,10 @@ protected:
class LLMaskedMorph
{
public:
- LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer);
+ LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer);
LLVisualParam *mMorphTarget;
- BOOL mInvert;
+ bool mInvert;
std::string mLayer;
};
/** Support Classes
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp
index 0e51fd459e..c69517cb22 100644
--- a/indra/llappearance/llavatarappearancedefines.cpp
+++ b/indra/llappearance/llavatarappearancedefines.cpp
@@ -39,56 +39,56 @@ using namespace LLAvatarAppearanceDefines;
LLAvatarAppearanceDictionary::Textures::Textures()
{
- addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
- addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT));
- addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS));
- addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES));
- addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR));
- addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
- addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
- addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES));
- addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS));
- addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
- addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
- addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES));
- addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT));
- addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS));
- addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT));
-
- addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
- addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
-
- addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
- addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
- addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
-
- addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
- addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
-
-
- addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD, "head"));
- addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER, "upper"));
- addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER, "lower"));
- addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", FALSE, BAKED_EYES, "eyes"));
- addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", FALSE, BAKED_HAIR, "hair"));
- addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", FALSE, BAKED_SKIRT, "skirt"));
- addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", FALSE, BAKED_LEFT_ARM, "leftarm"));
- addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", FALSE, BAKED_LEFT_LEG, "leftleg"));
- addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", FALSE, BAKED_AUX1, "aux1"));
- addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", FALSE, BAKED_AUX2, "aux2"));
- addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", FALSE, BAKED_AUX3, "aux3"));
+ addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
+ addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", true, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT));
+ addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", true, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS));
+ addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", true, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES));
+ addEntry(TEX_HAIR, new TextureEntry("hair_grain", true, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR));
+ addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
+ addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN));
+ addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", true, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES));
+ addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", true, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS));
+ addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
+ addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET));
+ addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", true, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES));
+ addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT));
+ addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS));
+ addEntry(TEX_SKIRT, new TextureEntry("skirt", true, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT));
+
+ addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+ addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA));
+
+ addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
+ addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
+ addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
+
+ addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+ addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
+
+
+ addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", false, BAKED_HEAD, "head"));
+ addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", false, BAKED_UPPER, "upper"));
+ addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", false, BAKED_LOWER, "lower"));
+ addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", false, BAKED_EYES, "eyes"));
+ addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", false, BAKED_HAIR, "hair"));
+ addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", false, BAKED_SKIRT, "skirt"));
+ addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", false, BAKED_LEFT_ARM, "leftarm"));
+ addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", false, BAKED_LEFT_LEG, "leftleg"));
+ addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", false, BAKED_AUX1, "aux1"));
+ addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", false, BAKED_AUX2, "aux2"));
+ addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", false, BAKED_AUX3, "aux3"));
}
LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()
@@ -303,15 +303,15 @@ LLWearableType::EType LLAvatarAppearanceDictionary::getTEWearableType(ETextureIn
}
// static
-BOOL LLAvatarAppearanceDictionary::isBakedImageId(const LLUUID& id)
+bool LLAvatarAppearanceDictionary::isBakedImageId(const LLUUID& id)
{
if ((id == IMG_USE_BAKED_EYES) || (id == IMG_USE_BAKED_HAIR) || (id == IMG_USE_BAKED_HEAD) || (id == IMG_USE_BAKED_LOWER) || (id == IMG_USE_BAKED_SKIRT) || (id == IMG_USE_BAKED_UPPER)
|| (id == IMG_USE_BAKED_LEFTARM) || (id == IMG_USE_BAKED_LEFTLEG) || (id == IMG_USE_BAKED_AUX1) || (id == IMG_USE_BAKED_AUX2) || (id == IMG_USE_BAKED_AUX3) )
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// static
diff --git a/indra/llappearance/llavatarappearancedefines.h b/indra/llappearance/llavatarappearancedefines.h
index 414bf8bbc1..50a72a45a5 100644
--- a/indra/llappearance/llavatarappearancedefines.h
+++ b/indra/llappearance/llavatarappearancedefines.h
@@ -40,7 +40,7 @@ namespace LLAvatarAppearanceDefines
extern const S32 SCRATCH_TEX_WIDTH;
extern const S32 SCRATCH_TEX_HEIGHT;
-static const U32 AVATAR_HOVER = 11001;
+static constexpr U32 AVATAR_HOVER = 11001;
//--------------------------------------------------------------------
// Enums
@@ -167,10 +167,10 @@ public:
const std::string mDefaultImageName;
const LLWearableType::EType mWearableType;
// It's either a local texture xor baked
- BOOL mIsLocalTexture;
- BOOL mIsBakedTexture;
+ bool mIsLocalTexture;
+ bool mIsBakedTexture;
// If it's a local texture, it may be used by a baked texture
- BOOL mIsUsedByBakedTexture;
+ bool mIsUsedByBakedTexture;
EBakedTextureIndex mBakedTextureIndex;
};
@@ -244,7 +244,7 @@ public:
// Given a texture entry, determine which wearable type owns it.
LLWearableType::EType getTEWearableType(ETextureIndex index) const;
- static BOOL isBakedImageId(const LLUUID& id);
+ static bool isBakedImageId(const LLUUID& id);
static EBakedTextureIndex assetIdToBakedTextureIndex(const LLUUID& id);
static LLUUID localTextureIndexToMagicId(ETextureIndex t);
diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp
index 5dae4c86cb..2aa6cb63e1 100644
--- a/indra/llappearance/llavatarjoint.cpp
+++ b/indra/llappearance/llavatarjoint.cpp
@@ -40,7 +40,7 @@ const F32 DEFAULT_AVATAR_JOINT_LOD = 0.0f;
//-----------------------------------------------------------------------------
// Static Data
//-----------------------------------------------------------------------------
-BOOL LLAvatarJoint::sDisableLOD = FALSE;
+bool LLAvatarJoint::sDisableLOD = false;
//-----------------------------------------------------------------------------
// LLAvatarJoint()
@@ -66,13 +66,13 @@ LLAvatarJoint::LLAvatarJoint(const std::string &name, LLJoint *parent) :
void LLAvatarJoint::init()
{
- mValid = FALSE;
+ mValid = false;
mComponents = SC_JOINT | SC_BONE | SC_AXES;
mMinPixelArea = DEFAULT_AVATAR_JOINT_LOD;
mPickName = PN_DEFAULT;
- mVisible = TRUE;
+ mVisible = true;
mMeshID = 0;
- mIsTransparent = FALSE;
+ mIsTransparent = false;
}
@@ -88,7 +88,7 @@ LLAvatarJoint::~LLAvatarJoint()
//--------------------------------------------------------------------
// setValid()
//--------------------------------------------------------------------
-void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
+void LLAvatarJoint::setValid( bool valid, bool recursive )
{
//----------------------------------------------------------------
// set visibility for this joint
@@ -103,7 +103,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
for (LLJoint* child : mChildren)
{
LLAvatarJoint* joint = static_cast<LLAvatarJoint*>(child);
- joint->setValid(valid, TRUE);
+ joint->setValid(valid, true);
}
}
@@ -112,7 +112,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive )
//--------------------------------------------------------------------
// setSkeletonComponents()
//--------------------------------------------------------------------
-void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
+void LLAvatarJoint::setSkeletonComponents( U32 comp, bool recursive )
{
mComponents = comp;
if (recursive)
@@ -125,7 +125,7 @@ void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive )
}
}
-void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive)
+void LLAvatarJoint::setVisible(bool visible, bool recursive)
{
mVisible = visible;
@@ -148,7 +148,7 @@ void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pix
}
}
-void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
+void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind, bool terse_update)
{
for (LLJoint* child : mChildren)
{
@@ -167,10 +167,10 @@ void LLAvatarJoint::updateJointGeometry()
}
-BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
+bool LLAvatarJoint::updateLOD(F32 pixel_area, bool activate)
{
- BOOL lod_changed = FALSE;
- BOOL found_lod = FALSE;
+ bool lod_changed = false;
+ bool found_lod = false;
for (LLJoint* child : mChildren)
{
@@ -180,18 +180,18 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD)
{
// we've already found a joint to enable, so enable the rest as alternatives
- lod_changed |= joint->updateLOD(pixel_area, TRUE);
+ lod_changed |= joint->updateLOD(pixel_area, true);
}
else
{
if (pixel_area >= jointLOD || sDisableLOD)
{
- lod_changed |= joint->updateLOD(pixel_area, TRUE);
- found_lod = TRUE;
+ lod_changed |= joint->updateLOD(pixel_area, true);
+ found_lod = true;
}
else
{
- lod_changed |= joint->updateLOD(pixel_area, FALSE);
+ lod_changed |= joint->updateLOD(pixel_area, false);
}
}
}
@@ -222,11 +222,11 @@ void LLAvatarJoint::setMeshesToChildren()
LLAvatarJointCollisionVolume::LLAvatarJointCollisionVolume()
{
- mUpdateXform = FALSE;
+ mUpdateXform = false;
}
/*virtual*/
-U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
+U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, bool first_pass, bool is_dummy )
{
LL_ERRS() << "Cannot call render() on LLAvatarJointCollisionVolume" << LL_ENDL;
return 0;
@@ -234,7 +234,7 @@ U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL i
LLVector3 LLAvatarJointCollisionVolume::getVolumePos(LLVector3 &offset)
{
- mUpdateXform = TRUE;
+ mUpdateXform = true;
LLVector3 result = offset;
result.scaleVec(getScale());
diff --git a/indra/llappearance/llavatarjoint.h b/indra/llappearance/llavatarjoint.h
index bc7c932955..13f025fd5f 100644
--- a/indra/llappearance/llavatarjoint.h
+++ b/indra/llappearance/llavatarjoint.h
@@ -52,17 +52,17 @@ public:
virtual ~LLAvatarJoint();
// Gets the validity of this joint
- BOOL getValid() { return mValid; }
+ bool getValid() { return mValid; }
// Sets the validity of this joint
- virtual void setValid( BOOL valid, BOOL recursive=FALSE );
+ virtual void setValid( bool valid, bool recursive=false );
// Returns true if this object is transparent.
// This is used to determine in which order to draw objects.
- virtual BOOL isTransparent() { return mIsTransparent; }
+ virtual bool isTransparent() { return mIsTransparent; }
// Returns true if this object should inherit scale modifiers from its immediate parent
- virtual BOOL inheritScale() { return FALSE; }
+ virtual bool inheritScale() { return false; }
enum Components
{
@@ -72,7 +72,7 @@ public:
};
// Selects which skeleton components to draw
- void setSkeletonComponents( U32 comp, BOOL recursive = TRUE );
+ void setSkeletonComponents( U32 comp, bool recursive = true );
// Returns which skeleton components are enables for drawing
U32 getSkeletonComponents() { return mComponents; }
@@ -90,34 +90,34 @@ public:
void setPickName(LLJointPickName name) { mPickName = name; }
LLJointPickName getPickName() { return mPickName; }
- void setVisible( BOOL visible, BOOL recursive );
+ void setVisible( bool visible, bool recursive );
// Takes meshes in mMeshParts and sets each one as a child joint
void setMeshesToChildren();
// LLViewerJoint interface
- virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) = 0;
+ virtual U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ) = 0;
virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area);
- virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false);
- virtual BOOL updateLOD(F32 pixel_area, BOOL activate);
+ virtual void updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind = false, bool terse_update = false);
+ virtual bool updateLOD(F32 pixel_area, bool activate);
virtual void updateJointGeometry();
virtual void dump();
public:
- static BOOL sDisableLOD;
+ static bool sDisableLOD;
avatar_joint_mesh_list_t mMeshParts; //LLViewerJointMesh*
void setMeshID( S32 id ) {mMeshID = id;}
protected:
void init();
- BOOL mValid;
- BOOL mIsTransparent;
+ bool mValid;
+ bool mIsTransparent;
U32 mComponents;
F32 mMinPixelArea;
LLJointPickName mPickName;
- BOOL mVisible;
+ bool mVisible;
S32 mMeshID;
};
@@ -127,8 +127,8 @@ public:
LLAvatarJointCollisionVolume();
virtual ~LLAvatarJointCollisionVolume() {};
- /*virtual*/ BOOL inheritScale() { return TRUE; }
- /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE );
+ /*virtual*/ bool inheritScale() { return true; }
+ /*virtual*/ U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false );
void renderCollision();
diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp
index aeac33b601..69a9023994 100644
--- a/indra/llappearance/llavatarjointmesh.cpp
+++ b/indra/llappearance/llavatarjointmesh.cpp
@@ -102,7 +102,7 @@ LLSkinJoint::~LLSkinJoint()
//-----------------------------------------------------------------------------
// LLSkinJoint::setupSkinJoint()
//-----------------------------------------------------------------------------
-BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
+bool LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
{
// find the named joint
mJoint = joint;
@@ -119,7 +119,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
mRootToParentJointSkinOffset = totalSkinOffset(getBaseSkeletonAncestor(joint));
mRootToParentJointSkinOffset = -mRootToParentJointSkinOffset;
- return TRUE;
+ return true;
}
@@ -129,7 +129,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-BOOL LLAvatarJointMesh::sPipelineRender = FALSE;
+bool LLAvatarJointMesh::sPipelineRender = false;
U32 LLAvatarJointMesh::sClothingMaskImageName = 0;
LLColor4 LLAvatarJointMesh::sClothingInnerColor;
@@ -149,7 +149,7 @@ LLAvatarJointMesh::LLAvatarJointMesh()
mColor[2] = 1.0f;
mColor[3] = 1.0f;
mShiny = 0.0f;
- mCullBackFaces = TRUE;
+ mCullBackFaces = true;
mMesh = NULL;
@@ -159,11 +159,11 @@ LLAvatarJointMesh::LLAvatarJointMesh()
mFace = NULL;
mMeshID = 0;
- mUpdateXform = FALSE;
+ mUpdateXform = false;
- mValid = FALSE;
+ mValid = false;
- mIsTransparent = FALSE;
+ mIsTransparent = false;
}
@@ -182,11 +182,11 @@ LLAvatarJointMesh::~LLAvatarJointMesh()
//-----------------------------------------------------------------------------
// LLAvatarJointMesh::allocateSkinData()
//-----------------------------------------------------------------------------
-BOOL LLAvatarJointMesh::allocateSkinData( U32 numSkinJoints )
+bool LLAvatarJointMesh::allocateSkinData( U32 numSkinJoints )
{
mSkinJoints = new LLSkinJoint[ numSkinJoints ];
mNumSkinJoints = numSkinJoints;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -247,12 +247,12 @@ void LLAvatarJointMesh::setTexture( LLGLTexture *texture )
{
mLayerSet = NULL;
//texture->bindTexture(0);
- //texture->setClamp(TRUE, TRUE);
+ //texture->setClamp(true, true);
}
}
-BOOL LLAvatarJointMesh::hasGLTexture() const
+bool LLAvatarJointMesh::hasGLTexture() const
{
return mTexture.notNull() && mTexture->hasGLTexture();
}
@@ -272,7 +272,7 @@ void LLAvatarJointMesh::setLayerSet( LLTexLayerSet* layer_set )
}
}
-BOOL LLAvatarJointMesh::hasComposite() const
+bool LLAvatarJointMesh::hasComposite() const
{
return (mLayerSet && mLayerSet->hasComposite());
}
diff --git a/indra/llappearance/llavatarjointmesh.h b/indra/llappearance/llavatarjointmesh.h
index 80db7f6f15..33f50fce00 100644
--- a/indra/llappearance/llavatarjointmesh.h
+++ b/indra/llappearance/llavatarjointmesh.h
@@ -49,7 +49,7 @@ class LLSkinJoint
public:
LLSkinJoint();
~LLSkinJoint();
- BOOL setupSkinJoint( LLAvatarJoint *joint);
+ bool setupSkinJoint( LLAvatarJoint *joint);
LLAvatarJoint *mJoint;
LLVector3 mRootToJointSkinOffset;
@@ -69,7 +69,7 @@ protected:
LLTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar
U32 mTestImageName; // handle to a temporary texture for previewing uploads
LLPolyMesh* mMesh; // ptr to a global polymesh
- BOOL mCullBackFaces; // true by default
+ bool mCullBackFaces; // true by default
LLFace* mFace; // ptr to a face w/ AGP copy of mesh
U32 mFaceIndexCount;
@@ -79,7 +79,7 @@ protected:
S32 mMeshID;
public:
- static BOOL sPipelineRender;
+ static bool sPipelineRender;
//RN: this is here for testing purposes
static U32 sClothingMaskImageName;
static LLColor4 sClothingInnerColor;
@@ -104,14 +104,14 @@ public:
// Sets the shape texture
void setTexture( LLGLTexture *texture );
- BOOL hasGLTexture() const;
+ bool hasGLTexture() const;
void setTestTexture( U32 name ) { mTestImageName = name; }
// Sets layer set responsible for a dynamic shape texture (takes precedence over normal texture)
void setLayerSet( LLTexLayerSet* layer_set );
- BOOL hasComposite() const;
+ bool hasComposite() const;
// Gets the poly mesh
LLPolyMesh *getMesh();
@@ -122,20 +122,17 @@ public:
// Sets up joint matrix data for rendering
void setupJoint(LLAvatarJoint* current_joint);
- // Render time method to upload batches of joint matrices
- void uploadJointMatrices();
-
// Sets ID for picking
void setMeshID( S32 id ) {mMeshID = id;}
// Gets ID for picking
S32 getMeshID() { return mMeshID; }
- void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; }
+ void setIsTransparent(bool is_transparent) { mIsTransparent = is_transparent; }
private:
// Allocate skin data
- BOOL allocateSkinData( U32 numSkinJoints );
+ bool allocateSkinData( U32 numSkinJoints );
// Free skin data
void freeSkinData();
diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp
index 4a2db2aefb..2e933f9357 100644
--- a/indra/llappearance/lldriverparam.cpp
+++ b/indra/llappearance/lldriverparam.cpp
@@ -41,16 +41,16 @@ LLDriverParamInfo::LLDriverParamInfo() :
{
}
-BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node)
+bool LLDriverParamInfo::parseXml(LLXmlTreeNode* node)
{
llassert( node->hasName( "param" ) && node->getChildByName( "param_driver" ) );
if( !LLViewerVisualParamInfo::parseXml( node ))
- return FALSE;
+ return false;
LLXmlTreeNode* param_driver_node = node->getChildByName( "param_driver" );
if( !param_driver_node )
- return FALSE;
+ return false;
for (LLXmlTreeNode* child = param_driver_node->getChildByName( "driven" );
child;
@@ -90,10 +90,10 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node)
else
{
LL_ERRS() << "<driven> Unable to resolve driven parameter: " << driven_id << LL_ENDL;
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//virtual
@@ -187,18 +187,18 @@ LLDriverParam::~LLDriverParam()
{
}
-BOOL LLDriverParam::setInfo(LLDriverParamInfo *info)
+bool LLDriverParam::setInfo(LLDriverParamInfo *info)
{
llassert(mInfo == NULL);
if (info->mID < 0)
- return FALSE;
+ return false;
mInfo = info;
mID = info->mID;
info->mDriverParam = this;
setWeight(getDefaultWeight());
- return TRUE;
+ return true;
}
/*virtual*/ LLViewerVisualParam* LLDriverParam::cloneParam(LLWearable* wearable) const
@@ -422,7 +422,7 @@ const LLVector4a* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **po
S32 LLDriverParam::getDrivenParamsCount() const
{
- return mDriven.size();
+ return static_cast<S32>(mDriven.size());
}
const LLViewerVisualParam* LLDriverParam::getDrivenParam(S32 index) const
@@ -461,25 +461,25 @@ void LLDriverParam::stopAnimating()
for(LLDrivenEntry& driven : mDriven)
{
- driven.mParam->setAnimating(FALSE);
+ driven.mParam->setAnimating(false);
}
}
/*virtual*/
-BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params)
+bool LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross_params)
{
- BOOL success = TRUE;
+ bool success = true;
for (LLDrivenEntryInfo& driven_info : getInfo()->mDrivenInfoList)
{
S32 driven_id = driven_info.mDrivenID;
// check for already existing links. Do not overwrite.
- BOOL found = FALSE;
+ bool found = false;
for (auto& driven : mDriven)
{
if (driven.mInfo->mDrivenID == driven_id)
{
- found = TRUE;
+ found = true;
}
}
@@ -494,7 +494,7 @@ BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross
}
else
{
- success = FALSE;
+ success = false;
}
}
}
diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h
index f93660dba3..59092988dd 100644
--- a/indra/llappearance/lldriverparam.h
+++ b/indra/llappearance/lldriverparam.h
@@ -65,7 +65,7 @@ public:
LLDriverParamInfo();
/*virtual*/ ~LLDriverParamInfo() {};
- /*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
+ /*virtual*/ bool parseXml(LLXmlTreeNode* node);
/*virtual*/ void toStream(std::ostream &out);
@@ -90,7 +90,7 @@ public:
// Special: These functions are overridden by child classes
LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; }
// This sets mInfo and calls initialization functions
- BOOL setInfo(LLDriverParamInfo* info);
+ bool setInfo(LLDriverParamInfo* info);
LLAvatarAppearance* getAvatarAppearance() { return mAvatarAppearance; }
const LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; }
@@ -104,7 +104,7 @@ public:
/*virtual*/ void setWeight(F32 weight);
/*virtual*/ void setAnimationTarget(F32 target_value);
/*virtual*/ void stopAnimating();
- /*virtual*/ BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params);
+ /*virtual*/ bool linkDrivenParams(visual_param_mapper mapper, bool only_cross_params);
/*virtual*/ void resetDrivenParams();
// LLViewerVisualParam Virtual functions
@@ -130,10 +130,10 @@ protected:
LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder
entry_list_t mDriven;
- LLViewerVisualParam* mCurrentDistortionParam;
+ LLViewerVisualParam* mCurrentDistortionParam{ nullptr };
// Backlink only; don't make this an LLPointer.
- LLAvatarAppearance* mAvatarAppearance;
- LLWearable* mWearablep;
+ LLAvatarAppearance* mAvatarAppearance{ nullptr };
+ LLWearable* mWearablep{ nullptr };
};
#endif // LL_LLDRIVERPARAM_H
diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp
index dfc61382ea..f743f7b517 100644
--- a/indra/llappearance/lllocaltextureobject.cpp
+++ b/indra/llappearance/lllocaltextureobject.cpp
@@ -36,14 +36,14 @@
LLLocalTextureObject::LLLocalTextureObject() :
- mIsBakedReady(FALSE),
+ mIsBakedReady(false),
mDiscard(MAX_DISCARD_LEVEL+1)
{
mImage = NULL;
}
LLLocalTextureObject::LLLocalTextureObject(LLGLTexture* image, const LLUUID& id) :
- mIsBakedReady(FALSE),
+ mIsBakedReady(false),
mDiscard(MAX_DISCARD_LEVEL+1)
{
mImage = image;
@@ -109,7 +109,7 @@ LLTexLayer* LLLocalTextureObject::getTexLayer(const std::string &name)
U32 LLLocalTextureObject::getNumTexLayers() const
{
- return mTexLayers.size();
+ return static_cast<U32>(mTexLayers.size());
}
LLUUID LLLocalTextureObject::getID() const
@@ -122,7 +122,7 @@ S32 LLLocalTextureObject::getDiscard() const
return mDiscard;
}
-BOOL LLLocalTextureObject::getBakedReady() const
+bool LLLocalTextureObject::getBakedReady() const
{
return mIsBakedReady;
}
@@ -132,11 +132,11 @@ void LLLocalTextureObject::setImage(LLGLTexture* new_image)
mImage = new_image;
}
-BOOL LLLocalTextureObject::setTexLayer(LLTexLayer *new_tex_layer, U32 index)
+bool LLLocalTextureObject::setTexLayer(LLTexLayer *new_tex_layer, U32 index)
{
if (index >= getNumTexLayers() )
{
- return FALSE;
+ return false;
}
if (new_tex_layer == NULL)
@@ -153,47 +153,47 @@ BOOL LLLocalTextureObject::setTexLayer(LLTexLayer *new_tex_layer, U32 index)
}
mTexLayers[index] = layer;
- return TRUE;
+ return true;
}
-BOOL LLLocalTextureObject::addTexLayer(LLTexLayer *new_tex_layer, LLWearable *wearable)
+bool LLLocalTextureObject::addTexLayer(LLTexLayer *new_tex_layer, LLWearable *wearable)
{
if (new_tex_layer == NULL)
{
- return FALSE;
+ return false;
}
LLTexLayer *layer = new LLTexLayer(*new_tex_layer, wearable);
layer->setLTO(this);
mTexLayers.push_back(layer);
- return TRUE;
+ return true;
}
-BOOL LLLocalTextureObject::addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable)
+bool LLLocalTextureObject::addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable)
{
if (new_tex_layer == NULL)
{
- return FALSE;
+ return false;
}
LLTexLayer *layer = new LLTexLayer(*new_tex_layer, this, wearable);
layer->setLTO(this);
mTexLayers.push_back(layer);
- return TRUE;
+ return true;
}
-BOOL LLLocalTextureObject::removeTexLayer(U32 index)
+bool LLLocalTextureObject::removeTexLayer(U32 index)
{
if (index >= getNumTexLayers())
{
- return FALSE;
+ return false;
}
tex_layer_vec_t::iterator iter = mTexLayers.begin();
iter += index;
delete *iter;
mTexLayers.erase(iter);
- return TRUE;
+ return true;
}
void LLLocalTextureObject::setID(LLUUID new_id)
@@ -206,7 +206,7 @@ void LLLocalTextureObject::setDiscard(S32 new_discard)
mDiscard = new_discard;
}
-void LLLocalTextureObject::setBakedReady(BOOL ready)
+void LLLocalTextureObject::setBakedReady(bool ready)
{
mIsBakedReady = ready;
}
diff --git a/indra/llappearance/lllocaltextureobject.h b/indra/llappearance/lllocaltextureobject.h
index f981e73789..5505ef205a 100644
--- a/indra/llappearance/lllocaltextureobject.h
+++ b/indra/llappearance/lllocaltextureobject.h
@@ -53,17 +53,17 @@ public:
U32 getNumTexLayers() const;
LLUUID getID() const;
S32 getDiscard() const;
- BOOL getBakedReady() const;
+ bool getBakedReady() const;
void setImage(LLGLTexture* new_image);
- BOOL setTexLayer(LLTexLayer *new_tex_layer, U32 index);
- BOOL addTexLayer(LLTexLayer *new_tex_layer, LLWearable *wearable);
- BOOL addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable);
- BOOL removeTexLayer(U32 index);
+ bool setTexLayer(LLTexLayer *new_tex_layer, U32 index);
+ bool addTexLayer(LLTexLayer *new_tex_layer, LLWearable *wearable);
+ bool addTexLayer(LLTexLayerTemplate *new_tex_layer, LLWearable *wearable);
+ bool removeTexLayer(U32 index);
void setID(LLUUID new_id);
void setDiscard(S32 new_discard);
- void setBakedReady(BOOL ready);
+ void setBakedReady(bool ready);
protected:
@@ -78,7 +78,7 @@ private:
LLUUID mID;
- BOOL mIsBakedReady;
+ bool mIsBakedReady;
S32 mDiscard;
};
diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp
index 819e95ef52..719381b4fc 100644
--- a/indra/llappearance/llpolymesh.cpp
+++ b/indra/llappearance/llpolymesh.cpp
@@ -72,8 +72,8 @@ LLPolyMeshSharedData::LLPolyMeshSharedData()
mTexCoords = NULL;
mDetailTexCoords = NULL;
mWeights = NULL;
- mHasWeights = FALSE;
- mHasDetailTexCoords = FALSE;
+ mHasWeights = false;
+ mHasDetailTexCoords = false;
mNumFaces = 0;
mFaces = NULL;
@@ -225,7 +225,7 @@ U32 LLPolyMeshSharedData::getNumKB()
//-----------------------------------------------------------------------------
// LLPolyMeshSharedData::allocateVertexData()
//-----------------------------------------------------------------------------
-BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
+bool LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
{
U32 i;
mBaseCoords = (LLVector4a*) ll_aligned_malloc_16(numVertices*sizeof(LLVector4a));
@@ -243,34 +243,34 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
mWeights[i] = 0.f;
}
mNumVertices = numVertices;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// LLPolyMeshSharedData::allocateFaceData()
//-----------------------------------------------------------------------------
-BOOL LLPolyMeshSharedData::allocateFaceData( U32 numFaces )
+bool LLPolyMeshSharedData::allocateFaceData( U32 numFaces )
{
mFaces = new LLPolyFace[ numFaces ];
mNumFaces = numFaces;
mNumTriangleIndices = mNumFaces * 3;
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// LLPolyMeshSharedData::allocateJointNames()
//-----------------------------------------------------------------------------
-BOOL LLPolyMeshSharedData::allocateJointNames( U32 numJointNames )
+bool LLPolyMeshSharedData::allocateJointNames( U32 numJointNames )
{
mJointNames = new std::string[ numJointNames ];
mNumJointNames = numJointNames;
- return TRUE;
+ return true;
}
//--------------------------------------------------------------------
// LLPolyMeshSharedData::loadMesh()
//--------------------------------------------------------------------
-BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
+bool LLPolyMeshSharedData::loadMesh( const std::string& fileName )
{
//-------------------------------------------------------------------------
// Open the file
@@ -278,13 +278,13 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if(fileName.empty())
{
LL_ERRS() << "Filename is Empty!" << LL_ENDL;
- return FALSE;
+ return false;
}
LLFILE* fp = LLFile::fopen(fileName, "rb"); /*Flawfinder: ignore*/
if (!fp)
{
LL_ERRS() << "can't open: " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
//-------------------------------------------------------------------------
@@ -299,7 +299,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
//-------------------------------------------------------------------------
// Check for proper binary header
//-------------------------------------------------------------------------
- BOOL status = FALSE;
+ bool status = false;
if ( strncmp(header, HEADER_BINARY, strlen(HEADER_BINARY)) == 0 ) /*Flawfinder: ignore*/
{
LL_DEBUGS() << "Loading " << fileName << LL_ENDL;
@@ -317,11 +317,11 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
LL_ERRS() << "can't read HasWeights flag from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
if (!isLOD())
{
- mHasWeights = (hasWeights==0) ? FALSE : TRUE;
+ mHasWeights = hasWeights > 0;
}
//----------------------------------------------------------------
@@ -332,7 +332,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
LL_ERRS() << "can't read HasDetailTexCoords flag from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
//----------------------------------------------------------------
@@ -344,7 +344,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 3)
{
LL_ERRS() << "can't read Position from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
setPosition( position );
@@ -357,7 +357,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 3)
{
LL_ERRS() << "can't read RotationAngles from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
U8 rotationOrder;
@@ -366,7 +366,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
LL_ERRS() << "can't read RotationOrder from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
rotationOrder = 0;
@@ -385,7 +385,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 3)
{
LL_ERRS() << "can't read Scale from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
setScale( scale );
@@ -406,7 +406,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
LL_ERRS() << "can't read NumVertices from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
allocateVertexData( numVertices );
@@ -421,7 +421,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 3)
{
LL_ERRS() << "can't read Coordinates from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -435,7 +435,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 3)
{
LL_ERRS() << " can't read Normals from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -449,7 +449,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 3)
{
LL_ERRS() << " can't read Binormals from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -461,7 +461,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != numVertices)
{
LL_ERRS() << "can't read TexCoords from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
//----------------------------------------------------------------
@@ -474,7 +474,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != numVertices)
{
LL_ERRS() << "can't read DetailTexCoords from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -488,7 +488,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != numVertices)
{
LL_ERRS() << "can't read Weights from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
}
}
@@ -502,7 +502,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
LL_ERRS() << "can't read NumFaces from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
allocateFaceData( numFaces );
@@ -520,7 +520,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 3)
{
LL_ERRS() << "can't read Face[" << i << "] from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
if (mReferenceData)
{
@@ -577,7 +577,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
LL_ERRS() << "can't read NumSkinJoints from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
allocateJointNames( numSkinJoints );
}
@@ -593,7 +593,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
LL_ERRS() << "can't read Skin[" << i << "].Name from " << fileName << LL_ENDL;
- return FALSE;
+ return false;
}
std::string *jn = &mJointNames[i];
@@ -615,7 +615,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
std::string morph_name(morphName);
LLPolyMorphData* morph_data = new LLPolyMorphData(morph_name);
- BOOL result = morph_data->loadBinary(fp, this);
+ bool result = morph_data->loadBinary(fp, this);
if (!result)
{
@@ -705,12 +705,12 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
}
}
- status = TRUE;
+ status = true;
}
else
{
LL_ERRS() << "invalid mesh file header: " << fileName << LL_ENDL;
- status = FALSE;
+ status = false;
}
if (0 == mNumJointNames)
@@ -983,7 +983,7 @@ void LLPolyMesh::initializeForMorph()
LLVector4a::memcpyNonAliased16((F32*) mScaledBinormals, (F32*) mSharedData->mBaseNormals, sizeof(LLVector4a) * mSharedData->mNumVertices);
memcpy((F32*) mTexCoords, (F32*) mSharedData->mTexCoords, sizeof(LLVector2) * (mSharedData->mNumVertices)); // allocated in LLPolyMeshSharedData::allocateVertexData
- for (U32 i = 0; i < mSharedData->mNumVertices; ++i)
+ for (S32 i = 0; i < mSharedData->mNumVertices; ++i)
{
mClothingWeights[i].clear();
}
diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h
index b8906e378f..5f8b4eab02 100644
--- a/indra/llappearance/llpolymesh.h
+++ b/indra/llappearance/llpolymesh.h
@@ -79,8 +79,8 @@ private:
LLVector2 *mDetailTexCoords;
F32 *mWeights;
- BOOL mHasWeights;
- BOOL mHasDetailTexCoords;
+ bool mHasWeights;
+ bool mHasDetailTexCoords;
// face data
S32 mNumFaces;
@@ -119,17 +119,17 @@ private:
void setRotation( const LLQuaternion &rot ) { mRotation = rot; }
void setScale( const LLVector3 &scale ) { mScale = scale; }
- BOOL allocateVertexData( U32 numVertices );
+ bool allocateVertexData( U32 numVertices );
- BOOL allocateFaceData( U32 numFaces );
+ bool allocateFaceData( U32 numFaces );
- BOOL allocateJointNames( U32 numJointNames );
+ bool allocateJointNames( U32 numJointNames );
// Retrieve the number of KB of memory used by this instance
U32 getNumKB();
// Load mesh data from file
- BOOL loadMesh( const std::string& fileName );
+ bool loadMesh( const std::string& fileName );
public:
void genIndices(S32 offset);
@@ -138,7 +138,7 @@ public:
const S32 *getSharedVert(S32 vert);
- BOOL isLOD() { return (mReferenceData != NULL); }
+ bool isLOD() { return (mReferenceData != NULL); }
};
@@ -204,13 +204,13 @@ public:
}
// Returns whether or not the mesh has detail texture coords
- BOOL hasDetailTexCoords() {
+ bool hasDetailTexCoords() {
llassert (mSharedData);
return mSharedData->mHasDetailTexCoords;
}
// Returns whether or not the mesh has vertex weights
- BOOL hasWeights() const{
+ bool hasWeights() const{
llassert (mSharedData);
return mSharedData->mHasWeights;
}
@@ -316,7 +316,7 @@ public:
// Get indices
U32* getIndices() { return mSharedData ? mSharedData->mTriangleIndices : NULL; }
- BOOL isLOD() { return mSharedData && mSharedData->isLOD(); }
+ bool isLOD() { return mSharedData && mSharedData->isLOD(); }
void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; }
LLAvatarAppearance* getAvatar() { return mAvatarp; }
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp
index c780778c7b..7ae760d312 100644
--- a/indra/llappearance/llpolymorph.cpp
+++ b/indra/llappearance/llpolymorph.cpp
@@ -104,17 +104,17 @@ LLPolyMorphData::~LLPolyMorphData()
//-----------------------------------------------------------------------------
// loadBinary()
//-----------------------------------------------------------------------------
-BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
+bool LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
{
S32 numVertices;
- S32 numRead;
+ size_t numRead;
numRead = fread(&numVertices, sizeof(S32), 1, fp);
llendianswizzle(&numVertices, sizeof(S32), 1);
if (numRead != 1)
{
LL_WARNS() << "Can't read number of morph target vertices" << LL_ENDL;
- return FALSE;
+ return false;
}
//-------------------------------------------------------------------------
@@ -151,14 +151,14 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
if (numRead != 1)
{
LL_WARNS() << "Can't read morph target vertex number" << LL_ENDL;
- return FALSE;
+ return false;
}
if (mVertexIndices[v] > 10000)
{
// Bad install? These are usually .llm files from 'character' fodler
LL_WARNS() << "Bad morph index " << v << ": " << mVertexIndices[v] << LL_ENDL;
- return FALSE;
+ return false;
}
@@ -167,7 +167,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
if (numRead != 3)
{
LL_WARNS() << "Can't read morph target vertex coordinates" << LL_ENDL;
- return FALSE;
+ return false;
}
F32 magnitude = mCoords[v].getLength3().getF32();
@@ -187,7 +187,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
if (numRead != 3)
{
LL_WARNS() << "Can't read morph target normal" << LL_ENDL;
- return FALSE;
+ return false;
}
numRead = fread(&mBinormals[v], sizeof(F32), 3, fp);
@@ -195,7 +195,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
if (numRead != 3)
{
LL_WARNS() << "Can't read morph target binormal" << LL_ENDL;
- return FALSE;
+ return false;
}
@@ -204,7 +204,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
if (numRead != 2)
{
LL_WARNS() << "Can't read morph target uv" << LL_ENDL;
- return FALSE;
+ return false;
}
mNumIndices++;
@@ -213,7 +213,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
mAvgDistortion.mul(1.f/(F32)mNumIndices);
mAvgDistortion.normalize3fast();
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -256,23 +256,23 @@ void LLPolyMorphData::freeData()
// LLPolyMorphTargetInfo()
//-----------------------------------------------------------------------------
LLPolyMorphTargetInfo::LLPolyMorphTargetInfo()
- : mIsClothingMorph(FALSE)
+ : mIsClothingMorph(false)
{
}
-BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
+bool LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
{
llassert( node->hasName( "param" ) && node->getChildByName( "param_morph" ) );
if (!LLViewerVisualParamInfo::parseXml(node))
- return FALSE;
+ return false;
// Get mixed-case name
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if( !node->getFastAttributeString( name_string, mMorphName ) )
{
LL_WARNS() << "Avatar file: <param> is missing name attribute" << LL_ENDL;
- return FALSE; // Continue, ignoring this tag
+ return false; // Continue, ignoring this tag
}
static LLStdStringHandle clothing_morph_string = LLXmlTree::addAttributeString("clothing_morph");
@@ -284,7 +284,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
{
LL_WARNS() << "Failed to getChildByName(\"param_morph\")"
<< LL_ENDL;
- return FALSE;
+ return false;
}
for (LLXmlTreeNode* child_node = paramNode->getFirstChild();
@@ -310,7 +310,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -353,11 +353,11 @@ LLPolyMorphTarget::~LLPolyMorphTarget()
//-----------------------------------------------------------------------------
// setInfo()
//-----------------------------------------------------------------------------
-BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
+bool LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
{
llassert(mInfo == NULL);
if (info->mID < 0)
- return FALSE;
+ return false;
mInfo = info;
mID = info->mID;
setWeight(getDefaultWeight());
@@ -384,8 +384,8 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
if (!mMorphData)
{
const std::string driven_tag = "_Driven";
- U32 pos = morph_param_name.find(driven_tag);
- if (pos > 0)
+ auto pos = morph_param_name.find(driven_tag);
+ if (pos != std::string::npos && pos > 0)
{
morph_param_name = morph_param_name.substr(0,pos);
mMorphData = mMesh->getMorphData(morph_param_name);
@@ -394,9 +394,9 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
if (!mMorphData)
{
LL_WARNS() << "No morph target named " << morph_param_name << " found in mesh." << LL_ENDL;
- return FALSE; // Continue, ignoring this tag
+ return false; // Continue, ignoring this tag
}
- return TRUE;
+ return true;
}
/*virtual*/ LLViewerVisualParam* LLPolyMorphTarget::cloneParam(LLWearable* wearable) const
@@ -408,7 +408,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
//-----------------------------------------------------------------------------
// parseData()
//-----------------------------------------------------------------------------
-BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node)
+bool LLPolyMorphTarget::parseData(LLXmlTreeNode* node)
{
LLPolyMorphTargetInfo* info = new LLPolyMorphTargetInfo;
@@ -416,9 +416,9 @@ BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node)
if (!setInfo(info))
{
delete info;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif
@@ -659,7 +659,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
//-----------------------------------------------------------------------------
// applyMask()
//-----------------------------------------------------------------------------
-void LLPolyMorphTarget::applyMask(U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert)
+void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert)
{
LLVector4a *clothing_weights = getInfo()->mIsClothingMorph ? mMesh->getWritableClothingWeights() : NULL;
@@ -749,7 +749,7 @@ void LLPolyMorphTarget::applyVolumeChanges(F32 delta_weight)
LLPolyVertexMask::LLPolyVertexMask(LLPolyMorphData* morph_data)
: mWeights(new F32[morph_data->mNumIndices]),
mMorphData(morph_data),
- mWeightsGenerated(FALSE)
+ mWeightsGenerated(false)
{
llassert(mMorphData != NULL);
llassert(mMorphData->mNumIndices > 0);
@@ -780,10 +780,10 @@ LLPolyVertexMask::~LLPolyVertexMask()
//-----------------------------------------------------------------------------
// generateMask()
//-----------------------------------------------------------------------------
-void LLPolyVertexMask::generateMask(U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights)
+void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights)
{
// RN debug output that uses Image Debugger (http://www.cs.unc.edu/~baxter/projects/imdebug/)
-// BOOL debugImg = FALSE;
+// bool debugImg = false;
// if (debugImg)
// {
// if (invert)
@@ -827,7 +827,7 @@ void LLPolyVertexMask::generateMask(U8 *maskTextureData, S32 width, S32 height,
clothing_weights[vertIndex].getF32ptr()[VW] = mWeights[index];
}
}
- mWeightsGenerated = TRUE;
+ mWeightsGenerated = true;
}
//-----------------------------------------------------------------------------
diff --git a/indra/llappearance/llpolymorph.h b/indra/llappearance/llpolymorph.h
index 5235e83097..8c76689f2c 100644
--- a/indra/llappearance/llpolymorph.h
+++ b/indra/llappearance/llpolymorph.h
@@ -49,7 +49,7 @@ public:
~LLPolyMorphData();
LLPolyMorphData(const LLPolyMorphData &rhs);
- BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
+ bool loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
const std::string& getName() { return mName; }
public:
@@ -84,14 +84,14 @@ public:
LLPolyVertexMask(const LLPolyVertexMask& pOther);
~LLPolyVertexMask();
- void generateMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights);
+ void generateMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights);
F32* getMorphMaskWeights();
protected:
F32* mWeights;
LLPolyMorphData *mMorphData;
- BOOL mWeightsGenerated;
+ bool mWeightsGenerated;
};
@@ -129,11 +129,11 @@ public:
LLPolyMorphTargetInfo();
/*virtual*/ ~LLPolyMorphTargetInfo() {};
- /*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
+ /*virtual*/ bool parseXml(LLXmlTreeNode* node);
protected:
std::string mMorphName;
- BOOL mIsClothingMorph;
+ bool mIsClothingMorph;
typedef std::vector<LLPolyVolumeMorphInfo> volume_info_list_t;
volume_info_list_t mVolumeInfoList;
};
@@ -154,12 +154,12 @@ public:
// Special: These functions are overridden by child classes
LLPolyMorphTargetInfo* getInfo() const { return (LLPolyMorphTargetInfo*)mInfo; }
// This sets mInfo and calls initialization functions
- BOOL setInfo(LLPolyMorphTargetInfo *info);
+ bool setInfo(LLPolyMorphTargetInfo *info);
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex sex );
// LLViewerVisualParam Virtual functions
@@ -170,7 +170,7 @@ public:
/*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh);
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh);
- void applyMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert);
+ void applyMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert);
void addPendingMorphMask() { mNumMorphMasksPending++; }
void applyVolumeChanges(F32 delta_weight); // SL-315 - for resetSkeleton()
@@ -183,7 +183,7 @@ protected:
LLPolyVertexMask * mVertMask;
ESex mLastSex;
// number of morph masks that haven't been generated, must be 0 before this morph is applied
- BOOL mNumMorphMasksPending;
+ S32 mNumMorphMasksPending;
typedef std::vector<LLPolyVolumeMorph> volume_list_t;
volume_list_t mVolumeMorphs;
diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index 1d2ff6ef4f..18c64282f1 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -45,12 +45,12 @@ LLPolySkeletalDistortionInfo::LLPolySkeletalDistortionInfo()
{
}
-BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
+bool LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
{
llassert( node->hasName( "param" ) && node->getChildByName( "param_skeleton" ) );
if (!LLViewerVisualParamInfo::parseXml(node))
- return FALSE;
+ return false;
LLXmlTreeNode* skeletalParam = node->getChildByName("param_skeleton");
@@ -58,7 +58,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
{
LL_WARNS() << "Failed to getChildByName(\"param_skeleton\")"
<< LL_ENDL;
- return FALSE;
+ return false;
}
for( LLXmlTreeNode* bone = skeletalParam->getFirstChild(); bone; bone = skeletalParam->getNextChild() )
@@ -68,7 +68,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
std::string name;
LLVector3 scale;
LLVector3 pos;
- BOOL haspos = FALSE;
+ bool haspos = false;
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!bone->getFastAttributeString(name_string, name))
@@ -88,7 +88,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle offset_string = LLXmlTree::addAttributeString("offset");
if (bone->getFastAttributeVector3(offset_string, pos))
{
- haspos = TRUE;
+ haspos = true;
}
mBoneInfoList.push_back(LLPolySkeletalBoneInfo(name, scale, pos, haspos));
}
@@ -98,7 +98,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
continue;
}
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
@@ -133,11 +133,11 @@ LLPolySkeletalDistortion::~LLPolySkeletalDistortion()
{
}
-BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
+bool LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
{
if (info->mID < 0)
{
- return FALSE;
+ return false;
}
mInfo = info;
mID = info->mID;
@@ -151,7 +151,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
// There's no point continuing after this error - means
// that either the skeleton or lad file is broken.
LL_WARNS() << "Joint " << bone_info.mBoneName << " not found." << LL_ENDL;
- return FALSE;
+ return false;
}
// store it
@@ -174,7 +174,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
mJointOffsets[joint] = bone_info.mPositionDeformation;
}
}
- return TRUE;
+ return true;
}
/*virtual*/ LLViewerVisualParam* LLPolySkeletalDistortion::cloneParam(LLWearable* wearable) const
diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h
index 818c363c39..9ba4cf66e9 100644
--- a/indra/llappearance/llpolyskeletaldistortion.h
+++ b/indra/llappearance/llpolyskeletaldistortion.h
@@ -51,7 +51,7 @@ class LLAvatarAppearance;
//-----------------------------------------------------------------------------
struct LLPolySkeletalBoneInfo
{
- LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, BOOL haspos)
+ LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, bool haspos)
: mBoneName(name),
mScaleDeformation(scale),
mPositionDeformation(pos),
@@ -59,7 +59,7 @@ struct LLPolySkeletalBoneInfo
std::string mBoneName;
LLVector3 mScaleDeformation;
LLVector3 mPositionDeformation;
- BOOL mHasPositionDeformation;
+ bool mHasPositionDeformation;
};
class alignas(16) LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
@@ -71,7 +71,7 @@ public:
LLPolySkeletalDistortionInfo();
/*virtual*/ ~LLPolySkeletalDistortionInfo() {};
- /*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
+ /*virtual*/ bool parseXml(LLXmlTreeNode* node);
protected:
typedef std::vector<LLPolySkeletalBoneInfo> bone_info_list_t;
@@ -92,12 +92,12 @@ public:
// Special: These functions are overridden by child classes
LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; }
// This sets mInfo and calls initialization functions
- BOOL setInfo(LLPolySkeletalDistortionInfo *info);
+ bool setInfo(LLPolySkeletalDistortionInfo *info);
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex sex );
// LLViewerVisualParam Virtual functions
diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp
index a90e159820..e39a856b78 100644
--- a/indra/llappearance/lltexglobalcolor.cpp
+++ b/indra/llappearance/lltexglobalcolor.cpp
@@ -48,7 +48,7 @@ LLTexGlobalColor::~LLTexGlobalColor()
//std::for_each(mParamColorList.begin(), mParamColorList.end(), DeletePointer());
}
-BOOL LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info)
+bool LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info)
{
llassert(mInfo == NULL);
mInfo = info;
@@ -58,15 +58,15 @@ BOOL LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info)
for (LLTexLayerParamColorInfo* color_info : mInfo->mParamColorInfoList)
{
LLTexParamGlobalColor* param_color = new LLTexParamGlobalColor(this);
- if (!param_color->setInfo(color_info, TRUE))
+ if (!param_color->setInfo(color_info, true))
{
mInfo = NULL;
- return FALSE;
+ return false;
}
mParamGlobalColorList.push_back(param_color);
}
- return TRUE;
+ return true;
}
LLColor4 LLTexGlobalColor::getColor() const
@@ -135,14 +135,14 @@ LLTexGlobalColorInfo::~LLTexGlobalColorInfo()
mParamColorInfoList.clear();
}
-BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
+bool LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
{
// name attribute
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
LL_WARNS() << "<global_color> element is missing name attribute." << LL_ENDL;
- return FALSE;
+ return false;
}
// <param> sub-element
for (LLXmlTreeNode* child = node->getChildByName("param");
@@ -156,10 +156,10 @@ BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
if (!info->parseXml(child))
{
delete info;
- return FALSE;
+ return false;
}
mParamColorInfoList.push_back(info);
}
}
- return TRUE;
+ return true;
}
diff --git a/indra/llappearance/lltexglobalcolor.h b/indra/llappearance/lltexglobalcolor.h
index 183eb47a4a..7561ea7df9 100644
--- a/indra/llappearance/lltexglobalcolor.h
+++ b/indra/llappearance/lltexglobalcolor.h
@@ -42,7 +42,7 @@ public:
LLTexGlobalColorInfo* getInfo() const { return mInfo; }
// This sets mInfo and calls initialization functions
- BOOL setInfo(LLTexGlobalColorInfo *info);
+ bool setInfo(LLTexGlobalColorInfo *info);
LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; }
LLColor4 getColor() const;
@@ -62,7 +62,7 @@ public:
LLTexGlobalColorInfo();
~LLTexGlobalColorInfo();
- BOOL parseXml(LLXmlTreeNode* node);
+ bool parseXml(LLXmlTreeNode* node);
private:
param_color_info_list_t mParamColorInfoList;
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index 4fc9ada15e..27656c8302 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -59,17 +59,17 @@ public:
LLTexLayerInfo();
~LLTexLayerInfo();
- BOOL parseXml(LLXmlTreeNode* node);
- BOOL createVisualParams(LLAvatarAppearance *appearance);
- BOOL isUserSettable() { return mLocalTexture != -1; }
+ bool parseXml(LLXmlTreeNode* node);
+ bool createVisualParams(LLAvatarAppearance *appearance);
+ bool isUserSettable() { return mLocalTexture != -1; }
S32 getLocalTexture() const { return mLocalTexture; }
- BOOL getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; }
+ bool getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; }
std::string getName() const { return mName; }
private:
std::string mName;
- BOOL mWriteAllChannels; // Don't use masking. Just write RGBA into buffer,
+ bool mWriteAllChannels; // Don't use masking. Just write RGBA into buffer,
LLTexLayerInterface::ERenderPass mRenderPass;
std::string mGlobalColor;
@@ -77,11 +77,11 @@ private:
S32 mLocalTexture;
std::string mStaticImageFileName;
- BOOL mStaticImageIsMask;
- BOOL mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask
- BOOL mIsVisibilityMask;
+ bool mStaticImageIsMask;
+ bool mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask
+ bool mIsVisibilityMask;
- typedef std::vector< std::pair< std::string,BOOL > > morph_name_list_t;
+ typedef std::vector< std::pair< std::string,bool > > morph_name_list_t;
morph_name_list_t mMorphNameList;
param_color_info_list_t mParamColorInfoList;
param_alpha_info_list_t mParamAlphaInfoList;
@@ -130,17 +130,17 @@ void LLTexLayerSetBuffer::preRenderTexLayerSet()
}
// virtual
-void LLTexLayerSetBuffer::postRenderTexLayerSet(BOOL success)
+void LLTexLayerSetBuffer::postRenderTexLayerSet(bool success)
{
popProjection();
}
-BOOL LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target)
+bool LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target)
{
// Default color mask for tex layer render
gGL.setColorMask(true, true);
- BOOL success = TRUE;
+ bool success = true;
gAlphaMaskProgram.bind();
gAlphaMaskProgram.setMinimumAlpha(0.004f);
@@ -175,7 +175,7 @@ LLTexLayerSetInfo::LLTexLayerSetInfo() :
mBodyRegion( "" ),
mWidth( 512 ),
mHeight( 512 ),
- mClearAlpha( TRUE )
+ mClearAlpha( true )
{
}
@@ -185,12 +185,12 @@ LLTexLayerSetInfo::~LLTexLayerSetInfo( )
mLayerInfoList.clear();
}
-BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node)
+bool LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node)
{
llassert( node->hasName( "layer_set" ) );
if( !node->hasName( "layer_set" ) )
{
- return FALSE;
+ return false;
}
// body_region
@@ -198,20 +198,20 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node)
if( !node->getFastAttributeString( body_region_string, mBodyRegion ) )
{
LL_WARNS() << "<layer_set> is missing body_region attribute" << LL_ENDL;
- return FALSE;
+ return false;
}
// width, height
static LLStdStringHandle width_string = LLXmlTree::addAttributeString("width");
if( !node->getFastAttributeS32( width_string, mWidth ) )
{
- return FALSE;
+ return false;
}
static LLStdStringHandle height_string = LLXmlTree::addAttributeString("height");
if( !node->getFastAttributeS32( height_string, mHeight ) )
{
- return FALSE;
+ return false;
}
// Optional alpha component to apply after all compositing is complete.
@@ -230,11 +230,11 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node)
if( !info->parseXml( child ))
{
delete info;
- return FALSE;
+ return false;
}
mLayerInfoList.push_back( info );
}
- return TRUE;
+ return true;
}
// creates visual params without generating layersets or layers
@@ -252,11 +252,11 @@ void LLTexLayerSetInfo::createVisualParams(LLAvatarAppearance *appearance)
// An ordered set of texture layers that get composited into a single texture.
//-----------------------------------------------------------------------------
-BOOL LLTexLayerSet::sHasCaches = FALSE;
+bool LLTexLayerSet::sHasCaches = false;
LLTexLayerSet::LLTexLayerSet(LLAvatarAppearance* const appearance) :
mAvatarAppearance( appearance ),
- mIsVisible( TRUE ),
+ mIsVisible( true ),
mBakedTexIndex(LLAvatarAppearanceDefines::BAKED_HEAD),
mInfo( NULL )
{
@@ -277,7 +277,7 @@ LLTexLayerSet::~LLTexLayerSet()
// setInfo
//-----------------------------------------------------------------------------
-BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
+bool LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
{
llassert(mInfo == NULL);
mInfo = info;
@@ -299,7 +299,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
if (!layer->setInfo(layer_info, NULL))
{
mInfo = NULL;
- return FALSE;
+ return false;
}
if (!layer->isVisibilityMask())
{
@@ -315,7 +315,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
stop_glerror();
- return TRUE;
+ return true;
}
#if 0 // obsolete
@@ -323,21 +323,21 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
// parseData
//-----------------------------------------------------------------------------
-BOOL LLTexLayerSet::parseData(LLXmlTreeNode* node)
+bool LLTexLayerSet::parseData(LLXmlTreeNode* node)
{
LLTexLayerSetInfo *info = new LLTexLayerSetInfo;
if (!info->parseXml(node))
{
delete info;
- return FALSE;
+ return false;
}
if (!setInfo(info))
{
delete info;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif
@@ -354,10 +354,10 @@ void LLTexLayerSet::deleteCaches()
}
-BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target )
+bool LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target )
{
- BOOL success = TRUE;
- mIsVisible = TRUE;
+ bool success = true;
+ mIsVisible = true;
if (mMaskLayerList.size() > 0)
{
@@ -365,7 +365,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
{
if (layer->isInvisibleAlphaMask())
{
- mIsVisible = FALSE;
+ mIsVisible = false;
}
}
}
@@ -425,7 +425,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget*
}
-BOOL LLTexLayerSet::isBodyRegion(const std::string& region) const
+bool LLTexLayerSet::isBodyRegion(const std::string& region) const
{
return mInfo->mBodyRegion == region;
}
@@ -484,7 +484,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
{
gGL.flush();
{
- LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, TRUE);
+ LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, true);
if( tex )
{
LLGLSUIDefault gls_ui;
@@ -528,21 +528,21 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
-void LLTexLayerSet::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components)
+void LLTexLayerSet::applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components)
{
mAvatarAppearance->applyMorphMask(tex_data, width, height, num_components, mBakedTexIndex);
}
-BOOL LLTexLayerSet::isMorphValid() const
+bool LLTexLayerSet::isMorphValid() const
{
for(const LLTexLayerInterface* layer : mLayerList)
{
if (layer && !layer->isMorphValid())
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void LLTexLayerSet::invalidateMorphMasks()
@@ -561,13 +561,13 @@ void LLTexLayerSet::invalidateMorphMasks()
// LLTexLayerInfo
//-----------------------------------------------------------------------------
LLTexLayerInfo::LLTexLayerInfo() :
- mWriteAllChannels( FALSE ),
+ mWriteAllChannels( false ),
mRenderPass(LLTexLayer::RP_COLOR),
mFixedColor( 0.f, 0.f, 0.f, 0.f ),
mLocalTexture( -1 ),
- mStaticImageIsMask( FALSE ),
- mUseLocalTextureAlphaOnly(FALSE),
- mIsVisibilityMask(FALSE)
+ mStaticImageIsMask( false ),
+ mUseLocalTextureAlphaOnly(false),
+ mIsVisibilityMask(false)
{
}
@@ -579,7 +579,7 @@ LLTexLayerInfo::~LLTexLayerInfo( )
mParamAlphaInfoList.clear();
}
-BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
+bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
{
llassert( node->hasName( "layer" ) );
@@ -587,7 +587,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if( !node->getFastAttributeString( name_string, mName ) )
{
- return FALSE;
+ return false;
}
static LLStdStringHandle write_all_channels_string = LLXmlTree::addAttributeString("write_all_channels");
@@ -609,7 +609,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
node->getFastAttributeString( global_color_string, mGlobalColor );
// Visibility mask (optional)
- BOOL is_visibility;
+ bool is_visibility;
static LLStdStringHandle visibility_mask_string = LLXmlTree::addAttributeString("visibility_mask");
if (node->getFastAttributeBOOL(visibility_mask_string, is_visibility))
{
@@ -657,13 +657,13 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
if (mLocalTexture == TEX_NUM_INDICES)
{
LL_WARNS() << "<texture> element has invalid local_texture attribute: " << mName << " " << local_texture_name << LL_ENDL;
- return FALSE;
+ return false;
}
}
else
{
LL_WARNS() << "<texture> element is missing a required attribute. " << mName << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -675,10 +675,10 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle morph_name_string = LLXmlTree::addAttributeString("morph_name");
if (maskNode->getFastAttributeString(morph_name_string, morph_name))
{
- BOOL invert = FALSE;
+ bool invert = false;
static LLStdStringHandle invert_string = LLXmlTree::addAttributeString("invert");
maskNode->getFastAttributeBOOL(invert_string, invert);
- mMorphNameList.push_back(std::pair<std::string,BOOL>(morph_name,invert));
+ mMorphNameList.push_back(std::pair<std::string,bool>(morph_name,invert));
}
}
@@ -694,7 +694,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
if (!info->parseXml(child))
{
delete info;
- return FALSE;
+ return false;
}
mParamColorInfoList.push_back(info);
}
@@ -705,37 +705,37 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
if (!info->parseXml(child))
{
delete info;
- return FALSE;
+ return false;
}
mParamAlphaInfoList.push_back(info);
}
}
- return TRUE;
+ return true;
}
-BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
+bool LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
{
- BOOL success = TRUE;
+ bool success = true;
for (LLTexLayerParamColorInfo* color_info : mParamColorInfoList)
{
LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance);
- if (!param_color->setInfo(color_info, TRUE))
+ if (!param_color->setInfo(color_info, true))
{
LL_WARNS() << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_color;
- success = FALSE;
+ success = false;
}
}
for (LLTexLayerParamAlphaInfo* alpha_info : mParamAlphaInfoList)
{
LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance);
- if (!param_alpha->setInfo(alpha_info, TRUE))
+ if (!param_alpha->setInfo(alpha_info, true))
{
LL_WARNS() << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_alpha;
- success = FALSE;
+ success = false;
}
}
@@ -744,9 +744,9 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
LLTexLayerInterface::LLTexLayerInterface(LLTexLayerSet* const layer_set):
mTexLayerSet( layer_set ),
- mMorphMasksValid( FALSE ),
+ mMorphMasksValid( false ),
mInfo(NULL),
- mHasMorph(FALSE)
+ mHasMorph(false)
{
}
@@ -760,7 +760,7 @@ LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWea
mHasMorph = layer.mHasMorph;
}
-BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions
+bool LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions
{
// setInfo should only be called once. Code is not robust enough to handle redefinition of a texlayer.
// Not a critical warning, but could be useful for debugging later issues. -Nyx
@@ -778,10 +778,10 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!wearable)
{
param_color = new LLTexLayerParamColor(this);
- if (!param_color->setInfo(color_info, TRUE))
+ if (!param_color->setInfo(color_info, true))
{
mInfo = NULL;
- return FALSE;
+ return false;
}
}
else
@@ -790,7 +790,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!param_color)
{
mInfo = NULL;
- return FALSE;
+ return false;
}
}
mParamColorList.push_back( param_color );
@@ -803,10 +803,10 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!wearable)
{
param_alpha = new LLTexLayerParamAlpha( this );
- if (!param_alpha->setInfo(alpha_info, TRUE))
+ if (!param_alpha->setInfo(alpha_info, true))
{
mInfo = NULL;
- return FALSE;
+ return false;
}
}
else
@@ -815,13 +815,13 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
if (!param_alpha)
{
mInfo = NULL;
- return FALSE;
+ return false;
}
}
mParamAlphaList.push_back( param_alpha );
}
- return TRUE;
+ return true;
}
/*virtual*/ void LLTexLayerInterface::requestUpdate()
@@ -893,14 +893,14 @@ const std::string& LLTexLayerInterface::getGlobalColor() const
return mInfo->mGlobalColor;
}
-BOOL LLTexLayerInterface::isVisibilityMask() const
+bool LLTexLayerInterface::isVisibilityMask() const
{
return mInfo->mIsVisibilityMask;
}
void LLTexLayerInterface::invalidateMorphMasks()
{
- mMorphMasksValid = FALSE;
+ mMorphMasksValid = false;
}
LLViewerVisualParam* LLTexLayerInterface::getVisualParamPtr(S32 index) const
@@ -980,7 +980,7 @@ void LLTexLayer::asLLSD(LLSD& sd) const
// setInfo
//-----------------------------------------------------------------------------
-BOOL LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
+bool LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
{
return LLTexLayerInterface::setInfo(info, wearable);
}
@@ -1020,14 +1020,14 @@ void LLTexLayer::calculateTexLayerColor(const param_color_list_t &param_list, LL
}
}
-BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
+bool LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
{
// *TODO: Is this correct?
//gPipeline.disableLights();
stop_glerror();
LLColor4 net_color;
- BOOL color_specified = findNetColor(&net_color);
+ bool color_specified = findNetColor(&net_color);
if (mTexLayerSet->getAvatarAppearance()->mIsDummy)
{
@@ -1035,15 +1035,15 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
net_color = LLAvatarAppearance::getDummyColor();
}
- BOOL success = TRUE;
+ bool success = true;
// If you can't see the layer, don't render it.
- if( is_approx_zero( net_color.mV[VW] ) )
+ if( is_approx_zero( net_color.mV[VALPHA] ) )
{
return success;
}
- BOOL alpha_mask_specified = FALSE;
+ bool alpha_mask_specified = false;
param_alpha_list_t::const_iterator iter = mParamAlphaList.begin();
if( iter != mParamAlphaList.end() )
{
@@ -1051,7 +1051,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
// However, we can't do this optimization if we have morph masks that need updating.
/* if (!mHasMorph)
{
- BOOL skip_layer = TRUE;
+ bool skip_layer = true;
while( iter != mParamAlphaList.end() )
{
@@ -1059,7 +1059,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
if( !param->getSkip() )
{
- skip_layer = FALSE;
+ skip_layer = false;
break;
}
@@ -1074,7 +1074,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
const bool force_render = true;
renderMorphMasks(x, y, width, height, net_color, bound_target, force_render);
- alpha_mask_specified = TRUE;
+ alpha_mask_specified = true;
gGL.flush();
gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA);
}
@@ -1115,7 +1115,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@@ -1130,7 +1130,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
}
// else
// {
-// success = FALSE;
+// success = false;
// }
}
}
@@ -1141,13 +1141,13 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
if( tex )
{
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
else
{
- success = FALSE;
+ success = false;
}
}
}
@@ -1199,7 +1199,7 @@ const U8* LLTexLayer::getAlphaData() const
return (iter2 == mAlphaCache.end()) ? 0 : iter2->second;
}
-BOOL LLTexLayer::findNetColor(LLColor4* net_color) const
+bool LLTexLayer::findNetColor(LLColor4* net_color) const
{
// Color is either:
// * one or more color parameters (weighted colors) (which may make use of a global color or fixed color)
@@ -1213,7 +1213,7 @@ BOOL LLTexLayer::findNetColor(LLColor4* net_color) const
{
net_color->setVec( mTexLayerSet->getAvatarAppearance()->getGlobalColor( getInfo()->mGlobalColor ) );
}
- else if (getInfo()->mFixedColor.mV[VW])
+ else if (getInfo()->mFixedColor.mV[VALPHA])
{
net_color->setVec( getInfo()->mFixedColor );
}
@@ -1223,29 +1223,29 @@ BOOL LLTexLayer::findNetColor(LLColor4* net_color) const
}
calculateTexLayerColor(mParamColorList, *net_color);
- return TRUE;
+ return true;
}
if( !getGlobalColor().empty() )
{
net_color->setVec( mTexLayerSet->getAvatarAppearance()->getGlobalColor( getGlobalColor() ) );
- return TRUE;
+ return true;
}
- if( getInfo()->mFixedColor.mV[VW] )
+ if( getInfo()->mFixedColor.mV[VALPHA] )
{
net_color->setVec( getInfo()->mFixedColor );
- return TRUE;
+ return true;
}
net_color->setToWhite();
- return FALSE; // No need to draw a separate colored polygon
+ return false; // No need to draw a separate colored polygon
}
-BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
+bool LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
{
- BOOL success = TRUE;
+ bool success = true;
gGL.flush();
@@ -1255,14 +1255,14 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
if( tex )
{
gAlphaMaskProgram.setMinimumAlpha(0.f);
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
else
{
- success = FALSE;
+ success = false;
}
}
else
@@ -1297,7 +1297,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
return;
}
LL_PROFILE_ZONE_SCOPED;
- BOOL success = TRUE;
+ bool success = true;
llassert( !mParamAlphaList.empty() );
@@ -1342,7 +1342,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@@ -1359,7 +1359,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
if( (tex->getComponents() == 4) || (tex->getComponents() == 1) )
{
- gGL.getTexUnit(0)->bind(tex, TRUE);
+ gGL.getTexUnit(0)->bind(tex, true);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -1373,7 +1373,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
// Draw a rectangle with the layer color to multiply the alpha by that color's alpha.
// Note: we're still using gGL.blendFunc( GL_DST_ALPHA, GL_ZERO );
- if ( !is_approx_equal(layer_color.mV[VW], 1.f) )
+ if ( !is_approx_equal(layer_color.mV[VALPHA], 1.f) )
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4fv(layer_color.mV);
@@ -1482,7 +1482,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
getTexLayerSet()->getAvatarAppearance()->dirtyMesh();
- mMorphMasksValid = TRUE;
+ mMorphMasksValid = true;
getTexLayerSet()->applyMorphMask(alpha_data, width, height, 1);
}
}
@@ -1515,17 +1515,17 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
}
}
-/*virtual*/ BOOL LLTexLayer::isInvisibleAlphaMask() const
+/*virtual*/ bool LLTexLayer::isInvisibleAlphaMask() const
{
if (mLocalTextureObject)
{
if (mLocalTextureObject->getID() == IMG_INVISIBLE)
{
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
LLUUID LLTexLayer::getUUID() const
@@ -1584,7 +1584,7 @@ LLTexLayerTemplate::~LLTexLayerTemplate()
// setInfo
//-----------------------------------------------------------------------------
-/*virtual*/ BOOL LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
+/*virtual*/ bool LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable )
{
return LLTexLayerInterface::setInfo(info, wearable);
}
@@ -1633,14 +1633,14 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
return layer;
}
-/*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
+/*virtual*/ bool LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target)
{
if(!mInfo)
{
- return FALSE ;
+ return false ;
}
- BOOL success = TRUE;
+ bool success = true;
updateWearableCache();
for (LLWearable* wearable : mWearableCache)
{
@@ -1665,9 +1665,9 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
return success;
}
-/*virtual*/ BOOL LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer
+/*virtual*/ bool LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer
{
- BOOL success = TRUE;
+ bool success = true;
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
{
@@ -1691,7 +1691,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
}
}
-/*virtual*/ void LLTexLayerTemplate::setHasMorph(BOOL newval)
+/*virtual*/ void LLTexLayerTemplate::setHasMorph(bool newval)
{
mHasMorph = newval;
U32 num_wearables = updateWearableCache();
@@ -1718,7 +1718,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
}
}
-/*virtual*/ BOOL LLTexLayerTemplate::isInvisibleAlphaMask() const
+/*virtual*/ bool LLTexLayerTemplate::isInvisibleAlphaMask() const
{
U32 num_wearables = updateWearableCache();
for (U32 i = 0; i < num_wearables; i++)
@@ -1728,12 +1728,12 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
{
if (layer->isInvisibleAlphaMask())
{
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
@@ -1855,7 +1855,7 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
// Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name.
// Caches the result to speed identical subsequent requests.
-LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask)
+LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, bool is_mask)
{
LL_PROFILE_ZONE_SCOPED;
LLPointer<LLGLTexture> tex;
@@ -1869,7 +1869,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
else
{
llassert(gTextureManagerBridgep);
- tex = gTextureManagerBridgep->getLocalTexture( FALSE );
+ tex = gTextureManagerBridgep->getLocalTexture( false );
LLPointer<LLImageRaw> image_raw = new LLImageRaw;
if( loadImageRaw( file_name, image_raw ) )
{
@@ -1885,7 +1885,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
image_raw->copyUnscaledAlphaMask(alpha_image_raw, LLColor4U::black);
}
- tex->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::LOCAL);
+ tex->createGLTexture(0, image_raw, 0, true, LLGLTexture::LOCAL);
gGL.getTexUnit(0)->bind(tex);
tex->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -1903,11 +1903,11 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
}
// Reads a .tga file, decodes it, and puts the decoded data in image_raw.
-// Returns TRUE if successful.
-BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
+// Returns true if successful.
+bool LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = FALSE;
+ bool success = false;
std::string path;
path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,file_name);
LLPointer<LLImageTGA> image_tga = new LLImageTGA( path );
diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h
index 2b9913f883..876ea6f600 100644
--- a/indra/llappearance/lltexlayer.h
+++ b/indra/llappearance/lltexlayer.h
@@ -65,13 +65,13 @@ public:
LLTexLayerInterface(const LLTexLayerInterface &layer, LLWearable *wearable);
virtual ~LLTexLayerInterface() {}
- virtual BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
+ virtual bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
virtual void deleteCaches() = 0;
- virtual BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0;
- virtual BOOL isInvisibleAlphaMask() const = 0;
+ virtual bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0;
+ virtual bool isInvisibleAlphaMask() const = 0;
const LLTexLayerInfo* getInfo() const { return mInfo; }
- virtual BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions
+ virtual bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions
LLWearableType::EType getWearableType() const;
LLAvatarAppearanceDefines::ETextureIndex getLocalTextureIndex() const;
@@ -80,16 +80,16 @@ public:
LLTexLayerSet* const getTexLayerSet() { return mTexLayerSet; }
void invalidateMorphMasks();
- virtual void setHasMorph(BOOL newval) { mHasMorph = newval; }
- BOOL hasMorph() const { return mHasMorph; }
- BOOL isMorphValid() const { return mMorphMasksValid; }
+ virtual void setHasMorph(bool newval) { mHasMorph = newval; }
+ bool hasMorph() const { return mHasMorph; }
+ bool isMorphValid() const { return mMorphMasksValid; }
void requestUpdate();
virtual void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target) = 0;
- BOOL hasAlphaParams() const { return !mParamAlphaList.empty(); }
+ bool hasAlphaParams() const { return !mParamAlphaList.empty(); }
ERenderPass getRenderPass() const;
- BOOL isVisibilityMask() const;
+ bool isVisibilityMask() const;
virtual void asLLSD(LLSD& sd) const {}
@@ -100,8 +100,8 @@ protected:
protected:
LLTexLayerSet* const mTexLayerSet;
const LLTexLayerInfo* mInfo;
- BOOL mMorphMasksValid;
- BOOL mHasMorph;
+ bool mMorphMasksValid;
+ bool mHasMorph;
// Layers can have either mParamColorList, mGlobalColor, or mFixedColor. They are looked for in that order.
param_color_list_t mParamColorList;
@@ -121,13 +121,13 @@ public:
LLTexLayerTemplate(LLTexLayerSet* const layer_set, LLAvatarAppearance* const appearance);
LLTexLayerTemplate(const LLTexLayerTemplate &layer);
/*virtual*/ ~LLTexLayerTemplate();
- /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
- /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
- /*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
+ /*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
+ /*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
+ /*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
- /*virtual*/ void setHasMorph(BOOL newval);
+ /*virtual*/ void setHasMorph(bool newval);
/*virtual*/ void deleteCaches();
- /*virtual*/ BOOL isInvisibleAlphaMask() const;
+ /*virtual*/ bool isInvisibleAlphaMask() const;
protected:
U32 updateWearableCache() const;
LLTexLayer* getLayer(U32 i) const;
@@ -151,18 +151,18 @@ public:
LLTexLayer(const LLTexLayerTemplate &layer_template, LLLocalTextureObject *lto, LLWearable *wearable);
/*virtual*/ ~LLTexLayer();
- /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
- /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
+ /*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions
+ /*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target);
/*virtual*/ void deleteCaches();
const U8* getAlphaData() const;
- BOOL findNetColor(LLColor4* color) const;
- /*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
+ bool findNetColor(LLColor4* color) const;
+ /*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
void renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, LLRenderTarget* bound_target, bool force_render);
void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target);
- /*virtual*/ BOOL isInvisibleAlphaMask() const;
+ /*virtual*/ bool isInvisibleAlphaMask() const;
void setLTO(LLLocalTextureObject *lto) { mLocalTextureObject = lto; }
LLLocalTextureObject* getLTO() { return mLocalTextureObject; }
@@ -197,14 +197,14 @@ public:
void gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height, LLRenderTarget* bound_target);
const LLTexLayerSetInfo* getInfo() const { return mInfo; }
- BOOL setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions
+ bool setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions
- BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr);
+ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr);
void renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr, bool forceClear = false);
- BOOL isBodyRegion(const std::string& region) const;
- void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components);
- BOOL isMorphValid() const;
+ bool isBodyRegion(const std::string& region) const;
+ void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components);
+ bool isMorphValid() const;
virtual void requestUpdate() = 0;
void invalidateMorphMasks();
void deleteCaches();
@@ -213,12 +213,12 @@ public:
LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; }
const std::string getBodyRegionName() const;
- BOOL hasComposite() const { return (mComposite.notNull()); }
+ bool hasComposite() const { return (mComposite.notNull()); }
LLAvatarAppearanceDefines::EBakedTextureIndex getBakedTexIndex() const { return mBakedTexIndex; }
void setBakedTexIndex(LLAvatarAppearanceDefines::EBakedTextureIndex index) { mBakedTexIndex = index; }
- BOOL isVisible() const { return mIsVisible; }
+ bool isVisible() const { return mIsVisible; }
- static BOOL sHasCaches;
+ static bool sHasCaches;
protected:
typedef std::vector<LLTexLayerInterface *> layer_list_t;
@@ -226,7 +226,7 @@ protected:
layer_list_t mMaskLayerList;
LLPointer<LLTexLayerSetBuffer> mComposite;
LLAvatarAppearance* const mAvatarAppearance; // note: backlink only; don't make this an LLPointer.
- BOOL mIsVisible;
+ bool mIsVisible;
LLAvatarAppearanceDefines::EBakedTextureIndex mBakedTexIndex;
const LLTexLayerSetInfo* mInfo;
@@ -243,7 +243,7 @@ class LLTexLayerSetInfo
public:
LLTexLayerSetInfo();
~LLTexLayerSetInfo();
- BOOL parseXml(LLXmlTreeNode* node);
+ bool parseXml(LLXmlTreeNode* node);
void createVisualParams(LLAvatarAppearance *appearance);
S32 getWidth() const { return mWidth; }
S32 getHeight() const { return mHeight; }
@@ -252,7 +252,7 @@ protected:
S32 mWidth;
S32 mHeight;
std::string mStaticAlphaFileName;
- BOOL mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName)
+ bool mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName)
typedef std::vector<LLTexLayerInfo*> layer_info_list_t;
layer_info_list_t mLayerInfoList;
};
@@ -274,13 +274,13 @@ protected:
void pushProjection() const;
void popProjection() const;
virtual void preRenderTexLayerSet();
- virtual void midRenderTexLayerSet(BOOL success) {}
- virtual void postRenderTexLayerSet(BOOL success);
+ virtual void midRenderTexLayerSet(bool success) {}
+ virtual void postRenderTexLayerSet(bool success);
virtual S32 getCompositeOriginX() const = 0;
virtual S32 getCompositeOriginY() const = 0;
virtual S32 getCompositeWidth() const = 0;
virtual S32 getCompositeHeight() const = 0;
- BOOL renderTexLayerSet(LLRenderTarget* bound_target);
+ bool renderTexLayerSet(LLRenderTarget* bound_target);
LLTexLayerSet* const mTexLayerSet;
};
@@ -294,12 +294,12 @@ class LLTexLayerStaticImageList : public LLSingleton<LLTexLayerStaticImageList>
LLSINGLETON(LLTexLayerStaticImageList);
~LLTexLayerStaticImageList();
public:
- LLGLTexture* getTexture(const std::string& file_name, BOOL is_mask);
+ LLGLTexture* getTexture(const std::string& file_name, bool is_mask);
LLImageTGA* getImageTGA(const std::string& file_name);
void deleteCachedImages();
void dumpByteCount() const;
protected:
- BOOL loadImageRaw(const std::string& file_name, LLImageRaw* image_raw);
+ bool loadImageRaw(const std::string& file_name, LLImageRaw* image_raw);
private:
LLStringTable mImageNames;
typedef std::map<const char*, LLPointer<LLGLTexture> > texture_map_t;
diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp
index 2e7495b55f..30551c115d 100644
--- a/indra/llappearance/lltexlayerparams.cpp
+++ b/indra/llappearance/lltexlayerparams.cpp
@@ -69,7 +69,7 @@ LLTexLayerParam::LLTexLayerParam(const LLTexLayerParam& pOther)
{
}
-BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance)
+bool LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance)
{
LLViewerVisualParam::setInfo(info);
@@ -79,7 +79,7 @@ BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appeara
this->setParamLocation(mAvatarAppearance->isSelf() ? LOC_AV_SELF : LOC_AV_OTHER);
}
- return TRUE;
+ return true;
}
@@ -123,8 +123,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer)
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
- mNeedsCreateTexture(FALSE),
- mStaticImageInvalid(FALSE),
+ mNeedsCreateTexture(false),
+ mStaticImageInvalid(false),
mAvgDistortionVec(1.f, 1.f, 1.f),
mCachedEffectiveWeight(0.f)
{
@@ -136,8 +136,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance)
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
- mNeedsCreateTexture(FALSE),
- mStaticImageInvalid(FALSE),
+ mNeedsCreateTexture(false),
+ mStaticImageInvalid(false),
mAvgDistortionVec(1.f, 1.f, 1.f),
mCachedEffectiveWeight(0.f)
{
@@ -173,10 +173,10 @@ void LLTexLayerParamAlpha::deleteCaches()
mStaticImageTGA = NULL; // deletes image
mCachedProcessedTexture = NULL;
mStaticImageRaw = NULL;
- mNeedsCreateTexture = FALSE;
+ mNeedsCreateTexture = false;
}
-BOOL LLTexLayerParamAlpha::getMultiplyBlend() const
+bool LLTexLayerParamAlpha::getMultiplyBlend() const
{
return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend;
}
@@ -216,7 +216,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value)
mTargetWeight = target_value;
setWeight(target_value);
- mIsAnimating = TRUE;
+ mIsAnimating = true;
if (mNext)
{
mNext->setAnimationTarget(target_value);
@@ -231,11 +231,11 @@ void LLTexLayerParamAlpha::animate(F32 delta)
}
}
-BOOL LLTexLayerParamAlpha::getSkip() const
+bool LLTexLayerParamAlpha::getSkip() const
{
if (!mTexLayer)
{
- return TRUE;
+ return true;
}
const LLAvatarAppearance *appearance = mTexLayer->getTexLayerSet()->getAvatarAppearance();
@@ -245,24 +245,24 @@ BOOL LLTexLayerParamAlpha::getSkip() const
F32 effective_weight = (appearance->getSex() & getSex()) ? mCurWeight : getDefaultWeight();
if (is_approx_zero(effective_weight))
{
- return TRUE;
+ return true;
}
}
LLWearableType::EType type = (LLWearableType::EType)getWearableType();
if ((type != LLWearableType::WT_INVALID) && !appearance->isWearingWearableType(type))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
+bool LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
{
LL_PROFILE_ZONE_SCOPED;
- BOOL success = TRUE;
+ bool success = true;
if (!mTexLayer)
{
@@ -270,7 +270,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
}
F32 effective_weight = (mTexLayer->getTexLayerSet()->getAvatarAppearance()->getSex() & getSex()) ? mCurWeight : getDefaultWeight();
- BOOL weight_changed = effective_weight != mCachedEffectiveWeight;
+ bool weight_changed = effective_weight != mCachedEffectiveWeight;
if (getSkip())
{
return success;
@@ -294,13 +294,13 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
// Don't load the image file until we actually need it the first time. Like now.
mStaticImageTGA = LLTexLayerStaticImageList::getInstance()->getImageTGA(info->mStaticImageFileName);
// We now have something in one of our caches
- LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? TRUE : FALSE;
+ LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull();
if (mStaticImageTGA.isNull())
{
LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL;
- mStaticImageInvalid = TRUE; // don't try again.
- return FALSE;
+ mStaticImageInvalid = true; // don't try again.
+ return false;
}
}
@@ -316,10 +316,10 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (!mCachedProcessedTexture)
{
llassert(gTextureManagerBridgep);
- mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, FALSE);
+ mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, false);
// We now have something in one of our caches
- LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? TRUE : FALSE;
+ LLTexLayerSet::sHasCaches |= mCachedProcessedTexture.notNull();
mCachedProcessedTexture->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
}
@@ -328,7 +328,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mStaticImageRaw = NULL;
mStaticImageRaw = new LLImageRaw;
mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight);
- mNeedsCreateTexture = TRUE;
+ mNeedsCreateTexture = true;
LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL;
}
@@ -339,7 +339,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (mNeedsCreateTexture)
{
mCachedProcessedTexture->createGLTexture(0, mStaticImageRaw);
- mNeedsCreateTexture = FALSE;
+ mNeedsCreateTexture = false;
gGL.getTexUnit(0)->bind(mCachedProcessedTexture);
mCachedProcessedTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@@ -372,23 +372,23 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
// LLTexLayerParamAlphaInfo
//-----------------------------------------------------------------------------
LLTexLayerParamAlphaInfo::LLTexLayerParamAlphaInfo() :
- mMultiplyBlend(FALSE),
- mSkipIfZeroWeight(FALSE),
+ mMultiplyBlend(false),
+ mSkipIfZeroWeight(false),
mDomain(0.f)
{
}
-BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
+bool LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
{
llassert(node->hasName("param") && node->getChildByName("param_alpha"));
if (!LLViewerVisualParamInfo::parseXml(node))
- return FALSE;
+ return false;
LLXmlTreeNode* param_alpha_node = node->getChildByName("param_alpha");
if (!param_alpha_node)
{
- return FALSE;
+ return false;
}
static LLStdStringHandle tga_file_string = LLXmlTree::addAttributeString("tga_file");
@@ -410,7 +410,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle domain_string = LLXmlTree::addAttributeString("domain");
param_alpha_node->getFastAttributeF32(domain_string, mDomain);
- return TRUE;
+ return true;
}
@@ -464,10 +464,10 @@ LLColor4 LLTexLayerParamColor::getNetColor() const
F32 weight = scaled_weight - index_start;
const LLColor4 *start = &info->mColors[ index_start ];
const LLColor4 *end = &info->mColors[ index_end ];
- return LLColor4((1.f - weight) * start->mV[VX] + weight * end->mV[VX],
- (1.f - weight) * start->mV[VY] + weight * end->mV[VY],
- (1.f - weight) * start->mV[VZ] + weight * end->mV[VZ],
- (1.f - weight) * start->mV[VW] + weight * end->mV[VW]);
+ return LLColor4((1.f - weight) * start->mV[VRED] + weight * end->mV[VRED],
+ (1.f - weight) * start->mV[VGREEN] + weight * end->mV[VGREEN],
+ (1.f - weight) * start->mV[VBLUE] + weight * end->mV[VBLUE],
+ (1.f - weight) * start->mV[VALPHA] + weight * end->mV[VALPHA]);
}
}
@@ -514,7 +514,7 @@ void LLTexLayerParamColor::setAnimationTarget(F32 target_value)
// set value first then set interpolating flag to ignore further updates
mTargetWeight = target_value;
setWeight(target_value);
- mIsAnimating = TRUE;
+ mIsAnimating = true;
if (mNext)
{
mNext->setAnimationTarget(target_value);
@@ -538,17 +538,17 @@ LLTexLayerParamColorInfo::LLTexLayerParamColorInfo() :
{
}
-BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node)
+bool LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node)
{
llassert(node->hasName("param") && node->getChildByName("param_color"));
if (!LLViewerVisualParamInfo::parseXml(node))
- return FALSE;
+ return false;
LLXmlTreeNode* param_color_node = node->getChildByName("param_color");
if (!param_color_node)
{
- return FALSE;
+ return false;
}
std::string op_string;
@@ -581,14 +581,14 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node)
if (!mNumColors)
{
LL_WARNS() << "<param_color> is missing <value> sub-elements" << LL_ENDL;
- return FALSE;
+ return false;
}
if ((mOperation == LLTexLayerParamColor::OP_BLEND) && (mNumColors != 1))
{
LL_WARNS() << "<param_color> with operation\"blend\" must have exactly one <value>" << LL_ENDL;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
diff --git a/indra/llappearance/lltexlayerparams.h b/indra/llappearance/lltexlayerparams.h
index 54264c119a..5e785e4f3e 100644
--- a/indra/llappearance/lltexlayerparams.h
+++ b/indra/llappearance/lltexlayerparams.h
@@ -48,7 +48,7 @@ class LLTexLayerParam : public LLViewerVisualParam
public:
LLTexLayerParam(LLTexLayerInterface *layer);
LLTexLayerParam(LLAvatarAppearance *appearance);
- /*virtual*/ BOOL setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance);
+ /*virtual*/ bool setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance);
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
protected:
@@ -74,7 +74,7 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
/*virtual*/ void setWeight(F32 weight);
/*virtual*/ void setAnimationTarget(F32 target_value);
@@ -89,10 +89,10 @@ public:
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return NULL;};
// New functions
- BOOL render( S32 x, S32 y, S32 width, S32 height );
- BOOL getSkip() const;
+ bool render( S32 x, S32 y, S32 width, S32 height );
+ bool getSkip() const;
void deleteCaches();
- BOOL getMultiplyBlend() const;
+ bool getMultiplyBlend() const;
private:
LLTexLayerParamAlpha(const LLTexLayerParamAlpha& pOther);
@@ -100,8 +100,8 @@ private:
LLPointer<LLGLTexture> mCachedProcessedTexture;
LLPointer<LLImageTGA> mStaticImageTGA;
LLPointer<LLImageRaw> mStaticImageRaw;
- std::atomic<BOOL> mNeedsCreateTexture;
- BOOL mStaticImageInvalid;
+ std::atomic<bool> mNeedsCreateTexture;
+ bool mStaticImageInvalid;
LL_ALIGN_16(LLVector4a mAvgDistortionVec);
F32 mCachedEffectiveWeight;
@@ -120,12 +120,12 @@ public:
LLTexLayerParamAlphaInfo();
/*virtual*/ ~LLTexLayerParamAlphaInfo() {};
- /*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
+ /*virtual*/ bool parseXml(LLXmlTreeNode* node);
private:
std::string mStaticImageFileName;
- BOOL mMultiplyBlend;
- BOOL mSkipIfZeroWeight;
+ bool mMultiplyBlend;
+ bool mSkipIfZeroWeight;
F32 mDomain;
};
//
@@ -157,7 +157,7 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
/*virtual*/ void setWeight(F32 weight);
/*virtual*/ void setAnimationTarget(F32 target_value);
@@ -189,7 +189,7 @@ class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo
public:
LLTexLayerParamColorInfo();
virtual ~LLTexLayerParamColorInfo() {};
- BOOL parseXml( LLXmlTreeNode* node );
+ bool parseXml( LLXmlTreeNode* node );
LLTexLayerParamColor::EColorOperation getOperation() const { return mOperation; }
private:
enum { MAX_COLOR_VALUES = 20 };
diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp
index 2cc072fd13..00d6383ad0 100644
--- a/indra/llappearance/llviewervisualparam.cpp
+++ b/indra/llappearance/llviewervisualparam.cpp
@@ -39,12 +39,12 @@
LLViewerVisualParamInfo::LLViewerVisualParamInfo()
:
mWearableType( LLWearableType::WT_INVALID ),
- mCrossWearable(FALSE),
+ mCrossWearable(false),
mCamDist( 0.5f ),
mCamAngle( 0.f ),
mCamElevation( 0.f ),
mEditGroupDisplayOrder( 0 ),
- mShowSimple(FALSE),
+ mShowSimple(false),
mSimpleMin(0.f),
mSimpleMax(100.f)
{
@@ -57,12 +57,12 @@ LLViewerVisualParamInfo::~LLViewerVisualParamInfo()
//-----------------------------------------------------------------------------
// parseXml()
//-----------------------------------------------------------------------------
-BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
+bool LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
{
llassert( node->hasName( "param" ) );
if (!LLVisualParamInfo::parseXml(node))
- return FALSE;
+ return false;
// VIEWER SPECIFIC PARAMS
@@ -82,7 +82,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
static LLStdStringHandle cross_wearable_string = LLXmlTree::addAttributeString("cross_wearable");
if (!node->getFastAttributeBOOL(cross_wearable_string, mCrossWearable))
{
- mCrossWearable = FALSE;
+ mCrossWearable = false;
}
// Optional camera offsets from the current joint center. Used for generating "hints" (thumbnails).
@@ -107,7 +107,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
params_loaded++;
- return TRUE;
+ return true;
}
/*virtual*/ void LLViewerVisualParamInfo::toStream(std::ostream &out)
@@ -146,15 +146,15 @@ LLViewerVisualParam::~LLViewerVisualParam()
// setInfo()
//-----------------------------------------------------------------------------
-BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
+bool LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
{
llassert(mInfo == NULL);
if (info->mID < 0)
- return FALSE;
+ return false;
mInfo = info;
mID = info->mID;
setWeight(getDefaultWeight());
- return TRUE;
+ return true;
}
/*
@@ -166,14 +166,14 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
//-----------------------------------------------------------------------------
// parseData()
//-----------------------------------------------------------------------------
-BOOL LLViewerVisualParam::parseData(LLXmlTreeNode *node)
+bool LLViewerVisualParam::parseData(LLXmlTreeNode *node)
{
LLViewerVisualParamInfo* info = new LLViewerVisualParamInfo;
info->parseXml(node);
if (!setInfo(info))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
*/
diff --git a/indra/llappearance/llviewervisualparam.h b/indra/llappearance/llviewervisualparam.h
index 7e332875f5..b79983df8e 100644
--- a/indra/llappearance/llviewervisualparam.h
+++ b/indra/llappearance/llviewervisualparam.h
@@ -43,19 +43,19 @@ public:
LLViewerVisualParamInfo();
/*virtual*/ ~LLViewerVisualParamInfo();
- /*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
+ /*virtual*/ bool parseXml(LLXmlTreeNode* node);
/*virtual*/ void toStream(std::ostream &out);
protected:
S32 mWearableType;
- BOOL mCrossWearable;
+ bool mCrossWearable;
std::string mEditGroup;
F32 mCamDist;
F32 mCamAngle; // degrees
F32 mCamElevation;
F32 mEditGroupDisplayOrder;
- BOOL mShowSimple; // show edit controls when in "simple ui" mode?
+ bool mShowSimple; // show edit controls when in "simple ui" mode?
F32 mSimpleMin; // when in simple UI, apply this minimum, range 0.f to 100.f
F32 mSimpleMax; // when in simple UI, apply this maximum, range 0.f to 100.f
};
@@ -75,12 +75,12 @@ public:
// Special: These functions are overridden by child classes
LLViewerVisualParamInfo *getInfo() const { return (LLViewerVisualParamInfo*)mInfo; };
// This sets mInfo and calls initialization functions
- BOOL setInfo(LLViewerVisualParamInfo *info);
+ bool setInfo(LLViewerVisualParamInfo *info);
virtual LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
// LLVisualParam Virtual functions
- ///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
+ ///*virtual*/ bool parseData(LLXmlTreeNode* node);
// New Virtual functions
virtual F32 getTotalDistortion() = 0;
@@ -99,11 +99,11 @@ public:
F32 getCameraAngle() const { return getInfo()->mCamAngle; } // degrees
F32 getCameraElevation() const { return getInfo()->mCamElevation; }
- BOOL getShowSimple() const { return getInfo()->mShowSimple; }
+ bool getShowSimple() const { return getInfo()->mShowSimple; }
F32 getSimpleMin() const { return getInfo()->mSimpleMin; }
F32 getSimpleMax() const { return getInfo()->mSimpleMax; }
- BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
+ bool getCrossWearable() const { return getInfo()->mCrossWearable; }
protected:
LLViewerVisualParam(const LLViewerVisualParam& pOther);
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index f04bae3d62..a7e5292fed 100644
--- a/indra/llappearance/llwearable.cpp
+++ b/indra/llappearance/llwearable.cpp
@@ -86,16 +86,16 @@ LLAssetType::EType LLWearable::getAssetType() const
return LLWearableType::getInstance()->getAssetType(mType);
}
-BOOL LLWearable::exportFile(const std::string& filename) const
+bool LLWearable::exportFile(const std::string& filename) const
{
llofstream ofs(filename.c_str(), std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
return ofs.is_open() && exportStream(ofs);
}
// virtual
-BOOL LLWearable::exportStream( std::ostream& output_stream ) const
+bool LLWearable::exportStream( std::ostream& output_stream ) const
{
- if (!output_stream.good()) return FALSE;
+ if (!output_stream.good()) return false;
// header and version
output_stream << "LLWearable version " << mDefinitionVersion << "\n";
@@ -107,13 +107,13 @@ BOOL LLWearable::exportStream( std::ostream& output_stream ) const
// permissions
if( !mPermissions.exportLegacyStream( output_stream ) )
{
- return FALSE;
+ return false;
}
// sale info
if( !mSaleInfo.exportLegacyStream( output_stream ) )
{
- return FALSE;
+ return false;
}
// wearable type
@@ -139,7 +139,7 @@ BOOL LLWearable::exportStream( std::ostream& output_stream ) const
const LLUUID& image_id = te_pair.second->getID();
output_stream << te << " " << image_id << "\n";
}
- return TRUE;
+ return true;
}
void LLWearable::createVisualParams(LLAvatarAppearance *avatarp)
@@ -307,7 +307,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// permissions. Thus, we read that out, and fix legacy
// objects. It's possible this op would fail, but it should pick
// up the vast majority of the tasks.
- BOOL has_perm_mask = FALSE;
+ bool has_perm_mask = false;
U32 perm_mask = 0;
if( !mSaleInfo.importLegacyStream(input_stream, has_perm_mask, perm_mask) )
{
@@ -469,11 +469,11 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
return LLWearable::SUCCESS;
}
-BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size)
+bool LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size)
{
if (!input_stream.good())
{
- return FALSE;
+ return false;
}
do
@@ -636,7 +636,7 @@ void LLWearable::addVisualParam(LLVisualParam *param)
{
delete mVisualParamIndexMap[param->getID()];
}
- param->setIsDummy(FALSE);
+ param->setIsDummy(false);
param->setParamLocation(LOC_WEARABLE);
mVisualParamIndexMap[param->getID()] = param;
mSavedVisualParamMap[param->getID()] = param->getDefaultWeight();
@@ -744,7 +744,7 @@ void LLWearable::writeToAvatar(LLAvatarAppearance* avatarp)
std::string terse_F32_to_string(F32 f)
{
std::string r = llformat("%.2f", f);
- S32 len = r.length();
+ auto len = r.length();
// "1.20" -> "1.2"
// "24.00" -> "24."
diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h
index 22075e9d9b..c76e836a46 100644
--- a/indra/llappearance/llwearable.h
+++ b/indra/llappearance/llwearable.h
@@ -80,9 +80,9 @@ public:
SUCCESS,
BAD_HEADER
};
- BOOL exportFile(const std::string& filename) const;
+ bool exportFile(const std::string& filename) const;
EImportResult importFile(const std::string& filename, LLAvatarAppearance* avatarp );
- virtual BOOL exportStream( std::ostream& output_stream ) const;
+ virtual bool exportStream( std::ostream& output_stream ) const;
virtual EImportResult importStream( std::istream& input_stream, LLAvatarAppearance* avatarp );
static void setCurrentDefinitionVersion( S32 version ) { LLWearable::sCurrentDefinitionVersion = version; }
@@ -118,7 +118,7 @@ protected:
void destroyTextures();
void createVisualParams(LLAvatarAppearance *avatarp);
void createLayers(S32 te, LLAvatarAppearance *avatarp);
- BOOL getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size);
+ bool getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size);
static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml.
S32 mDefinitionVersion; // Depends on the state of the avatar_lad.xml when this asset was created.
diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp
index 55f8db8bda..7598ed67f3 100644
--- a/indra/llappearance/llwearabledata.cpp
+++ b/indra/llappearance/llwearabledata.cpp
@@ -86,7 +86,7 @@ void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LL
{
wearable_vec[index] = wearable;
old_wearable->setUpdated();
- const BOOL removed = FALSE;
+ const bool removed = false;
wearableUpdated(wearable, removed);
}
}
@@ -105,14 +105,14 @@ void LLWearableData::pushWearable(const LLWearableType::EType type,
mWearableDatas[type].push_back(wearable);
if (trigger_updated)
{
- const BOOL removed = FALSE;
+ const bool removed = false;
wearableUpdated(wearable, removed);
}
}
}
// virtual
-void LLWearableData::wearableUpdated(LLWearable *wearable, BOOL removed)
+void LLWearableData::wearableUpdated(LLWearable *wearable, bool removed)
{
wearable->setUpdated();
if (!removed)
@@ -144,7 +144,7 @@ void LLWearableData::eraseWearable(const LLWearableType::EType type, U32 index)
if (wearable)
{
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
- const BOOL removed = TRUE;
+ const bool removed = true;
wearableUpdated(wearable, removed);
}
}
@@ -200,11 +200,11 @@ void LLWearableData::pullCrossWearableValues(const LLWearableType::EType type)
}
-BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const
+bool LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const
{
if (wearable == NULL)
{
- return FALSE;
+ return false;
}
const LLWearableType::EType type = wearable->getType();
@@ -212,7 +212,7 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou
if (wearable_iter == mWearableDatas.end())
{
LL_WARNS() << "tried to get wearable index with an invalid type!" << LL_ENDL;
- return FALSE;
+ return false;
}
const wearableentry_vec_t& wearable_vec = wearable_iter->second;
for(U32 index = 0; index < wearable_vec.size(); index++)
@@ -220,11 +220,11 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou
if (wearable_vec[index] == wearable)
{
index_found = index;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
U32 LLWearableData::getClothingLayerCount() const
@@ -242,7 +242,7 @@ U32 LLWearableData::getClothingLayerCount() const
return count;
}
-BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
+bool LLWearableData::canAddWearable(const LLWearableType::EType type) const
{
LLAssetType::EType a_type = LLWearableType::getInstance()->getAssetType(type);
if (a_type==LLAssetType::AT_CLOTHING)
@@ -255,13 +255,13 @@ BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
}
else
{
- return FALSE;
+ return false;
}
}
-BOOL LLWearableData::isOnTop(LLWearable* wearable) const
+bool LLWearableData::isOnTop(LLWearable* wearable) const
{
- if (!wearable) return FALSE;
+ if (!wearable) return false;
const LLWearableType::EType type = wearable->getType();
return ( getTopWearable(type) == wearable );
}
@@ -334,7 +334,7 @@ U32 LLWearableData::getWearableCount(const LLWearableType::EType type) const
return 0;
}
const wearableentry_vec_t& wearable_vec = wearable_iter->second;
- return wearable_vec.size();
+ return static_cast<U32>(wearable_vec.size());
}
U32 LLWearableData::getWearableCount(const U32 tex_index) const
diff --git a/indra/llappearance/llwearabledata.h b/indra/llappearance/llwearabledata.h
index 4276335bd6..1266aed008 100644
--- a/indra/llappearance/llwearabledata.h
+++ b/indra/llappearance/llwearabledata.h
@@ -60,11 +60,11 @@ public:
const LLWearable* getBottomWearable(const LLWearableType::EType type) const;
U32 getWearableCount(const LLWearableType::EType type) const;
U32 getWearableCount(const U32 tex_index) const;
- BOOL getWearableIndex(const LLWearable *wearable, U32& index) const;
+ bool getWearableIndex(const LLWearable *wearable, U32& index) const;
U32 getClothingLayerCount() const;
- BOOL canAddWearable(const LLWearableType::EType type) const;
+ bool canAddWearable(const LLWearableType::EType type) const;
- BOOL isOnTop(LLWearable* wearable) const;
+ bool isOnTop(LLWearable* wearable) const;
static const U32 MAX_CLOTHING_LAYERS = 60;
@@ -76,7 +76,7 @@ protected:
void setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable);
void pushWearable(const LLWearableType::EType type, LLWearable *wearable,
bool trigger_updated = true);
- virtual void wearableUpdated(LLWearable *wearable, BOOL removed);
+ virtual void wearableUpdated(LLWearable *wearable, bool removed);
void eraseWearable(LLWearable *wearable);
void eraseWearable(const LLWearableType::EType type, U32 index);
void clearWearableType(const LLWearableType::EType type);
diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp
index 3a6b3969f6..988304cbac 100644
--- a/indra/llappearance/llwearabletype.cpp
+++ b/indra/llappearance/llwearabletype.cpp
@@ -32,27 +32,27 @@
LLWearableType::LLWearableDictionary::LLWearableDictionary(LLTranslationBridge::ptr_t& trans)
{
- addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
- addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
- addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
- addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
- addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
- addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
- addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
- addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
- addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
- addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
- addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
- addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
- addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
- addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
- addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
- addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
-
- addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
-
- addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE));
- addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
+ addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, false, false));
+ addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, false, false));
+ addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, false, false));
+ addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, false, false));
+ addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, false, true));
+ addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, false, true));
+ addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, false, true));
+ addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, false, true));
+ addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, false, true));
+ addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, false, true));
+ addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, false, true));
+ addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, false, true));
+ addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, false, true));
+ addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, false, true));
+ addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, false, true));
+ addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, false, true));
+
+ addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, true, true));
+
+ addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, false, false));
+ addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, false, false));
}
@@ -112,17 +112,17 @@ LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType typ
return entry->mIconName;
}
-BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
+bool LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
{
const WearableEntry *entry = mDictionary.lookup(type);
- if (!entry) return FALSE;
+ if (!entry) return false;
return entry->mDisableCameraSwitch;
}
-BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type)
+bool LLWearableType::getAllowMultiwear(LLWearableType::EType type)
{
const WearableEntry *entry = mDictionary.lookup(type);
- if (!entry) return FALSE;
+ if (!entry) return false;
return entry->mAllowMultiwear;
}
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h
index 99846586dc..206a344134 100644
--- a/indra/llappearance/llwearabletype.h
+++ b/indra/llappearance/llwearabletype.h
@@ -72,8 +72,8 @@ public:
LLAssetType::EType getAssetType(EType type);
EType typeNameToType(const std::string& type_name);
LLInventoryType::EIconName getIconName(EType type);
- BOOL getDisableCameraSwitch(EType type);
- BOOL getAllowMultiwear(EType type);
+ bool getDisableCameraSwitch(EType type);
+ bool getAllowMultiwear(EType type);
static EType inventoryFlagsToWearableType(U32 flags);
@@ -85,8 +85,8 @@ private:
const std::string& default_new_name,
LLAssetType::EType assetType,
LLInventoryType::EIconName iconName,
- BOOL disable_camera_switch = FALSE,
- BOOL allow_multiwear = TRUE) :
+ bool disable_camera_switch = false,
+ bool allow_multiwear = true) :
LLDictionaryEntry(name),
mAssetType(assetType),
mDefaultNewName(default_new_name),
@@ -101,8 +101,8 @@ private:
const std::string mLabel;
const std::string mDefaultNewName;
LLInventoryType::EIconName mIconName;
- BOOL mDisableCameraSwitch;
- BOOL mAllowMultiwear;
+ bool mDisableCameraSwitch;
+ bool mAllowMultiwear;
};
class LLWearableDictionary : public LLDictionary<LLWearableType::EType, WearableEntry>