Merge branch 'DRTVWR-600-maint-A' of https://github.com/secondlife/viewer
# Conflicts: # indra/llappearance/llavatarappearance.cpp # indra/llappearance/llavatarappearance.h # indra/llappearance/lldriverparam.h # indra/llappearance/llviewervisualparam.cpp # indra/llaudio/llaudiodecodemgr.cpp # indra/llcharacter/llcharacter.cpp # indra/llfilesystem/llfilesystem.cpp # indra/newview/llagent.cpp # indra/newview/llcallbacklist.cpp # indra/newview/llfloaterpreference.cpp # indra/newview/llpanelnearbymedia.cpp # indra/newview/llpanelnearbymedia.h # indra/newview/llpanelobjectinventory.cpp # indra/newview/llvoavatar.h # indra/newview/llvovolume.cpp # indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xmlmaster
commit
9a044f4a52
|
|
@ -84,13 +84,13 @@ public:
|
|||
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;
|
||||
|
|
@ -115,7 +115,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; }
|
||||
|
||||
|
|
@ -347,7 +347,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;
|
||||
|
|
@ -588,17 +588,17 @@ F32 LLAvatarAppearance::getAvatarOffset() /*const*/
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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
|
||||
|
|
@ -606,13 +606,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;
|
||||
|
|
@ -620,16 +620,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;
|
||||
|
||||
|
|
@ -645,7 +645,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 );
|
||||
}
|
||||
|
|
@ -654,7 +654,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 );
|
||||
|
|
@ -694,17 +694,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( S32 num )
|
||||
bool LLAvatarAppearance::allocateCharacterJoints( S32 num )
|
||||
{
|
||||
if (mSkeleton.size() != num)
|
||||
{
|
||||
|
|
@ -714,14 +714,14 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( S32 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;
|
||||
|
||||
|
|
@ -729,7 +729,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
|
||||
|
|
@ -738,7 +738,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -749,11 +749,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;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -836,7 +836,7 @@ void LLAvatarAppearance::buildCharacter()
|
|||
//-------------------------------------------------------------------------
|
||||
LLTimer timer;
|
||||
|
||||
BOOL status = loadAvatar();
|
||||
bool status = loadAvatar();
|
||||
stop_glerror();
|
||||
|
||||
// gPrintMessagesThisFrame = TRUE;
|
||||
|
|
@ -914,7 +914,7 @@ void LLAvatarAppearance::buildCharacter()
|
|||
|
||||
}
|
||||
|
||||
BOOL LLAvatarAppearance::loadAvatar()
|
||||
bool LLAvatarAppearance::loadAvatar()
|
||||
{
|
||||
// LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR);
|
||||
|
||||
|
|
@ -922,7 +922,7 @@ BOOL LLAvatarAppearance::loadAvatar()
|
|||
if( !buildSkeleton(sAvatarSkeletonInfo) )
|
||||
{
|
||||
LL_ERRS() << "avatar file: buildSkeleton() failed" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// initialize mJointAliasMap
|
||||
|
|
@ -932,14 +932,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>
|
||||
|
|
@ -949,13 +949,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 )
|
||||
{
|
||||
|
|
@ -963,13 +963,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 )
|
||||
{
|
||||
|
|
@ -977,26 +977,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>
|
||||
|
|
@ -1010,7 +1010,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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1038,17 +1038,17 @@ 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] );
|
||||
|
||||
|
|
@ -1092,7 +1092,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode ()
|
|||
if (!param->setInfo(info))
|
||||
{
|
||||
delete param;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1103,13 +1103,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)
|
||||
{
|
||||
|
|
@ -1118,7 +1118,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)
|
||||
|
|
@ -1145,13 +1145,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;
|
||||
|
|
@ -1174,7 +1174,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
|
||||
|
|
@ -1186,7 +1186,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
|
|||
if( !poly_mesh )
|
||||
{
|
||||
LL_WARNS() << "Failed to load mesh of type " << type << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Multimap insert
|
||||
|
|
@ -1201,7 +1201,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
|
|||
if (!param->setInfo((LLPolyMorphTargetInfo*)info_pair.first))
|
||||
{
|
||||
delete param;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1219,15 +1219,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())
|
||||
|
|
@ -1240,7 +1240,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
|
||||
|
|
@ -1262,7 +1262,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
|
||||
|
|
@ -1369,19 +1369,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)
|
||||
{
|
||||
|
|
@ -1392,7 +1392,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 )
|
||||
{
|
||||
|
|
@ -1476,10 +1476,10 @@ BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
|
|||
|
||||
default:
|
||||
llassert(0);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> [Legacy Bake]
|
||||
|
|
@ -1543,7 +1543,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;
|
||||
}
|
||||
|
|
@ -1560,7 +1560,7 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in
|
|||
//-----------------------------------------------------------------------------
|
||||
// allocateCollisionVolumes()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
|
||||
bool LLAvatarAppearance::allocateCollisionVolumes( U32 num )
|
||||
{
|
||||
if (mNumCollisionVolumes !=num)
|
||||
{
|
||||
|
|
@ -1571,18 +1571,18 @@ 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"))
|
||||
{
|
||||
|
|
@ -1591,7 +1591,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
|
|||
if (!node->getFastAttributeString(name_string, mName))
|
||||
{
|
||||
LL_WARNS() << "Bone without name" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static LLStdStringHandle aliases_string = LLXmlTree::addAttributeString("aliases");
|
||||
|
|
@ -1609,28 +1609,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");
|
||||
|
|
@ -1653,7 +1653,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
|
|||
if (!node->getFastAttributeVector3(pivot_string, mPivot))
|
||||
{
|
||||
LL_WARNS() << "Bone without pivot" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1665,23 +1665,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");
|
||||
|
|
@ -1695,11 +1695,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.
|
||||
|
|
@ -1767,13 +1767,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;
|
||||
|
|
@ -1793,14 +1793,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);
|
||||
|
|
@ -1818,7 +1818,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");
|
||||
|
|
@ -1826,7 +1826,7 @@ 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");
|
||||
|
|
@ -1852,7 +1852,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");
|
||||
|
|
@ -1867,13 +1867,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;
|
||||
|
|
@ -1887,7 +1887,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");
|
||||
|
|
@ -1895,7 +1895,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");
|
||||
|
|
@ -1903,7 +1903,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");
|
||||
|
|
@ -1938,7 +1938,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
|
|||
{
|
||||
LL_WARNS() << "Unknown param type." << LL_ENDL;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLPolyMorphTargetInfo *morphinfo = new LLPolyMorphTargetInfo();
|
||||
|
|
@ -1946,9 +1946,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);
|
||||
|
||||
|
|
@ -1957,13 +1957,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;
|
||||
|
|
@ -1978,14 +1978,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" )
|
||||
|
|
@ -1993,14 +1993,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" )
|
||||
|
|
@ -2008,24 +2008,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;
|
||||
|
|
@ -2040,16 +2040,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 )
|
||||
|
|
@ -2069,23 +2069,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" );
|
||||
|
|
@ -2099,7 +2099,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");
|
||||
|
|
@ -2107,7 +2107,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");
|
||||
|
|
@ -2115,7 +2115,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.
|
||||
|
|
@ -2125,12 +2125,12 @@ 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) :
|
||||
mMorphTarget(morph_target),
|
||||
mMorphTarget(morph_target),
|
||||
mInvert(invert),
|
||||
mLayer(layer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ public:
|
|||
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();
|
||||
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; }
|
||||
|
||||
|
|
@ -162,21 +162,21 @@ 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();
|
||||
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
|
||||
virtual F32 getAvatarOffset() /*const*/;
|
||||
// [/RLVa:KB]
|
||||
// <FS:Ansariel> [Legacy Bake]
|
||||
virtual void bodySizeChanged() = 0;
|
||||
|
||||
BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num);
|
||||
BOOL allocateCharacterJoints(S32 num);
|
||||
BOOL buildSkeleton(const LLAvatarSkeletonInfo *info);
|
||||
bool setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num);
|
||||
bool allocateCharacterJoints(S32 num);
|
||||
bool buildSkeleton(const LLAvatarSkeletonInfo *info);
|
||||
|
||||
void clearSkeleton();
|
||||
BOOL mIsBuilt; // state of deferred character building
|
||||
bool mIsBuilt; // state of deferred character building
|
||||
avatar_joint_list_t mSkeleton;
|
||||
LLVector3OverrideMap mPelvisFixups;
|
||||
joint_alias_map_t mJointAliasMap;
|
||||
|
|
@ -240,13 +240,13 @@ public:
|
|||
** RENDERING
|
||||
**/
|
||||
public:
|
||||
BOOL mIsDummy; // for special views and animated object controllers; local to viewer
|
||||
bool mIsDummy; // 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);
|
||||
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
|
||||
|
|
@ -299,7 +299,7 @@ public:
|
|||
void setClothesColor(LLAvatarAppearanceDefines::ETextureIndex te, const LLColor4& new_color, BOOL upload_bake);
|
||||
// </FS:Ansariel> [Legacy Bake]
|
||||
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
|
||||
|
|
@ -332,8 +332,8 @@ 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;
|
||||
|
|
@ -379,7 +379,7 @@ public:
|
|||
S32 mNumCollisionVolumes;
|
||||
LLAvatarJointCollisionVolume* mCollisionVolumes;
|
||||
protected:
|
||||
BOOL allocateCollisionVolumes(U32 num);
|
||||
bool allocateCollisionVolumes(U32 num);
|
||||
|
||||
/** Physics
|
||||
** **
|
||||
|
|
@ -395,12 +395,12 @@ 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
|
||||
{
|
||||
|
|
@ -444,8 +444,8 @@ protected:
|
|||
S32 mPieMenuSlice;
|
||||
BOOL mVisibleFirstPerson;
|
||||
BOOL mIsHUDAttachment;
|
||||
BOOL mHasPosition;
|
||||
BOOL mHasRotation;
|
||||
bool mHasPosition;
|
||||
bool mHasRotation;
|
||||
};
|
||||
typedef std::vector<LLAvatarAttachmentInfo*> attachment_info_list_t;
|
||||
attachment_info_list_t mAttachmentInfoList;
|
||||
|
|
@ -481,7 +481,7 @@ protected:
|
|||
LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer);
|
||||
|
||||
LLVisualParam *mMorphTarget;
|
||||
BOOL mInvert;
|
||||
bool mInvert;
|
||||
std::string mLayer;
|
||||
};
|
||||
/** Support Classes
|
||||
|
|
|
|||
|
|
@ -305,15 +305,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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -187,7 +187,7 @@ BOOL LLAvatarJoint::updateLOD(F32 pixel_area, BOOL activate)
|
|||
if (pixel_area >= jointLOD || sDisableLOD)
|
||||
{
|
||||
lod_changed |= joint->updateLOD(pixel_area, TRUE);
|
||||
found_lod = TRUE;
|
||||
found_lod = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public:
|
|||
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
|
||||
{
|
||||
|
|
@ -99,7 +99,7 @@ public:
|
|||
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 bool updateLOD(F32 pixel_area, bool activate);
|
||||
virtual void updateJointGeometry();
|
||||
virtual void dump();
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ public:
|
|||
LLAvatarJointCollisionVolume();
|
||||
virtual ~LLAvatarJointCollisionVolume() {};
|
||||
|
||||
/*virtual*/ BOOL inheritScale() { return TRUE; }
|
||||
/*virtual*/ bool inheritScale() { return true; }
|
||||
/*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE );
|
||||
|
||||
void renderCollision();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -252,7 +252,7 @@ void LLAvatarJointMesh::setTexture( LLGLTexture *texture )
|
|||
}
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class LLSkinJoint
|
|||
public:
|
||||
LLSkinJoint();
|
||||
~LLSkinJoint();
|
||||
BOOL setupSkinJoint( LLAvatarJoint *joint);
|
||||
bool setupSkinJoint( LLAvatarJoint *joint);
|
||||
|
||||
LLAvatarJoint *mJoint;
|
||||
LLVector3 mRootToJointSkinOffset;
|
||||
|
|
@ -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();
|
||||
|
|
@ -135,7 +135,7 @@ public:
|
|||
|
||||
private:
|
||||
// Allocate skin data
|
||||
BOOL allocateSkinData( U32 numSkinJoints );
|
||||
bool allocateSkinData( U32 numSkinJoints );
|
||||
|
||||
// Free skin data
|
||||
void freeSkinData();
|
||||
|
|
|
|||
|
|
@ -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,11 +187,11 @@ 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;
|
||||
|
|
@ -200,7 +200,7 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info)
|
|||
//setWeight(getDefaultWeight());
|
||||
setWeight(getDefaultWeight(), FALSE );
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*virtual*/ LLViewerVisualParam* LLDriverParam::cloneParam(LLWearable* wearable) const
|
||||
|
|
@ -492,20 +492,20 @@ void LLDriverParam::stopAnimating(BOOL upload_bake)
|
|||
}
|
||||
|
||||
/*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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross
|
|||
}
|
||||
else
|
||||
{
|
||||
success = FALSE;
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
/*virtual*/ void setAnimationTarget(F32 target_value, BOOL upload_bake);
|
||||
/*virtual*/ void stopAnimating(BOOL upload_bake);
|
||||
// </FS:Ansariel> [Legacy Bake]
|
||||
/*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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ 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);
|
||||
|
|
|
|||
|
|
@ -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) ? false : true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ LLPolyMorphData::~LLPolyMorphData()
|
|||
//-----------------------------------------------------------------------------
|
||||
// loadBinary()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
|
||||
bool LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
|
||||
{
|
||||
S32 numVertices;
|
||||
S32 numRead;
|
||||
|
|
@ -114,7 +114,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
|
|||
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;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -260,19 +260,19 @@ LLPolyMorphTargetInfo::LLPolyMorphTargetInfo()
|
|||
{
|
||||
}
|
||||
|
||||
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;
|
||||
// <FS:Ansariel> [Legacy Bake]
|
||||
|
|
@ -396,9 +396,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
|
||||
|
|
@ -410,7 +410,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
|
|||
//-----------------------------------------------------------------------------
|
||||
// parseData()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node)
|
||||
bool LLPolyMorphTarget::parseData(LLXmlTreeNode* node)
|
||||
{
|
||||
LLPolyMorphTargetInfo* info = new LLPolyMorphTargetInfo;
|
||||
|
||||
|
|
@ -418,9 +418,9 @@ BOOL LLPolyMorphTarget::parseData(LLXmlTreeNode* node)
|
|||
if (!setInfo(info))
|
||||
{
|
||||
delete info;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
@ -129,7 +129,7 @@ public:
|
|||
LLPolyMorphTargetInfo();
|
||||
/*virtual*/ ~LLPolyMorphTargetInfo() {};
|
||||
|
||||
/*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
|
||||
/*virtual*/ bool parseXml(LLXmlTreeNode* node);
|
||||
|
||||
protected:
|
||||
std::string mMorphName;
|
||||
|
|
@ -154,7 +154,7 @@ 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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -153,7 +153,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
|
||||
|
|
@ -176,7 +176,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
|
|||
mJointOffsets[joint] = bone_info.mPositionDeformation;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*virtual*/ LLViewerVisualParam* LLPolySkeletalDistortion::cloneParam(LLWearable* wearable) const
|
||||
|
|
|
|||
|
|
@ -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,7 +92,7 @@ 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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -61,12 +61,12 @@ BOOL LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info)
|
|||
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
|
||||
|
|
@ -140,14 +140,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");
|
||||
|
|
@ -161,10 +161,10 @@ BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
|
|||
if (!info->parseXml(child))
|
||||
{
|
||||
delete info;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
mParamColorInfoList.push_back(info);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
LLTexLayerInfo();
|
||||
~LLTexLayerInfo();
|
||||
|
||||
BOOL parseXml(LLXmlTreeNode* node);
|
||||
bool parseXml(LLXmlTreeNode* node);
|
||||
BOOL createVisualParams(LLAvatarAppearance *appearance);
|
||||
BOOL isUserSettable() { return mLocalTexture != -1; }
|
||||
S32 getLocalTexture() const { return mLocalTexture; }
|
||||
|
|
@ -192,12 +192,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
|
||||
|
|
@ -205,20 +205,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.
|
||||
|
|
@ -237,11 +237,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
|
||||
|
|
@ -306,7 +306,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
|
|||
if (!layer->setInfo(layer_info, NULL))
|
||||
{
|
||||
mInfo = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!layer->isVisibilityMask())
|
||||
{
|
||||
|
|
@ -322,7 +322,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info)
|
|||
|
||||
stop_glerror();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#if 0 // obsolete
|
||||
|
|
@ -337,14 +337,14 @@ BOOL LLTexLayerSet::parseData(LLXmlTreeNode* node)
|
|||
if (!info->parseXml(node))
|
||||
{
|
||||
delete info;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!setInfo(info))
|
||||
{
|
||||
delete info;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -546,10 +546,10 @@ BOOL LLTexLayerSet::isMorphValid() const
|
|||
{
|
||||
if (layer && !layer->isMorphValid())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLTexLayerSet::invalidateMorphMasks()
|
||||
|
|
@ -586,7 +586,7 @@ LLTexLayerInfo::~LLTexLayerInfo( )
|
|||
mParamAlphaInfoList.clear();
|
||||
}
|
||||
|
||||
BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
|
||||
bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
|
||||
{
|
||||
llassert( node->hasName( "layer" ) );
|
||||
|
||||
|
|
@ -594,7 +594,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");
|
||||
|
|
@ -664,13 +664,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -701,7 +701,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
|
|||
if (!info->parseXml(child))
|
||||
{
|
||||
delete info;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
mParamColorInfoList.push_back(info);
|
||||
}
|
||||
|
|
@ -712,18 +712,18 @@ 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 success = TRUE;
|
||||
BOOL success = true;
|
||||
for (LLTexLayerParamColorInfo* color_info : mParamColorInfoList)
|
||||
{
|
||||
LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance);
|
||||
|
|
@ -788,7 +788,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
|
|||
if (!param_color->setInfo(color_info, TRUE))
|
||||
{
|
||||
mInfo = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -797,7 +797,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
|
|||
if (!param_color)
|
||||
{
|
||||
mInfo = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
mParamColorList.push_back( param_color );
|
||||
|
|
@ -813,7 +813,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
|
|||
if (!param_alpha->setInfo(alpha_info, TRUE))
|
||||
{
|
||||
mInfo = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -822,13 +822,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()
|
||||
|
|
@ -1230,29 +1230,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] )
|
||||
{
|
||||
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 success = TRUE;
|
||||
BOOL success = true;
|
||||
|
||||
gGL.flush();
|
||||
|
||||
|
|
@ -1586,11 +1586,11 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
|
|||
{
|
||||
if (mLocalTextureObject->getID() == IMG_INVISIBLE)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID LLTexLayer::getUUID() const
|
||||
|
|
@ -1793,12 +1793,12 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const
|
|||
{
|
||||
if (layer->isInvisibleAlphaMask())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ BOOL LLTexLayerParamAlpha::getSkip() const
|
|||
{
|
||||
if (!mTexLayer)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
const LLAvatarAppearance *appearance = mTexLayer->getTexLayerSet()->getAvatarAppearance();
|
||||
|
|
@ -263,24 +263,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)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
BOOL success = TRUE;
|
||||
BOOL success = true;
|
||||
|
||||
if (!mTexLayer)
|
||||
{
|
||||
|
|
@ -318,7 +318,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
|
|||
{
|
||||
LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL;
|
||||
mStaticImageInvalid = TRUE; // don't try again.
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -396,17 +396,17 @@ LLTexLayerParamAlphaInfo::LLTexLayerParamAlphaInfo() :
|
|||
{
|
||||
}
|
||||
|
||||
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");
|
||||
|
|
@ -428,7 +428,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
|
|||
static LLStdStringHandle domain_string = LLXmlTree::addAttributeString("domain");
|
||||
param_alpha_node->getFastAttributeF32(domain_string, mDomain);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -572,17 +572,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;
|
||||
|
|
@ -615,14 +615,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public:
|
|||
LLTexLayerParamAlphaInfo();
|
||||
/*virtual*/ ~LLTexLayerParamAlphaInfo() {};
|
||||
|
||||
/*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
|
||||
/*virtual*/ bool parseXml(LLXmlTreeNode* node);
|
||||
|
||||
private:
|
||||
std::string mStaticImageFileName;
|
||||
|
|
@ -207,7 +207,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 };
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
|||
|
||||
params_loaded++;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*virtual*/ void LLViewerVisualParamInfo::toStream(std::ostream &out)
|
||||
|
|
@ -150,13 +150,13 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
|
|||
{
|
||||
llassert(mInfo == NULL);
|
||||
if (info->mID < 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
mInfo = info;
|
||||
mID = info->mID;
|
||||
// <FS:Ansariel> [Legacy Bake]
|
||||
//setWeight(getDefaultWeight());
|
||||
setWeight(getDefaultWeight(), FALSE);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -168,14 +168,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;
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
LLViewerVisualParamInfo();
|
||||
/*virtual*/ ~LLViewerVisualParamInfo();
|
||||
|
||||
/*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
|
||||
/*virtual*/ bool parseXml(LLXmlTreeNode* node);
|
||||
|
||||
/*virtual*/ void toStream(std::ostream &out);
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ BOOL LLWearable::exportFile(const std::string& filename) const
|
|||
// virtual
|
||||
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";
|
||||
|
|
@ -110,13 +110,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
|
||||
|
|
@ -142,7 +142,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)
|
||||
|
|
@ -310,7 +310,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) )
|
||||
{
|
||||
|
|
@ -476,7 +476,7 @@ BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer,
|
|||
{
|
||||
if (!input_stream.good())
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
do
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou
|
|||
{
|
||||
if (wearable == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
const LLWearableType::EType type = wearable->getType();
|
||||
|
|
@ -223,7 +223,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++)
|
||||
|
|
@ -231,11 +231,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
|
||||
|
|
@ -267,13 +267,13 @@ BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
|
|||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLWearableData::isOnTop(LLWearable* wearable) const
|
||||
{
|
||||
if (!wearable) return FALSE;
|
||||
if (!wearable) return false;
|
||||
const LLWearableType::EType type = wearable->getType();
|
||||
return ( getTopWearable(type) == wearable );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,14 +118,14 @@ LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType typ
|
|||
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)
|
||||
{
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return FALSE;
|
||||
if (!entry) return false;
|
||||
return entry->mAllowMultiwear;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,22 +70,22 @@ public:
|
|||
|
||||
LLVorbisDecodeState(const LLUUID &uuid, const std::string &out_filename);
|
||||
|
||||
BOOL initDecode();
|
||||
BOOL decodeSection(); // Return TRUE if done.
|
||||
BOOL finishDecode();
|
||||
bool initDecode();
|
||||
bool decodeSection(); // Return true if done.
|
||||
bool finishDecode();
|
||||
|
||||
void flushBadFile();
|
||||
|
||||
void ioComplete(S32 bytes) { mBytesRead = bytes; }
|
||||
BOOL isValid() const { return mValid; }
|
||||
BOOL isDone() const { return mDone; }
|
||||
bool isValid() const { return mValid; }
|
||||
bool isDone() const { return mDone; }
|
||||
const LLUUID &getUUID() const { return mUUID; }
|
||||
|
||||
protected:
|
||||
virtual ~LLVorbisDecodeState();
|
||||
|
||||
BOOL mValid;
|
||||
BOOL mDone;
|
||||
bool mValid;
|
||||
bool mDone;
|
||||
LLAtomicS32 mBytesRead;
|
||||
LLUUID mUUID;
|
||||
|
||||
|
|
@ -164,8 +164,8 @@ long cache_tell (void *datasource)
|
|||
|
||||
LLVorbisDecodeState::LLVorbisDecodeState(const LLUUID &uuid, const std::string &out_filename)
|
||||
{
|
||||
mDone = FALSE;
|
||||
mValid = FALSE;
|
||||
mDone = false;
|
||||
mValid = false;
|
||||
mBytesRead = -1;
|
||||
mUUID = uuid;
|
||||
mInFilep = NULL;
|
||||
|
|
@ -188,7 +188,7 @@ LLVorbisDecodeState::~LLVorbisDecodeState()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLVorbisDecodeState::initDecode()
|
||||
bool LLVorbisDecodeState::initDecode()
|
||||
{
|
||||
ov_callbacks cache_callbacks;
|
||||
cache_callbacks.read_func = cache_read;
|
||||
|
|
@ -204,14 +204,14 @@ BOOL LLVorbisDecodeState::initDecode()
|
|||
LL_WARNS("AudioEngine") << "unable to open vorbis source vfile for reading" << LL_ENDL;
|
||||
delete mInFilep;
|
||||
mInFilep = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, cache_callbacks);
|
||||
if(r < 0)
|
||||
{
|
||||
LL_WARNS("AudioEngine") << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << LL_ENDL;
|
||||
return(FALSE);
|
||||
return(false);
|
||||
}
|
||||
|
||||
S32 sample_count = (S32)ov_pcm_total(&mVF, -1);
|
||||
|
|
@ -260,7 +260,7 @@ BOOL LLVorbisDecodeState::initDecode()
|
|||
}
|
||||
delete mInFilep;
|
||||
mInFilep = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
|
|
@ -273,7 +273,7 @@ BOOL LLVorbisDecodeState::initDecode()
|
|||
LL_WARNS("AudioEngine") << "Out of memory when trying to alloc buffer: " << size_guess << LL_ENDL;
|
||||
delete mInFilep;
|
||||
mInFilep = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -360,31 +360,31 @@ BOOL LLVorbisDecodeState::initDecode()
|
|||
// fprintf(stderr,"\nDecoded length: %ld samples\n", (long)ov_pcm_total(&vf,-1));
|
||||
// fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
|
||||
//}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLVorbisDecodeState::decodeSection()
|
||||
bool LLVorbisDecodeState::decodeSection()
|
||||
{
|
||||
if (!mInFilep)
|
||||
{
|
||||
LL_WARNS("AudioEngine") << "No cache file to decode in vorbis!" << LL_ENDL;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
if (mDone)
|
||||
{
|
||||
// LL_WARNS("AudioEngine") << "Already done with decode, aborting!" << LL_ENDL;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
char pcmout[4096]; /*Flawfinder: ignore*/
|
||||
|
||||
BOOL eof = FALSE;
|
||||
bool eof = false;
|
||||
long ret=ov_read(&mVF, pcmout, sizeof(pcmout), 0, 2, 1, &mCurrentSection);
|
||||
if (ret == 0)
|
||||
{
|
||||
/* EOF */
|
||||
eof = TRUE;
|
||||
mDone = TRUE;
|
||||
mValid = TRUE;
|
||||
eof = true;
|
||||
mDone = true;
|
||||
mValid = true;
|
||||
// LL_INFOS("AudioEngine") << "Vorbis EOF" << LL_ENDL;
|
||||
}
|
||||
else if (ret < 0)
|
||||
|
|
@ -394,10 +394,10 @@ BOOL LLVorbisDecodeState::decodeSection()
|
|||
|
||||
LL_WARNS("AudioEngine") << "BAD vorbis decode in decodeSection." << LL_ENDL;
|
||||
|
||||
mValid = FALSE;
|
||||
mDone = TRUE;
|
||||
// We're done, return TRUE.
|
||||
return TRUE;
|
||||
mValid = false;
|
||||
mDone = true;
|
||||
// We're done, return true.
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -409,12 +409,12 @@ BOOL LLVorbisDecodeState::decodeSection()
|
|||
return eof;
|
||||
}
|
||||
|
||||
BOOL LLVorbisDecodeState::finishDecode()
|
||||
bool LLVorbisDecodeState::finishDecode()
|
||||
{
|
||||
if (!isValid())
|
||||
{
|
||||
LL_WARNS("AudioEngine") << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << LL_ENDL;
|
||||
return TRUE; // We've finished
|
||||
return true; // We've finished
|
||||
}
|
||||
|
||||
if (mFileHandle == LLLFSThread::nullHandle())
|
||||
|
|
@ -487,8 +487,8 @@ BOOL LLVorbisDecodeState::finishDecode()
|
|||
if (36 == data_length)
|
||||
{
|
||||
LL_WARNS("AudioEngine") << "BAD Vorbis decode in finishDecode!" << LL_ENDL;
|
||||
mValid = FALSE;
|
||||
return TRUE; // we've finished
|
||||
mValid = false;
|
||||
return true; // we've finished
|
||||
}
|
||||
mBytesRead = -1;
|
||||
mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(),
|
||||
|
|
@ -502,21 +502,21 @@ BOOL LLVorbisDecodeState::finishDecode()
|
|||
if (mBytesRead == 0)
|
||||
{
|
||||
LL_WARNS("AudioEngine") << "Unable to write file in LLVorbisDecodeState::finishDecode" << LL_ENDL;
|
||||
mValid = FALSE;
|
||||
return TRUE; // we've finished
|
||||
mValid = false;
|
||||
return true; // we've finished
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE; // not done
|
||||
return false; // not done
|
||||
}
|
||||
}
|
||||
|
||||
mDone = TRUE;
|
||||
mDone = true;
|
||||
|
||||
LL_DEBUGS("AudioEngine") << "Finished decode for " << getUUID() << LL_ENDL;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLVorbisDecodeState::flushBadFile()
|
||||
|
|
@ -790,7 +790,7 @@ void LLAudioDecodeMgr::processQueue()
|
|||
mImpl->processQueue();
|
||||
}
|
||||
|
||||
BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
|
||||
bool LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
|
||||
{
|
||||
// <FS:ND> Protect against corrupted sounds. Just do a quit exit instead of trying to decode over and over.
|
||||
if (gAudiop && gAudiop->isCorruptSound(uuid))
|
||||
|
|
@ -801,7 +801,7 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
|
|||
{
|
||||
// Already have a decoded version, don't need to decode it.
|
||||
LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
|
||||
|
|
@ -816,9 +816,9 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
|
|||
mImpl->mDecodeQueue.push_back(uuid);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " no file available" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class LLAudioDecodeMgr : public LLSingleton<LLAudioDecodeMgr>
|
|||
~LLAudioDecodeMgr();
|
||||
public:
|
||||
void processQueue();
|
||||
BOOL addDecodeRequest(const LLUUID &uuid);
|
||||
bool addDecodeRequest(const LLUUID &uuid);
|
||||
void addAudioRequest(const LLUUID &uuid);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ public:
|
|||
|
||||
void preload(const LLUUID &audio_id); // Only used for preloading UI sounds, now.
|
||||
|
||||
void addAudioData(LLAudioData *adp, bool set_current = TRUE);
|
||||
void addAudioData(LLAudioData *adp, bool set_current = true);
|
||||
|
||||
void setForcedPriority(const bool ambient) { mForcedPriority = ambient; }
|
||||
bool isForcedPriority() const { return mForcedPriority; }
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
|
|||
U32 chunk_length = 0;
|
||||
U32 raw_data_length = 0;
|
||||
U32 bytes_per_sec = 0;
|
||||
BOOL uncompressed_pcm = FALSE;
|
||||
bool uncompressed_pcm = false;
|
||||
|
||||
unsigned char wav_header[44]; /*Flawfinder: ignore*/
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
|
|||
{
|
||||
if ((wav_header[8] == 0x01) && (wav_header[9] == 0x00))
|
||||
{
|
||||
uncompressed_pcm = TRUE;
|
||||
uncompressed_pcm = true;
|
||||
}
|
||||
num_channels = ((U16) wav_header[11] << 8) + wav_header[10];
|
||||
sample_rate = ((U32) wav_header[15] << 24)
|
||||
|
|
|
|||
|
|
@ -1275,15 +1275,15 @@ BOOL LLBVHLoader::getLine(LLAPRFile::tFiletype* fp)
|
|||
{
|
||||
if (apr_file_eof(fp) == APR_EOF)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if ( apr_file_gets(mLine, BVH_PARSER_LINE_SIZE, fp) == APR_SUCCESS)
|
||||
{
|
||||
mLineNumber++;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// returns required size of output buffer
|
||||
|
|
@ -1505,5 +1505,5 @@ BOOL LLBVHLoader::serialize(LLDataPacker& dp)
|
|||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ BOOL LLCharacter::isMotionActive(const LLUUID& id)
|
|||
return mMotionController.isMotionActive(motionp);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -298,9 +298,9 @@ BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 wei
|
|||
// <FS:Ansariel> [Legacy Bake]
|
||||
//index_iter->second->setWeight(weight);
|
||||
index_iter->second->setWeight(weight, upload_bake);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -319,10 +319,10 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight, BOOL
|
|||
// <FS:Ansariel> [Legacy Bake]
|
||||
//name_iter->second->setWeight(weight);
|
||||
name_iter->second->setWeight(weight, upload_bake);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter: " << param_name << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -338,10 +338,10 @@ BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake)
|
|||
// <FS:Ansariel> [Legacy Bake]
|
||||
//index_iter->second->setWeight(weight);
|
||||
index_iter->second->setWeight(weight, upload_bake);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
LL_WARNS() << "LLCharacter::setVisualParamWeight() Invalid visual parameter index: " << index << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ BOOL LLEditingMotion::onActivate()
|
|||
mShoulderJoint.setRotation( mShoulderState->getJoint()->getRotation() );
|
||||
mElbowJoint.setRotation( mElbowState->getJoint()->getRotation() );
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -168,12 +168,12 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
LLVector3* pointAtPt = (LLVector3*)mCharacter->getAnimationData("PointAtPoint");
|
||||
|
||||
|
||||
BOOL result = TRUE;
|
||||
BOOL result = true;
|
||||
|
||||
if (!pointAtPt)
|
||||
{
|
||||
focus_pt = mLastSelectPt;
|
||||
result = FALSE;
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() { return TRUE; }
|
||||
virtual bool getLoop() { return true; }
|
||||
|
||||
// motions must report their total duration
|
||||
virtual F32 getDuration() { return 0.0; }
|
||||
|
|
|
|||
|
|
@ -94,14 +94,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs)
|
|||
BOOL LLGesture::trigger(KEY key, MASK mask)
|
||||
{
|
||||
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLGesture::trigger(const std::string& trigger_string)
|
||||
{
|
||||
LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// NOT endian-neutral
|
||||
|
|
@ -267,7 +267,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask)
|
|||
{
|
||||
if (gesture->trigger(key, mask))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -275,7 +275,7 @@ BOOL LLGestureList::trigger(KEY key, MASK mask)
|
|||
LL_WARNS() << "NULL gesture in gesture list (" << i << ")" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// NOT endian-neutral
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ BOOL LLHandMotion::onActivate()
|
|||
mCharacter->setVisualParamWeight(gHandPoseNames[mCurrentPose], 1.f);
|
||||
mCharacter->updateVisualParams();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() { return TRUE; }
|
||||
virtual bool getLoop() { return true; }
|
||||
|
||||
// motions must report their total duration
|
||||
virtual F32 getDuration() { return 0.0; }
|
||||
|
|
@ -119,7 +119,7 @@ public:
|
|||
// called when a motion is deactivated
|
||||
virtual void onDeactivate();
|
||||
|
||||
virtual BOOL canDeprecate() { return FALSE; }
|
||||
virtual bool canDeprecate() { return false; }
|
||||
|
||||
static std::string getHandPoseName(eHandPose pose);
|
||||
static eHandPose getHandPose(std::string posename);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLHeadRotMotion::onActivate()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
mHeadState->setRotation( nlerp(1.f - NECK_LAG, LLQuaternion::DEFAULT, head_rot_local));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -364,7 +364,7 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character)
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLEyeMotion::onActivate()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -540,7 +540,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
adjustEyeTarget(targetPos, *mLeftEyeState, *mRightEyeState);
|
||||
adjustEyeTarget(targetPos, *mAltLeftEyeState, *mAltRightEyeState);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() { return TRUE; }
|
||||
virtual bool getLoop() { return true; }
|
||||
|
||||
// motions must report their total duration
|
||||
virtual F32 getDuration() { return 0.0; }
|
||||
|
|
@ -147,7 +147,7 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() { return TRUE; }
|
||||
virtual bool getLoop() { return true; }
|
||||
|
||||
// motions must report their total duration
|
||||
virtual F32 getDuration() { return 0.0; }
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ public:
|
|||
|
||||
void clampRotation(LLQuaternion old_rot, LLQuaternion new_rot);
|
||||
|
||||
virtual BOOL isAnimatable() const { return TRUE; }
|
||||
virtual BOOL isAnimatable() const { return true; }
|
||||
|
||||
void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed );
|
||||
void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed );
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ BOOL LLKeyframeMotion::setupPose()
|
|||
mPelvisp = mCharacter->getJoint("mPelvis");
|
||||
if (!mPelvisp)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -656,7 +656,7 @@ BOOL LLKeyframeMotion::setupPose()
|
|||
setLoopIn(mJointMotionList->mLoopInPoint);
|
||||
setLoopOut(mJointMotionList->mLoopOutPoint);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -677,7 +677,7 @@ BOOL LLKeyframeMotion::onActivate()
|
|||
|
||||
mLastLoopedTime = 0.f;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1243,13 +1243,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
if (!dp.unpackU16(version, "version"))
|
||||
{
|
||||
LL_WARNS() << "can't read version number for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackU16(sub_version, "sub_version"))
|
||||
{
|
||||
LL_WARNS() << "can't read sub version number for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (version == 0 && sub_version == 1)
|
||||
|
|
@ -1261,7 +1261,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
#if LL_RELEASE
|
||||
LL_WARNS() << "Bad animation version " << version << "." << sub_version
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
#else
|
||||
LL_ERRS() << "Bad animation version " << version << "." << sub_version
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
|
|
@ -1272,7 +1272,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read animation base_priority"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
joint_motion_list->mBasePriority = (LLJoint::JointPriority) temp_priority;
|
||||
|
||||
|
|
@ -1285,7 +1285,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "bad animation base_priority " << joint_motion_list->mBasePriority
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -1295,7 +1295,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read duration"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (joint_motion_list->mDuration > MAX_ANIM_DURATION ||
|
||||
|
|
@ -1303,7 +1303,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "invalid animation duration"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -1313,14 +1313,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read optional_emote_animation"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(joint_motion_list->mEmoteName==mID.asString())
|
||||
{
|
||||
LL_WARNS() << "Malformed animation mEmoteName==mID"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -1331,7 +1331,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read loop point"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(joint_motion_list->mLoopOutPoint, "loop_out_point") ||
|
||||
|
|
@ -1339,14 +1339,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read loop point"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackS32(joint_motion_list->mLoop, "loop"))
|
||||
{
|
||||
LL_WARNS() << "can't read loop"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//SL-17206 hack to alter Female_land loop setting, while current behavior won't be changed serverside
|
||||
|
|
@ -1366,7 +1366,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read easeIn"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(joint_motion_list->mEaseOutDuration, "ease_out_duration") ||
|
||||
|
|
@ -1374,7 +1374,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read easeOut"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -1385,14 +1385,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read hand pose"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(word > LLHandMotion::NUM_HAND_POSES)
|
||||
{
|
||||
LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
joint_motion_list->mHandPose = (LLHandMotion::eHandPose)word;
|
||||
|
|
@ -1407,20 +1407,20 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read number of joints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (num_motions == 0)
|
||||
{
|
||||
LL_WARNS() << "no joints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (num_motions > LL_CHARACTER_MAX_ANIMATED_JOINTS)
|
||||
{
|
||||
LL_WARNS() << "too many joints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
joint_motion_list->mJointMotionArray.clear();
|
||||
|
|
@ -1442,14 +1442,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read joint name"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (joint_name == "mScreen" || joint_name == "mRoot")
|
||||
{
|
||||
LL_WARNS() << "attempted to animate special " << joint_name << " joint"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
|
@ -1476,7 +1476,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
<< " for animation " << asset_id << LL_ENDL;
|
||||
if (!allow_invalid_joints)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1495,14 +1495,14 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read joint priority."
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (joint_priority < LLJoint::USE_MOTION_PRIORITY)
|
||||
{
|
||||
LL_WARNS() << "joint priority unknown - too low."
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
joint_motion->mPriority = (LLJoint::JointPriority)joint_priority;
|
||||
|
|
@ -1521,7 +1521,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read number of rotation keys"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
joint_motion->mRotationCurve.mInterpolationType = IT_LINEAR;
|
||||
|
|
@ -1547,7 +1547,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1557,7 +1557,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
time = U16_to_F32(time_short, 0.f, joint_motion_list->mDuration);
|
||||
|
|
@ -1566,7 +1566,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "invalid frame time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1580,12 +1580,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
if (!dp.unpackVector3(rot_angles, "rot_angles"))
|
||||
{
|
||||
LL_WARNS() << "can't read rot_angles in rotation key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!rot_angles.isFinite())
|
||||
{
|
||||
LL_WARNS() << "non-finite angle in rotation key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLQuaternion::Order ro = StringToOrder("ZYX");
|
||||
|
|
@ -1596,17 +1596,17 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
if (!dp.unpackU16(x, "rot_angle_x"))
|
||||
{
|
||||
LL_WARNS() << "can't read rot_angle_x in rotation key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!dp.unpackU16(y, "rot_angle_y"))
|
||||
{
|
||||
LL_WARNS() << "can't read rot_angle_y in rotation key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!dp.unpackU16(z, "rot_angle_z"))
|
||||
{
|
||||
LL_WARNS() << "can't read rot_angle_z in rotation key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLVector3 rot_vec;
|
||||
|
|
@ -1618,7 +1618,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "non-finite angle in rotation key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
rot_key.mRotation.unpackFromVector3(rot_vec);
|
||||
}
|
||||
|
|
@ -1627,7 +1627,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "non-finite angle in rotation key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
rCurve->mKeys[time] = rot_key;
|
||||
|
|
@ -1646,7 +1646,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read number of position keys"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
joint_motion->mPositionCurve.mInterpolationType = IT_LINEAR;
|
||||
|
|
@ -1672,7 +1672,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read position key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1681,7 +1681,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read position key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pos_key.mTime = U16_to_F32(time_short, 0.f, joint_motion_list->mDuration);
|
||||
|
|
@ -1692,7 +1692,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
if (!dp.unpackVector3(pos_key.mPosition, "pos"))
|
||||
{
|
||||
LL_WARNS() << "can't read pos in position key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//MAINT-6162
|
||||
|
|
@ -1708,17 +1708,17 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
if (!dp.unpackU16(x, "pos_x"))
|
||||
{
|
||||
LL_WARNS() << "can't read pos_x in position key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!dp.unpackU16(y, "pos_y"))
|
||||
{
|
||||
LL_WARNS() << "can't read pos_y in position key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (!dp.unpackU16(z, "pos_z"))
|
||||
{
|
||||
LL_WARNS() << "can't read pos_z in position key (" << k << ")" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pos_key.mPosition.mV[VX] = U16_to_F32(x, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET);
|
||||
|
|
@ -1730,7 +1730,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "non-finite position in key"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
pCurve->mKeys[pos_key.mTime] = pos_key;
|
||||
|
|
@ -1767,7 +1767,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read number of constraints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (num_constraints > MAX_CONSTRAINTS || num_constraints < 0)
|
||||
|
|
@ -1791,7 +1791,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read constraint chain length"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
constraintp->mChainLength = (S32) byte;
|
||||
|
||||
|
|
@ -1799,21 +1799,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "invalid constraint chain length"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackU8(byte, "constraint_type"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint type"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( byte >= NUM_CONSTRAINT_TYPES )
|
||||
{
|
||||
LL_WARNS() << "invalid constraint type"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
constraintp->mConstraintType = (EConstraintType)byte;
|
||||
|
||||
|
|
@ -1823,7 +1823,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read source volume name"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bin_data[BIN_DATA_LENGTH] = 0; // Ensure null termination
|
||||
|
|
@ -1833,28 +1833,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "not a valid source constraint volume " << str
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint source offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !(constraintp->mSourceConstraintOffset.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite constraint source offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume"))
|
||||
{
|
||||
LL_WARNS() << "can't read target volume name"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bin_data[BIN_DATA_LENGTH] = 0; // Ensure null termination
|
||||
|
|
@ -1872,7 +1872,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "not a valid target constraint volume " << str
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1880,28 +1880,28 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read constraint target offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !(constraintp->mTargetConstraintOffset.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite constraint target offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint target direction"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !(constraintp->mTargetConstraintDir.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite constraint target direction"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!constraintp->mTargetConstraintDir.isExactlyZero())
|
||||
|
|
@ -1914,35 +1914,35 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "can't read constraint ease in start time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(constraintp->mEaseInStopTime, "ease_in_stop") || !llfinite(constraintp->mEaseInStopTime))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint ease in stop time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(constraintp->mEaseOutStartTime, "ease_out_start") || !llfinite(constraintp->mEaseOutStartTime))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint ease out start time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(constraintp->mEaseOutStopTime, "ease_out_stop") || !llfinite(constraintp->mEaseOutStopTime))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint ease out stop time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLJoint* joint = mCharacter->findCollisionVolume(constraintp->mSourceConstraintVolume);
|
||||
// get joint to which this collision volume is attached
|
||||
if (!joint)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
constraintp->mJointStateIndices = new S32[constraintp->mChainLength + 1]; // note: mChainLength is size-limited - comes from a byte
|
||||
|
|
@ -1955,7 +1955,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
LL_WARNS() << "Joint with no parent: " << joint->getName()
|
||||
<< " Emote: " << joint_motion_list->mEmoteName
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
joint = parent;
|
||||
constraintp->mJointStateIndices[i] = -1;
|
||||
|
|
@ -1967,7 +1967,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "Invalid joint " << j
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(constraint_joint == joint)
|
||||
|
|
@ -1980,7 +1980,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
{
|
||||
LL_WARNS() << "No joint index for constraint " << i
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1995,7 +1995,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
|
||||
setupPose();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -2003,7 +2003,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
|
||||
{
|
||||
BOOL success = TRUE;
|
||||
BOOL success = true;
|
||||
|
||||
LL_DEBUGS("BVH") << "serializing" << LL_ENDL;
|
||||
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() {
|
||||
if (mJointMotionList) return mJointMotionList->mLoop;
|
||||
else return FALSE;
|
||||
virtual bool getLoop() {
|
||||
if (mJointMotionList) return mJointMotionList->mLoop;
|
||||
else return false;
|
||||
}
|
||||
|
||||
// motions must report their total duration
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ BOOL LLKeyframeMotionParam::onActivate()
|
|||
paramMotion.mMotion->activate(mActivationTimestamp);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask)
|
|||
|
||||
LL_INFOS() << "Param Motion weight " << mPoseBlender.getBlendedPose()->getWeight() << LL_ENDL;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -292,7 +292,7 @@ BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char
|
|||
|
||||
if (!newMotion)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
newMotion->setName(name);
|
||||
|
|
@ -300,7 +300,7 @@ BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char
|
|||
// now add motion to this list
|
||||
mParameterizedMotions[param].insert(ParameterizedMotion(newMotion, value));
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -352,7 +352,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
|
|||
if (!fp || fileSize == 0)
|
||||
{
|
||||
LL_INFOS() << "ERROR: can't open: " << path << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// allocate a text buffer
|
||||
|
|
@ -391,7 +391,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
|
|||
if ( error )
|
||||
{
|
||||
LL_INFOS() << "ERROR: error while reading from " << path << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LL_INFOS() << "Loading parametric keyframe data for: " << getName() << LL_ENDL;
|
||||
|
|
@ -418,7 +418,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
|
|||
if ((num != 3))
|
||||
{
|
||||
LL_INFOS() << "WARNING: can't read parametric motion" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
addKeyframeMotion(strA, gAnimLibrary.stringToAnimState(std::string(strA)), strB, floatA);
|
||||
|
|
@ -438,7 +438,7 @@ BOOL LLKeyframeMotionParam::loadMotions()
|
|||
num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// End
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() {
|
||||
return TRUE;
|
||||
virtual bool getLoop() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// motions must report their total duration
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
BOOL status = LLKeyframeMotion::onUpdate(time, joint_mask);
|
||||
if (!status)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLVector3 root_world_pos = mPelvisState->getJoint()->getParent()->getWorldPosition();
|
||||
|
|
@ -174,7 +174,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
// have we received a valid world position for this avatar?
|
||||
if (root_world_pos.isExactlyZero())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
@ -255,7 +255,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
else if (mFrameNum < 2)
|
||||
{
|
||||
mFrameNum++;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
mFrameNum++;
|
||||
|
|
@ -336,7 +336,7 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
//LL_INFOS() << "Stand drift amount " << (mCharacter->getCharacterPosition() - mLastGoodPosition).magVec() << LL_ENDL;
|
||||
|
||||
// LL_INFOS() << "DEBUG: " << speed << " : " << mTrackAnkles << LL_ENDL;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// End
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ BOOL LLWalkAdjustMotion::onActivate()
|
|||
F32 rightAnkleOffset = (mRightAnkleJoint->getWorldPosition() - mCharacter->getCharacterPosition()).magVec();
|
||||
mAnkleOffset = llmax(leftAnkleOffset, rightAnkleOffset);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -318,7 +318,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
// need to update *some* joint to keep this animation active
|
||||
mPelvisState->setPosition(mPelvisOffset);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -370,7 +370,7 @@ BOOL LLFlyAdjustMotion::onActivate()
|
|||
mPelvisState->setPosition(LLVector3::zero);
|
||||
mPelvisState->setRotation(LLQuaternion::DEFAULT);
|
||||
mRoll = 0.f;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -391,6 +391,6 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f));
|
||||
mPelvisState->setRotation(roll);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public:
|
|||
virtual void onDeactivate();
|
||||
virtual BOOL onUpdate(F32 time, U8* joint_mask);
|
||||
virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGH_PRIORITY;}
|
||||
virtual BOOL getLoop() { return TRUE; }
|
||||
virtual bool getLoop() { return true; }
|
||||
virtual F32 getDuration() { return 0.f; }
|
||||
virtual F32 getEaseInDuration() { return 0.f; }
|
||||
virtual F32 getEaseOutDuration() { return 0.f; }
|
||||
|
|
@ -154,7 +154,7 @@ public:
|
|||
virtual void onDeactivate() {};
|
||||
virtual BOOL onUpdate(F32 time, U8* joint_mask);
|
||||
virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGHER_PRIORITY;}
|
||||
virtual BOOL getLoop() { return TRUE; }
|
||||
virtual bool getLoop() { return true; }
|
||||
virtual F32 getDuration() { return 0.f; }
|
||||
virtual F32 getEaseInDuration() { return 0.f; }
|
||||
virtual F32 getEaseOutDuration() { return 0.f; }
|
||||
|
|
|
|||
|
|
@ -169,9 +169,9 @@ void LLMotion::deactivate()
|
|||
onDeactivate();
|
||||
}
|
||||
|
||||
BOOL LLMotion::canDeprecate()
|
||||
bool LLMotion::canDeprecate()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// End
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() = 0;
|
||||
virtual bool getLoop() = 0;
|
||||
|
||||
// motions must report their total duration
|
||||
virtual F32 getDuration() = 0;
|
||||
|
|
@ -154,7 +154,7 @@ public:
|
|||
// can we crossfade this motion with a new instance when restarted?
|
||||
// should ultimately always be TRUE, but lack of emote blending, etc
|
||||
// requires this
|
||||
virtual BOOL canDeprecate();
|
||||
virtual bool canDeprecate();
|
||||
|
||||
// optional callback routine called when animation deactivated.
|
||||
void setDeactivateCallback( void (*cb)(void *), void* userdata );
|
||||
|
|
@ -199,7 +199,7 @@ public:
|
|||
LLTestMotion(const LLUUID &id) : LLMotion(id){}
|
||||
~LLTestMotion() {}
|
||||
static LLMotion *create(const LLUUID& id) { return new LLTestMotion(id); }
|
||||
BOOL getLoop() { return FALSE; }
|
||||
bool getLoop() { return false; }
|
||||
F32 getDuration() { return 0.0f; }
|
||||
F32 getEaseInDuration() { return 0.0f; }
|
||||
F32 getEaseOutDuration() { return 0.0f; }
|
||||
|
|
@ -208,8 +208,8 @@ public:
|
|||
F32 getMinPixelArea() { return 0.f; }
|
||||
|
||||
LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; }
|
||||
BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return TRUE; }
|
||||
BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return TRUE; }
|
||||
BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; }
|
||||
BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; }
|
||||
void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; }
|
||||
};
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ public:
|
|||
static LLMotion *create(const LLUUID &id) { return new LLNullMotion(id); }
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
/*virtual*/ BOOL getLoop() { return TRUE; }
|
||||
/*virtual*/ bool getLoop() { return true; }
|
||||
|
||||
// motions must report their total duration
|
||||
/*virtual*/ F32 getDuration() { return 1.f; }
|
||||
|
|
@ -253,12 +253,12 @@ public:
|
|||
// called when a motion is activated
|
||||
// must return TRUE to indicate success, or else
|
||||
// it will be deactivated
|
||||
/*virtual*/ BOOL onActivate() { return TRUE; }
|
||||
/*virtual*/ BOOL onActivate() { return true; }
|
||||
|
||||
// called per time step
|
||||
// must return TRUE while it is active, and
|
||||
// must return FALSE when the motion is completed.
|
||||
/*virtual*/ BOOL onUpdate(F32 activeTime, U8* joint_mask) { return TRUE; }
|
||||
/*virtual*/ BOOL onUpdate(F32 activeTime, U8* joint_mask) { return true; }
|
||||
|
||||
// called when a motion is deactivated
|
||||
/*virtual*/ void onDeactivate() {}
|
||||
|
|
|
|||
|
|
@ -82,10 +82,10 @@ BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor con
|
|||
if (!is_in_map(mMotionTable, id))
|
||||
{
|
||||
mMotionTable[id] = constructor;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -425,12 +425,12 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
|
|||
|
||||
if (!motion)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
//if the motion is already active and allows deprecation, then let it keep playing
|
||||
else if (motion->canDeprecate() && isMotionActive(motion))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// LL_INFOS() << "Starting motion " << name << LL_ENDL;
|
||||
|
|
@ -453,7 +453,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat
|
|||
{
|
||||
if (!motion)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -465,15 +465,15 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat
|
|||
{
|
||||
deactivateMotionInstance(motion);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (isMotionLoading(motion))
|
||||
{
|
||||
motion->setStopped(TRUE);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -939,7 +939,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
|
|||
// hopefully this fixes it.
|
||||
if (motion == NULL || motion->getPose() == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mLoadingMotions.find(motion) != mLoadingMotions.end())
|
||||
|
|
@ -947,7 +947,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
|
|||
// we want to start this motion, but we can't yet, so flag it as started
|
||||
motion->setStopped(FALSE);
|
||||
// report pending animations as activated
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
motion->mResidualWeight = motion->getPose()->getWeight();
|
||||
|
|
@ -991,7 +991,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time)
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1014,7 +1014,7 @@ BOOL LLMotionController::deactivateMotionInstance(LLMotion *motion)
|
|||
mActiveMotions.remove(motion);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLMotionController::deprecateMotionInstance(LLMotion* motion)
|
||||
|
|
|
|||
|
|
@ -133,10 +133,10 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
|
|||
BOOL ok = step->serialize(dp);
|
||||
if (!ok)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
|
||||
|
|
@ -148,7 +148,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
|
|||
LL_WARNS() << "Bad LLMultiGesture version " << version
|
||||
<< " should be " << GESTURE_VERSION
|
||||
<< LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
dp.unpackU8(mKey, "key");
|
||||
|
|
@ -164,7 +164,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
|
|||
if (count < 0)
|
||||
{
|
||||
LL_WARNS() << "Bad LLMultiGesture step count " << count << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
S32 i;
|
||||
|
|
@ -180,7 +180,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
|
|||
{
|
||||
LLGestureStepAnimation* step = new LLGestureStepAnimation();
|
||||
BOOL ok = step->deserialize(dp);
|
||||
if (!ok) return FALSE;
|
||||
if (!ok) return false;
|
||||
mSteps.push_back(step);
|
||||
break;
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
|
|||
{
|
||||
LLGestureStepSound* step = new LLGestureStepSound();
|
||||
BOOL ok = step->deserialize(dp);
|
||||
if (!ok) return FALSE;
|
||||
if (!ok) return false;
|
||||
mSteps.push_back(step);
|
||||
break;
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
|
|||
{
|
||||
LLGestureStepChat* step = new LLGestureStepChat();
|
||||
BOOL ok = step->deserialize(dp);
|
||||
if (!ok) return FALSE;
|
||||
if (!ok) return false;
|
||||
mSteps.push_back(step);
|
||||
break;
|
||||
}
|
||||
|
|
@ -204,18 +204,18 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp)
|
|||
{
|
||||
LLGestureStepWait* step = new LLGestureStepWait();
|
||||
BOOL ok = step->deserialize(dp);
|
||||
if (!ok) return FALSE;
|
||||
if (!ok) return false;
|
||||
mSteps.push_back(step);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
LL_WARNS() << "Bad LLMultiGesture step type " << type << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLMultiGesture::dump()
|
||||
|
|
@ -267,7 +267,7 @@ BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const
|
|||
dp.packString(mAnimName, "anim_name");
|
||||
dp.packUUID(mAnimAssetID, "asset_id");
|
||||
dp.packU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
|
||||
|
|
@ -284,7 +284,7 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
|
|||
|
||||
dp.unpackUUID(mAnimAssetID, "asset_id");
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepAnimation::getLabel() const
|
||||
|
|
@ -349,7 +349,7 @@ BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const
|
|||
dp.packString(mSoundName, "sound_name");
|
||||
dp.packUUID(mSoundAssetID, "asset_id");
|
||||
dp.packU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
|
||||
|
|
@ -358,7 +358,7 @@ BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
|
|||
|
||||
dp.unpackUUID(mSoundAssetID, "asset_id");
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepSound::getLabel() const
|
||||
|
|
@ -408,7 +408,7 @@ BOOL LLGestureStepChat::serialize(LLDataPacker& dp) const
|
|||
{
|
||||
dp.packString(mChatText, "chat_text");
|
||||
dp.packU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLGestureStepChat::deserialize(LLDataPacker& dp)
|
||||
|
|
@ -416,7 +416,7 @@ BOOL LLGestureStepChat::deserialize(LLDataPacker& dp)
|
|||
dp.unpackString(mChatText, "chat_text");
|
||||
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepChat::getLabel() const
|
||||
|
|
@ -463,14 +463,14 @@ BOOL LLGestureStepWait::serialize(LLDataPacker& dp) const
|
|||
{
|
||||
dp.packF32(mWaitSeconds, "wait_seconds");
|
||||
dp.packU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLGestureStepWait::deserialize(LLDataPacker& dp)
|
||||
{
|
||||
dp.unpackF32(mWaitSeconds, "wait_seconds");
|
||||
dp.unpackU32(mFlags, "flags");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
// *NOTE: result is translated in LLPreviewGesture::getLabel()
|
||||
std::vector<std::string> LLGestureStepWait::getLabel() const
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState)
|
|||
{
|
||||
mJointMap[jointState->getJoint()->getName()] = jointState;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -96,7 +96,7 @@ BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState)
|
|||
BOOL LLPose::removeJointState(const LLPointer<LLJointState>& jointState)
|
||||
{
|
||||
mJointMap.erase(jointState->getJoint()->getName());
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -105,7 +105,7 @@ BOOL LLPose::removeJointState(const LLPointer<LLJointState>& jointState)
|
|||
BOOL LLPose::removeAllJointStates()
|
||||
{
|
||||
mJointMap.clear();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -199,7 +199,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_sta
|
|||
|
||||
if (!joint_state->getJoint())
|
||||
// this joint state doesn't point to an actual joint, so we don't care about applying it
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
for(S32 i = 0; i < JSB_NUM_JOINT_STATES; i++)
|
||||
{
|
||||
|
|
@ -208,7 +208,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_sta
|
|||
mJointStates[i] = joint_state;
|
||||
mPriorities[i] = priority;
|
||||
mAdditiveBlends[i] = additive_blend;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (priority > mPriorities[i])
|
||||
{
|
||||
|
|
@ -225,11 +225,11 @@ BOOL LLJointStateBlender::addJointState(const LLPointer<LLJointState>& joint_sta
|
|||
mJointStates[i] = joint_state;
|
||||
mPriorities[i] = priority;
|
||||
mAdditiveBlends[i] = additive_blend;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -503,7 +503,7 @@ BOOL LLPoseBlender::addMotion(LLMotion* motion)
|
|||
mActiveBlenders.push_front(joint_blender);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ LLStateDiagram::~LLStateDiagram()
|
|||
BOOL LLStateDiagram::addState(LLFSMState *state)
|
||||
{
|
||||
mStates[state] = Transitions();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// add a directed transition between 2 states
|
||||
|
|
@ -89,11 +89,11 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat
|
|||
if (transition_it != state_transitions->end())
|
||||
{
|
||||
LL_ERRS() << "LLStateTable::addDirectedTransition() : transition already exists" << LL_ENDL;
|
||||
return FALSE; // transition already exists
|
||||
return false; // transition already exists
|
||||
}
|
||||
|
||||
(*state_transitions)[&transition] = &end_state;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// add an undirected transition between 2 states
|
||||
|
|
@ -183,9 +183,9 @@ BOOL LLStateDiagram::stateIsValid(LLFSMState& state)
|
|||
{
|
||||
if (mStates.find(&state) != mStates.end())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLFSMState* LLStateDiagram::getState(U32 state_id)
|
||||
|
|
@ -213,7 +213,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename)
|
|||
if (!dot_file)
|
||||
{
|
||||
LL_WARNS() << "LLStateDiagram::saveDotFile() : Couldn't open " << filename << " to save state diagram." << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
apr_file_printf(dot_file, "digraph StateMachine {\n\tsize=\"100,100\";\n\tfontsize=40;\n\tlabel=\"Finite State Machine\";\n\torientation=landscape\n\tratio=.77\n");
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ BOOL LLStateDiagram::saveDotFile(const std::string& filename)
|
|||
|
||||
apr_file_printf(dot_file, "}\n");
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream &s, LLStateDiagram &FSM)
|
||||
|
|
@ -323,10 +323,10 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data,
|
|||
{
|
||||
initial_state->onEntry(user_data);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_entry)
|
||||
|
|
@ -342,10 +342,10 @@ BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_en
|
|||
{
|
||||
state->onEntry(user_data);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLStateMachine::processTransition(LLFSMTransition& transition, void* user_data)
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLTargetingMotion::onActivate()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -113,7 +113,7 @@ BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
|
||||
if (!lookAtPoint)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// motions must specify whether or not they loop
|
||||
virtual BOOL getLoop() { return TRUE; }
|
||||
virtual bool getLoop() { return true; }
|
||||
|
||||
// motions must report their total duration
|
||||
virtual F32 getDuration() { return 0.0; }
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ LLVisualParamInfo::LLVisualParamInfo()
|
|||
//-----------------------------------------------------------------------------
|
||||
// parseXml()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
||||
bool LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
||||
{
|
||||
// attribute: id
|
||||
static LLStdStringHandle id_string = LLXmlTree::addAttributeString("id");
|
||||
|
|
@ -102,7 +102,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
|||
else
|
||||
{
|
||||
LL_WARNS() << "Avatar file: <param> has invalid sex attribute: " << sex << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// attribute: name
|
||||
|
|
@ -110,7 +110,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
|||
if( !node->getFastAttributeString( name_string, mName ) )
|
||||
{
|
||||
LL_WARNS() << "Avatar file: <param> is missing name attribute" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// attribute: label
|
||||
|
|
@ -138,7 +138,7 @@ BOOL LLVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
|||
mMaxName = "More";
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
@ -211,11 +211,11 @@ BOOL LLVisualParam::setInfo(LLVisualParamInfo *info)
|
|||
{
|
||||
llassert(mInfo == NULL);
|
||||
if (info->mID < 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
mInfo = info;
|
||||
mID = info->mID;
|
||||
setWeight(getDefaultWeight(), FALSE );
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -227,9 +227,9 @@ BOOL LLVisualParam::parseData(LLXmlTreeNode *node)
|
|||
|
||||
info->parseXml(node);
|
||||
if (!setInfo(info))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
@ -351,10 +351,10 @@ void LLVisualParam::stopAnimating(BOOL upload_bake)
|
|||
}
|
||||
|
||||
//virtual
|
||||
BOOL LLVisualParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params)
|
||||
bool LLVisualParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross_params)
|
||||
{
|
||||
// nothing to do for non-driver parameters
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
LLVisualParamInfo();
|
||||
virtual ~LLVisualParamInfo() {};
|
||||
|
||||
virtual BOOL parseXml(LLXmlTreeNode *node);
|
||||
virtual bool parseXml(LLXmlTreeNode *node);
|
||||
|
||||
S32 getID() const { return mID; }
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ public:
|
|||
virtual void stopAnimating(BOOL upload_bake);
|
||||
// </FS:Ansariel> [Legacy Bake]
|
||||
|
||||
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();
|
||||
|
||||
// Interface methods
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@
|
|||
* signatures.
|
||||
*/
|
||||
template <typename FTYPE>
|
||||
inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits)
|
||||
inline bool is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits)
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
bool ret = true;
|
||||
FTYPE diff = (FTYPE) fabs(x - y);
|
||||
|
||||
S32 diffInt = (S32) diff;
|
||||
|
|
@ -58,20 +58,20 @@ inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits)
|
|||
// based on the number of bits used for packing decimal portion.
|
||||
if (diffInt != 0 || diffFracTolerance > 1)
|
||||
{
|
||||
ret = FALSE;
|
||||
ret = false;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// F32 flavor
|
||||
inline BOOL is_approx_equal_fraction(F32 x, F32 y, U32 frac_bits)
|
||||
inline bool is_approx_equal_fraction(F32 x, F32 y, U32 frac_bits)
|
||||
{
|
||||
return is_approx_equal_fraction_impl<F32>(x, y, frac_bits);
|
||||
}
|
||||
|
||||
/// F64 flavor
|
||||
inline BOOL is_approx_equal_fraction(F64 x, F64 y, U32 frac_bits)
|
||||
inline bool is_approx_equal_fraction(F64 x, F64 y, U32 frac_bits)
|
||||
{
|
||||
return is_approx_equal_fraction_impl<F64>(x, y, frac_bits);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,3 +59,19 @@ std::string LLBase64::encode(const U8* input, size_t input_size)
|
|||
return output;
|
||||
}
|
||||
|
||||
std::string LLBase64::decodeAsString(const std::string &input)
|
||||
{
|
||||
int b64_buffer_length = apr_base64_decode_len(input.c_str());
|
||||
char* b64_buffer = new char[b64_buffer_length];
|
||||
|
||||
// This is faster than apr_base64_encode() if you know
|
||||
// you're not on an EBCDIC machine. Also, the output is
|
||||
// null terminated, even though the documentation doesn't
|
||||
// specify. See apr_base64.c for details. JC
|
||||
b64_buffer_length = apr_base64_decode(b64_buffer, input.c_str());
|
||||
std::string res;
|
||||
res.assign(b64_buffer);
|
||||
delete[] b64_buffer;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class LL_COMMON_API LLBase64
|
|||
{
|
||||
public:
|
||||
static std::string encode(const U8* input, size_t input_size);
|
||||
static std::string decodeAsString(const std::string& input);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ bool LLCallbackList::containsFunction( callback_t func, void *data)
|
|||
callback_list_t::iterator iter = find(func,data);
|
||||
if (iter != mCallbackList.end())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -85,11 +85,11 @@ bool LLCallbackList::deleteFunction( callback_t func, void *data)
|
|||
if (iter != mCallbackList.end())
|
||||
{
|
||||
mCallbackList.erase(iter);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -191,10 +191,10 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
BOOL tick()
|
||||
bool tick()
|
||||
{
|
||||
mCallable();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
nullary_func_t mCallable;
|
||||
|
|
@ -215,7 +215,7 @@ public:
|
|||
{
|
||||
}
|
||||
private:
|
||||
BOOL tick()
|
||||
bool tick()
|
||||
{
|
||||
return mCallable();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
//function to be called at the supplied frequency
|
||||
// Normally return FALSE; TRUE will delete the timer after the function returns.
|
||||
virtual BOOL tick() = 0;
|
||||
virtual bool tick() = 0;
|
||||
|
||||
static void updateClass();
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ public:
|
|||
mOnce(once),
|
||||
mCallable(callable)
|
||||
{}
|
||||
BOOL tick() override
|
||||
bool tick() override
|
||||
{
|
||||
mCallable();
|
||||
// true tells updateClass() to delete this instance
|
||||
|
|
|
|||
|
|
@ -170,10 +170,10 @@ namespace
|
|||
: LLEventTimer(refresh), mLiveFile(f)
|
||||
{ }
|
||||
|
||||
BOOL tick()
|
||||
{
|
||||
bool tick()
|
||||
{
|
||||
mLiveFile.checkAndReload();
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -79,13 +79,13 @@ private:
|
|||
LLEventTimer(0),
|
||||
mTask(std::forward<CALLABLE>(callable))
|
||||
{}
|
||||
BOOL tick() override
|
||||
bool tick() override
|
||||
{
|
||||
// run the task on the main thread, will populate the future
|
||||
// obtained by get_future()
|
||||
mTask();
|
||||
// tell LLEventTimer we're done (one shot)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
// Given arbitrary CALLABLE, which might be a lambda, how are we
|
||||
// supposed to obtain its signature for std::packaged_task? It seems
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ public:
|
|||
static void toLower(string_type& string);
|
||||
|
||||
// True if this is the head of s.
|
||||
static BOOL isHead( const string_type& string, const T* s );
|
||||
static bool isHead( const string_type& string, const T* s );
|
||||
|
||||
/**
|
||||
* @brief Returns true if string starts with substr
|
||||
|
|
@ -365,7 +365,7 @@ public:
|
|||
static void replaceChar( string_type& string, T target, T replacement );
|
||||
static void replaceString( string_type& string, string_type target, string_type replacement );
|
||||
|
||||
static BOOL containsNonprintable(const string_type& string);
|
||||
static bool containsNonprintable(const string_type& string);
|
||||
static void stripNonprintable(string_type& string);
|
||||
|
||||
/**
|
||||
|
|
@ -391,15 +391,15 @@ public:
|
|||
static void _makeASCII(string_type& string);
|
||||
|
||||
// Conversion to other data types
|
||||
static BOOL convertToBOOL(const string_type& string, BOOL& value);
|
||||
static BOOL convertToU8(const string_type& string, U8& value);
|
||||
static BOOL convertToS8(const string_type& string, S8& value);
|
||||
static BOOL convertToS16(const string_type& string, S16& value);
|
||||
static BOOL convertToU16(const string_type& string, U16& value);
|
||||
static BOOL convertToU32(const string_type& string, U32& value);
|
||||
static BOOL convertToS32(const string_type& string, S32& value);
|
||||
static BOOL convertToF32(const string_type& string, F32& value);
|
||||
static BOOL convertToF64(const string_type& string, F64& value);
|
||||
static bool convertToBOOL(const string_type& string, BOOL& value);
|
||||
static bool convertToU8(const string_type& string, U8& value);
|
||||
static bool convertToS8(const string_type& string, S8& value);
|
||||
static bool convertToS16(const string_type& string, S16& value);
|
||||
static bool convertToU16(const string_type& string, U16& value);
|
||||
static bool convertToU32(const string_type& string, U32& value);
|
||||
static bool convertToS32(const string_type& string, S32& value);
|
||||
static bool convertToF32(const string_type& string, F32& value);
|
||||
static bool convertToF64(const string_type& string, F64& value);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Utility functions for working with char*'s and strings
|
||||
|
|
@ -424,7 +424,7 @@ public:
|
|||
static S32 compareDictInsensitive(const string_type& a, const string_type& b);
|
||||
|
||||
// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
|
||||
static BOOL precedesDict( const string_type& a, const string_type& b );
|
||||
static bool precedesDict( const string_type& a, const string_type& b );
|
||||
|
||||
// A replacement for strncpy.
|
||||
// If the dst buffer is dst_size bytes long or more, ensures that dst is null terminated and holds
|
||||
|
|
@ -1376,7 +1376,7 @@ S32 LLStringUtilBase<T>::compareDictInsensitive(const string_type& astr, const s
|
|||
// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
|
||||
// static
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b )
|
||||
bool LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b )
|
||||
{
|
||||
if( a.size() && b.size() )
|
||||
{
|
||||
|
|
@ -1609,15 +1609,15 @@ void LLStringUtilBase<T>::replaceTabsWithSpaces( string_type& str, size_type spa
|
|||
|
||||
//static
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::containsNonprintable(const string_type& string)
|
||||
bool LLStringUtilBase<T>::containsNonprintable(const string_type& string)
|
||||
{
|
||||
const char MIN = 32;
|
||||
BOOL rv = FALSE;
|
||||
bool rv = false;
|
||||
for (size_type i = 0; i < string.size(); i++)
|
||||
{
|
||||
if(string[i] < MIN)
|
||||
{
|
||||
rv = TRUE;
|
||||
rv = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1746,12 +1746,12 @@ void LLStringUtilBase<T>::copyInto(string_type& dst, const string_type& src, siz
|
|||
// True if this is the head of s.
|
||||
//static
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::isHead( const string_type& string, const T* s )
|
||||
{
|
||||
bool LLStringUtilBase<T>::isHead( const string_type& string, const T* s )
|
||||
{
|
||||
if( string.empty() )
|
||||
{
|
||||
// Early exit
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1818,11 +1818,11 @@ auto LLStringUtilBase<T>::getenv(const std::string& key, const string_type& dflt
|
|||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
|
||||
bool LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
|
||||
{
|
||||
if( string.empty() )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
string_type temp( string );
|
||||
|
|
@ -1835,8 +1835,8 @@ BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
|
|||
(temp == "true") ||
|
||||
(temp == "True") )
|
||||
{
|
||||
value = TRUE;
|
||||
return TRUE;
|
||||
value = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
if(
|
||||
|
|
@ -1847,71 +1847,71 @@ BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
|
|||
(temp == "false") ||
|
||||
(temp == "False") )
|
||||
{
|
||||
value = FALSE;
|
||||
return TRUE;
|
||||
value = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToU8(const string_type& string, U8& value)
|
||||
bool LLStringUtilBase<T>::convertToU8(const string_type& string, U8& value)
|
||||
{
|
||||
S32 value32 = 0;
|
||||
BOOL success = convertToS32(string, value32);
|
||||
bool success = convertToS32(string, value32);
|
||||
if( success && (U8_MIN <= value32) && (value32 <= U8_MAX) )
|
||||
{
|
||||
value = (U8) value32;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToS8(const string_type& string, S8& value)
|
||||
bool LLStringUtilBase<T>::convertToS8(const string_type& string, S8& value)
|
||||
{
|
||||
S32 value32 = 0;
|
||||
BOOL success = convertToS32(string, value32);
|
||||
bool success = convertToS32(string, value32);
|
||||
if( success && (S8_MIN <= value32) && (value32 <= S8_MAX) )
|
||||
{
|
||||
value = (S8) value32;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToS16(const string_type& string, S16& value)
|
||||
bool LLStringUtilBase<T>::convertToS16(const string_type& string, S16& value)
|
||||
{
|
||||
S32 value32 = 0;
|
||||
BOOL success = convertToS32(string, value32);
|
||||
bool success = convertToS32(string, value32);
|
||||
if( success && (S16_MIN <= value32) && (value32 <= S16_MAX) )
|
||||
{
|
||||
value = (S16) value32;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToU16(const string_type& string, U16& value)
|
||||
bool LLStringUtilBase<T>::convertToU16(const string_type& string, U16& value)
|
||||
{
|
||||
S32 value32 = 0;
|
||||
BOOL success = convertToS32(string, value32);
|
||||
bool success = convertToS32(string, value32);
|
||||
if( success && (U16_MIN <= value32) && (value32 <= U16_MAX) )
|
||||
{
|
||||
value = (U16) value32;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value)
|
||||
bool LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value)
|
||||
{
|
||||
if( string.empty() )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
string_type temp( string );
|
||||
|
|
@ -1921,17 +1921,17 @@ BOOL LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value)
|
|||
if(i_stream >> v)
|
||||
{
|
||||
value = v;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value)
|
||||
bool LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value)
|
||||
{
|
||||
if( string.empty() )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
string_type temp( string );
|
||||
|
|
@ -1944,34 +1944,34 @@ BOOL LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value)
|
|||
//if((LONG_MAX == v) || (LONG_MIN == v))
|
||||
//{
|
||||
// // Underflow or overflow
|
||||
// return FALSE;
|
||||
// return false;
|
||||
//}
|
||||
|
||||
value = v;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToF32(const string_type& string, F32& value)
|
||||
bool LLStringUtilBase<T>::convertToF32(const string_type& string, F32& value)
|
||||
{
|
||||
F64 value64 = 0.0;
|
||||
BOOL success = convertToF64(string, value64);
|
||||
bool success = convertToF64(string, value64);
|
||||
if( success && (-F32_MAX <= value64) && (value64 <= F32_MAX) )
|
||||
{
|
||||
value = (F32) value64;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
BOOL LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value)
|
||||
bool LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value)
|
||||
{
|
||||
if( string.empty() )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
string_type temp( string );
|
||||
|
|
@ -1984,13 +1984,13 @@ BOOL LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value)
|
|||
//if( ((-HUGE_VAL == v) || (HUGE_VAL == v))) )
|
||||
//{
|
||||
// // Underflow or overflow
|
||||
// return FALSE;
|
||||
// return false;
|
||||
//}
|
||||
|
||||
value = v;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
|
|
|||
|
|
@ -135,14 +135,14 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
|
|||
|
||||
if (LLFile::rename(old_filename, new_filename) != 0)
|
||||
{
|
||||
// We would like to return FALSE here indicating the operation
|
||||
// We would like to return false here indicating the operation
|
||||
// failed but the original code does not and doing so seems to
|
||||
// break a lot of things so we go with the flow...
|
||||
//return FALSE;
|
||||
//return false;
|
||||
LL_WARNS() << "Failed to rename " << old_file_id << " to " << new_id_str << " reason: " << strerror(errno) << LL_ENDL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -172,10 +172,10 @@ S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType fi
|
|||
return file_size;
|
||||
}
|
||||
|
||||
BOOL LLFileSystem::read(U8* buffer, S32 bytes)
|
||||
bool LLFileSystem::read(U8* buffer, S32 bytes)
|
||||
{
|
||||
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // <FS:Beq> measure cache performance
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
|
||||
std::string id;
|
||||
mFileID.toString(id);
|
||||
|
|
@ -204,7 +204,7 @@ BOOL LLFileSystem::read(U8* buffer, S32 bytes)
|
|||
// mPosition += mBytesRead;
|
||||
// if (mBytesRead)
|
||||
// {
|
||||
// success = TRUE;
|
||||
// success = true;
|
||||
// }
|
||||
//}
|
||||
LLFILE* file = LLFile::fopen(filename, "rb");
|
||||
|
|
@ -220,7 +220,7 @@ BOOL LLFileSystem::read(U8* buffer, S32 bytes)
|
|||
// but that will break avatar rezzing...
|
||||
if (mBytesRead)
|
||||
{
|
||||
success = TRUE;
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -235,13 +235,13 @@ S32 LLFileSystem::getLastBytesRead()
|
|||
return mBytesRead;
|
||||
}
|
||||
|
||||
BOOL LLFileSystem::eof()
|
||||
bool LLFileSystem::eof()
|
||||
{
|
||||
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // <FS:Beq> measure cache performance
|
||||
return mPosition >= getSize();
|
||||
}
|
||||
|
||||
BOOL LLFileSystem::write(const U8* buffer, S32 bytes)
|
||||
bool LLFileSystem::write(const U8* buffer, S32 bytes)
|
||||
{
|
||||
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // <FS:Beq> measure cache performance
|
||||
std::string id_str;
|
||||
|
|
@ -249,7 +249,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes)
|
|||
const std::string extra_info = "";
|
||||
const std::string filename = LLDiskCache::getInstance()->metaDataToFilepath(id_str, mFileType, extra_info);
|
||||
|
||||
BOOL success = FALSE;
|
||||
bool success = false;
|
||||
|
||||
// <FS:Ansariel> IO-streams replacement
|
||||
//if (mMode == APPEND)
|
||||
|
|
@ -261,7 +261,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes)
|
|||
|
||||
// mPosition = ofs.tellp(); // <FS:Ansariel> Fix asset caching
|
||||
|
||||
// success = TRUE;
|
||||
// success = true;
|
||||
// }
|
||||
//}
|
||||
//// <FS:Ansariel> Fix asset caching
|
||||
|
|
@ -274,7 +274,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes)
|
|||
// ofs.seekp(mPosition, std::ios::beg);
|
||||
// ofs.write((const char*)buffer, bytes);
|
||||
// mPosition += bytes;
|
||||
// success = TRUE;
|
||||
// success = true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
|
@ -284,7 +284,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes)
|
|||
// {
|
||||
// ofs.write((const char*)buffer, bytes);
|
||||
// mPosition += bytes;
|
||||
// success = TRUE;
|
||||
// success = true;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
@ -298,7 +298,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes)
|
|||
|
||||
// mPosition += bytes;
|
||||
|
||||
// success = TRUE;
|
||||
// success = true;
|
||||
// }
|
||||
//}
|
||||
if (mMode == APPEND)
|
||||
|
|
@ -353,7 +353,7 @@ BOOL LLFileSystem::write(const U8* buffer, S32 bytes)
|
|||
return success;
|
||||
}
|
||||
|
||||
BOOL LLFileSystem::seek(S32 offset, S32 origin)
|
||||
bool LLFileSystem::seek(S32 offset, S32 origin)
|
||||
{
|
||||
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // <FS:Beq> measure cache performance
|
||||
if (-1 == origin)
|
||||
|
|
@ -370,18 +370,18 @@ BOOL LLFileSystem::seek(S32 offset, S32 origin)
|
|||
LL_WARNS() << "Attempt to seek past end of file" << LL_ENDL;
|
||||
|
||||
mPosition = size;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (new_pos < 0)
|
||||
{
|
||||
LL_WARNS() << "Attempt to seek past beginning of file" << LL_ENDL;
|
||||
|
||||
mPosition = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
mPosition = new_pos;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
S32 LLFileSystem::tell() const
|
||||
|
|
@ -403,7 +403,7 @@ S32 LLFileSystem::getMaxSize()
|
|||
return INT_MAX;
|
||||
}
|
||||
|
||||
BOOL LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_type)
|
||||
bool LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_type)
|
||||
{
|
||||
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // <FS:Beq> measure cache performance
|
||||
LLFileSystem::renameFile(mFileID, mFileType, new_id, new_type);
|
||||
|
|
@ -411,13 +411,13 @@ BOOL LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_typ
|
|||
mFileID = new_id;
|
||||
mFileType = new_type;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLFileSystem::remove()
|
||||
bool LLFileSystem::remove()
|
||||
{
|
||||
LL_PROFILE_ZONE_COLOR(tracy::Color::Gold); // <FS:Beq> measure cache performance
|
||||
LLFileSystem::removeFile(mFileID, mFileType);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,18 +40,18 @@ class LLFileSystem
|
|||
LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_type, S32 mode = LLFileSystem::READ);
|
||||
~LLFileSystem();
|
||||
|
||||
BOOL read(U8* buffer, S32 bytes);
|
||||
bool read(U8* buffer, S32 bytes);
|
||||
S32 getLastBytesRead();
|
||||
BOOL eof();
|
||||
bool eof();
|
||||
|
||||
BOOL write(const U8* buffer, S32 bytes);
|
||||
BOOL seek(S32 offset, S32 origin = -1);
|
||||
bool write(const U8* buffer, S32 bytes);
|
||||
bool seek(S32 offset, S32 origin = -1);
|
||||
S32 tell() const;
|
||||
|
||||
S32 getSize();
|
||||
S32 getMaxSize();
|
||||
BOOL rename(const LLUUID& new_id, const LLAssetType::EType new_type);
|
||||
BOOL remove();
|
||||
bool rename(const LLUUID& new_id, const LLAssetType::EType new_type);
|
||||
bool remove();
|
||||
|
||||
static bool getExists(const LLUUID& file_id, const LLAssetType::EType file_type);
|
||||
static bool removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_error = 0);
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ public:
|
|||
|
||||
//------------------------------------------------------------------------
|
||||
public:
|
||||
LLLFSThread(bool threaded = TRUE);
|
||||
~LLLFSThread();
|
||||
LLLFSThread(bool threaded = true);
|
||||
~LLLFSThread();
|
||||
|
||||
// Return a Request handle
|
||||
handle_t read(const std::string& filename, /* Flawfinder: ignore */
|
||||
|
|
@ -126,7 +126,7 @@ public:
|
|||
Responder* responder);
|
||||
|
||||
// static initializers
|
||||
static void initClass(bool local_is_threaded = TRUE); // Setup sLocal
|
||||
static void initClass(bool local_is_threaded = true); // Setup sLocal
|
||||
static S32 updateClass(U32 ms_elapsed);
|
||||
static void cleanupClass(); // Delete sLocal
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg()
|
|||
|
||||
jpeg_create_decompress (&cinfo);
|
||||
jpeg_stdio_src (&cinfo, fp);
|
||||
jpeg_read_header (&cinfo, TRUE);
|
||||
jpeg_read_header (&cinfo, true);
|
||||
cinfo.out_color_space = JCS_RGB;
|
||||
jpeg_start_decompress (&cinfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class ImageRequest
|
|||
{
|
||||
public:
|
||||
ImageRequest(const LLPointer<LLImageFormatted>& image,
|
||||
S32 discard, BOOL needs_aux,
|
||||
S32 discard, bool needs_aux,
|
||||
const LLPointer<LLImageDecodeThread::Responder>& responder);
|
||||
virtual ~ImageRequest();
|
||||
|
||||
|
|
@ -48,12 +48,12 @@ private:
|
|||
// input
|
||||
LLPointer<LLImageFormatted> mFormattedImage;
|
||||
S32 mDiscardLevel;
|
||||
BOOL mNeedsAux;
|
||||
bool mNeedsAux;
|
||||
// output
|
||||
LLPointer<LLImageRaw> mDecodedImageRaw;
|
||||
LLPointer<LLImageRaw> mDecodedImageAux;
|
||||
BOOL mDecodedRaw;
|
||||
BOOL mDecodedAux;
|
||||
bool mDecodedRaw;
|
||||
bool mDecodedAux;
|
||||
LLPointer<LLImageDecodeThread::Responder> mResponder;
|
||||
};
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ size_t LLImageDecodeThread::getPending()
|
|||
LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(
|
||||
const LLPointer<LLImageFormatted>& image,
|
||||
S32 discard,
|
||||
BOOL needs_aux,
|
||||
bool needs_aux,
|
||||
const LLPointer<LLImageDecodeThread::Responder>& responder)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
|
||||
|
|
@ -124,13 +124,13 @@ LLImageDecodeThread::Responder::~Responder()
|
|||
//----------------------------------------------------------------------------
|
||||
|
||||
ImageRequest::ImageRequest(const LLPointer<LLImageFormatted>& image,
|
||||
S32 discard, BOOL needs_aux,
|
||||
S32 discard, bool needs_aux,
|
||||
const LLPointer<LLImageDecodeThread::Responder>& responder)
|
||||
: mFormattedImage(image),
|
||||
mDiscardLevel(discard),
|
||||
mNeedsAux(needs_aux),
|
||||
mDecodedRaw(FALSE),
|
||||
mDecodedAux(FALSE),
|
||||
mDecodedRaw(false),
|
||||
mDecodedAux(false),
|
||||
mResponder(responder)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
// meant to resemble LLQueuedThread::handle_t
|
||||
typedef U32 handle_t;
|
||||
handle_t decodeImage(const LLPointer<LLImageFormatted>& image,
|
||||
S32 discard, BOOL needs_aux,
|
||||
S32 discard, bool needs_aux,
|
||||
const LLPointer<Responder>& responder);
|
||||
size_t getPending();
|
||||
size_t update(F32 max_time_ms);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ LLPngWrapper::~LLPngWrapper()
|
|||
}
|
||||
|
||||
// Checks the src for a valid PNG header
|
||||
BOOL LLPngWrapper::isValidPng(U8* src)
|
||||
bool LLPngWrapper::isValidPng(U8* src)
|
||||
{
|
||||
const int PNG_BYTES_TO_CHECK = 8;
|
||||
|
||||
|
|
@ -78,10 +78,10 @@ BOOL LLPngWrapper::isValidPng(U8* src)
|
|||
if (sig != 0)
|
||||
{
|
||||
mErrorMessage = "Invalid or corrupt PNG file";
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Called by the libpng library when a fatal encoding or decoding error
|
||||
|
|
@ -134,7 +134,7 @@ void LLPngWrapper::writeFlush(png_structp png_ptr)
|
|||
// The scanline also begins at the bottom of
|
||||
// the image (per SecondLife conventions) instead of at the top, so we
|
||||
// must assign row-pointers in "reverse" order.
|
||||
BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop)
|
||||
bool LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -210,18 +210,18 @@ BOOL LLPngWrapper::readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInf
|
|||
{
|
||||
mErrorMessage = msg.what();
|
||||
releaseResources();
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
catch (std::bad_alloc&)
|
||||
{
|
||||
mErrorMessage = "LLPngWrapper";
|
||||
releaseResources();
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
// Clean up and return
|
||||
releaseResources();
|
||||
return (TRUE);
|
||||
return (true);
|
||||
}
|
||||
|
||||
// Do transformations to normalize the input to 8-bpp RGBA
|
||||
|
|
@ -283,7 +283,7 @@ void LLPngWrapper::updateMetaData()
|
|||
|
||||
// Method to write raw image into PNG at dest. The raw scanline begins
|
||||
// at the bottom of the image per SecondLife conventions.
|
||||
BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize)
|
||||
bool LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSize)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -364,11 +364,11 @@ BOOL LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSiz
|
|||
{
|
||||
mErrorMessage = msg.what();
|
||||
releaseResources();
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
releaseResources();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Cleanup various internal structures
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ public:
|
|||
S8 mComponents;
|
||||
};
|
||||
|
||||
BOOL isValidPng(U8* src);
|
||||
BOOL readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop = NULL);
|
||||
BOOL writePng(const LLImageRaw* rawImage, U8* dst, size_t destSize);
|
||||
bool isValidPng(U8* src);
|
||||
bool readPng(U8* src, S32 dataSize, LLImageRaw* rawImage, ImageInfo *infop = NULL);
|
||||
bool writePng(const LLImageRaw* rawImage, U8* dst, size_t destSize);
|
||||
U32 getFinalSize();
|
||||
const std::string& getErrorMessage();
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ LLAssetType::EType LLInventoryObject::getActualType() const
|
|||
return mType;
|
||||
}
|
||||
|
||||
BOOL LLInventoryObject::getIsLinkType() const
|
||||
bool LLInventoryObject::getIsLinkType() const
|
||||
{
|
||||
return LLAssetType::lookupIsLinkType(mType);
|
||||
}
|
||||
|
|
@ -181,7 +181,7 @@ void LLInventoryObject::setType(LLAssetType::EType type)
|
|||
|
||||
|
||||
// virtual
|
||||
BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
|
||||
bool LLInventoryObject::importLegacyStream(std::istream& input_stream)
|
||||
{
|
||||
// *NOTE: Changing the buffer size will require changing the scanf
|
||||
// calls below.
|
||||
|
|
@ -252,10 +252,10 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
|
|||
<< "' in LLInventoryObject::importLegacyStream() for object " << mUUID << LL_ENDL;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) const
|
||||
bool LLInventoryObject::exportLegacyStream(std::ostream& output_stream, bool) const
|
||||
{
|
||||
std::string uuid_str;
|
||||
output_stream << "\tinv_object\t0\n\t{\n";
|
||||
|
|
@ -266,16 +266,16 @@ BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) co
|
|||
output_stream << "\t\ttype\t" << LLAssetType::lookup(mType) << "\n";
|
||||
output_stream << "\t\tname\t" << mName.c_str() << "|\n";
|
||||
output_stream << "\t}\n";
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLInventoryObject::updateParentOnServer(BOOL) const
|
||||
void LLInventoryObject::updateParentOnServer(bool) const
|
||||
{
|
||||
// don't do nothin'
|
||||
LL_WARNS() << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLInventoryObject::updateServer(BOOL) const
|
||||
void LLInventoryObject::updateServer(bool) const
|
||||
{
|
||||
// don't do nothin'
|
||||
LL_WARNS() << "LLInventoryObject::updateServer() called. Doesn't do anything." << LL_ENDL;
|
||||
|
|
@ -562,7 +562,7 @@ void LLInventoryItem::packMessage(LLMessageSystem* msg) const
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)
|
||||
bool LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)
|
||||
{
|
||||
msg->getUUIDFast(block, _PREHASH_ItemID, mUUID, block_num);
|
||||
msg->getUUIDFast(block, _PREHASH_FolderID, mParentUUID, block_num);
|
||||
|
|
@ -598,13 +598,13 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
|
|||
if(local_crc == remote_crc)
|
||||
{
|
||||
LL_DEBUGS() << "crc matches" << LL_ENDL;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "inventory crc mismatch: local=" << std::hex << local_crc
|
||||
<< " remote=" << remote_crc << std::dec << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
return (local_crc == remote_crc);
|
||||
|
|
@ -690,7 +690,7 @@ int splitCacheLine( char *aBuffer, char *&aKeyword, char *&aValue )
|
|||
// </FS:ND>
|
||||
|
||||
// virtual
|
||||
BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
||||
bool LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
||||
{
|
||||
// *NOTE: Changing the buffer size will require changing the scanf
|
||||
// calls below.
|
||||
|
|
@ -698,7 +698,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
|||
char keyword[MAX_STRING]; /* Flawfinder: ignore */
|
||||
char valuestr[MAX_STRING]; /* Flawfinder: ignore */
|
||||
char junk[MAX_STRING]; /* Flawfinder: ignore */
|
||||
BOOL success = TRUE;
|
||||
bool success = true;
|
||||
|
||||
keyword[0] = '\0';
|
||||
valuestr[0] = '\0';
|
||||
|
|
@ -738,7 +738,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
|||
// the 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;
|
||||
success = mSaleInfo.importLegacyStream(input_stream, has_perm_mask, perm_mask);
|
||||
if(has_perm_mask)
|
||||
|
|
@ -868,7 +868,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
|||
return success;
|
||||
}
|
||||
|
||||
BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key) const
|
||||
bool LLInventoryItem::exportLegacyStream(std::ostream& output_stream, bool include_asset_key) const
|
||||
{
|
||||
std::string uuid_str;
|
||||
output_stream << "\tinv_item\t0\n\t{\n";
|
||||
|
|
@ -922,7 +922,7 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
|
|||
output_stream << "\t\tdesc\t" << mDescription.c_str() << "|\n";
|
||||
output_stream << "\t\tcreation_date\t" << mCreationDate << "\n";
|
||||
output_stream << "\t}\n";
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLSD LLInventoryItem::asLLSD() const
|
||||
|
|
@ -1042,7 +1042,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
|
|||
// the 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.fromLLSD(i->second, has_perm_mask, perm_mask))
|
||||
{
|
||||
|
|
@ -1326,7 +1326,7 @@ void LLInventoryCategory::unpackMessage(LLMessageSystem* msg,
|
|||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
|
||||
bool LLInventoryCategory::importLegacyStream(std::istream& input_stream)
|
||||
{
|
||||
// *NOTE: Changing the buffer size will require changing the scanf
|
||||
// calls below.
|
||||
|
|
@ -1405,10 +1405,10 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
|
|||
<< "' in inventory import category " << mUUID << LL_ENDL;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL) const
|
||||
bool LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, bool) const
|
||||
{
|
||||
std::string uuid_str;
|
||||
output_stream << "\tinv_category\t0\n\t{\n";
|
||||
|
|
@ -1426,7 +1426,7 @@ BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL)
|
|||
output_stream << "\t\tmetadata\t" << metadata << "|\n";
|
||||
}
|
||||
output_stream << "\t}\n";
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLSD LLInventoryCategory::exportLLSD() const
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
virtual const std::string& getName() const;
|
||||
virtual LLAssetType::EType getType() const;
|
||||
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
|
||||
BOOL getIsLinkType() const;
|
||||
bool getIsLinkType() const;
|
||||
virtual time_t getCreationDate() const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -98,11 +98,11 @@ public:
|
|||
// between simulator and viewer.
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
virtual bool importLegacyStream(std::istream& input_stream);
|
||||
virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = true) const;
|
||||
|
||||
virtual void updateParentOnServer(BOOL) const;
|
||||
virtual void updateServer(BOOL) const;
|
||||
virtual void updateParentOnServer(bool) const;
|
||||
virtual void updateServer(bool) const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member Variables
|
||||
|
|
@ -193,14 +193,14 @@ public:
|
|||
// Returns TRUE if the inventory item came through the network correctly.
|
||||
// Uses a simple crc check which is defeatable, but we want to detect
|
||||
// network mangling somehow.
|
||||
virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
|
||||
virtual bool unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
virtual bool importLegacyStream(std::istream& input_stream);
|
||||
virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = true) const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Helper Functions
|
||||
|
|
@ -267,8 +267,8 @@ public:
|
|||
// File Support
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
virtual bool importLegacyStream(std::istream& input_stream);
|
||||
virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = TRUE) const;
|
||||
|
||||
LLSD exportLLSD() const;
|
||||
bool importLLSD(const LLSD& cat_data);
|
||||
|
|
|
|||
|
|
@ -162,25 +162,25 @@ bool LLNotecard::importStream(std::istream& str)
|
|||
if(str.fail())
|
||||
{
|
||||
LL_WARNS() << "Invalid Linden text file header " << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( 1 != mVersion && 2 != mVersion)
|
||||
{
|
||||
LL_WARNS() << "Invalid Linden text file version: " << mVersion << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
str >> std::ws >> "{\n";
|
||||
if(str.fail())
|
||||
{
|
||||
LL_WARNS() << "Invalid Linden text file format" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!importEmbeddedItemsStream(str))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
char line_buf[STD_STRING_BUF_SIZE]; /* Flawfinder: ignore */
|
||||
|
|
@ -188,7 +188,7 @@ bool LLNotecard::importStream(std::istream& str)
|
|||
if(str.fail())
|
||||
{
|
||||
LL_WARNS() << "Invalid Linden text length field" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
line_buf[STD_STRING_STR_LEN] = '\0';
|
||||
|
||||
|
|
@ -196,23 +196,23 @@ bool LLNotecard::importStream(std::istream& str)
|
|||
if( 1 != sscanf(line_buf, "Text length %d", &text_len) )
|
||||
{
|
||||
LL_WARNS() << "Invalid Linden text length field" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(text_len > mMaxText || text_len < 0)
|
||||
{
|
||||
LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL success = TRUE;
|
||||
bool success = true;
|
||||
|
||||
char* text = new char[text_len + 1];
|
||||
fullread(str, text, text_len);
|
||||
if(str.fail())
|
||||
{
|
||||
LL_WARNS() << "Invalid Linden text: text shorter than text length: " << text_len << LL_ENDL;
|
||||
success = FALSE;
|
||||
success = false;
|
||||
}
|
||||
text[text_len] = '\0';
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ bool LLNotecard::exportEmbeddedItemsStream( std::ostream& out_stream )
|
|||
out_stream << llformat("ext char index %d\n", idx );
|
||||
if( !item->exportLegacyStream( out_stream ) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
out_stream << "}\n";
|
||||
}
|
||||
|
|
@ -256,7 +256,7 @@ bool LLNotecard::exportEmbeddedItemsStream( std::ostream& out_stream )
|
|||
|
||||
out_stream << "}\n";
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLNotecard::exportStream( std::ostream& out_stream )
|
||||
|
|
@ -266,14 +266,14 @@ bool LLNotecard::exportStream( std::ostream& out_stream )
|
|||
|
||||
if( !exportEmbeddedItemsStream( out_stream ) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
out_stream << llformat("Text length %d\n", mText.length() );
|
||||
out_stream << mText;
|
||||
out_stream << "}\n";
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -370,20 +370,20 @@ BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) con
|
|||
if (agent_id == LLUUID::null)
|
||||
{
|
||||
// system always can enter
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (isPublic())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (agent_id == mOwnerID)
|
||||
{
|
||||
// owner can always perform operations
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if (mParcelFlags & PF_CREATE_OBJECTS)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ((mParcelFlags & PF_CREATE_GROUP_OBJECTS)
|
||||
&& group_id.notNull() )
|
||||
|
|
@ -391,7 +391,7 @@ BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) con
|
|||
return (getGroupID() == group_id);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
|
||||
|
|
@ -399,14 +399,14 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
|
|||
if (agent_id == LLUUID::null)
|
||||
{
|
||||
// system always can enter
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if(OS_LEASED == mStatus)
|
||||
{
|
||||
if(agent_id == mOwnerID)
|
||||
{
|
||||
// owner can modify leased land
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -416,7 +416,7 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const
|
|||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -728,21 +728,21 @@ void LLParcel::expirePasses(S32 now)
|
|||
bool LLParcel::operator==(const LLParcel &rhs) const
|
||||
{
|
||||
if (mOwnerID != rhs.mOwnerID)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (mParcelFlags != rhs.mParcelFlags)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (mClaimDate != rhs.mClaimDate)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (mClaimPricePerMeter != rhs.mClaimPricePerMeter)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (mRentPricePerMeter != rhs.mRentPricePerMeter)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Calculate rent
|
||||
|
|
@ -791,12 +791,12 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
|
|||
{
|
||||
if (mAccessList.size() >= (U32) PARCEL_MAX_ACCESS_LIST)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (agent_id == getOwnerID())
|
||||
{
|
||||
// Can't add owner to these lists
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
LLAccessEntry::map::iterator itor = mAccessList.begin();
|
||||
while (itor != mAccessList.end())
|
||||
|
|
@ -811,7 +811,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
|
|||
else
|
||||
{
|
||||
// existing one expires later
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -825,7 +825,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
|
|||
new_entry.mTime = time;
|
||||
new_entry.mFlags = 0x0;
|
||||
mAccessList[new_entry.mID] = new_entry;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
|
||||
|
|
@ -833,12 +833,12 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
|
|||
if (mBanList.size() >= (U32) PARCEL_MAX_ACCESS_LIST)
|
||||
{
|
||||
// Not using ban list, so not a rational thing to do
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (agent_id == getOwnerID())
|
||||
{
|
||||
// Can't add owner to these lists
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLAccessEntry::map::iterator itor = mBanList.begin();
|
||||
|
|
@ -854,7 +854,7 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
|
|||
else
|
||||
{
|
||||
// existing one expires later
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -868,7 +868,7 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
|
|||
new_entry.mTime = time;
|
||||
new_entry.mFlags = 0x0;
|
||||
mBanList[new_entry.mID] = new_entry;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list, const LLUUID& agent_id); // <FS:CR> Various missing prototypes
|
||||
|
|
@ -952,7 +952,7 @@ BOOL LLParcel::isSaleTimerExpired(const U64& time)
|
|||
{
|
||||
if (mSaleTimerExpires.getStarted() == FALSE)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
BOOL expired = mSaleTimerExpires.checkExpirationAndReset(0.0f);
|
||||
if (expired)
|
||||
|
|
@ -966,7 +966,7 @@ BOOL LLParcel::isMediaResetTimerExpired(const U64& time)
|
|||
{
|
||||
if (mMediaResetTimer.getStarted() == FALSE)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
BOOL expired = mMediaResetTimer.checkExpirationAndReset(0.0f);
|
||||
if (expired)
|
||||
|
|
@ -1079,7 +1079,7 @@ BOOL LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const
|
|||
{
|
||||
if(mAuthBuyerID.isNull())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return (mAuthBuyerID == buyer_id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ LLSaleInfo::LLSaleInfo(EForSale sale_type, S32 sale_price) :
|
|||
mSalePrice = llclamp(mSalePrice, 0, S32_MAX);
|
||||
}
|
||||
|
||||
BOOL LLSaleInfo::isForSale() const
|
||||
bool LLSaleInfo::isForSale() const
|
||||
{
|
||||
return (FS_NOT != mSaleType);
|
||||
}
|
||||
|
|
@ -78,13 +78,13 @@ U32 LLSaleInfo::getCRC32() const
|
|||
return rv;
|
||||
}
|
||||
|
||||
BOOL LLSaleInfo::exportLegacyStream(std::ostream& output_stream) const
|
||||
bool LLSaleInfo::exportLegacyStream(std::ostream& output_stream) const
|
||||
{
|
||||
output_stream << "\tsale_info\t0\n\t{\n";
|
||||
output_stream << "\t\tsale_type\t" << lookup(mSaleType) << "\n";
|
||||
output_stream << "\t\tsale_price\t" << mSalePrice << "\n";
|
||||
output_stream <<"\t}\n";
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLSD LLSaleInfo::asLLSD() const
|
||||
|
|
@ -95,7 +95,7 @@ LLSD LLSaleInfo::asLLSD() const
|
|||
return sd;
|
||||
}
|
||||
|
||||
bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
|
||||
bool LLSaleInfo::fromLLSD(const LLSD& sd, bool& has_perm_mask, U32& perm_mask)
|
||||
{
|
||||
const char *w;
|
||||
|
||||
|
|
@ -113,22 +113,22 @@ bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
|
|||
w = "perm_mask";
|
||||
if (sd.has(w))
|
||||
{
|
||||
has_perm_mask = TRUE;
|
||||
has_perm_mask = true;
|
||||
perm_mask = ll_U32_from_sd(sd[w]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask)
|
||||
bool LLSaleInfo::importLegacyStream(std::istream& input_stream, bool& has_perm_mask, U32& perm_mask)
|
||||
{
|
||||
has_perm_mask = FALSE;
|
||||
has_perm_mask = false;
|
||||
|
||||
// *NOTE: Changing the buffer size will require changing the scanf
|
||||
// calls below.
|
||||
char buffer[MAX_STRING]; /* Flawfinder: ignore */
|
||||
char keyword[MAX_STRING]; /* Flawfinder: ignore */
|
||||
char valuestr[MAX_STRING]; /* Flawfinder: ignore */
|
||||
BOOL success = TRUE;
|
||||
bool success = true;
|
||||
|
||||
keyword[0] = '\0';
|
||||
valuestr[0] = '\0';
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public:
|
|||
LLSaleInfo(EForSale sale_type, S32 sale_price);
|
||||
|
||||
// accessors
|
||||
BOOL isForSale() const;
|
||||
bool isForSale() const;
|
||||
EForSale getSaleType() const { return mSaleType; }
|
||||
S32 getSalePrice() const { return mSalePrice; }
|
||||
U32 getCRC32() const;
|
||||
|
|
@ -84,11 +84,11 @@ public:
|
|||
void setSalePrice(S32 price);
|
||||
//void setNextOwnerPermMask(U32 mask) { mNextOwnerPermMask = mask; }
|
||||
|
||||
BOOL exportLegacyStream(std::ostream& output_stream) const;
|
||||
bool exportLegacyStream(std::ostream& output_stream) const;
|
||||
LLSD asLLSD() const;
|
||||
operator LLSD() const { return asLLSD(); }
|
||||
bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
|
||||
BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask);
|
||||
bool fromLLSD(const LLSD& sd, bool& has_perm_mask, U32& perm_mask);
|
||||
bool importLegacyStream(std::istream& input_stream, bool& has_perm_mask, U32& perm_mask);
|
||||
|
||||
LLSD packMessage() const;
|
||||
void unpackMessage(LLSD sales);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void LLBBox::addPointLocal(const LLVector3& p)
|
|||
{
|
||||
mMinLocal = p;
|
||||
mMaxLocal = p;
|
||||
mEmpty = FALSE;
|
||||
mEmpty = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -140,7 +140,7 @@ LLVector3 LLBBox::agentToLocalBasis(const LLVector3& v) const
|
|||
return v * m;
|
||||
}
|
||||
|
||||
BOOL LLBBox::containsPointLocal(const LLVector3& p) const
|
||||
bool LLBBox::containsPointLocal(const LLVector3& p) const
|
||||
{
|
||||
if ( (p.mV[VX] < mMinLocal.mV[VX])
|
||||
||(p.mV[VX] > mMaxLocal.mV[VX])
|
||||
|
|
@ -149,12 +149,12 @@ BOOL LLBBox::containsPointLocal(const LLVector3& p) const
|
|||
||(p.mV[VZ] < mMinLocal.mV[VZ])
|
||||
||(p.mV[VZ] > mMaxLocal.mV[VZ]))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLBBox::containsPointAgent(const LLVector3& p) const
|
||||
bool LLBBox::containsPointAgent(const LLVector3& p) const
|
||||
{
|
||||
LLVector3 point_local = agentToLocal(p);
|
||||
return containsPointLocal(point_local);
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ public:
|
|||
|
||||
LLVector3 getExtentLocal() const { return mMaxLocal - mMinLocal; }
|
||||
|
||||
BOOL containsPointLocal(const LLVector3& p) const;
|
||||
BOOL containsPointAgent(const LLVector3& p) const;
|
||||
bool containsPointLocal(const LLVector3& p) const;
|
||||
bool containsPointAgent(const LLVector3& p) const;
|
||||
|
||||
void addPointAgent(LLVector3 p);
|
||||
void addBBoxAgent(const LLBBox& b);
|
||||
|
|
@ -92,7 +92,7 @@ private:
|
|||
LLVector3 mMaxLocal;
|
||||
LLVector3 mPosAgent; // Position relative to Agent's Region
|
||||
LLQuaternion mRotation;
|
||||
BOOL mEmpty; // Nothing has been added to this bbox yet
|
||||
bool mEmpty; // Nothing has been added to this bbox yet
|
||||
};
|
||||
|
||||
//LLBBox operator*(const LLBBox &a, const LLMatrix4 &b);
|
||||
|
|
|
|||
|
|
@ -963,7 +963,7 @@ BOOL LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value)
|
|||
{
|
||||
if( buf.empty() || value == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
LLQuaternion quat;
|
||||
|
|
@ -971,10 +971,10 @@ BOOL LLQuaternion::parseQuat(const std::string& buf, LLQuaternion* value)
|
|||
if( 4 == count )
|
||||
{
|
||||
value->set( quat );
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -69,18 +69,18 @@ F32 LLSphere::getRadius() const
|
|||
return mRadius;
|
||||
}
|
||||
|
||||
// returns 'TRUE' if this sphere completely contains other_sphere
|
||||
BOOL LLSphere::contains(const LLSphere& other_sphere) const
|
||||
// returns 'true' if this sphere completely contains other_sphere
|
||||
bool LLSphere::contains(const LLSphere& other_sphere) const
|
||||
{
|
||||
F32 separation = (mCenter - other_sphere.mCenter).length();
|
||||
return (mRadius >= separation + other_sphere.mRadius) ? TRUE : FALSE;
|
||||
return (mRadius >= separation + other_sphere.mRadius) ? true : false;
|
||||
}
|
||||
|
||||
// returns 'TRUE' if this sphere completely contains other_sphere
|
||||
BOOL LLSphere::overlaps(const LLSphere& other_sphere) const
|
||||
// returns 'true' if this sphere completely contains other_sphere
|
||||
bool LLSphere::overlaps(const LLSphere& other_sphere) const
|
||||
{
|
||||
F32 separation = (mCenter - other_sphere.mCenter).length();
|
||||
return (separation <= mRadius + other_sphere.mRadius) ? TRUE : FALSE;
|
||||
return (separation <= mRadius + other_sphere.mRadius) ? true : false;
|
||||
}
|
||||
|
||||
// returns overlap
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ public:
|
|||
const LLVector3& getCenter() const;
|
||||
F32 getRadius() const;
|
||||
|
||||
// returns TRUE if this sphere completely contains other_sphere
|
||||
BOOL contains(const LLSphere& other_sphere) const;
|
||||
// returns true if this sphere completely contains other_sphere
|
||||
bool contains(const LLSphere& other_sphere) const;
|
||||
|
||||
// returns TRUE if this sphere overlaps other_sphere
|
||||
BOOL overlaps(const LLSphere& other_sphere) const;
|
||||
// returns true if this sphere overlaps other_sphere
|
||||
bool overlaps(const LLSphere& other_sphere) const;
|
||||
|
||||
// returns overlap distance
|
||||
// negative overlap is closest approach
|
||||
|
|
|
|||
|
|
@ -4838,10 +4838,10 @@ LLVolumeFace::LLVolumeFace() :
|
|||
mJustWeights(NULL),
|
||||
mJointIndices(NULL),
|
||||
#endif
|
||||
mWeightsScrubbed(FALSE),
|
||||
mWeightsScrubbed(false),
|
||||
mOctree(NULL),
|
||||
mOctreeTriangles(NULL),
|
||||
mOptimized(FALSE)
|
||||
mOptimized(false)
|
||||
{
|
||||
mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*3);
|
||||
mExtents[0].splat(-0.5f);
|
||||
|
|
|
|||
|
|
@ -690,9 +690,9 @@ class LLProfile
|
|||
|
||||
public:
|
||||
LLProfile()
|
||||
: mOpen(FALSE),
|
||||
mConcave(FALSE),
|
||||
mDirty(TRUE),
|
||||
: mOpen(false),
|
||||
mConcave(false),
|
||||
mDirty(true),
|
||||
mTotalOut(0),
|
||||
mTotal(2)
|
||||
{
|
||||
|
|
@ -782,9 +782,9 @@ public:
|
|||
|
||||
public:
|
||||
LLPath()
|
||||
: mOpen(FALSE),
|
||||
: mOpen(false),
|
||||
mTotal(0),
|
||||
mDirty(TRUE),
|
||||
mDirty(true),
|
||||
mStep(1)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ LLVolumeMgr::~LLVolumeMgr()
|
|||
mDataMutex = NULL;
|
||||
}
|
||||
|
||||
BOOL LLVolumeMgr::cleanup()
|
||||
bool LLVolumeMgr::cleanup()
|
||||
{
|
||||
BOOL no_refs = TRUE;
|
||||
bool no_refs = true;
|
||||
if (mDataMutex)
|
||||
{
|
||||
mDataMutex->lock();
|
||||
|
|
@ -73,7 +73,7 @@ BOOL LLVolumeMgr::cleanup()
|
|||
LLVolumeLODGroup *volgroupp = iter->second;
|
||||
if (volgroupp->cleanupRefs() == false)
|
||||
{
|
||||
no_refs = FALSE;
|
||||
no_refs = false;
|
||||
}
|
||||
delete volgroupp;
|
||||
}
|
||||
|
|
@ -301,7 +301,7 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 lod)
|
|||
return mVolumeLODs[lod];
|
||||
}
|
||||
|
||||
BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep)
|
||||
bool LLVolumeLODGroup::derefLOD(LLVolume *volumep)
|
||||
{
|
||||
llassert_always(mRefs > 0);
|
||||
mRefs--;
|
||||
|
|
@ -317,11 +317,11 @@ BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep)
|
|||
mVolumeLODs[i] = NULL;
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
LL_ERRS() << "Deref of non-matching LOD in volume LOD group" << LL_ENDL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
S32 LLVolumeLODGroup::getDetailFromTan(const F32 tan_angle)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
static S32 getVolumeDetailFromScale(F32 scale);
|
||||
|
||||
LLVolume* refLOD(const S32 detail);
|
||||
BOOL derefLOD(LLVolume *volumep);
|
||||
bool derefLOD(LLVolume *volumep);
|
||||
S32 getNumRefs() const { return mRefs; }
|
||||
|
||||
const LLVolumeParams* getVolumeParams() const { return &mVolumeParams; };
|
||||
|
|
@ -80,7 +80,7 @@ class LLVolumeMgr
|
|||
public:
|
||||
LLVolumeMgr();
|
||||
virtual ~LLVolumeMgr();
|
||||
BOOL cleanup(); // Cleanup all volumes being managed, returns TRUE if no dangling references
|
||||
bool cleanup(); // Cleanup all volumes being managed, returns true if no dangling references
|
||||
|
||||
virtual LLVolumeLODGroup* getGroup( const LLVolumeParams& volume_params ) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@
|
|||
#include "raytrace.h"
|
||||
|
||||
|
||||
BOOL line_plane(const LLVector3 &line_point, const LLVector3 &line_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
bool line_plane(const LLVector3 &line_point, const LLVector3 &line_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
LLVector3 &intersection)
|
||||
{
|
||||
F32 N = line_direction * plane_normal;
|
||||
|
|
@ -43,19 +43,19 @@ BOOL line_plane(const LLVector3 &line_point, const LLVector3 &line_direction,
|
|||
{
|
||||
// line is perpendicular to plane normal
|
||||
// so it is either entirely on plane, or not on plane at all
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// Ax + By, + Cz + D = 0
|
||||
// D = - (plane_point * plane_normal)
|
||||
// N = line_direction * plane_normal
|
||||
// intersection = line_point - ((D + plane_normal * line_point) / N) * line_direction
|
||||
intersection = line_point - ((plane_normal * line_point - plane_point * plane_normal) / N) * line_direction;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
bool ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
LLVector3 &intersection)
|
||||
{
|
||||
F32 N = ray_direction * plane_normal;
|
||||
|
|
@ -63,7 +63,7 @@ BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
{
|
||||
// ray is perpendicular to plane normal
|
||||
// so it is either entirely on plane, or not on plane at all
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// Ax + By, + Cz + D = 0
|
||||
// D = - (plane_point * plane_normal)
|
||||
|
|
@ -73,14 +73,14 @@ BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (alpha < 0.0f)
|
||||
{
|
||||
// ray points away from plane
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
intersection = ray_point + alpha * ray_direction;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
BOOL ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
bool ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
|
||||
LLVector3 &intersection)
|
||||
{
|
||||
|
|
@ -88,15 +88,15 @@ BOOL ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
{
|
||||
if (circle_radius >= (intersection - circle_center).magVec())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
|
||||
bool ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal)
|
||||
{
|
||||
LLVector3 side_01 = point_1 - point_0;
|
||||
|
|
@ -112,15 +112,15 @@ BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
intersection_normal * (side_12 % (intersection - point_1)) >= 0.0f &&
|
||||
intersection_normal * (side_20 % (intersection - point_2)) >= 0.0f)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// assumes a parallelogram
|
||||
BOOL ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
bool ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal)
|
||||
{
|
||||
|
|
@ -140,14 +140,14 @@ BOOL ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
intersection_normal * (side_23 % (intersection - point_2)) >= 0.0f &&
|
||||
intersection_normal * (side_30 % (intersection - point_3)) >= 0.0f)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
bool ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &sphere_center, F32 sphere_radius,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal)
|
||||
{
|
||||
|
|
@ -160,7 +160,7 @@ BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
F32 radius_squared = sphere_radius * sphere_radius;
|
||||
if (shortest_distance > radius_squared)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
F32 half_chord = (F32) sqrt(radius_squared - shortest_distance);
|
||||
|
|
@ -170,7 +170,7 @@ BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (dot < 0.0f)
|
||||
{
|
||||
// ray shoots away from sphere and is not inside it
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
shortest_distance = ray_direction * ((closest_approach - half_chord * ray_direction) - ray_point);
|
||||
|
|
@ -195,11 +195,11 @@ BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
intersection_normal.setVec(0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
bool ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal)
|
||||
{
|
||||
|
|
@ -270,15 +270,15 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (dot < 0.0f)
|
||||
{
|
||||
// ray points away from cylinder bottom
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
// ray hit top from outside
|
||||
intersection = ray_point - (shortest_distance + cyl_length) * cyl_axis;
|
||||
intersection_normal = -cyl_axis;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for intersection with infinite cylinder
|
||||
|
|
@ -299,7 +299,7 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (out < 0.0f)
|
||||
{
|
||||
// cylinder is behind the ray, so we return FALSE
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
in = dist_to_closest_point - half_chord_length; // dist to entering point
|
||||
|
|
@ -341,14 +341,14 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (shortest_distance > out)
|
||||
{
|
||||
// ray missed the finite cylinder
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (shortest_distance > in)
|
||||
{
|
||||
// ray intersects cylinder at top plane
|
||||
intersection = temp_vector;
|
||||
intersection_normal = -cyl_axis;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -357,7 +357,7 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (shortest_distance < in)
|
||||
{
|
||||
// missed the finite cylinder
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -370,14 +370,14 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (shortest_distance > out)
|
||||
{
|
||||
// ray missed the finite cylinder
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (shortest_distance > in)
|
||||
{
|
||||
// ray intersects cylinder at bottom plane
|
||||
intersection = temp_vector;
|
||||
intersection_normal = cyl_axis;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -386,7 +386,7 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (shortest_distance < in)
|
||||
{
|
||||
// ray missed the finite cylinder
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -399,14 +399,14 @@ BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
if (shortest_distance < 0.0f || shortest_distance > cyl_length)
|
||||
{
|
||||
// ray missed finite cylinder
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1226,7 +1226,7 @@ BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
|
|||
{
|
||||
if (segment_length >= (point_a - intersection).magVec())
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -61,26 +61,26 @@ class LLQuaternion;
|
|||
// frame.
|
||||
|
||||
|
||||
// returns TRUE iff line is not parallel to plane.
|
||||
BOOL line_plane(const LLVector3 &line_point, const LLVector3 &line_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
// returns true if line is not parallel to plane.
|
||||
bool line_plane(const LLVector3 &line_point, const LLVector3 &line_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
LLVector3 &intersection);
|
||||
|
||||
|
||||
// returns TRUE iff line is not parallel to plane.
|
||||
BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
// returns true if line is not parallel to plane.
|
||||
bool ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &plane_point, const LLVector3 plane_normal,
|
||||
LLVector3 &intersection);
|
||||
|
||||
|
||||
BOOL ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
bool ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
|
||||
LLVector3 &intersection);
|
||||
|
||||
// point_0 through point_2 define the plane_normal via the right-hand rule:
|
||||
// circle from point_0 to point_2 with fingers ==> thumb points in direction of normal
|
||||
BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
|
||||
bool ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal);
|
||||
|
||||
|
||||
|
|
@ -88,19 +88,19 @@ BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
|||
// right-hand-rule... curl fingers from lower-left toward lower-right then toward upper-right
|
||||
// ==> thumb points in direction of normal
|
||||
// assumes a parallelogram, so point_3 is determined by the other points
|
||||
BOOL ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
|
||||
bool ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal);
|
||||
|
||||
|
||||
BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
bool ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &sphere_center, F32 sphere_radius,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal);
|
||||
|
||||
|
||||
// finite right cylinder is defined by end centers: "cyl_top", "cyl_bottom",
|
||||
// and by the cylinder radius "cyl_radius"
|
||||
BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
bool ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
|
||||
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
|
||||
LLVector3 &intersection, LLVector3 &intersection_normal);
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class LLVector3
|
|||
const LLVector3& scaleVec(const LLVector3& vec); // scales per component by vec
|
||||
LLVector3 scaledVec(const LLVector3& vec) const; // get a copy of this vector scaled by vec
|
||||
|
||||
BOOL isNull() const; // Returns TRUE if vector has a _very_small_ length
|
||||
bool isNull() const; // Returns TRUE if vector has a _very_small_ length
|
||||
BOOL isExactlyZero() const { return !mV[VX] && !mV[VY] && !mV[VZ]; }
|
||||
|
||||
F32 operator[](int idx) const { return mV[idx]; }
|
||||
|
|
@ -539,13 +539,13 @@ inline LLVector3 lerp(const LLVector3 &a, const LLVector3 &b, F32 u)
|
|||
}
|
||||
|
||||
|
||||
inline BOOL LLVector3::isNull() const
|
||||
inline bool LLVector3::isNull() const
|
||||
{
|
||||
if ( F_APPROXIMATELY_ZERO > mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ] )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline void update_min_max(LLVector3& min, LLVector3& max, const LLVector3& pos)
|
||||
|
|
@ -598,9 +598,9 @@ inline BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon)
|
|||
F32 dot = an * bn;
|
||||
if ( (1.0f - fabs(dot)) < epsilon)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& s, const LLVector3 &a)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
extern LLControlGroup gSavedSettings;
|
||||
#if LL_DARWIN
|
||||
extern BOOL gHiDPISupport;
|
||||
extern bool gHiDPISupport;
|
||||
#endif
|
||||
|
||||
static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256;
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ bool LLPluginSharedMemory::attach(const std::string &name, size_t size)
|
|||
|
||||
mImpl->mMapFile = OpenFileMappingA(
|
||||
FILE_MAP_ALL_ACCESS, // read/write access
|
||||
FALSE, // do not inherit the name
|
||||
false, // do not inherit the name
|
||||
mName.c_str()); // name of mapping object
|
||||
|
||||
if(mImpl->mMapFile == NULL)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ LLCubeMapArray::~LLCubeMapArray()
|
|||
{
|
||||
}
|
||||
|
||||
void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, BOOL use_mips)
|
||||
void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, bool use_mips)
|
||||
{
|
||||
U32 texname = 0;
|
||||
mWidth = resolution;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
// components - number of components per pixel
|
||||
// count - number of cube maps in the array
|
||||
// use_mips - if TRUE, mipmaps will be allocated for this cube map array and anisotropic filtering will be used
|
||||
void allocate(U32 res, U32 components, U32 count, BOOL use_mips = TRUE);
|
||||
void allocate(U32 res, U32 components, U32 count, bool use_mips = true);
|
||||
void bind(S32 stage);
|
||||
void unbind();
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ LLImageGL *LLFontBitmapCache::getImageGL(U32 bitmap_num) const
|
|||
}
|
||||
|
||||
|
||||
BOOL LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitmap_num)
|
||||
bool LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitmap_num)
|
||||
{
|
||||
if ((mBitmapNum<0) || (mCurrentOffsetX + width + 1) > mBitmapWidth)
|
||||
{
|
||||
|
|
@ -138,7 +138,7 @@ BOOL LLFontBitmapCache::nextOpenPos(S32 width, S32 &pos_x, S32 &pos_y, S32& bitm
|
|||
|
||||
mCurrentOffsetX += width + 1;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLFontBitmapCache::destroyGL()
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public:
|
|||
|
||||
void reset();
|
||||
|
||||
BOOL nextOpenPos(S32 width, S32 &posX, S32 &posY, S32 &bitmapNum);
|
||||
bool nextOpenPos(S32 width, S32 &posX, S32 &posY, S32 &bitmapNum);
|
||||
|
||||
void destroyGL();
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue