QAR-566 maint-viewer-5-merge-2

Effective merge: release@84102 maint-viewer-5@86348 -> maint-viewer-5-merge-2
Actual merge maint-viewer-5-merge-2 -r 87239 : 87246 -> release
master
Steven Bennetts 2008-05-11 20:56:42 +00:00
parent 783e05058c
commit 875606a04d
31 changed files with 137 additions and 144 deletions

View File

@ -172,6 +172,7 @@ Jacek Antonelli
VWR-427
VWR-597
VWR-2448
VWR-3605
Joghert LeSabre
VWR-64
Kage Pixel
@ -293,6 +294,8 @@ Robin Cornelius
VWR-2488
Ryozu Kojima
VWR-287
Sammy Frederix
VWR-6186
Scrippy Scofield
VWR-3748
Seg Baphomet

View File

@ -47,22 +47,20 @@
// LLMotion()
// Class Constructor
//-----------------------------------------------------------------------------
LLMotion::LLMotion( const LLUUID &id )
LLMotion::LLMotion( const LLUUID &id ) :
mStopped(TRUE),
mActive(FALSE),
mID(id),
mActivationTimestamp(0.f),
mStopTimestamp(0.f),
mSendStopTimestamp(F32_MAX),
mResidualWeight(0.f),
mFadeWeight(1.f),
mDeactivateCallback(NULL),
mDeactivateCallbackUserData(NULL)
{
mActivationTimestamp = 0.f;
mStopTimestamp = 0.f;
mSendStopTimestamp = F32_MAX;
mResidualWeight = 0.f;
mFadeWeight = 1.f;
mStopped = TRUE;
mActive = FALSE;
mDeactivateCallback = NULL;
memset(&mJointSignature[0][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
memset(&mJointSignature[1][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
memset(&mJointSignature[2][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
mID = id;
for (int i=0; i<3; ++i)
memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
}
//-----------------------------------------------------------------------------

View File

@ -49,13 +49,13 @@ class LLCharacter;
class LLMotion
{
public:
enum LLMotionBlendType
typedef enum LLMotionBlendType
{
NORMAL_BLEND,
ADDITIVE_BLEND
};
enum LLMotionInitStatus
typedef enum LLMotionInitStatus
{
STATUS_FAILURE,
STATUS_SUCCESS,

View File

@ -238,7 +238,8 @@ private:
template <class INDEX_T, class DATA_T, S32 BINARY_DEPTH>
inline LLPtrSkipMap<INDEX_T, DATA_T, BINARY_DEPTH>::LLPtrSkipMap()
: mInsertFirst(NULL),
mEquals(defaultEquals)
mEquals(defaultEquals),
mNumberOfSteps(0)
{
if (BINARY_DEPTH < 2)
{
@ -259,7 +260,8 @@ template <class INDEX_T, class DATA_T, S32 BINARY_DEPTH>
inline LLPtrSkipMap<INDEX_T, DATA_T, BINARY_DEPTH>::LLPtrSkipMap(insert_func insert_first,
equals_func equals)
: mInsertFirst(insert_first),
mEquals(equals)
mEquals(equals),
mNumberOfSteps(0)
{
if (BINARY_DEPTH < 2)
{

View File

@ -390,7 +390,7 @@ public:
/**
* Options for output
*/
enum e_formatter_options_type
typedef enum e_formatter_options_type
{
OPTIONS_NONE = 0,
OPTIONS_PRETTY = 1

View File

@ -4181,18 +4181,6 @@ std::ostream& operator<<(std::ostream &s, const LLVolume *volumep)
}
LLVolumeFace::LLVolumeFace()
{
mTypeMask = 0;
mID = 0;
mBeginS = 0;
mBeginT = 0;
mNumS = 0;
mNumT = 0;
mHasBinormals = FALSE;
}
BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build)
{
if (mTypeMask & CAP_MASK)

View File

@ -761,7 +761,17 @@ public:
class LLVolumeFace
{
public:
LLVolumeFace();
LLVolumeFace() :
mID(0),
mTypeMask(0),
mHasBinormals(FALSE),
mBeginS(0),
mBeginT(0),
mNumS(0),
mNumT(0)
{
}
BOOL create(LLVolume* volume, BOOL partial_build = FALSE);
void createBinormals();

View File

@ -1,6 +1,6 @@
/**
* @file m4math.h
* @brief LLMatrix3 class header file.
* @brief LLMatrix4 class header file.
*
* $LicenseInfo:firstyear=2000&license=viewergpl$
*
@ -101,9 +101,13 @@ class LLMatrix4
public:
F32 mMatrix[NUM_VALUES_IN_MAT4][NUM_VALUES_IN_MAT4];
LLMatrix4(); // Initializes Matrix to identity matrix
// Initializes Matrix to identity matrix
LLMatrix4()
{
setIdentity();
}
explicit LLMatrix4(const F32 *mat); // Initializes Matrix to values in mat
explicit LLMatrix4(const LLMatrix3 &mat); // Initializes Matrix to valuee in mat and sets position to (0,0,0)
explicit LLMatrix4(const LLMatrix3 &mat); // Initializes Matrix to values in mat and sets position to (0,0,0)
explicit LLMatrix4(const LLQuaternion &q); // Initializes Matrix with rotation q and sets position to (0,0,0)
LLMatrix4(const LLMatrix3 &mat, const LLVector4 &pos); // Initializes Matrix to values in mat and pos
@ -240,12 +244,6 @@ public:
friend std::ostream& operator<<(std::ostream& s, const LLMatrix4 &a); // Stream a
};
inline LLMatrix4::LLMatrix4()
{
setIdentity();
}
inline const LLMatrix4& LLMatrix4::setIdentity()
{
mMatrix[0][0] = 1.f;

View File

@ -674,8 +674,9 @@ std::string LLCurl::strerror(CURLcode errorcode)
// For generating a simple request for data
// using one multi and one easy per request
LLCurlRequest::LLCurlRequest()
: mActiveMulti(NULL)
LLCurlRequest::LLCurlRequest() :
mActiveMulti(NULL),
mActiveRequestCount(0)
{
}

View File

@ -334,6 +334,8 @@ void LLHTTPAssetRequest::finishCompressedUpload()
size_t LLHTTPAssetRequest::readCompressedData(void* data, size_t size)
{
llassert(mZInitialized);
mZStream.next_out = (Bytef*)data;
mZStream.avail_out = size;

View File

@ -1336,7 +1336,9 @@ BOOL LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp)
}
LLTransferSourceParamsEstate::LLTransferSourceParamsEstate() :
LLTransferSourceParams(LLTST_SIM_ESTATE), mEstateAssetType(ET_NONE)
LLTransferSourceParams(LLTST_SIM_ESTATE),
mEstateAssetType(ET_NONE),
mAssetType(LLAssetType::AT_NONE)
{
}

View File

@ -153,7 +153,9 @@ BOOL LLTransferSourceFile::unpackParams(LLDataPacker &dp)
}
LLTransferSourceParamsFile::LLTransferSourceParamsFile() : LLTransferSourceParams(LLTST_FILE)
LLTransferSourceParamsFile::LLTransferSourceParamsFile() :
LLTransferSourceParams(LLTST_FILE),
mDeleteOnCompletion(FALSE)
{
}

View File

@ -38,11 +38,17 @@
BOOL LLRenderTarget::sUseFBO = FALSE;
LLRenderTarget::LLRenderTarget()
LLRenderTarget::LLRenderTarget() :
mResX(0),
mResY(0),
mTex(0),
mFBO(0),
mDepth(0),
mStencil(0),
mUseDepth(FALSE),
mRenderDepth(FALSE),
mUsage(GL_TEXTURE_2D)
{
mResX = mResY = mTex = mFBO = mDepth = 0;
mUseDepth = FALSE;
mUsage = GL_TEXTURE_2D;
}
LLRenderTarget::~LLRenderTarget()

View File

@ -47,6 +47,8 @@ void setupCocoa()
if(!inited)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor":
// http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html
@ -55,6 +57,8 @@ void setupCocoa()
// Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image
[[[NSWindow alloc] init] release];
[pool release];
}
}
@ -82,8 +86,10 @@ OSErr releaseImageCursor(CursorRef ref)
{
if( ref != NULL )
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSCursor *cursor = (NSCursor*)ref;
[cursor release];
[pool release];
}
else
{
@ -97,8 +103,10 @@ OSErr setImageCursor(CursorRef ref)
{
if( ref != NULL )
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSCursor *cursor = (NSCursor*)ref;
[cursor set];
[pool release];
}
else
{

View File

@ -606,6 +606,11 @@ extern "C" { int yyerror(const char *fmt, ...); }
"CLICK_ACTION_PLAY" { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); }
"CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); }
"TEXTURE_BLANK" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "5748decc-f629-461c-9a36-a35a221fe21f"); return(STRING_CONSTANT); }
"TEXTURE_DEFAULT" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361"); return(STRING_CONSTANT); }
"TEXTURE_PLYWOOD" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "89556747-24cb-43ed-920b-47caed15465f"); return(STRING_CONSTANT); }
"TEXTURE_TRANSPARENT" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "59facb66-4a72-40a2-815c-7d9b42c56f60"); return(STRING_CONSTANT); }
{L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
{N}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }

View File

@ -3040,40 +3040,6 @@ BOOL run_return(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
return FALSE;
}
S32 axtoi(char *hexStg)
{
S32 n = 0; // position in string
S32 m = 0; // position in digit[] to shift
S32 count; // loop index
S32 intValue = 0; // integer value of hex string
S32 digit[9]; // hold values to convert
while (n < 8)
{
if (hexStg[n]=='\0')
break;
if (hexStg[n] > 0x29 && hexStg[n] < 0x40 ) //if 0 to 9
digit[n] = hexStg[n] & 0x0f; //convert to int
else if (hexStg[n] >='a' && hexStg[n] <= 'f') //if a to f
digit[n] = (hexStg[n] & 0x0f) + 9; //convert to int
else if (hexStg[n] >='A' && hexStg[n] <= 'F') //if A to F
digit[n] = (hexStg[n] & 0x0f) + 9; //convert to int
else break;
n++;
}
count = n;
m = n - 1;
n = 0;
while(n < count)
{
// digit[n] is value of hex digit at position n
// (m << 2) is the number of positions to shift
// OR the bits into return value
intValue = intValue | (digit[n] << (m << 2));
m--; // adjust the position to set
n++; // next digit to process
}
return (intValue);
}
BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)

View File

@ -507,6 +507,10 @@ CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the defa
[word .1, .3, .5]
NULL_KEY Indicates an empty key
EOF Indicates the last line of a notecard was read
TEXTURE_BLANK UUID for the "Blank" texture
TEXTURE_DEFAULT UUID for the "Default Media" texture
TEXTURE_PLYWOOD UUID for the default "Plywood" texture
TEXTURE_TRANSPARENT UUID for the "White - Transparent" texture
# float constants
[word .3, .1, .5]

View File

@ -68,13 +68,10 @@ public:
static BOOL sShowDebugAlpha;
private:
S32 mDiffuse;
LLGLSLShader* current_shader;
LLGLSLShader* target_shader;
LLGLSLShader* simple_shader;
LLGLSLShader* simple_lod_shader;
LLGLSLShader* fullbright_shader;
LLGLSLShader* fullbright_lod_shader;
};
class LLDrawPoolAlphaPostWater : public LLDrawPoolAlpha

View File

@ -441,7 +441,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
perm_string = "G";
perm_string += overwrite_group ? "*: " : ": ";
perm_string += perm_string += mask_to_string(group_mask);
perm_string += mask_to_string(group_mask);
childSetText("GroupMaskDebug",perm_string);
childSetVisible("GroupMaskDebug",TRUE);

View File

@ -327,6 +327,7 @@ void LLPanelPermissions::refresh()
// update group text field
childSetEnabled("Group:",true);
childSetText("Group Name",LLString::null);
LLUUID group_id;
BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
if (groups_identical)
@ -337,6 +338,16 @@ void LLPanelPermissions::refresh()
mLabelGroupName->setEnabled(TRUE);
}
}
else
{
if(mLabelGroupName)
{
mLabelGroupName->setNameID(LLUUID::null, TRUE);
mLabelGroupName->refresh(LLUUID::null, "", "", TRUE);
mLabelGroupName->setEnabled(FALSE);
}
}
childSetEnabled("button set group",owners_identical && (mOwnerID == gAgent.getID()));
// figure out the contents of the name, description, & category
@ -854,7 +865,7 @@ void callback_deed_to_group(S32 option, void*)
{
LLUUID group_id;
BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
if(groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
if(group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
{
LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
// LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);

View File

@ -2510,11 +2510,7 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
}
}
}
if (first_id.isNull())
{
return FALSE;
}
result_id = first_id;
return identical;

View File

@ -401,8 +401,8 @@ void handle_duplicate_in_place(void*);
void handle_repeat_duplicate(void*);
void handle_export(void*);
void handle_deed_object_to_group(void*);
BOOL enable_deed_object_to_group(void*);
// void handle_deed_object_to_group(void*);
// BOOL enable_deed_object_to_group(void*);
void handle_object_owner_self(void*);
void handle_object_owner_permissive(void*);
void handle_object_lock(void*);
@ -3498,6 +3498,7 @@ void handle_repeat_duplicate(void*)
LLSelectMgr::getInstance()->repeatDuplicate();
}
/* dead code 30-apr-2008
void handle_deed_object_to_group(void*)
{
LLUUID group_id;
@ -3523,6 +3524,8 @@ BOOL enable_deed_object_to_group(void*)
return FALSE;
}
*/
/*
* No longer able to support viewer side manipulations in this way

View File

@ -194,11 +194,13 @@ inline void color_gamma_correct(LLColor3 &col)
S32 LLSkyTex::sComponents = 4;
S32 LLSkyTex::sResolution = 64;
F32 LLSkyTex::sInterpVal = 0.f;
F32 LLSkyTex::sInterpVal = 0.f;
S32 LLSkyTex::sCurrent = 0;
LLSkyTex::LLSkyTex()
LLSkyTex::LLSkyTex() :
mSkyData(NULL),
mSkyDirs(NULL)
{
}

View File

@ -207,7 +207,7 @@ protected:
F32 mDiskRadius;
BOOL mDraw; // FALSE - do not draw.
F32 mHorizonVisibility; // number [0, 1] due to how horizon
F32 mVisibility; // same but due to other objects being in frong.
F32 mVisibility; // same but due to other objects being in throng.
BOOL mVisible;
static F32 sInterpVal;
LLVector3 mQuadCorner[4];
@ -217,10 +217,12 @@ protected:
public:
LLHeavenBody(const F32 rad) :
mDirectionCached(LLVector3(0,0,0)), mDirection(LLVector3(0,0,0)),
mDiskRadius(rad), mDraw(FALSE),
mHorizonVisibility(1), mVisibility(1)
mDirectionCached(LLVector3(0,0,0)),
mDirection(LLVector3(0,0,0)),
mIntensity(0.f),
mDiskRadius(rad), mDraw(FALSE),
mHorizonVisibility(1.f), mVisibility(1.f),
mVisible(FALSE)
{
mColor.setToBlack();
mColorCached.setToBlack();
@ -261,7 +263,6 @@ public:
BOOL isVisible() const { return mVisible; }
void setVisible(const BOOL v) { mVisible = v; }
const F32& getIntensity() const { return mIntensity; }
void setIntensity(const F32 c) { mIntensity = c; }
@ -311,19 +312,19 @@ LL_FORCE_INLINE LLColor3 calc_air_sca_sea_level()
const LLColor3 gAirScaSeaLevel = calc_air_sca_sea_level();
const F32 AIR_SCA_INTENS = color_intens(gAirScaSeaLevel);
const F32 AIR_SCA_AVG = AIR_SCA_INTENS / 3;
const F32 AIR_SCA_AVG = AIR_SCA_INTENS / 3.f;
class LLHaze
{
public:
LLHaze() : mG(0), mFalloff(1) {mSigSca.setToBlack();}
LLHaze(const F32 g, const LLColor3& sca, const F32 fo = 2) :
mG(g), mSigSca(0.25f/F_PI * sca), mFalloff(fo), mAbsCoef(0)
LLHaze() : mG(0), mFalloff(1), mAbsCoef(0.f) {mSigSca.setToBlack();}
LLHaze(const F32 g, const LLColor3& sca, const F32 fo = 2.f) :
mG(g), mSigSca(0.25f/F_PI * sca), mFalloff(fo), mAbsCoef(0.f)
{
mAbsCoef = color_intens(mSigSca) / AIR_SCA_INTENS;
}
LLHaze(const F32 g, const F32 sca, const F32 fo = 2) : mG(g),
LLHaze(const F32 g, const F32 sca, const F32 fo = 2.f) : mG(g),
mSigSca(0.25f/F_PI * LLColor3(sca, sca, sca)), mFalloff(fo)
{
mAbsCoef = 0.01f * sca / AIR_SCA_AVG;

View File

@ -75,7 +75,8 @@ LLWaterParamManager::LLWaterParamManager() :
mBlurMultiplier(0.1f, "blurMultiplier"),
mWave1Dir(.5f, .5f, "wave1Dir"),
mWave2Dir(.5f, .5f, "wave2Dir"),
mDensitySliderValue(1.0f)
mDensitySliderValue(1.0f),
mWaterFogKS(1.0f)
{
}
@ -255,8 +256,8 @@ void LLWaterParamManager::update(LLViewerCamera * cam)
if(gPipeline.canUseVertexShaders())
{
//transform water plane to eye space
glh::vec3f norm(0, 0, 1);
glh::vec3f p(0, 0, gAgent.getRegion()->getWaterHeight()+0.1f);
glh::vec3f norm(0.f, 0.f, 1.f);
glh::vec3f p(0.f, 0.f, gAgent.getRegion()->getWaterHeight()+0.1f);
F32 modelView[16];
for (U32 i = 0; i < 16; i++)

View File

@ -315,18 +315,16 @@ public:
F32 mDensitySliderValue;
private:
// our parameter manager singleton instance
static LLWaterParamManager * sInstance;
private:
LLVector4 mWaterPlane;
F32 mWaterFogKS;
// our parameter manager singleton instance
static LLWaterParamManager * sInstance;
};
inline void LLWaterParamManager::setDensitySliderValue(F32 val)
{
val /= 10;
val /= 10.0f;
val = 1.0f - val;
val *= val * val;
// val *= val;

View File

@ -299,7 +299,7 @@ void LLWLParamManager::propagateParameters(void)
LLVector4 sunDir;
LLVector4 moonDir;
// set the sun direction from mSunAngle and mEastAngle
// set the sun direction from SunAngle and EastAngle
F32 sinTheta = sin(mCurParams.getEastAngle());
F32 cosTheta = cos(mCurParams.getEastAngle());

View File

@ -199,8 +199,6 @@ public:
public:
// helper variables
F32 mSunAngle;
F32 mEastAngle;
LLWLAnimator mAnimator;
/// actual direction of the sun
@ -217,9 +215,6 @@ public:
// list of params and how they're cycled for days
LLWLDayCycle mDay;
// length of the day in seconds
F32 mLengthOfDay;
LLWLParamSet mCurParams;
/// Sun Delta Terrain tweak variables.

View File

@ -132,18 +132,10 @@ public:
/// get the star brightness value;
F32 getStarBrightness();
/// set the star's brightness
/// \param val brightness value
void setSunAngle(F32 val);
/// get the star brightness value;
F32 getSunAngle();
/// set the star's brightness
/// \param val brightness value
void setEastAngle(F32 val);
/// get the star brightness value;
F32 getEastAngle();

View File

@ -83,24 +83,27 @@ const F32 LLWorld::mWidthInMeters = mWidth * mScale;
//
// allocate the stack
LLWorld::LLWorld()
LLWorld::LLWorld() :
mLandFarClip(DEFAULT_FAR_PLANE),
mLastPacketsIn(0),
mLastPacketsOut(0),
mLastPacketsLost(0),
mMinRegionX(0),
mMaxRegionX(0),
mMinRegionY(0),
mMaxRegionY(0),
mSpaceTimeUSec(0)
{
mSpaceTimeUSec = 0;
mLastPacketsIn = 0;
mLastPacketsOut = 0;
mLastPacketsLost = 0;
mLandFarClip = DEFAULT_FAR_PLANE;
for (S32 i = 0; i < 8; i++)
{
mEdgeWaterObjects[i] = NULL;
}
if (gNoRender)
{
return;
}
for (S32 i = 0; i < 8; i++)
{
mEdgeWaterObjects[i] = NULL;
}
LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,4);
U8 *default_texture = raw->getData();
*(default_texture++) = MAX_WATER_COLOR.mV[0];

View File

@ -508,7 +508,6 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libdb-4.2.so")
self.path("libcrypto.so.0.9.7")
self.path("libssl.so.0.9.7")
self.path("libexpat.so.1")
self.path("libstdc++.so.6")
self.path("libuuid.so", "libuuid.so.1")
self.path("libSDL-1.2.so.0")