Merge remote-tracking branch 'siana/master'

This commit is contained in:
Aleric Inglewood
2012-02-15 20:20:56 +01:00
94 changed files with 2603 additions and 1844 deletions

View File

@@ -16,7 +16,11 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REPLACE "\n" ";" GIT_REV_LIST ${GIT_REV_LIST_STR})
if(GIT_REV_LIST_STR)
string(REPLACE "\n" ";" GIT_REV_LIST ${GIT_REV_LIST_STR})
else()
string(REPLACE "\n" ";" GIT_REV_LIST "")
endif()
if(GIT_REV_LIST)
list(LENGTH GIT_REV_LIST vBUILD)

View File

@@ -239,12 +239,15 @@ protected:
// A list of all audio sources that are known to the viewer at this time.
// This is most likely a superset of the ones that we actually have audio
// data for, or are playing back.
public://Jay: IDGAF
typedef std::map<LLUUID, LLAudioSource *> source_map;
protected:
typedef std::map<LLUUID, LLAudioData *> data_map;
public://Jay: IDGAF
source_map mAllSources;
protected:
data_map mAllData;
LLAudioChannel *mChannels[MAX_CHANNELS];
// Buffers needs to change into a different data structure, as the number of buffers
@@ -351,6 +354,9 @@ public:
protected:
LLUUID mID; // The ID of the source is that of the object if it's attached to an object.
LLUUID mOwnerID; // owner of the object playing the sound
public:
const LLUUID &getOwnerID() { return mOwnerID; }
protected:
F32 mPriority;
F32 mGain;
bool mSourceMuted;

View File

@@ -2,31 +2,25 @@
* @file llvolumexml.cpp
* @brief LLVolumeXml base class
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -40,9 +34,9 @@
//============================================================================
LLXMLNode *LLVolumeXml::exportProfileParams(const LLProfileParams* params)
LLPointer<LLXMLNode> LLVolumeXml::exportProfileParams(const LLProfileParams* params)
{
LLXMLNode *ret = new LLXMLNode("profile", FALSE);
LLPointer<LLXMLNode> ret = new LLXMLNode("profile", FALSE);
ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
@@ -52,9 +46,9 @@ LLXMLNode *LLVolumeXml::exportProfileParams(const LLProfileParams* params)
}
LLXMLNode *LLVolumeXml::exportPathParams(const LLPathParams* params)
LLPointer<LLXMLNode> LLVolumeXml::exportPathParams(const LLPathParams* params)
{
LLXMLNode *ret = new LLXMLNode("path", FALSE);
LLPointer<LLXMLNode> ret = new LLXMLNode("path", FALSE);
ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
ret->createChild("scale", FALSE)->setFloatValue(2, params->getScale().mV);
@@ -69,12 +63,15 @@ LLXMLNode *LLVolumeXml::exportPathParams(const LLPathParams* params)
}
LLXMLNode *LLVolumeXml::exportVolumeParams(const LLVolumeParams* params)
LLPointer<LLXMLNode> LLVolumeXml::exportVolumeParams(const LLVolumeParams* params)
{
LLXMLNode *ret = new LLXMLNode("shape", FALSE);
LLPointer<LLXMLNode> ret = new LLXMLNode("shape", FALSE);
exportPathParams(&params->getPathParams())->setParent(ret);
exportProfileParams(&params->getProfileParams())->setParent(ret);
LLPointer<LLXMLNode> node ;
node = exportPathParams(&params->getPathParams()) ;
node->setParent(ret);
node = exportProfileParams(&params->getProfileParams()) ;
node->setParent(ret);
return ret;
}

View File

@@ -2,31 +2,25 @@
* @file llvolumexml.h
* @brief LLVolumeXml base class
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -40,11 +34,11 @@
class LLVolumeXml
{
public:
static LLXMLNode* exportProfileParams(const LLProfileParams* params);
static LLPointer<LLXMLNode> exportProfileParams(const LLProfileParams* params);
static LLXMLNode* exportPathParams(const LLPathParams* params);
static LLPointer<LLXMLNode> exportPathParams(const LLPathParams* params);
static LLXMLNode* exportVolumeParams(const LLVolumeParams* params);
static LLPointer<LLXMLNode> exportVolumeParams(const LLVolumeParams* params);
};
#endif // LL_LLVOLUMEXML_H

View File

@@ -2,31 +2,25 @@
* @file llcubemap.cpp
* @brief LLCubeMap class implementation
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "linden_common.h"
@@ -266,7 +260,7 @@ void LLCubeMap::setMatrix(S32 stage)
if (mMatrixStage < 0) return;
if (stage > 0)
//if (stage > 0)
{
gGL.getTexUnit(stage)->activate();
}
@@ -285,17 +279,17 @@ void LLCubeMap::setMatrix(S32 stage)
gGL.loadMatrix((F32 *)trans.mMatrix);
gGL.matrixMode(LLRender::MM_MODELVIEW);
if (stage > 0)
/*if (stage > 0)
{
gGL.getTexUnit(0)->activate();
}
}*/
}
void LLCubeMap::restoreMatrix()
{
if (mMatrixStage < 0) return;
if (mMatrixStage > 0)
//if (mMatrixStage > 0)
{
gGL.getTexUnit(mMatrixStage)->activate();
}
@@ -303,10 +297,10 @@ void LLCubeMap::restoreMatrix()
gGL.popMatrix();
gGL.matrixMode(LLRender::MM_MODELVIEW);
if (mMatrixStage > 0)
/*if (mMatrixStage > 0)
{
gGL.getTexUnit(0)->activate();
}
}*/
}
void LLCubeMap::setReflection (void)

View File

@@ -2,31 +2,25 @@
* @file llcubemap.h
* @brief LLCubeMap class definition
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/

View File

@@ -1141,7 +1141,7 @@ LLFontGL* LLFontGL::getFontSansSerifBig()
//static
LLFontGL* LLFontGL::getFontSansSerifHuge()
{
static LLFontGL* fontp = getFont(LLFontDescriptor("SansSerif","Large",0));
static LLFontGL* fontp = getFont(LLFontDescriptor("SansSerif","Huge",0));
return fontp;
}
@@ -1320,4 +1320,4 @@ void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, con
}
gGL.end();
}
}

View File

@@ -151,8 +151,7 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes,
mProgramObject = glCreateProgramObjectARB();
static const LLCachedControl<bool> no_texture_indexing("ShyotlUseLegacyTextureBatching",false);
//static const LLCachedControl<bool> use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching.
if (gGLManager.mGLVersion < 3.1f || no_texture_indexing /*|| use_legacy_path*/)
if (gGLManager.mGLVersion < 3.1f || no_texture_indexing)
{ //force indexed texture channels to 1 if GL version is old (performance improvement for drivers with poor branching shader model support)
mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1);
}

View File

@@ -1,32 +1,26 @@
/**
/**
* @file llrender.cpp
* @brief LLRender implementation
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -1009,7 +1003,7 @@ void LLLightState::setSpotDirection(const LLVector3& direction)
const glh::matrix4f& mat = gGL.getModelviewMatrix();
mat.mult_matrix_dir(dir);
mSpotDirection.set(direction);
mSpotDirection.set(dir.v);
}
}
@@ -1446,6 +1440,8 @@ void LLRender::loadIdentity()
flush();
{
llassert_always(mMatrixMode < NUM_MATRIX_MODES) ;
mMatrix[mMatrixMode][mMatIdx[mMatrixMode]].make_identity();
mMatHash[mMatrixMode]++;
}

View File

@@ -7,31 +7,25 @@
* code, to define an interface for a multiple rendering API abstraction of the UI
* rendering, and to abstract out direct rendering calls in a way that is cleaner and easier to maintain.
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/

View File

@@ -699,7 +699,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
text[count++] = strdup("return texture2D(tex0, texcoord);\n");
text[count++] = strdup("}\n");
}
else if (gGLManager.mGLVersion >= 3.f)
else if (gGLManager.mGLVersion >= 3.f && !(gGLManager.mIsATI && gGLManager.mGLVersion < 3.3f) )
{
text[count++] = strdup("\tswitch (int(vary_texture_index+0.25))\n");
text[count++] = strdup("\t{\n");
@@ -1119,6 +1119,8 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("magnification");
mReservedUniforms.push_back("max_cof");
mReservedUniforms.push_back("res_scale");
mReservedUniforms.push_back("dof_width");
mReservedUniforms.push_back("dof_height");
mReservedUniforms.push_back("depthMap");
mReservedUniforms.push_back("shadowMap0");

View File

@@ -2,31 +2,25 @@
* @file llshadermgr.h
* @brief Shader Manager
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -148,6 +142,8 @@ public:
DOF_MAGNIFICATION,
DOF_MAX_COF,
DOF_RES_SCALE,
DOF_WIDTH,
DOF_HEIGHT,
DEFERRED_DEPTH,
DEFERRED_SHADOW0,

View File

@@ -798,14 +798,7 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR);
if (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping)
{
mMappable = true;
}
else
{
mMappable = false;
}
mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping);
//zero out offsets
for (U32 i = 0; i < TYPE_MAX; i++)

View File

@@ -33,7 +33,6 @@
#include "v4math.h"
#include "v4coloru.h"
#include "llstrider.h"
#include "llmemory.h"
#include "llrender.h"
#include <set>
#include <vector>

View File

@@ -1723,7 +1723,7 @@ void LLWindowSDL::processMiscNativeEvents()
void LLWindowSDL::gatherInput()
{
const Uint32 CLICK_THRESHOLD = 300; // milliseconds
const Uint32 CLICK_THRESHOLD = 500; // milliseconds
static int leftClick = 0;
static int rightClick = 0;
static Uint32 lastLeftDown = 0;

View File

@@ -129,6 +129,7 @@ set(viewer_SOURCE_FILES
llassetuploadqueue.cpp
llattachmentsmgr.cpp
llaudiosourcevo.cpp
llavatarpropertiesprocessor.cpp
llbox.cpp
llbuildnewviewsscheduler.cpp
llcallbacklist.cpp
@@ -614,6 +615,7 @@ set(viewer_HEADER_FILES
llassetuploadqueue.h
llattachmentsmgr.h
llaudiosourcevo.h
llavatarpropertiesprocessor.h
llbox.h
llbuildnewviewsscheduler.h
llcallbacklist.h

View File

@@ -9,6 +9,18 @@
<string>settings_rlv.xml</string>
</array>
<key>SGAbsolutePointer</key>
<map>
<key>Comment</key>
<string>Support pen tablets and absolute pointer devices by disabling mouse wrapping</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>WaterPresetName</key>
<map>
<key>Comment</key>
@@ -8132,7 +8144,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>MemoryPrivatePoolSize</key>
<map>

View File

@@ -620,5 +620,16 @@
<key>Value</key>
<string>tp2</string>
</map>
<key>SinguCmdLineAway</key>
<map>
<key>Comment</key>
<string>Toggle Fake Away Status.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>/away</string>
</map>
</map>
</llsd>

View File

@@ -207,17 +207,6 @@
<key>Value</key>
<real>10.0</real>
</map>
<key>ShyotlUseLegacyRenderPath</key>
<map>
<key>Comment</key>
<string>Use deprecated pre-3.x OpenGL api calls.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ShyotlUseLegacyTextureBatching</key>
<map>
<key>Comment</key>
@@ -228,28 +217,6 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ShyotlUseLegacyDynamicTexture</key>
<map>
<key>Comment</key>
<string>Disable shader path when rendering dynamic textures.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ShyotlUseLegacyTextureBaking</key>
<map>
<key>Comment</key>
<string>Disable shader path when generating baked textures.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShyotlDumpRawShaders</key>
<map>

View File

@@ -50,18 +50,18 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
uniform vec4 haze_horizon;
uniform vec4 haze_density;
uniform float haze_horizon;
uniform float haze_density;
uniform vec4 cloud_shadow;
uniform vec4 density_multiplier;
uniform vec4 max_y;
uniform float cloud_shadow;
uniform float density_multiplier;
uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
uniform vec4 cloud_scale;
uniform float cloud_scale;
void main()
{
@@ -77,7 +77,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
P *= (max_y.x / P.y);
P *= (max_y / P.y);
}
else
{
@@ -99,12 +99,12 @@ void main()
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
temp1 = blue_density + haze_density.x;
temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
haze_weight = haze_density.x / temp1;
haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -112,7 +112,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
temp2.z = Plen * density_multiplier.x;
temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -136,14 +136,14 @@ void main()
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
sunlight *= (1. - cloud_shadow.x);
sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// CLOUDS
@@ -164,13 +164,13 @@ void main()
vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1);
// Make a nice cloud density based on the cloud_shadow value that was passed in.
vary_CloudDensity = 2. * (cloud_shadow.x - 0.25);
vary_CloudDensity = 2. * (cloud_shadow - 0.25);
// Texture coords
vary_texcoord0 = texcoord0;
vary_texcoord0.xy -= 0.5;
vary_texcoord0.xy /= cloud_scale.x;
vary_texcoord0.xy /= cloud_scale;
vary_texcoord0.xy += 0.5;
vary_texcoord1 = vary_texcoord0;

View File

@@ -37,14 +37,24 @@ uniform vec2 screen_res;
uniform float max_cof;
uniform float res_scale;
uniform float dof_width;
uniform float dof_height;
VARYING vec2 vary_fragcoord;
vec4 dofSample(sampler2DRect tex, vec2 tc)
{
tc.x = min(tc.x, dof_width);
tc.y = min(tc.y, dof_height);
return texture2DRect(tex, tc);
}
void main()
{
vec2 tc = vary_fragcoord.xy;
vec4 dof = texture2DRect(diffuseRect, vary_fragcoord.xy*res_scale);
vec4 dof = dofSample(diffuseRect, vary_fragcoord.xy*res_scale);
vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy);

View File

@@ -44,19 +44,17 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
uniform vec4 haze_horizon;
uniform vec4 haze_density;
uniform float haze_horizon;
uniform float haze_density;
uniform vec4 cloud_shadow;
uniform vec4 density_multiplier;
uniform vec4 max_y;
uniform float cloud_shadow;
uniform float density_multiplier;
uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
uniform vec4 cloud_scale;
void main()
{
@@ -71,7 +69,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
P *= (max_y.x / P.y);
P *= (max_y / P.y);
}
else
{
@@ -93,12 +91,12 @@ void main()
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
temp1 = blue_density + haze_density.x;
temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
haze_weight = haze_density.x / temp1;
haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -106,7 +104,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
temp2.z = Plen * density_multiplier.x;
temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -131,20 +129,20 @@ void main()
// Haze color above cloud
vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient)
+ (haze_horizon.r * haze_weight) * (sunlight * temp2.x + ambient)
+ (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient)
);
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
sunlight *= (1. - cloud_shadow.x);
sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// Final atmosphere additive

View File

@@ -51,12 +51,12 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
uniform vec4 haze_horizon;
uniform vec4 haze_density;
uniform vec4 cloud_shadow;
uniform vec4 density_multiplier;
uniform vec4 distance_multiplier;
uniform vec4 max_y;
uniform float haze_horizon;
uniform float haze_density;
uniform float cloud_shadow;
uniform float density_multiplier;
uniform float distance_multiplier;
uniform float max_y;
uniform vec4 glow;
uniform float scene_light_strength;
uniform mat3 env_mat;
@@ -161,13 +161,13 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//sunlight attenuation effect (hue and brightness) due to atmosphere
//this is used later for sunlight modulation at various altitudes
light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
//I had thought blue_density and haze_density should have equal weighting,
//but attenuation due to haze_density tends to seem too strong
temp1 = blue_density + vec4(haze_density.r);
temp1 = blue_density + vec4(haze_density);
blue_weight = blue_density / temp1;
haze_weight = vec4(haze_density.r) / temp1;
haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2.y = max(0.0, tmpLightnorm.y);
@@ -175,12 +175,12 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
sunlight *= exp( - light_atten * temp2.y);
// main atmospheric scattering line integral
temp2.z = Plen * density_multiplier.x;
temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
// ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati
// compiler gets confused.
temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
temp1 = exp(-temp1 * temp2.z * distance_multiplier);
//final atmosphere attenuation factor
setAtmosAttenuation(temp1.rgb);
@@ -201,7 +201,7 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
temp2.x += .25;
//increase ambient when there are more clouds
vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5;
/* decrease value and saturation (that in HSV, not HSL) for occluded areas
* // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
@@ -215,8 +215,8 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//haze color
setAdditiveColor(
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
+ (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
//brightness of surface both sunlight and ambient

View File

@@ -51,12 +51,12 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
uniform vec4 haze_horizon;
uniform vec4 haze_density;
uniform vec4 cloud_shadow;
uniform vec4 density_multiplier;
uniform vec4 distance_multiplier;
uniform vec4 max_y;
uniform float haze_horizon;
uniform float haze_density;
uniform float cloud_shadow;
uniform float density_multiplier;
uniform float distance_multiplier;
uniform float max_y;
uniform vec4 glow;
uniform float scene_light_strength;
uniform mat3 env_mat;
@@ -161,13 +161,13 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//sunlight attenuation effect (hue and brightness) due to atmosphere
//this is used later for sunlight modulation at various altitudes
light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
//I had thought blue_density and haze_density should have equal weighting,
//but attenuation due to haze_density tends to seem too strong
temp1 = blue_density + vec4(haze_density.r);
temp1 = blue_density + vec4(haze_density);
blue_weight = blue_density / temp1;
haze_weight = vec4(haze_density.r) / temp1;
haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2.y = max(0.0, tmpLightnorm.y);
@@ -175,12 +175,12 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
sunlight *= exp( - light_atten * temp2.y);
// main atmospheric scattering line integral
temp2.z = Plen * density_multiplier.x;
temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
// ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati
// compiler gets confused.
temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
temp1 = exp(-temp1 * temp2.z * distance_multiplier);
//final atmosphere attenuation factor
setAtmosAttenuation(temp1.rgb);
@@ -201,7 +201,7 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
temp2.x += .25;
//increase ambient when there are more clouds
vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5;
/* decrease value and saturation (that in HSV, not HSL) for occluded areas
* // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
@@ -215,8 +215,8 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
//haze color
setAdditiveColor(
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
+ (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
//brightness of surface both sunlight and ambient

View File

@@ -47,12 +47,12 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
uniform vec4 haze_horizon;
uniform vec4 haze_density;
uniform vec4 cloud_shadow;
uniform vec4 density_multiplier;
uniform vec4 distance_multiplier;
uniform vec4 max_y;
uniform float haze_horizon;
uniform float haze_density;
uniform float cloud_shadow;
uniform float density_multiplier;
uniform float distance_multiplier;
uniform float max_y;
uniform vec4 glow;
void calcAtmospherics(vec3 inPositionEye) {
@@ -61,8 +61,8 @@ void calcAtmospherics(vec3 inPositionEye) {
setPositionEye(P);
//(TERRAIN) limit altitude
if (P.y > max_y.x) P *= (max_y.x / P.y);
if (P.y < -max_y.x) P *= (-max_y.x / P.y);
if (P.y > max_y) P *= (max_y / P.y);
if (P.y < -max_y) P *= (-max_y / P.y);
vec3 tmpLightnorm = lightnorm.xyz;
@@ -78,13 +78,13 @@ void calcAtmospherics(vec3 inPositionEye) {
//sunlight attenuation effect (hue and brightness) due to atmosphere
//this is used later for sunlight modulation at various altitudes
light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
//I had thought blue_density and haze_density should have equal weighting,
//but attenuation due to haze_density tends to seem too strong
temp1 = blue_density + vec4(haze_density.r);
temp1 = blue_density + vec4(haze_density);
blue_weight = blue_density / temp1;
haze_weight = vec4(haze_density.r) / temp1;
haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2.y = max(0.0, tmpLightnorm.y);
@@ -92,12 +92,12 @@ void calcAtmospherics(vec3 inPositionEye) {
sunlight *= exp( - light_atten * temp2.y);
// main atmospheric scattering line integral
temp2.z = Plen * density_multiplier.x;
temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
// ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati
// compiler gets confused.
temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
temp1 = exp(-temp1 * temp2.z * distance_multiplier);
//final atmosphere attenuation factor
setAtmosAttenuation(temp1.rgb);
@@ -122,12 +122,12 @@ void calcAtmospherics(vec3 inPositionEye) {
//increase ambient when there are more clouds
vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5;
//haze color
setAdditiveColor(
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
+ (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x
+ tmpAmbient)));
//brightness of surface both sunlight and ambient

View File

@@ -49,18 +49,18 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
uniform vec4 haze_horizon;
uniform vec4 haze_density;
uniform float haze_horizon;
uniform float haze_density;
uniform vec4 cloud_shadow;
uniform vec4 density_multiplier;
uniform vec4 max_y;
uniform float cloud_shadow;
uniform float density_multiplier;
uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
uniform vec4 cloud_scale;
uniform float cloud_scale;
void main()
{
@@ -76,7 +76,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
P *= (max_y.x / P.y);
P *= (max_y / P.y);
}
else
{
@@ -98,12 +98,12 @@ void main()
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
temp1 = blue_density + haze_density.x;
temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
haze_weight = haze_density.x / temp1;
haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -111,7 +111,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
temp2.z = Plen * density_multiplier.x;
temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -135,14 +135,14 @@ void main()
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
sunlight *= (1. - cloud_shadow.x);
sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// CLOUDS
@@ -163,13 +163,13 @@ void main()
vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1);
// Make a nice cloud density based on the cloud_shadow value that was passed in.
vary_CloudDensity = 2. * (cloud_shadow.x - 0.25);
vary_CloudDensity = 2. * (cloud_shadow - 0.25);
// Texture coords
vary_texcoord0 = texcoord0;
vary_texcoord0.xy -= 0.5;
vary_texcoord0.xy /= cloud_scale.x;
vary_texcoord0.xy /= cloud_scale;
vary_texcoord0.xy += 0.5;
vary_texcoord1 = vary_texcoord0;

View File

@@ -42,19 +42,17 @@ uniform vec4 sunlight_color;
uniform vec4 ambient;
uniform vec4 blue_horizon;
uniform vec4 blue_density;
uniform vec4 haze_horizon;
uniform vec4 haze_density;
uniform float haze_horizon;
uniform float haze_density;
uniform vec4 cloud_shadow;
uniform vec4 density_multiplier;
uniform vec4 max_y;
uniform float cloud_shadow;
uniform float density_multiplier;
uniform float max_y;
uniform vec4 glow;
uniform vec4 cloud_color;
uniform vec4 cloud_scale;
void main()
{
@@ -68,7 +66,7 @@ void main()
// Set altitude
if (P.y > 0.)
{
P *= (max_y.x / P.y);
P *= (max_y / P.y);
}
else
{
@@ -90,12 +88,12 @@ void main()
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y);
// Calculate relative weights
temp1 = blue_density + haze_density.x;
temp1 = blue_density + haze_density;
blue_weight = blue_density / temp1;
haze_weight = haze_density.x / temp1;
haze_weight = haze_density / temp1;
// Compute sunlight from P & lightnorm (for long rays like sky)
temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y );
@@ -103,7 +101,7 @@ void main()
sunlight *= exp( - light_atten * temp2.y);
// Distance
temp2.z = Plen * density_multiplier.x;
temp2.z = Plen * density_multiplier;
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
@@ -128,20 +126,20 @@ void main()
// Haze color above cloud
vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient)
+ (haze_horizon.r * haze_weight) * (sunlight * temp2.x + ambient)
+ (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient)
);
// Increase ambient when there are more clouds
vec4 tmpAmbient = ambient;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5;
// Dim sunlight by cloud shadow percentage
sunlight *= (1. - cloud_shadow.x);
sunlight *= (1. - cloud_shadow);
// Haze color below cloud
vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient)
);
// Final atmosphere additive

View File

@@ -71,6 +71,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
childSetCommitCallback("AscentCmdLineOfferTp", onCommitCmdLine, this);
childSetCommitCallback("AscentCmdLineMapTo", onCommitCmdLine, this);
childSetCommitCallback("AscentCmdLineTP2", onCommitCmdLine, this);
childSetCommitCallback("SinguCmdLineAway", onCommitCmdLine, this);
refreshValues();
refresh();
@@ -169,6 +170,7 @@ void LLPrefsAscentSys::onCommitCmdLine(LLUICtrl* ctrl, void* user_data)
self->childSetEnabled("AscentCmdLineMapTo", enabled);
self->childSetEnabled("map_to_keep_pos", enabled);
self->childSetEnabled("AscentCmdLineTP2", enabled);
self->childSetEnabled("SinguCmdLineAway", enabled);
}
gSavedSettings.setString("AscentCmdLinePos", self->childGetValue("AscentCmdLinePos"));
@@ -184,6 +186,7 @@ void LLPrefsAscentSys::onCommitCmdLine(LLUICtrl* ctrl, void* user_data)
gSavedSettings.setString("AscentCmdLineOfferTp", self->childGetValue("AscentCmdLineOfferTp"));
gSavedSettings.setString("AscentCmdLineMapTo", self->childGetValue("AscentCmdLineMapTo"));
gSavedSettings.setString("AscentCmdLineTP2", self->childGetValue("AscentCmdLineTP2"));
gSavedSettings.setString("SinguCmdLineAway", self->childGetValue("SinguCmdLineAway"));
}
void LLPrefsAscentSys::refreshValues()
@@ -225,12 +228,14 @@ void LLPrefsAscentSys::refreshValues()
mCmdLineMapTo = gSavedSettings.getString("AscentCmdLineMapTo");
mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos");
mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2");
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
//Privacy -----------------------------------------------------------------------------
//Security ----------------------------------------------------------------------------
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
mDisablePointAtAndBeam = gSavedSettings.getBOOL("DisablePointAtAndBeam");
mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt");
mShowLookAt = gSavedSettings.getBOOL("AscentShowLookAt");
mQuietSnapshotsToDisk = gSavedSettings.getBOOL("QuietSnapshotsToDisk");
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps");
@@ -275,6 +280,7 @@ void LLPrefsAscentSys::refresh()
childSetEnabled("AscentCmdLineMapTo", mCmdLine);
childSetEnabled("map_to_keep_pos", mCmdLine);
childSetEnabled("AscentCmdLineTP2", mCmdLine);
childSetEnabled("SinguCmdLineAway", mCmdLine);
childSetValue("AscentCmdLinePos", mCmdLinePos);
childSetValue("AscentCmdLineGround", mCmdLineGround);
@@ -289,6 +295,7 @@ void LLPrefsAscentSys::refresh()
childSetValue("AscentCmdLineOfferTp", mCmdLineOfferTp);
childSetValue("AscentCmdLineMapTo", mCmdLineMapTo);
childSetValue("AscentCmdLineTP2", mCmdLineTP2);
childSetValue("SinguCmdLineAway", mCmdLineAway);
}
void LLPrefsAscentSys::cancel()
@@ -329,12 +336,14 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setString("AscentCmdLineMapTo", mCmdLineMapTo);
gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos);
gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2);
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
//Privacy -----------------------------------------------------------------------------
//Security ----------------------------------------------------------------------------
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
gSavedSettings.setBOOL("DisablePointAtAndBeam", mDisablePointAtAndBeam);
gSavedSettings.setBOOL("PrivateLookAt", mPrivateLookAt);
gSavedSettings.setBOOL("AscentShowLookAt", mShowLookAt);
gSavedSettings.setBOOL("QuietSnapshotsToDisk", mQuietSnapshotsToDisk);
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit);
gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps);

View File

@@ -88,13 +88,15 @@ protected:
std::string mCmdLineMapTo;
BOOL mCmdMapToKeepPos;
std::string mCmdLineTP2;
std::string mCmdLineAway;
//Privacy -----------------------------------------------------------------------------
//Security ----------------------------------------------------------------------------
BOOL mBroadcastViewerEffects;
BOOL mDisablePointAtAndBeam;
BOOL mPrivateLookAt;
BOOL mShowLookAt;
BOOL mRevokePermsOnStandUp;
BOOL mQuietSnapshotsToDisk;
BOOL mRevokePermsOnStandUp;
BOOL mDisableClickSit;
BOOL mDisplayScriptJumps;
F32 mNumScriptDiff;

View File

@@ -55,6 +55,7 @@
#include "llfloateravatarlist.h"
#include "llviewerobjectlist.h"
#include "llviewertexteditor.h"
#include "llviewermenu.h"
#include "llvoavatar.h"
#include "lltooldraganddrop.h"
#include "llinventorymodel.h"
@@ -398,6 +399,10 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
cmdline_tp2name(name);
}
return false;
}else if(command == utf8str_tolower(gSavedSettings.getString("SinguCmdLineAway")))
{
handle_fake_away_status(NULL);
return false;
}else if(command == "typingstop")
{
std::string text;

View File

@@ -3984,7 +3984,10 @@ void LLAgent::sendAgentSetAppearance()
}
}
// llinfos << "Avatar XML num VisualParams transmitted = " << transmitted_params << llendl;
llinfos << "Avatar XML num VisualParams transmitted = " << transmitted_params << llendl;
if(transmitted_params < 218) {
LLNotificationsUtil::add("SGIncompleteAppearence");
}
sendReliableMessage();
}

View File

@@ -0,0 +1,692 @@
/**
* @file llavatarpropertiesprocessor.cpp
* @brief LLAvatarPropertiesProcessor class implementation
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llavatarpropertiesprocessor.h"
// Viewer includes
#include "llagent.h"
#include "llviewergenericmessage.h"
// Linden library includes
#include "llavatarconstants.h" // AVATAR_TRANSACTED, etc.
#include "lldate.h"
#include "lltrans.h"
#include "llui.h" // LLUI::getLanguage()
#include "message.h"
LLAvatarPropertiesProcessor::LLAvatarPropertiesProcessor()
{
}
LLAvatarPropertiesProcessor::~LLAvatarPropertiesProcessor()
{
}
void LLAvatarPropertiesProcessor::addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer)
{
// Check if that observer is already in mObservers for that avatar_id
observer_multimap_t::iterator it;
// IAN BUG this should update the observer's UUID if this is a dupe - sent to PE
it = mObservers.find(avatar_id);
while (it != mObservers.end())
{
if (it->second == observer)
{
return;
}
else
{
++it;
}
}
mObservers.insert(std::pair<LLUUID, LLAvatarPropertiesObserver*>(avatar_id, observer));
}
void LLAvatarPropertiesProcessor::removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer)
{
if (!observer)
{
return;
}
observer_multimap_t::iterator it;
it = mObservers.find(avatar_id);
while (it != mObservers.end())
{
if (it->second == observer)
{
mObservers.erase(it);
break;
}
else
{
++it;
}
}
}
void LLAvatarPropertiesProcessor::sendGenericRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string method)
{
// Suppress duplicate requests while waiting for a response from the network
if (isPendingRequest(avatar_id, type))
{
// waiting for a response, don't re-request
return;
}
// indicate we're going to make a request
addPendingRequest(avatar_id, type);
std::vector<std::string> strings;
strings.push_back( avatar_id.asString() );
send_generic_message(method, strings);
}
void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avatar_id)
{
if (isPendingRequest(avatar_id, APT_PROPERTIES))
{
// waiting for a response, don't re-request
return;
}
// indicate we're going to make a request
addPendingRequest(avatar_id, APT_PROPERTIES);
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_AvatarPropertiesRequest);
msg->nextBlockFast( _PREHASH_AgentData);
msg->addUUIDFast( _PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast( _PREHASH_AvatarID, avatar_id);
gAgent.sendReliableMessage();
}
void LLAvatarPropertiesProcessor::sendAvatarPicksRequest(const LLUUID& avatar_id)
{
std::string name;
gCacheName->getFullName(avatar_id, name);
llinfos << "Sending avatarpicksrequest for " << avatar_id << " ("<<name<<")" << llendl;
sendGenericRequest(avatar_id, APT_PICKS, "avatarpicksrequest");
}
void LLAvatarPropertiesProcessor::sendAvatarNotesRequest(const LLUUID& avatar_id)
{
sendGenericRequest(avatar_id, APT_NOTES, "avatarnotesrequest");
}
void LLAvatarPropertiesProcessor::sendAvatarGroupsRequest(const LLUUID& avatar_id)
{
sendGenericRequest(avatar_id, APT_GROUPS, "avatargroupsrequest");
}
void LLAvatarPropertiesProcessor::sendAvatarTexturesRequest(const LLUUID& avatar_id)
{
sendGenericRequest(avatar_id, APT_TEXTURES, "avatartexturesrequest");
// No response expected.
removePendingRequest(avatar_id, APT_TEXTURES);
}
void LLAvatarPropertiesProcessor::sendAvatarClassifiedsRequest(const LLUUID& avatar_id)
{
sendGenericRequest(avatar_id, APT_CLASSIFIEDS, "avatarclassifiedsrequest");
}
void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props)
{
if (!gAgent.isInitialized() || (gAgent.getID() == LLUUID::null))
{
llwarns << "Sending avatarinfo update DENIED - invalid agent" << llendl;
return;
}
llinfos << "Sending avatarinfo update" << llendl;
// This value is required by sendAvatarPropertiesUpdate method.
//A profile should never be mature. (From the original code)
BOOL mature = FALSE;
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast (_PREHASH_AvatarPropertiesUpdate);
msg->nextBlockFast (_PREHASH_AgentData);
msg->addUUIDFast (_PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast (_PREHASH_SessionID, gAgent.getSessionID() );
msg->nextBlockFast (_PREHASH_PropertiesData);
msg->addUUIDFast (_PREHASH_ImageID, avatar_props->image_id);
msg->addUUIDFast (_PREHASH_FLImageID, avatar_props->fl_image_id);
msg->addStringFast (_PREHASH_AboutText, avatar_props->about_text);
msg->addStringFast (_PREHASH_FLAboutText, avatar_props->fl_about_text);
msg->addBOOL(_PREHASH_AllowPublish, avatar_props->allow_publish);
msg->addBOOL(_PREHASH_MaturePublish, mature);
msg->addString(_PREHASH_ProfileURL, avatar_props->profile_url);
gAgent.sendReliableMessage();
}
void LLAvatarPropertiesProcessor::sendAvatarInterestsUpdate(const LLAvatarInterestsInfo* interests_props)
{
if (!gAgent.isInitialized() || (gAgent.getID() == LLUUID::null))
{
llwarns << "Sending avatarinfo update DENIED - invalid agent" << llendl;
return;
}
LLMessageSystem *msg = gMessageSystem;
msg->newMessage(_PREHASH_AvatarInterestsUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast( _PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() );
msg->nextBlockFast(_PREHASH_PropertiesData);
msg->addU32Fast( _PREHASH_WantToMask, interests_props->want_to_mask);
msg->addStringFast( _PREHASH_WantToText, interests_props->want_to_text);
msg->addU32Fast( _PREHASH_SkillsMask, interests_props->skills_mask);
msg->addStringFast( _PREHASH_SkillsText, interests_props->skills_text);
msg->addString( _PREHASH_LanguagesText, interests_props->languages_text);
gAgent.sendReliableMessage();
}
//static
std::string LLAvatarPropertiesProcessor::accountType(const LLAvatarData* avatar_data)
{
// If you have a special account, like M Linden ("El Jefe!")
// return an untranslated "special" string
if (!avatar_data->caption_text.empty())
{
return avatar_data->caption_text;
}
const char* const ACCT_TYPE[] = {
"AcctTypeResident",
"AcctTypeTrial",
"AcctTypeCharterMember",
"AcctTypeEmployee"
};
U8 caption_max = (U8)LL_ARRAY_SIZE(ACCT_TYPE)-1;
U8 caption_index = llclamp(avatar_data->caption_index, (U8)0, caption_max);
return LLTrans::getString(ACCT_TYPE[caption_index]);
}
//static
std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_data)
{
// Special accounts like M Linden don't have payment info revealed.
if (!avatar_data->caption_text.empty()) return "";
// Linden employees don't have payment info revealed
const S32 LINDEN_EMPLOYEE_INDEX = 3;
if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX) return "";
BOOL transacted = (avatar_data->flags & AVATAR_TRANSACTED);
BOOL identified = (avatar_data->flags & AVATAR_IDENTIFIED);
// Not currently getting set in dataserver/lldataavatar.cpp for privacy considerations
//BOOL age_verified = (avatar_data->flags & AVATAR_AGEVERIFIED);
const char* payment_text;
if(transacted)
{
payment_text = "PaymentInfoUsed";
}
else if (identified)
{
payment_text = "PaymentInfoOnFile";
}
else
{
payment_text = "NoPaymentInfoOnFile";
}
return LLTrans::getString(payment_text);
}
void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**)
{
LLAvatarData avatar_data;
std::string birth_date;
msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, avatar_data.agent_id);
msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AvatarID, avatar_data.avatar_id);
msg->getUUIDFast( _PREHASH_PropertiesData, _PREHASH_ImageID, avatar_data.image_id);
msg->getUUIDFast( _PREHASH_PropertiesData, _PREHASH_FLImageID, avatar_data.fl_image_id);
msg->getUUIDFast( _PREHASH_PropertiesData, _PREHASH_PartnerID, avatar_data.partner_id);
msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_AboutText, avatar_data.about_text);
msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_FLAboutText, avatar_data.fl_about_text);
msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_BornOn, birth_date);
msg->getString( _PREHASH_PropertiesData, _PREHASH_ProfileURL, avatar_data.profile_url);
msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_Flags, avatar_data.flags);
//LLDateUtil::dateFromPDTString(avatar_data.born_on, birth_date);
avatar_data.born_on = birth_date;
avatar_data.caption_index = 0;
S32 charter_member_size = 0;
charter_member_size = msg->getSize(_PREHASH_PropertiesData, _PREHASH_CharterMember);
if(1 == charter_member_size)
{
msg->getBinaryData(_PREHASH_PropertiesData, _PREHASH_CharterMember, &avatar_data.caption_index, 1);
}
else if(1 < charter_member_size)
{
msg->getString(_PREHASH_PropertiesData, _PREHASH_CharterMember, avatar_data.caption_text);
}
LLAvatarPropertiesProcessor* self = getInstance();
// Request processed, no longer pending
self->removePendingRequest(avatar_data.avatar_id, APT_PROPERTIES);
self->notifyObservers(avatar_data.avatar_id,&avatar_data,APT_PROPERTIES);
}
void LLAvatarPropertiesProcessor::processAvatarInterestsReply(LLMessageSystem* msg, void**)
{
LLAvatarInterestsInfo avatar_interests;
msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, avatar_interests.agent_id);
msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AvatarID, avatar_interests.avatar_id );
msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_WantToMask, avatar_interests.want_to_mask );
msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_WantToText, avatar_interests.want_to_text );
msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_SkillsMask, avatar_interests.skills_mask );
msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_SkillsText, avatar_interests.skills_text );
msg->getString( _PREHASH_PropertiesData, _PREHASH_LanguagesText, avatar_interests.languages_text );
LLAvatarPropertiesProcessor* self = getInstance();
//This message isn't requested.. it just comes as a consequence of AvatarPropertiesRequest.
//self->removePendingRequest(avatar_interests.avatar_id, APT_INTERESTS);
self->notifyObservers(avatar_interests.avatar_id,&avatar_interests,APT_INTERESTS);
}
void LLAvatarPropertiesProcessor::processAvatarClassifiedsReply(LLMessageSystem* msg, void**)
{
LLAvatarClassifieds classifieds;
msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, classifieds.agent_id);
msg->getUUID(_PREHASH_AgentData, _PREHASH_TargetID, classifieds.target_id);
S32 block_count = msg->getNumberOfBlocks(_PREHASH_Data);
for(int n = 0; n < block_count; ++n)
{
LLAvatarClassifieds::classified_data data;
msg->getUUID(_PREHASH_Data, _PREHASH_ClassifiedID, data.classified_id, n);
msg->getString(_PREHASH_Data, _PREHASH_Name, data.name, n);
classifieds.classifieds_list.push_back(data);
}
LLAvatarPropertiesProcessor* self = getInstance();
// Request processed, no longer pending
self->removePendingRequest(classifieds.target_id, APT_CLASSIFIEDS);
self->notifyObservers(classifieds.target_id,&classifieds,APT_CLASSIFIEDS);
//LLPanelAvatarClassified => LLPanelAvatar
}
void LLAvatarPropertiesProcessor::processClassifiedInfoReply(LLMessageSystem* msg, void**)
{
LLAvatarClassifiedInfo c_info;
msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, c_info.agent_id);
msg->getUUID(_PREHASH_Data, _PREHASH_ClassifiedID, c_info.classified_id);
msg->getUUID(_PREHASH_Data, _PREHASH_CreatorID, c_info.creator_id);
msg->getU32(_PREHASH_Data, _PREHASH_CreationDate, c_info.creation_date);
msg->getU32(_PREHASH_Data, _PREHASH_ExpirationDate, c_info.expiration_date);
msg->getU32(_PREHASH_Data, _PREHASH_Category, c_info.category);
msg->getString(_PREHASH_Data, _PREHASH_Name, c_info.name);
msg->getString(_PREHASH_Data, _PREHASH_Desc, c_info.description);
msg->getUUID(_PREHASH_Data, _PREHASH_ParcelID, c_info.parcel_id);
msg->getU32(_PREHASH_Data, _PREHASH_ParentEstate, c_info.parent_estate);
msg->getUUID(_PREHASH_Data, _PREHASH_SnapshotID, c_info.snapshot_id);
msg->getString(_PREHASH_Data, _PREHASH_SimName, c_info.sim_name);
msg->getVector3d(_PREHASH_Data, _PREHASH_PosGlobal, c_info.pos_global);
msg->getString(_PREHASH_Data, _PREHASH_ParcelName, c_info.parcel_name);
msg->getU8(_PREHASH_Data, _PREHASH_ClassifiedFlags, c_info.flags);
msg->getS32(_PREHASH_Data, _PREHASH_PriceForListing, c_info.price_for_listing);
LLAvatarPropertiesProcessor* self = getInstance();
// Request processed, no longer pending
self->removePendingRequest(c_info.creator_id, APT_CLASSIFIED_INFO);
self->notifyObservers(c_info.creator_id, &c_info, APT_CLASSIFIED_INFO);
}
void LLAvatarPropertiesProcessor::processAvatarNotesReply(LLMessageSystem* msg, void**)
{
LLAvatarNotes avatar_notes;
msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, avatar_notes.agent_id);
msg->getUUID(_PREHASH_Data, _PREHASH_TargetID, avatar_notes.target_id);
msg->getString(_PREHASH_Data, _PREHASH_Notes, avatar_notes.notes);
LLAvatarPropertiesProcessor* self = getInstance();
// Request processed, no longer pending
self->removePendingRequest(avatar_notes.target_id, APT_NOTES);
self->notifyObservers(avatar_notes.target_id,&avatar_notes,APT_NOTES);
//LLPanelAvatar
}
void LLAvatarPropertiesProcessor::processAvatarPicksReply(LLMessageSystem* msg, void**)
{
LLAvatarPicks avatar_picks;
msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, avatar_picks.agent_id);
msg->getUUID(_PREHASH_AgentData, _PREHASH_TargetID, avatar_picks.target_id);
std::string name;
gCacheName->getFullName(avatar_picks.target_id, name);
llinfos << "Got reply for " << avatar_picks.target_id << ": (" << name << ")" << llendl;
S32 block_count = msg->getNumberOfBlocks(_PREHASH_Data);
for (int block = 0; block < block_count; ++block)
{
LLUUID pick_id;
std::string pick_name;
msg->getUUID(_PREHASH_Data, _PREHASH_PickID, pick_id, block);
msg->getString(_PREHASH_Data, _PREHASH_PickName, pick_name, block);
llinfos << "\t" << pick_id << ": " << pick_name << llendl;
avatar_picks.picks_list.push_back(std::make_pair(pick_id,pick_name));
}
LLAvatarPropertiesProcessor* self = getInstance();
// Request processed, no longer pending
self->removePendingRequest(avatar_picks.target_id, APT_PICKS);
self->notifyObservers(avatar_picks.target_id,&avatar_picks,APT_PICKS);
//LLPanelAvatar
}
void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, void**)
{
LLPickData pick_data;
// Extract the agent id and verify the message is for this
// client.
msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, pick_data.agent_id );
msg->getUUID(_PREHASH_Data, _PREHASH_PickID, pick_data.pick_id);
msg->getUUID(_PREHASH_Data, _PREHASH_CreatorID, pick_data.creator_id);
// ** top_pick should be deleted, not being used anymore - angela
msg->getBOOL(_PREHASH_Data, _PREHASH_TopPick, pick_data.top_pick);
msg->getUUID(_PREHASH_Data, _PREHASH_ParcelID, pick_data.parcel_id);
msg->getString(_PREHASH_Data, _PREHASH_Name, pick_data.name);
msg->getString(_PREHASH_Data, _PREHASH_Desc, pick_data.desc);
msg->getUUID(_PREHASH_Data, _PREHASH_SnapshotID, pick_data.snapshot_id);
msg->getString(_PREHASH_Data, _PREHASH_User, pick_data.user_name);
msg->getString(_PREHASH_Data, _PREHASH_OriginalName, pick_data.original_name);
msg->getString(_PREHASH_Data, _PREHASH_SimName, pick_data.sim_name);
msg->getVector3d(_PREHASH_Data, _PREHASH_PosGlobal, pick_data.pos_global);
msg->getS32(_PREHASH_Data, _PREHASH_SortOrder, pick_data.sort_order);
msg->getBOOL(_PREHASH_Data, _PREHASH_Enabled, pick_data.enabled);
LLAvatarPropertiesProcessor* self = getInstance();
// don't need to remove pending request as we don't track pick info
self->notifyObservers(pick_data.creator_id, &pick_data, APT_PICK_INFO);
}
void LLAvatarPropertiesProcessor::processAvatarGroupsReply(LLMessageSystem* msg, void**)
{
LLAvatarGroups avatar_groups;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, avatar_groups.agent_id );
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AvatarID, avatar_groups.avatar_id );
S32 group_count = msg->getNumberOfBlocksFast(_PREHASH_GroupData);
for(S32 i = 0; i < group_count; ++i)
{
LLAvatarGroups::LLGroupData group_data;
msg->getU64( _PREHASH_GroupData, _PREHASH_GroupPowers, group_data.group_powers, i );
msg->getStringFast(_PREHASH_GroupData, _PREHASH_GroupTitle, group_data.group_title, i );
msg->getUUIDFast( _PREHASH_GroupData, _PREHASH_GroupID, group_data.group_id, i);
msg->getStringFast(_PREHASH_GroupData, _PREHASH_GroupName, group_data.group_name, i );
msg->getUUIDFast( _PREHASH_GroupData, _PREHASH_GroupInsigniaID, group_data.group_insignia_id, i );
avatar_groups.group_list.push_back(group_data);
}
LLAvatarPropertiesProcessor* self = getInstance();
self->removePendingRequest(avatar_groups.avatar_id, APT_GROUPS);
self->notifyObservers(avatar_groups.avatar_id,&avatar_groups,APT_GROUPS);
}
void LLAvatarPropertiesProcessor::notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type)
{
// Copy the map (because observers may delete themselves when updated?)
LLAvatarPropertiesProcessor::observer_multimap_t observers = mObservers;
observer_multimap_t::iterator oi = observers.begin();
observer_multimap_t::iterator end = observers.end();
for (; oi != end; ++oi)
{
// only notify observers for the same agent, or if the observer
// didn't know the agent ID and passed a NULL id.
const LLUUID &agent_id = oi->first;
if (agent_id == id || agent_id.isNull())
{
oi->second->processProperties(data,type);
}
}
}
void LLAvatarPropertiesProcessor::sendFriendRights(const LLUUID& avatar_id, S32 rights)
{
if(!avatar_id.isNull())
{
LLMessageSystem* msg = gMessageSystem;
// setup message header
msg->newMessageFast(_PREHASH_GrantUserRights);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Rights);
msg->addUUID(_PREHASH_AgentRelated, avatar_id);
msg->addS32(_PREHASH_RelatedRights, rights);
gAgent.sendReliableMessage();
}
}
void LLAvatarPropertiesProcessor::sendNotes(const LLUUID& avatar_id, const std::string notes)
{
if(!avatar_id.isNull())
{
LLMessageSystem* msg = gMessageSystem;
// setup message header
msg->newMessageFast(_PREHASH_AvatarNotesUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Data);
msg->addUUID(_PREHASH_TargetID, avatar_id);
msg->addString(_PREHASH_Notes, notes);
gAgent.sendReliableMessage();
}
}
void LLAvatarPropertiesProcessor::sendPickDelete( const LLUUID& pick_id )
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_PickDelete);
msg->nextBlock(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_PickID, pick_id);
gAgent.sendReliableMessage();
//LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
//LLAgentPicksInfo::getInstance()->decrementNumberOfPicks();
}
void LLAvatarPropertiesProcessor::sendClassifiedDelete(const LLUUID& classified_id)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_ClassifiedDelete);
msg->nextBlock(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_ClassifiedID, classified_id);
gAgent.sendReliableMessage();
}
void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
{
if (!new_pick) return;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_PickInfoUpdate);
msg->nextBlock(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_PickID, new_pick->pick_id);
msg->addUUID(_PREHASH_CreatorID, new_pick->creator_id);
//legacy var need to be deleted
msg->addBOOL(_PREHASH_TopPick, FALSE);
// fills in on simulator if null
msg->addUUID(_PREHASH_ParcelID, new_pick->parcel_id);
msg->addString(_PREHASH_Name, new_pick->name);
msg->addString(_PREHASH_Desc, new_pick->desc);
msg->addUUID(_PREHASH_SnapshotID, new_pick->snapshot_id);
msg->addVector3d(_PREHASH_PosGlobal, new_pick->pos_global);
// Only top picks have a sort order
msg->addS32(_PREHASH_SortOrder, 0);
msg->addBOOL(_PREHASH_Enabled, new_pick->enabled);
gAgent.sendReliableMessage();
//LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
}
void LLAvatarPropertiesProcessor::sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data)
{
if(!c_data)
{
return;
}
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_ClassifiedInfoUpdate);
msg->nextBlock(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_ClassifiedID, c_data->classified_id);
msg->addU32(_PREHASH_Category, c_data->category);
msg->addString(_PREHASH_Name, c_data->name);
msg->addString(_PREHASH_Desc, c_data->description);
msg->addUUID(_PREHASH_ParcelID, c_data->parcel_id);
msg->addU32(_PREHASH_ParentEstate, 0);
msg->addUUID(_PREHASH_SnapshotID, c_data->snapshot_id);
msg->addVector3d(_PREHASH_PosGlobal, c_data->pos_global);
msg->addU8(_PREHASH_ClassifiedFlags, c_data->flags);
msg->addS32(_PREHASH_PriceForListing, c_data->price_for_listing);
gAgent.sendReliableMessage();
}
void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id)
{
// Must ask for a pick based on the creator id because
// the pick database is distributed to the inventory cluster. JC
std::vector<std::string> request_params;
request_params.push_back(creator_id.asString() );
request_params.push_back(pick_id.asString() );
send_generic_message("pickinforequest", request_params);
}
void LLAvatarPropertiesProcessor::sendClassifiedInfoRequest(const LLUUID& classified_id)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage(_PREHASH_ClassifiedInfoRequest);
msg->nextBlock(_PREHASH_AgentData);
msg->addUUID(_PREHASH_AgentID, gAgent.getID());
msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_ClassifiedID, classified_id);
gAgent.sendReliableMessage();
}
bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type)
{
timestamp_map_t::key_type key = std::make_pair(avatar_id, type);
timestamp_map_t::iterator it = mRequestTimestamps.find(key);
// Is this a new request?
if (it == mRequestTimestamps.end()) return false;
// We found a request, check if it has timed out
U32 now = time(NULL);
const U32 REQUEST_EXPIRE_SECS = 5;
U32 expires = it->second + REQUEST_EXPIRE_SECS;
// Request is still pending if it hasn't expired yet
// *NOTE: Expired requests will accumulate in this map, but they are rare,
// the data is small, and they will be updated if the same data is
// re-requested
return (now < expires);
}
void LLAvatarPropertiesProcessor::addPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type)
{
timestamp_map_t::key_type key = std::make_pair(avatar_id, type);
U32 now = time(NULL);
// Add or update existing (expired) request
mRequestTimestamps[ key ] = now;
}
void LLAvatarPropertiesProcessor::removePendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type)
{
timestamp_map_t::key_type key = std::make_pair(avatar_id, type);
mRequestTimestamps.erase(key);
}

View File

@@ -0,0 +1,291 @@
/**
* @file llavatarpropertiesprocessor.h
* @brief LLAvatatIconCtrl base class
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLAVATARPROPERTIESPROCESSOR_H
#define LL_LLAVATARPROPERTIESPROCESSOR_H
#include "lluuid.h"
#include "llsingleton.h"
#include "v3dmath.h" // LLVector3d
#include <list>
#include <map>
/*
*TODO Vadim: This needs some refactoring:
- Remove EAvatarProcessorType in favor of separate observers, derived from a common parent (to get rid of void*).
*/
class LLMessageSystem;
enum EAvatarProcessorType
{
APT_PROPERTIES,
APT_NOTES,
APT_GROUPS,
APT_PICKS,
APT_PICK_INFO,
APT_TEXTURES,
APT_CLASSIFIEDS,
APT_CLASSIFIED_INFO,
APT_INTERESTS
};
struct LLAvatarData
{
LLUUID agent_id;
LLUUID avatar_id; //target id
LLUUID image_id;
LLUUID fl_image_id;
LLUUID partner_id;
std::string about_text;
std::string fl_about_text;
std::string born_on;
std::string profile_url;
U8 caption_index;
std::string caption_text;
U32 flags;
BOOL allow_publish;
};
struct LLAvatarPicks
{
LLUUID agent_id;
LLUUID target_id; //target id
typedef std::pair<LLUUID,std::string> pick_data_t;
typedef std::list< pick_data_t> picks_list_t;
picks_list_t picks_list;
};
struct LLPickData
{
LLUUID agent_id;
LLUUID pick_id;
LLUUID creator_id;
BOOL top_pick;
LLUUID parcel_id;
std::string name;
std::string desc;
LLUUID snapshot_id;
LLVector3d pos_global;
S32 sort_order;
BOOL enabled;
//used only in read requests
std::string user_name;
std::string original_name;
std::string sim_name;
//used only in write (update) requests
LLUUID session_id;
};
struct LLAvatarNotes
{
LLUUID agent_id;
LLUUID target_id; //target id
std::string notes;
};
struct LLAvatarGroups
{
LLUUID agent_id;
LLUUID avatar_id; //target id
BOOL list_in_profile;
struct LLGroupData;
typedef std::list<LLGroupData> group_list_t;
group_list_t group_list;
struct LLGroupData
{
U64 group_powers;
BOOL accept_notices;
std::string group_title;
LLUUID group_id;
std::string group_name;
LLUUID group_insignia_id;
};
};
struct LLAvatarClassifieds
{
LLUUID agent_id;
LLUUID target_id;
struct classified_data;
typedef std::list<classified_data> classifieds_list_t;
classifieds_list_t classifieds_list;
struct classified_data
{
LLUUID classified_id;
std::string name;
};
};
struct LLAvatarClassifiedInfo
{
LLUUID agent_id;
LLUUID classified_id;
LLUUID creator_id;
U32 creation_date;
U32 expiration_date;
U32 category;
std::string name;
std::string description;
LLUUID parcel_id;
U32 parent_estate;
LLUUID snapshot_id;
std::string sim_name;
LLVector3d pos_global;
std::string parcel_name;
U8 flags;
S32 price_for_listing;
};
struct LLAvatarInterestsInfo
{
LLUUID agent_id;
LLUUID avatar_id; //target id
U32 want_to_mask;
std::string want_to_text;
U32 skills_mask;
std::string skills_text;
std::string languages_text;
};
class LLAvatarPropertiesObserver
{
public:
virtual ~LLAvatarPropertiesObserver() {}
virtual void processProperties(void* data, EAvatarProcessorType type) = 0;
};
class LLAvatarPropertiesProcessor
: public LLSingleton<LLAvatarPropertiesProcessor>
{
public:
LLAvatarPropertiesProcessor();
virtual ~LLAvatarPropertiesProcessor();
void addObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer);
void removeObserver(const LLUUID& avatar_id, LLAvatarPropertiesObserver* observer);
// Request various types of avatar data. Duplicate requests will be
// suppressed while waiting for a response from the network.
void sendAvatarPropertiesRequest(const LLUUID& avatar_id);
void sendAvatarPicksRequest(const LLUUID& avatar_id);
void sendAvatarNotesRequest(const LLUUID& avatar_id);
void sendAvatarGroupsRequest(const LLUUID& avatar_id);
void sendAvatarTexturesRequest(const LLUUID& avatar_id);
void sendAvatarClassifiedsRequest(const LLUUID& avatar_id);
// Duplicate pick info requests are not suppressed.
void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id);
void sendClassifiedInfoRequest(const LLUUID& classified_id);
void sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props);
void sendAvatarInterestsUpdate(const LLAvatarInterestsInfo* interests_props);
void sendPickInfoUpdate(const LLPickData* new_pick);
void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data);
void sendFriendRights(const LLUUID& avatar_id, S32 rights);
void sendNotes(const LLUUID& avatar_id, const std::string notes);
void sendPickDelete(const LLUUID& pick_id);
void sendClassifiedDelete(const LLUUID& classified_id);
// Returns translated, human readable string for account type, such
// as "Resident" or "Linden Employee". Used for profiles, inspectors.
static std::string accountType(const LLAvatarData* avatar_data);
// Returns translated, human readable string for payment info, such
// as "Payment Info on File" or "Payment Info Used".
// Used for profiles, inspectors.
static std::string paymentInfo(const LLAvatarData* avatar_data);
static void processAvatarPropertiesReply(LLMessageSystem* msg, void**);
static void processAvatarInterestsReply(LLMessageSystem* msg, void**);
static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**);
static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
static void processAvatarGroupsReply(LLMessageSystem* msg, void**);
static void processAvatarNotesReply(LLMessageSystem* msg, void**);
static void processAvatarPicksReply(LLMessageSystem* msg, void**);
static void processPickInfoReply(LLMessageSystem* msg, void**);
protected:
void sendGenericRequest(const LLUUID& avatar_id, EAvatarProcessorType type, const std::string method);
void notifyObservers(const LLUUID& id,void* data, EAvatarProcessorType type);
// Is there a pending, not timed out, request for this avatar's data?
// Use this to suppress duplicate requests for data when a request is
// pending.
bool isPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type);
// Call this when a request has been sent
void addPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type);
// Call this when the reply to the request is received
void removePendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type);
typedef void* (*processor_method_t)(LLMessageSystem*);
static processor_method_t getProcessor(EAvatarProcessorType type);
protected:
typedef std::multimap<LLUUID, LLAvatarPropertiesObserver*> observer_multimap_t;
observer_multimap_t mObservers;
// Keep track of pending requests for data by avatar id and type.
// Maintain a timestamp for each request so a request that receives no reply
// does not block future requests forever.
// Map avatar_id+request_type -> U32 timestamp in seconds
typedef std::map< std::pair<LLUUID, EAvatarProcessorType>, U32> timestamp_map_t;
timestamp_map_t mRequestTimestamps;
};
#endif // LL_LLAVATARPROPERTIESPROCESSOR_H

View File

@@ -139,6 +139,7 @@ public:
PASS_ALPHA,
PASS_ALPHA_MASK,
PASS_FULLBRIGHT_ALPHA_MASK,
PASS_ALPHA_INVISIBLE,
NUM_RENDER_TYPES,
};

View File

@@ -42,7 +42,6 @@
#include "llcubemap.h"
#include "llsky.h"
#include "llagent.h"
#include "lldrawable.h"
#include "llface.h"
#include "llviewercamera.h"
@@ -345,6 +344,7 @@ void LLDrawPoolAlpha::render(S32 pass)
pushBatches(LLRenderPass::PASS_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
pushBatches(LLRenderPass::PASS_ALPHA_INVISIBLE, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
if(shaders)
{

View File

@@ -43,7 +43,6 @@
#include "llglheaders.h"
#include "llrender.h"
#include "llagent.h"
#include "llcubemap.h"
#include "lldrawable.h"
#include "llface.h"

View File

@@ -2,31 +2,25 @@
* @file lldrawpoolsimple.cpp
* @brief LLDrawPoolSimple class implementation
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -35,7 +29,6 @@
#include "lldrawpoolsimple.h"
#include "llviewercamera.h"
#include "llagent.h"
#include "lldrawable.h"
#include "llface.h"
#include "llsky.h"

View File

@@ -57,6 +57,10 @@
#include "llsdutil.h"
#include "llaudioengine.h"
#include "llstartup.h"
//<edit>
#include "llviewermenu.h"
//</edit>
@@ -125,7 +129,8 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool
LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string &name, const LLVector3d &position) :
mID(id), mName(name), mPosition(position), mDrawPosition(), mMarked(FALSE), mFocused(FALSE),
mUpdateTimer(), mFrame(gFrameCount), mInSimFrame(U32_MAX), mInDrawFrame(U32_MAX),
mInChatFrame(U32_MAX), mInShoutFrame(U32_MAX)
mInChatFrame(U32_MAX), mInShoutFrame(U32_MAX),
mActivityType(ACTIVITY_NEW), mActivityTimer()
{
}
@@ -214,6 +219,26 @@ BOOL LLAvatarListEntry::isDead()
{
return getEntryAgeSeconds() > DEAD_KEEP_TIME;
}
const F32 ACTIVITY_TIMEOUT = 1.0f;
void LLAvatarListEntry::setActivity(ACTIVITY_TYPE activity)
{
if ( activity >= mActivityType || mActivityTimer.getElapsedTimeF32() > ACTIVITY_TIMEOUT )
{
mActivityType = activity;
mActivityTimer.start();
}
}
LLAvatarListEntry::ACTIVITY_TYPE LLAvatarListEntry::getActivity()
{
if ( mActivityTimer.getElapsedTimeF32() > ACTIVITY_TIMEOUT )
{
mActivityType = ACTIVITY_NONE;
}
if(isDead())return ACTIVITY_DEAD;
return mActivityType;
}
LLFloaterAvatarList* LLFloaterAvatarList::sInstance = NULL;
@@ -359,10 +384,29 @@ BOOL LLFloaterAvatarList::postBuild()
return TRUE;
}
void updateParticleActivity(LLDrawable *drawablep)
{
if (LLFloaterAvatarList::getInstance())
{
LLViewerObject *vobj = drawablep->getVObj();
if (vobj && vobj->isParticleSource())
{
LLUUID id = vobj->mPartSourcep->getOwnerUUID();
LLAvatarListEntry *ent = LLFloaterAvatarList::getInstance()->getAvatarEntry(id);
if ( NULL != ent )
{
ent->setActivity(LLAvatarListEntry::ACTIVITY_PARTICLES);
}
}
}
}
void LLFloaterAvatarList::updateAvatarList()
{
if (sInstance != this) return;
//if(LLStartUp::getStartupState() < STATE_STARTED)return;
//llinfos << "radar refresh: updating map" << llendl;
// Check whether updates are enabled
@@ -377,6 +421,25 @@ void LLFloaterAvatarList::updateAvatarList()
{
mUpdate = TRUE;
}
//moved to pipeline to prevent a crash
//gPipeline.forAllVisibleDrawables(updateParticleActivity);
//todo: make this less of a hacked up copypasta from dales 1.18.
if(gAudiop != NULL)
{
LLAudioEngine::source_map::iterator iter;
for (iter = gAudiop->mAllSources.begin(); iter != gAudiop->mAllSources.end(); ++iter)
{
LLAudioSource *sourcep = iter->second;
LLUUID uuid = sourcep->getOwnerID();
LLAvatarListEntry *ent = getAvatarEntry(uuid);
if ( ent )
{
ent->setActivity(LLAvatarListEntry::ACTIVITY_SOUND);
}
}
}
LLVector3d mypos = gAgent.getPositionGlobal();
@@ -469,6 +532,7 @@ void LLFloaterAvatarList::updateAvatarList()
// Avatar already in list, update position
F32 dist = (F32)(position - mypos).magVec();
mAvatars[avid].setPosition(position, (avatarp->getRegion() == gAgent.getRegion()), true, dist < 20.0, dist < 100.0);
if(avatarp->isTyping())mAvatars[avid].setActivity(LLAvatarListEntry::ACTIVITY_TYPING);
}
else
{
@@ -813,6 +877,40 @@ void LLFloaterAvatarList::refreshAvatarList()
snprintf(temp, sizeof(temp), "%d", (S32)position.mdV[VZ]);
}
element["columns"][LIST_ALTITUDE]["value"] = temp;
element["columns"][LIST_ACTIVITY]["column"] = "activity";
element["columns"][LIST_ACTIVITY]["type"] = "icon";
std::string activity_icon = "";
switch(entry->getActivity())
{
case LLAvatarListEntry::ACTIVITY_MOVING:
activity_icon = "inv_item_animation.tga";
break;
case LLAvatarListEntry::ACTIVITY_GESTURING:
activity_icon = "inv_item_gesture.tga";
break;
case LLAvatarListEntry::ACTIVITY_SOUND:
activity_icon = "inv_item_sound.tga";
break;
case LLAvatarListEntry::ACTIVITY_REZZING:
activity_icon = "ff_edit_theirs.tga";
break;
case LLAvatarListEntry::ACTIVITY_PARTICLES:
activity_icon = "particles_scan.tga";
break;
case LLAvatarListEntry::ACTIVITY_NEW:
activity_icon = "avatar_new.tga";
break;
case LLAvatarListEntry::ACTIVITY_TYPING:
activity_icon = "avatar_typing.tga";
break;
default:
break;
}
element["columns"][LIST_ACTIVITY]["value"] = activity_icon;//icon_image_id; //"icn_active-speakers-dot-lvl0.tga";
//element["columns"][LIST_AVATAR_ACTIVITY]["color"] = icon_color.getValue();
element["columns"][LIST_CLIENT]["column"] = "client";
element["columns"][LIST_CLIENT]["type"] = "text";

View File

@@ -33,6 +33,18 @@ class LLAvatarListEntry {
public:
enum ACTIVITY_TYPE
{
ACTIVITY_NONE, /** Avatar not doing anything */
ACTIVITY_MOVING, /** Changing position */
ACTIVITY_GESTURING, /** Playing a gesture */
ACTIVITY_REZZING, /** Rezzing objects */
ACTIVITY_PARTICLES, /** Creating particles */
ACTIVITY_TYPING, /** Typing */
ACTIVITY_NEW, /** Avatar just appeared */
ACTIVITY_SOUND, /** Playing a sound */
ACTIVITY_DEAD /** Avatar isn't around anymore, and will be removed soon from the list */
};
/**
* @brief Initializes a list entry
* @param id Avatar's key
@@ -72,6 +84,13 @@ public:
*/
LLUUID getID() { return mID; }
void setActivity(ACTIVITY_TYPE activity);
/**
* @brief Returns the activity type
*/
ACTIVITY_TYPE getActivity();
/**
* @brief Sets the 'focus' status on this entry (camera focused on this avatar)
*/
@@ -106,8 +125,13 @@ private:
/**
* @brief Timer to keep track of whether avatars are still there
*/
LLTimer mUpdateTimer;
ACTIVITY_TYPE mActivityType;
LLTimer mActivityTimer;
/**
* @brief Last frame when this avatar was updated
*/
@@ -204,9 +228,11 @@ private:
LIST_DISTANCE,
LIST_POSITION,
LIST_ALTITUDE,
LIST_ACTIVITY,
LIST_CLIENT,
};
typedef void (*avlist_command_t)(const LLUUID &avatar, const std::string &name);
/**

View File

@@ -71,6 +71,8 @@ LLFloaterWindLight* LLFloaterWindLight::sWindLight = NULL;
std::set<std::string> LLFloaterWindLight::sDefaultPresets;
static const F32 WL_SUN_AMBIENT_SLIDER_SCALE = 3.0f;
static const F32 WL_BLUE_HORIZON_DENSITY_SCALE = 2.0f;
static const F32 WL_CLOUD_SLIDER_SCALE = 1.0f;
LLFloaterWindLight::LLFloaterWindLight() : LLFloater(std::string("windlight floater"))
{
@@ -308,7 +310,7 @@ void LLFloaterWindLight::syncMenu()
LLWLParamManager * param_mgr = LLWLParamManager::getInstance();
LLWLParamSet& currentParams = param_mgr->mCurParams;
LLWLParamSet& cur_params = param_mgr->mCurParams;
//std::map<std::string, LLVector4> & currentParams = param_mgr->mCurParams.mParamValues;
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
@@ -320,59 +322,37 @@ void LLFloaterWindLight::syncMenu()
// [/RLVa:KB]
// blue horizon
param_mgr->mBlueHorizon = currentParams.getVector(param_mgr->mBlueHorizon.mName, err);
childSetValue("WLBlueHorizonR", param_mgr->mBlueHorizon.r / 2.0);
childSetValue("WLBlueHorizonG", param_mgr->mBlueHorizon.g / 2.0);
childSetValue("WLBlueHorizonB", param_mgr->mBlueHorizon.b / 2.0);
childSetValue("WLBlueHorizonI",
std::max(param_mgr->mBlueHorizon.r / 2.0,
std::max(param_mgr->mBlueHorizon.g / 2.0,
param_mgr->mBlueHorizon.b / 2.0)));
param_mgr->mBlueHorizon = cur_params.getVector(param_mgr->mBlueHorizon.mName, err);
setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE);
// haze density, horizon, mult, and altitude
param_mgr->mHazeDensity = currentParams.getVector(param_mgr->mHazeDensity.mName, err);
childSetValue("WLHazeDensity", param_mgr->mHazeDensity.r);
param_mgr->mHazeHorizon = currentParams.getVector(param_mgr->mHazeHorizon.mName, err);
childSetValue("WLHazeHorizon", param_mgr->mHazeHorizon.r);
param_mgr->mDensityMult = currentParams.getVector(param_mgr->mDensityMult.mName, err);
childSetValue("WLDensityMult", param_mgr->mDensityMult.x *
param_mgr->mDensityMult.mult);
param_mgr->mMaxAlt = currentParams.getVector(param_mgr->mMaxAlt.mName, err);
childSetValue("WLMaxAltitude", param_mgr->mMaxAlt.x);
param_mgr->mHazeDensity = cur_params.getFloat(param_mgr->mHazeDensity.mName, err);
childSetValue("WLHazeDensity", (F32) param_mgr->mHazeDensity);
param_mgr->mHazeHorizon = cur_params.getFloat(param_mgr->mHazeHorizon.mName, err);
childSetValue("WLHazeHorizon", (F32) param_mgr->mHazeHorizon);
param_mgr->mDensityMult = cur_params.getFloat(param_mgr->mDensityMult.mName, err);
childSetValue("WLDensityMult", ((F32) param_mgr->mDensityMult) * param_mgr->mDensityMult.mult);
param_mgr->mMaxAlt = cur_params.getFloat(param_mgr->mMaxAlt.mName, err);
childSetValue("WLMaxAltitude", (F32) param_mgr->mMaxAlt);
// blue density
param_mgr->mBlueDensity = currentParams.getVector(param_mgr->mBlueDensity.mName, err);
childSetValue("WLBlueDensityR", param_mgr->mBlueDensity.r / 2.0);
childSetValue("WLBlueDensityG", param_mgr->mBlueDensity.g / 2.0);
childSetValue("WLBlueDensityB", param_mgr->mBlueDensity.b / 2.0);
childSetValue("WLBlueDensityI",
std::max(param_mgr->mBlueDensity.r / 2.0,
std::max(param_mgr->mBlueDensity.g / 2.0, param_mgr->mBlueDensity.b / 2.0)));
param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err);
setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE);
// Lighting
// sunlight
param_mgr->mSunlight = currentParams.getVector(param_mgr->mSunlight.mName, err);
childSetValue("WLSunlightR", param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightG", param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightB", param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightI",
std::max(param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE,
std::max(param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE)));
param_mgr->mSunlight = cur_params.getVector(param_mgr->mSunlight.mName, err);
setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE);
// glow
param_mgr->mGlow = currentParams.getVector(param_mgr->mGlow.mName, err);
param_mgr->mGlow = cur_params.getVector(param_mgr->mGlow.mName, err);
childSetValue("WLGlowR", 2 - param_mgr->mGlow.r / 20.0f);
childSetValue("WLGlowB", -param_mgr->mGlow.b / 5.0f);
// ambient
param_mgr->mAmbient = currentParams.getVector(param_mgr->mAmbient.mName, err);
childSetValue("WLAmbientR", param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientG", param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientB", param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientI",
std::max(param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE,
std::max(param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE, param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE)));
param_mgr->mAmbient = cur_params.getVector(param_mgr->mAmbient.mName, err);
setColorSwatch("WLAmbient", param_mgr->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunAngle", param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI);
childSetValue("WLEastAngle", param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI);
@@ -380,31 +360,26 @@ void LLFloaterWindLight::syncMenu()
// Clouds
// Cloud Color
param_mgr->mCloudColor = currentParams.getVector(param_mgr->mCloudColor.mName, err);
childSetValue("WLCloudColorR", param_mgr->mCloudColor.r);
childSetValue("WLCloudColorG", param_mgr->mCloudColor.g);
childSetValue("WLCloudColorB", param_mgr->mCloudColor.b);
childSetValue("WLCloudColorI",
std::max(param_mgr->mCloudColor.r,
std::max(param_mgr->mCloudColor.g, param_mgr->mCloudColor.b)));
param_mgr->mCloudColor = cur_params.getVector(param_mgr->mCloudColor.mName, err);
setColorSwatch("WLCloudColor", param_mgr->mCloudColor, WL_CLOUD_SLIDER_SCALE);
// Cloud
param_mgr->mCloudMain = currentParams.getVector(param_mgr->mCloudMain.mName, err);
param_mgr->mCloudMain = cur_params.getVector(param_mgr->mCloudMain.mName, err);
childSetValue("WLCloudX", param_mgr->mCloudMain.r);
childSetValue("WLCloudY", param_mgr->mCloudMain.g);
childSetValue("WLCloudDensity", param_mgr->mCloudMain.b);
// Cloud Detail
param_mgr->mCloudDetail = currentParams.getVector(param_mgr->mCloudDetail.mName, err);
param_mgr->mCloudDetail = cur_params.getVector(param_mgr->mCloudDetail.mName, err);
childSetValue("WLCloudDetailX", param_mgr->mCloudDetail.r);
childSetValue("WLCloudDetailY", param_mgr->mCloudDetail.g);
childSetValue("WLCloudDetailDensity", param_mgr->mCloudDetail.b);
// Cloud extras
param_mgr->mCloudCoverage = currentParams.getVector(param_mgr->mCloudCoverage.mName, err);
param_mgr->mCloudScale = currentParams.getVector(param_mgr->mCloudScale.mName, err);
childSetValue("WLCloudCoverage", param_mgr->mCloudCoverage.x);
childSetValue("WLCloudScale", param_mgr->mCloudScale.x);
param_mgr->mCloudCoverage = cur_params.getFloat(param_mgr->mCloudCoverage.mName, err);
param_mgr->mCloudScale = cur_params.getFloat(param_mgr->mCloudScale.mName, err);
childSetValue("WLCloudCoverage", (F32) param_mgr->mCloudCoverage);
childSetValue("WLCloudScale", (F32) param_mgr->mCloudScale);
// cloud scrolling
bool lockX = !param_mgr->mCurParams.getEnableCloudScrollX();
@@ -414,16 +389,20 @@ void LLFloaterWindLight::syncMenu()
childSetValue("DrawClassicClouds", gSavedSettings.getBOOL("SkyUseClassicClouds"));
// disable if locked, enable if not
if(lockX)
if (lockX)
{
childDisable("WLCloudScrollX");
} else {
}
else
{
childEnable("WLCloudScrollX");
}
if(lockY)
if (lockY)
{
childDisable("WLCloudScrollY");
} else {
}
else
{
childEnable("WLCloudScrollY");
}
@@ -431,17 +410,32 @@ void LLFloaterWindLight::syncMenu()
childSetValue("WLCloudScrollX", param_mgr->mCurParams.getCloudScrollX() - 10.0f);
childSetValue("WLCloudScrollY", param_mgr->mCurParams.getCloudScrollY() - 10.0f);
param_mgr->mDistanceMult = currentParams.getVector(param_mgr->mDistanceMult.mName, err);
childSetValue("WLDistanceMult", param_mgr->mDistanceMult.x);
param_mgr->mDistanceMult = cur_params.getFloat(param_mgr->mDistanceMult.mName, err);
childSetValue("WLDistanceMult", (F32) param_mgr->mDistanceMult);
// Tweak extras
param_mgr->mWLGamma = currentParams.getVector(param_mgr->mWLGamma.mName, err);
childSetValue("WLGamma", param_mgr->mWLGamma.x);
param_mgr->mWLGamma = cur_params.getFloat(param_mgr->mWLGamma.mName, err);
childSetValue("WLGamma", (F32) param_mgr->mWLGamma);
childSetValue("WLStarAlpha", param_mgr->mCurParams.getStarBrightness());
}
void LLFloaterWindLight::setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k)
{
std::string child_name(name);
LLVector4 color_vec = from_ctrl;
color_vec/=k;
child_name.push_back('R');
childSetValue(name.data(), color_vec[0]);
child_name.replace(child_name.length()-1,1,1,'G');
childSetValue(child_name, color_vec[1]);
child_name.replace(child_name.length()-1,1,1,'B');
childSetValue(child_name, color_vec[2]);
child_name.replace(child_name.length()-1,1,1,'I');
childSetValue(child_name, llmax(color_vec.mV[0], color_vec.mV[1], color_vec.mV[2]));
}
// static
LLFloaterWindLight* LLFloaterWindLight::instance()
@@ -497,240 +491,238 @@ void LLFloaterWindLight::onClose(bool app_quitting)
}
// color control callbacks
void LLFloaterWindLight::onColorControlRMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onColorControlRMoved(LLUICtrl* ctrl, void* userdata)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl * colorControl = static_cast<WLColorControl *>(userData);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
colorControl->r = sldrCtrl->getValueF32();
if(colorControl->isSunOrAmbientColor) {
colorControl->r *= 3;
color_ctrl->r = sldr_ctrl->getValueF32();
if (color_ctrl->isSunOrAmbientColor)
{
color_ctrl->r *= WL_SUN_AMBIENT_SLIDER_SCALE;
}
if (color_ctrl->isBlueHorizonOrDensity)
{
color_ctrl->r *= WL_BLUE_HORIZON_DENSITY_SCALE;
}
if(colorControl->isBlueHorizonOrDensity) {
colorControl->r *= 2;
}
// move i if it's the max
if(colorControl->r >= colorControl->g && colorControl->r >= colorControl->b
&& colorControl->hasSliderName) {
colorControl->i = colorControl->r;
std::string name = colorControl->mSliderName;
if (color_ctrl->r >= color_ctrl->g && color_ctrl->r >= color_ctrl->b && color_ctrl->hasSliderName)
{
color_ctrl->i = color_ctrl->r;
std::string name = color_ctrl->mSliderName;
name.append("I");
if(colorControl->isSunOrAmbientColor) {
sWindLight->childSetValue(name, colorControl->r / 3);
} else if(colorControl->isBlueHorizonOrDensity) {
sWindLight->childSetValue(name, colorControl->r / 2);
} else {
sWindLight->childSetValue(name, colorControl->r);
if (color_ctrl->isSunOrAmbientColor)
{
sWindLight->childSetValue(name, color_ctrl->r / WL_SUN_AMBIENT_SLIDER_SCALE);
}
else if (color_ctrl->isBlueHorizonOrDensity)
{
sWindLight->childSetValue(name, color_ctrl->r / WL_BLUE_HORIZON_DENSITY_SCALE);
}
else
{
sWindLight->childSetValue(name, color_ctrl->r);
}
}
colorControl->update(LLWLParamManager::getInstance()->mCurParams);
color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
}
void LLFloaterWindLight::onColorControlGMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onColorControlGMoved(LLUICtrl* ctrl, void* userdata)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl * colorControl = static_cast<WLColorControl *>(userData);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
colorControl->g = sldrCtrl->getValueF32();
if(colorControl->isSunOrAmbientColor) {
colorControl->g *= 3;
color_ctrl->g = sldr_ctrl->getValueF32();
if (color_ctrl->isSunOrAmbientColor)
{
color_ctrl->g *= WL_SUN_AMBIENT_SLIDER_SCALE;
}
if (color_ctrl->isBlueHorizonOrDensity)
{
color_ctrl->g *= WL_BLUE_HORIZON_DENSITY_SCALE;
}
if(colorControl->isBlueHorizonOrDensity) {
colorControl->g *= 2;
}
// move i if it's the max
if(colorControl->g >= colorControl->r && colorControl->g >= colorControl->b
&& colorControl->hasSliderName) {
colorControl->i = colorControl->g;
std::string name = colorControl->mSliderName;
if (color_ctrl->g >= color_ctrl->r && color_ctrl->g >= color_ctrl->b && color_ctrl->hasSliderName)
{
color_ctrl->i = color_ctrl->g;
std::string name = color_ctrl->mSliderName;
name.append("I");
if(colorControl->isSunOrAmbientColor) {
sWindLight->childSetValue(name, colorControl->g / 3);
} else if(colorControl->isBlueHorizonOrDensity) {
sWindLight->childSetValue(name, colorControl->g / 2);
} else {
sWindLight->childSetValue(name, colorControl->g);
if (color_ctrl->isSunOrAmbientColor)
{
sWindLight->childSetValue(name, color_ctrl->g / WL_SUN_AMBIENT_SLIDER_SCALE);
}
else if (color_ctrl->isBlueHorizonOrDensity)
{
sWindLight->childSetValue(name, color_ctrl->g / WL_BLUE_HORIZON_DENSITY_SCALE);
}
else
{
sWindLight->childSetValue(name, color_ctrl->g);
}
}
colorControl->update(LLWLParamManager::getInstance()->mCurParams);
color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
}
void LLFloaterWindLight::onColorControlBMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onColorControlBMoved(LLUICtrl* ctrl, void* userdata)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl * colorControl = static_cast<WLColorControl *>(userData);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
colorControl->b = sldrCtrl->getValueF32();
if(colorControl->isSunOrAmbientColor) {
colorControl->b *= 3;
color_ctrl->b = sldr_ctrl->getValueF32();
if (color_ctrl->isSunOrAmbientColor)
{
color_ctrl->b *= WL_SUN_AMBIENT_SLIDER_SCALE;
}
if (color_ctrl->isBlueHorizonOrDensity)
{
color_ctrl->b *= WL_BLUE_HORIZON_DENSITY_SCALE;
}
if(colorControl->isBlueHorizonOrDensity) {
colorControl->b *= 2;
}
// move i if it's the max
if(colorControl->b >= colorControl->r && colorControl->b >= colorControl->g
&& colorControl->hasSliderName) {
colorControl->i = colorControl->b;
std::string name = colorControl->mSliderName;
if (color_ctrl->b >= color_ctrl->r && color_ctrl->b >= color_ctrl->g && color_ctrl->hasSliderName)
{
color_ctrl->i = color_ctrl->b;
std::string name = color_ctrl->mSliderName;
name.append("I");
if(colorControl->isSunOrAmbientColor) {
sWindLight->childSetValue(name, colorControl->b / 3);
} else if(colorControl->isBlueHorizonOrDensity) {
sWindLight->childSetValue(name, colorControl->b / 2);
} else {
sWindLight->childSetValue(name, colorControl->b);
if (color_ctrl->isSunOrAmbientColor)
{
sWindLight->childSetValue(name, color_ctrl->b / WL_SUN_AMBIENT_SLIDER_SCALE);
}
else if (color_ctrl->isBlueHorizonOrDensity)
{
sWindLight->childSetValue(name, color_ctrl->b / WL_BLUE_HORIZON_DENSITY_SCALE);
}
else
{
sWindLight->childSetValue(name, color_ctrl->b);
}
}
colorControl->update(LLWLParamManager::getInstance()->mCurParams);
color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
}
void LLFloaterWindLight::onColorControlIMoved(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl * colorControl = static_cast<WLColorControl *>(userData);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl * color_ctrl = static_cast<WLColorControl *>(userData);
colorControl->i = sldrCtrl->getValueF32();
color_ctrl->i = sldr_ctrl->getValueF32();
// only for sliders where we pass a name
if(colorControl->hasSliderName) {
if(color_ctrl->hasSliderName)
{
// set it to the top
F32 maxVal = std::max(std::max(colorControl->r, colorControl->g), colorControl->b);
F32 iVal;
if(colorControl->isSunOrAmbientColor)
{
iVal = colorControl->i * 3;
}
else if(colorControl->isBlueHorizonOrDensity)
{
iVal = colorControl->i * 2;
}
else
{
iVal = colorControl->i;
}
// get the names of the other sliders
std::string rName = colorControl->mSliderName;
rName.append("R");
std::string gName = colorControl->mSliderName;
gName.append("G");
std::string bName = colorControl->mSliderName;
bName.append("B");
F32 maxVal = std::max(std::max(color_ctrl->r, color_ctrl->g), color_ctrl->b);
F32 scale = 1.f;
if(color_ctrl->isSunOrAmbientColor)
scale = WL_SUN_AMBIENT_SLIDER_SCALE;
else if(color_ctrl->isBlueHorizonOrDensity)
scale = WL_BLUE_HORIZON_DENSITY_SCALE;
F32 iVal = color_ctrl->i * scale;
// handle if at 0
if(iVal == 0) {
colorControl->r = 0;
colorControl->g = 0;
colorControl->b = 0;
if(iVal == 0)
{
color_ctrl->r = 0;
color_ctrl->g = 0;
color_ctrl->b = 0;
// if all at the start
// set them all to the intensity
} else if (maxVal == 0) {
colorControl->r = iVal;
colorControl->g = iVal;
colorControl->b = iVal;
} else {
}
else if (maxVal == 0)
{
color_ctrl->r = iVal;
color_ctrl->g = iVal;
color_ctrl->b = iVal;
}
else
{
// add delta amounts to each
F32 delta = (iVal - maxVal) / maxVal;
colorControl->r *= (1.0f + delta);
colorControl->g *= (1.0f + delta);
colorControl->b *= (1.0f + delta);
color_ctrl->r *= (1.0f + delta);
color_ctrl->g *= (1.0f + delta);
color_ctrl->b *= (1.0f + delta);
}
// divide sun color vals by three
if(colorControl->isSunOrAmbientColor)
{
sWindLight->childSetValue(rName, colorControl->r/3);
sWindLight->childSetValue(gName, colorControl->g/3);
sWindLight->childSetValue(bName, colorControl->b/3);
}
else if(colorControl->isBlueHorizonOrDensity)
{
sWindLight->childSetValue(rName, colorControl->r/2);
sWindLight->childSetValue(gName, colorControl->g/2);
sWindLight->childSetValue(bName, colorControl->b/2);
}
else
{
// set the sliders to the new vals
sWindLight->childSetValue(rName, colorControl->r);
sWindLight->childSetValue(gName, colorControl->g);
sWindLight->childSetValue(bName, colorControl->b);
}
// set the sliders to the new vals
std::string child_name(color_ctrl->mSliderName);
child_name.push_back('R');
sWindLight->childSetValue(child_name, color_ctrl->r/scale);
child_name.replace(child_name.length()-1,1,1,'G');
sWindLight->childSetValue(child_name, color_ctrl->g/scale);
child_name.replace(child_name.length()-1,1,1,'B');
sWindLight->childSetValue(child_name, color_ctrl->b/scale);
}
// now update the current parameters and send them to shaders
colorControl->update(LLWLParamManager::getInstance()->mCurParams);
color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
}
/// GLOW SPECIFIC CODE
void LLFloaterWindLight::onGlowRMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onGlowRMoved(LLUICtrl* ctrl, void* userdata)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl * colorControl = static_cast<WLColorControl *>(userData);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
// scaled by 20
colorControl->r = (2 - sldrCtrl->getValueF32()) * 20;
color_ctrl->r = (2 - sldr_ctrl->getValueF32()) * 20;
colorControl->update(LLWLParamManager::getInstance()->mCurParams);
color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
}
/// \NOTE that we want NEGATIVE (-) B
void LLFloaterWindLight::onGlowBMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onGlowBMoved(LLUICtrl* ctrl, void* userdata)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl * colorControl = static_cast<WLColorControl *>(userData);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
/// \NOTE that we want NEGATIVE (-) B and NOT by 20 as 20 is too big
colorControl->b = -sldrCtrl->getValueF32() * 5;
color_ctrl->b = -sldr_ctrl->getValueF32() * 5;
colorControl->update(LLWLParamManager::getInstance()->mCurParams);
color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
}
void LLFloaterWindLight::onFloatControlMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onFloatControlMoved(LLUICtrl* ctrl, void* userdata)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
WLFloatControl * floatControl = static_cast<WLFloatControl *>(userData);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLFloatControl * floatControl = static_cast<WLFloatControl *>(userdata);
floatControl->x = sldrCtrl->getValueF32() / floatControl->mult;
floatControl->x = sldr_ctrl->getValueF32() / floatControl->mult;
floatControl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
@@ -738,7 +730,7 @@ void LLFloaterWindLight::onFloatControlMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onBoolToggle(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl);
@@ -752,12 +744,12 @@ void LLFloaterWindLight::onBoolToggle(LLUICtrl* ctrl, void* userData)
// time of day
void LLFloaterWindLight::onSunMoved(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sunSldr = sWindLight->getChild<LLSliderCtrl>("WLSunAngle");
LLSliderCtrl* eastSldr = sWindLight->getChild<LLSliderCtrl>("WLEastAngle");
WLColorControl * colorControl = static_cast<WLColorControl *>(userData);
WLColorControl * color_ctrl = static_cast<WLColorControl *>(userData);
// get the two angles
LLWLParamManager * param_mgr = LLWLParamManager::getInstance();
@@ -766,20 +758,20 @@ void LLFloaterWindLight::onSunMoved(LLUICtrl* ctrl, void* userData)
param_mgr->mCurParams.setEastAngle(F_TWO_PI * eastSldr->getValueF32());
// set the sun vector
colorControl->r = -sin(param_mgr->mCurParams.getEastAngle()) *
color_ctrl->r = -sin(param_mgr->mCurParams.getEastAngle()) *
cos(param_mgr->mCurParams.getSunAngle());
colorControl->g = sin(param_mgr->mCurParams.getSunAngle());
colorControl->b = cos(param_mgr->mCurParams.getEastAngle()) *
color_ctrl->g = sin(param_mgr->mCurParams.getSunAngle());
color_ctrl->b = cos(param_mgr->mCurParams.getEastAngle()) *
cos(param_mgr->mCurParams.getSunAngle());
colorControl->i = 1.f;
color_ctrl->i = 1.f;
colorControl->update(param_mgr->mCurParams);
color_ctrl->update(param_mgr->mCurParams);
param_mgr->propagateParameters();
}
void LLFloaterWindLight::onFloatTweakMoved(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
F32 * tweak = static_cast<F32 *>(userData);
@@ -790,7 +782,7 @@ void LLFloaterWindLight::onFloatTweakMoved(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onStarAlphaMoved(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
@@ -974,36 +966,35 @@ void LLFloaterWindLight::onOpenDayCycle(void* userData)
// Clouds
void LLFloaterWindLight::onCloudScrollXMoved(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
// *HACK all cloud scrolling is off by an additive of 10.
LLWLParamManager::getInstance()->mCurParams.setCloudScrollX(sldrCtrl->getValueF32() + 10.0f);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
// *HACK all cloud scrolling is off by an additive of 10.
LLWLParamManager::getInstance()->mCurParams.setCloudScrollX(sldr_ctrl->getValueF32() + 10.0f);
}
void LLFloaterWindLight::onCloudScrollYMoved(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
// *HACK all cloud scrolling is off by an additive of 10.
LLWLParamManager::getInstance()->mCurParams.setCloudScrollY(sldrCtrl->getValueF32() + 10.0f);
// *HACK all cloud scrolling is off by an additive of 10.
LLWLParamManager::getInstance()->mCurParams.setCloudScrollY(sldr_ctrl->getValueF32() + 10.0f);
}
void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl);
LLCheckBoxCtrl* cb_ctrl = static_cast<LLCheckBoxCtrl*>(ctrl);
bool lock = cbCtrl->get();
bool lock = cb_ctrl->get();
LLWLParamManager::getInstance()->mCurParams.setEnableCloudScrollX(!lock);
LLSliderCtrl* sldr = sWindLight->getChild<LLSliderCtrl>(
"WLCloudScrollX");
LLSliderCtrl* sldr = sWindLight->getChild<LLSliderCtrl>("WLCloudScrollX");
if(cbCtrl->get())
if (cb_ctrl->get())
{
sldr->setEnabled(false);
}
@@ -1016,16 +1007,15 @@ void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl, void* userData)
void LLFloaterWindLight::onCloudScrollYToggled(LLUICtrl* ctrl, void* userData)
{
deactivateAnimator();
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl);
bool lock = cbCtrl->get();
LLCheckBoxCtrl* cb_ctrl = static_cast<LLCheckBoxCtrl*>(ctrl);
bool lock = cb_ctrl->get();
LLWLParamManager::getInstance()->mCurParams.setEnableCloudScrollY(!lock);
LLSliderCtrl* sldr = sWindLight->getChild<LLSliderCtrl>(
"WLCloudScrollY");
LLSliderCtrl* sldr = sWindLight->getChild<LLSliderCtrl>("WLCloudScrollY");
if(cbCtrl->get())
if (cb_ctrl->get())
{
sldr->setEnabled(false);
}
@@ -1035,10 +1025,6 @@ void LLFloaterWindLight::onCloudScrollYToggled(LLUICtrl* ctrl, void* userData)
}
}
void LLFloaterWindLight::deactivateAnimator()
{
LLWLParamManager::getInstance()->mAnimator.deactivate();
}
void LLFloaterWindLight::onClickNext(void* user_data)
{

View File

@@ -67,6 +67,8 @@ public:
static bool newPromptCallback(const LLSD& notification, const LLSD& response);
void setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k);
/// general purpose callbacks for dealing with color controllers
static void onColorControlRMoved(LLUICtrl* ctrl, void* userData);
static void onColorControlGMoved(LLUICtrl* ctrl, void* userData);
@@ -133,8 +135,6 @@ public:
/// sync up sliders with parameters
void syncMenu();
/// turn off animated skies
static void deactivateAnimator();
static void selectTab(std::string tab_name);

View File

@@ -2895,7 +2895,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
if (is_movable)
{
is_movable = (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (RlvFolderLocks::instance().canMoveItem(inv_item->getUUID(), mUUID));
is_movable = (!RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) ||
(RlvFolderLocks::instance().canMoveItem(inv_item->getUUID(), mUUID));
}
}
// [/RLVa:KB]

File diff suppressed because it is too large Load Diff

View File

@@ -37,6 +37,7 @@
#include "v3dmath.h"
#include "lluuid.h"
#include "llmediactrl.h"
#include "llavatarpropertiesprocessor.h"
class LLAvatarName;
class LLButton;
@@ -68,30 +69,29 @@ enum EOnlineStatus
// Base class for all sub-tabs inside the avatar profile. Many of these
// panels need to keep track of the parent panel (to get the avatar id)
// and only request data from the database when they are first drawn. JC
class LLPanelAvatarTab : public LLPanel
class LLPanelAvatarTab : public LLPanel, public LLAvatarPropertiesObserver
{
public:
LLPanelAvatarTab(const std::string& name, const LLRect &rect,
LLPanelAvatar* panel_avatar);
virtual ~LLPanelAvatarTab();
// Calls refresh() once per frame when panel is visible
/*virtual*/ void draw();
LLPanelAvatar* getPanelAvatar() const { return mPanelAvatar; }
void setAvatarID(const LLUUID& avatar_id);
void setDataRequested(bool requested) { mDataRequested = requested; }
bool isDataRequested() const { return mDataRequested; }
// If the data for this tab has not yet been requested,
// send the request. Used by tabs that are filled in only
// when they are first displayed.
// type is one of "avatarnotesrequest", "avatarpicksrequest",
// or "avatarclassifiedsrequest"
void sendAvatarProfileRequestIfNeeded(const std::string& method);
private:
LLPanelAvatar* mPanelAvatar;
bool mDataRequested;
protected:
LLUUID mAvatarID;
};
@@ -101,6 +101,9 @@ public:
LLPanelAvatarFirstLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar);
/*virtual*/ BOOL postBuild(void);
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
static void onClickImage( void *userdata);
@@ -117,6 +120,8 @@ public:
/*virtual*/ BOOL postBuild(void);
/*virtual*/ void refresh();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
static void onClickImage( void *userdata);
static void onClickFriends( void *userdata);
static void onDoubleClickGroup(void* userdata);
@@ -150,6 +155,8 @@ public:
/*virtual*/ void refresh();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
void enableControls(BOOL own_avatar);
void setWebURL(std::string url);
@@ -177,6 +184,8 @@ public:
/*virtual*/ BOOL postBuild(void);
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
void enableControls(BOOL own_avatar);
void setWantSkills(U32 want_to_mask, const std::string& want_to_text,
U32 skills_mask, const std::string& skills_text,
@@ -204,6 +213,8 @@ public:
/*virtual*/ void refresh();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type){}
void clearControls();
static void onCommitNotes(LLUICtrl* field, void* userdata);
@@ -219,6 +230,8 @@ public:
/*virtual*/ void refresh();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
// If can close, return TRUE. If cannot close, pop save/discard dialog
// and return FALSE.
BOOL canClose();
@@ -230,10 +243,6 @@ public:
// Delete all the classified sub-panels from the tab container
void deleteClassifiedPanels();
// Unpack the outline of classified for this avatar (count, names, but not
// actual data).
void processAvatarClassifiedReply(LLMessageSystem* msg, void**);
private:
static void onClickNew(void* data);
static void onClickDelete(void* data);
@@ -252,14 +261,11 @@ public:
/*virtual*/ void refresh();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
// Delete all the pick sub-panels from the tab container
void deletePickPanels();
// Unpack the outline of picks for this avatar (count, names, but not
// actual data).
void processAvatarPicksReply(LLMessageSystem* msg, void**);
void processAvatarClassifiedReply(LLMessageSystem* msg, void**);
private:
static void onClickNew(void* data);
static void onClickDelete(void* data);
@@ -276,7 +282,7 @@ private:
};
class LLPanelAvatar : public LLPanel
class LLPanelAvatar : public LLPanel, public LLAvatarPropertiesObserver
{
public:
@@ -285,6 +291,8 @@ public:
/*virtual*/ BOOL postBuild(void);
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
// If can close, return TRUE. If cannot close, pop save/discard dialog
// and return FALSE.
BOOL canClose();
@@ -318,13 +326,6 @@ public:
BOOL haveData() { return mHaveProperties && mHaveStatistics; }
BOOL isEditable() const { return mAllowEdit; }
static void processAvatarPropertiesReply(LLMessageSystem *msg, void **);
static void processAvatarInterestsReply(LLMessageSystem *msg, void **);
static void processAvatarGroupsReply(LLMessageSystem* msg, void**);
static void processAvatarNotesReply(LLMessageSystem *msg, void **);
static void processAvatarPicksReply(LLMessageSystem *msg, void **);
static void processAvatarClassifiedReply(LLMessageSystem *msg, void **);
static void onClickTrack( void *userdata);
static void onClickIM( void *userdata);
static void onClickGroupInvite( void *userdata);
@@ -369,6 +370,8 @@ public:
LLPanelAvatarFirstLife* mPanelFirstLife;
LLPanelAvatarWeb* mPanelWeb;
std::list<LLPanelAvatarTab*> mAvatarPanelList;
LLDropTarget* mDropTarget;
// Teen users are not allowed to see or enter data into the first life page,

View File

@@ -213,12 +213,21 @@ LLPanelClassified::LLPanelClassified(bool in_finder, bool from_search)
LLPanelClassified::~LLPanelClassified()
{
if(mCreatorID.notNull())
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this);
}
sAllPanels.remove(this);
}
void LLPanelClassified::reset()
{
if(mCreatorID.notNull())
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this);
}
mClassifiedID.setNull();
mCreatorID.setNull();
mParcelID.setNull();
@@ -322,6 +331,82 @@ BOOL LLPanelClassified::postBuild()
return TRUE;
}
void LLPanelClassified::processProperties(void* data, EAvatarProcessorType type)
{
if(APT_CLASSIFIED_INFO == type)
{
lldebugs << "processClassifiedInfoReply()" << llendl;
LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
if(c_info && mClassifiedID == c_info->classified_id)
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this);
// "Location text" is actually the original
// name that owner gave the parcel, and the location.
std::string location_text = c_info->parcel_name;
if (!location_text.empty())
location_text.append(", ");
S32 region_x = llround((F32)c_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
S32 region_y = llround((F32)c_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
S32 region_z = llround((F32)c_info->pos_global.mdV[VZ]);
std::string buffer = llformat("%s (%d, %d, %d)", c_info->sim_name.c_str(), region_x, region_y, region_z);
location_text.append(buffer);
//BOOL enabled = is_cf_enabled(flags);
time_t tim = c_info->creation_date;
tm *now=localtime(&tim);
// Found the panel, now fill in the information
mClassifiedID = c_info->classified_id;
mCreatorID = c_info->creator_id;
mParcelID = c_info->parcel_id;
mPriceForListing = c_info->price_for_listing;
mSimName = c_info->sim_name;
mPosGlobal = c_info->pos_global;
// Update UI controls
mNameEditor->setText(c_info->name);
mDescEditor->setText(c_info->description);
mSnapshotCtrl->setImageAssetID(c_info->snapshot_id);
mLocationEditor->setText(location_text);
mLocationChanged = false;
mCategoryCombo->setCurrentByIndex(c_info->category - 1);
mMatureCombo->setCurrentByIndex(is_cf_mature(c_info->flags) ? MATURE_CONTENT : PG_CONTENT);
if (mAutoRenewCheck)
{
mAutoRenewCheck->set(is_cf_auto_renew(c_info->flags));
}
std::string datestr;
timeStructToFormattedString(now, gSavedSettings.getString("ShortDateFormat"), datestr);
LLStringUtil::format_map_t string_args;
string_args["[DATE]"] = datestr;
string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
string_args["[AMT]"] = llformat("%d", c_info->price_for_listing);
childSetText("classified_info_text", getString("ad_placed_paid", string_args));
// If we got data from the database, we know the listing is paid for.
mPaidFor = TRUE;
mUpdateBtn->setLabel(getString("update_txt"));
resetDirty();
// I don't know if a second call is deliberate or a bad merge, so I'm leaving it here.
resetDirty();
}
}
}
BOOL LLPanelClassified::titleIsValid()
{
// Disallow leading spaces, punctuation, etc. that screw up
@@ -488,19 +573,13 @@ std::string LLPanelClassified::getClassifiedName()
void LLPanelClassified::sendClassifiedInfoRequest()
{
LLMessageSystem *msg = gMessageSystem;
if (mClassifiedID != mRequestedID)
{
msg->newMessageFast(_PREHASH_ClassifiedInfoRequest);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() );
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
msg->nextBlockFast(_PREHASH_Data);
msg->addUUIDFast(_PREHASH_ClassifiedID, mClassifiedID);
gAgent.sendReliableMessage();
LLAvatarPropertiesProcessor::getInstance()->addObserver(mCreatorID, this);
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(mClassifiedID);
mDataRequested = TRUE;
mRequestedID = mClassifiedID;
// While we're at it let's get the stats from the new table if that
@@ -517,9 +596,10 @@ void LLPanelClassified::sendClassifiedInfoRequest()
}
}
void LLPanelClassified::sendClassifiedInfoUpdate()
{
LLAvatarClassifiedInfo c_data;
// If we don't have a classified id yet, we'll need to generate one,
// otherwise we'll keep overwriting classified_id 00000 in the database.
if (mClassifiedID.isNull())
@@ -528,180 +608,24 @@ void LLPanelClassified::sendClassifiedInfoUpdate()
mClassifiedID.generate();
}
LLMessageSystem* msg = gMessageSystem;
c_data.agent_id = gAgent.getID();
c_data.classified_id = mClassifiedID;
c_data.category = mCategoryCombo->getCurrentIndex() + 1;
c_data.name = mNameEditor->getText();
c_data.description = mDescEditor->getText();
c_data.parcel_id = mParcelID;
c_data.snapshot_id = mSnapshotCtrl->getImageAssetID();
c_data.pos_global = mPosGlobal;
BOOL auto_renew = mAutoRenewCheck && mAutoRenewCheck->get();
c_data.flags = pack_classified_flags_request(auto_renew, false, mMatureCombo->getCurrentIndex() == MATURE_CONTENT, false);
c_data.price_for_listing = mPriceForListing;
c_data.parent_estate = 0; //probably not required.
msg->newMessageFast(_PREHASH_ClassifiedInfoUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Data);
msg->addUUIDFast(_PREHASH_ClassifiedID, mClassifiedID);
// TODO: fix this
U32 category = mCategoryCombo->getCurrentIndex() + 1;
msg->addU32Fast(_PREHASH_Category, category);
msg->addStringFast(_PREHASH_Name, mNameEditor->getText());
msg->addStringFast(_PREHASH_Desc, mDescEditor->getText());
// fills in on simulator if null
msg->addUUIDFast(_PREHASH_ParcelID, mParcelID);
// fills in on simulator if null
msg->addU32Fast(_PREHASH_ParentEstate, 0);
msg->addUUIDFast(_PREHASH_SnapshotID, mSnapshotCtrl->getImageAssetID());
msg->addVector3dFast(_PREHASH_PosGlobal, mPosGlobal);
BOOL mature = mMatureCombo->getCurrentIndex() == MATURE_CONTENT;
BOOL auto_renew = FALSE;
if (mAutoRenewCheck)
{
auto_renew = mAutoRenewCheck->get();
}
// These flags doesn't matter here.
const bool adult_enabled = false;
const bool is_pg = false;
U8 flags = pack_classified_flags_request(auto_renew, is_pg, mature, adult_enabled);
msg->addU8Fast(_PREHASH_ClassifiedFlags, flags);
msg->addS32("PriceForListing", mPriceForListing);
gAgent.sendReliableMessage();
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoUpdate(&c_data);
mDirty = false;
}
//static
void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void **)
{
lldebugs << "processClassifiedInfoReply()" << llendl;
// Extract the agent id and verify the message is for this
// client.
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
if (agent_id != gAgent.getID())
{
llwarns << "Agent ID mismatch in processClassifiedInfoReply"
<< llendl;
return;
}
LLUUID classified_id;
msg->getUUIDFast(_PREHASH_Data, _PREHASH_ClassifiedID, classified_id);
LLUUID creator_id;
msg->getUUIDFast(_PREHASH_Data, _PREHASH_CreatorID, creator_id);
LLUUID parcel_id;
msg->getUUIDFast(_PREHASH_Data, _PREHASH_ParcelID, parcel_id);
std::string name;
msg->getStringFast(_PREHASH_Data, _PREHASH_Name, name);
std::string desc;
msg->getStringFast(_PREHASH_Data, _PREHASH_Desc, desc);
LLUUID snapshot_id;
msg->getUUIDFast(_PREHASH_Data, _PREHASH_SnapshotID, snapshot_id);
// "Location text" is actually the original
// name that owner gave the parcel, and the location.
std::string location_text;
msg->getStringFast(_PREHASH_Data, _PREHASH_ParcelName, location_text);
if (!location_text.empty())
{
location_text.append(", ");
}
std::string sim_name;
msg->getStringFast(_PREHASH_Data, _PREHASH_SimName, sim_name);
LLVector3d pos_global;
msg->getVector3dFast(_PREHASH_Data, _PREHASH_PosGlobal, pos_global);
S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
S32 region_z = llround((F32)pos_global.mdV[VZ]);
std::string buffer = llformat("%s (%d, %d, %d)", sim_name.c_str(), region_x, region_y, region_z);
location_text.append(buffer);
U8 flags;
msg->getU8Fast(_PREHASH_Data, _PREHASH_ClassifiedFlags, flags);
//BOOL enabled = is_cf_enabled(flags);
bool mature = is_cf_mature(flags);
bool auto_renew = is_cf_auto_renew(flags);
U32 date = 0;
msg->getU32Fast(_PREHASH_Data, _PREHASH_CreationDate, date);
time_t tim = date;
tm *now=localtime(&tim);
// future use
U32 expiration_date = 0;
msg->getU32("Data", "ExpirationDate", expiration_date);
U32 category = 0;
msg->getU32Fast(_PREHASH_Data, _PREHASH_Category, category);
S32 price_for_listing = 0;
msg->getS32("Data", "PriceForListing", price_for_listing);
// Look up the panel to fill in
for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter)
{
LLPanelClassified* self = *iter;
// For top picks, must match pick id
if (self->mClassifiedID != classified_id)
{
continue;
}
// Found the panel, now fill in the information
self->mClassifiedID = classified_id;
self->mCreatorID = creator_id;
self->mParcelID = parcel_id;
self->mPriceForListing = price_for_listing;
self->mSimName.assign(sim_name);
self->mPosGlobal = pos_global;
// Update UI controls
self->mNameEditor->setText(name);
self->mDescEditor->setText(desc);
self->mSnapshotCtrl->setImageAssetID(snapshot_id);
self->mLocationEditor->setText(location_text);
self->mLocationChanged = false;
self->mCategoryCombo->setCurrentByIndex(category - 1);
if(mature)
{
self->mMatureCombo->setCurrentByIndex(MATURE_CONTENT);
}
else
{
self->mMatureCombo->setCurrentByIndex(PG_CONTENT);
}
if (self->mAutoRenewCheck)
{
self->mAutoRenewCheck->set(auto_renew);
}
std::string datestr;
timeStructToFormattedString(now, gSavedSettings.getString("ShortDateFormat"), datestr);
LLStringUtil::format_map_t string_args;
string_args["[DATE]"] = datestr;
string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
string_args["[AMT]"] = llformat("%d", price_for_listing);
self->childSetText("classified_info_text", self->getString("ad_placed_paid", string_args));
// If we got data from the database, we know the listing is paid for.
self->mPaidFor = TRUE;
self->mUpdateBtn->setLabel(self->getString("update_txt"));
self->resetDirty();
// I don't know if a second call is deliberate or a bad merge, so I'm leaving it here.
self->resetDirty();
}
}
void LLPanelClassified::draw()
{
refresh();

View File

@@ -37,6 +37,7 @@
#ifndef LL_LLPANELCLASSIFIED_H
#define LL_LLPANELCLASSIFIED_H
#include "llavatarpropertiesprocessor.h"
#include "llpanel.h"
#include "llclassifiedinfo.h"
#include "v3dmath.h"
@@ -55,7 +56,7 @@ class LLTextureCtrl;
class LLUICtrl;
class LLMessageSystem;
class LLPanelClassified : public LLPanel
class LLPanelClassified : public LLPanel, public LLAvatarPropertiesObserver
{
public:
LLPanelClassified(bool in_finder, bool from_search);
@@ -69,6 +70,8 @@ public:
/*virtual*/ void refresh();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
void apply();
// If can close, return TRUE. If cannot close, pop save/discard dialog
@@ -98,8 +101,6 @@ public:
void sendClassifiedInfoUpdate();
void resetDirty();
static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
// Confirmation dialogs flow in this order
bool confirmMature(const LLSD& notification, const LLSD& response);
void gotMature();

View File

@@ -112,12 +112,20 @@ LLPanelPick::LLPanelPick(BOOL top_pick)
LLPanelPick::~LLPanelPick()
{
if(mDataRequested && !mDataReceived)
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this);
}
sAllPanels.remove(this);
}
void LLPanelPick::reset()
{
if(mDataRequested && !mDataReceived)
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this);
}
mPickID.setNull();
mCreatorID.setNull();
mParcelID.setNull();
@@ -178,6 +186,72 @@ BOOL LLPanelPick::postBuild()
return TRUE;
}
void LLPanelPick::processProperties(void* data, EAvatarProcessorType type)
{
if(APT_PICK_INFO != type)
{
return;
}
LLPickData* pick_info = static_cast<LLPickData*>(data);
//llassert_always(pick_info->creator_id != gAgent.getID());
//llassert_always(mCreatorID != gAgent.getID());
if(!pick_info
|| pick_info->creator_id != mCreatorID
|| pick_info->pick_id != mPickID)
{
return;
}
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this);
// "Location text" is actually the owner name, the original
// name that owner gave the parcel, and the location.
std::string location_text = pick_info->user_name + ", ";
if (!pick_info->original_name.empty())
{
location_text.append(pick_info->original_name);
location_text.append(", ");
}
location_text.append(pick_info->sim_name);
location_text.append(" ");
//Fix for location text importing - RK
for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter)
{
LLPanelPick* self = *iter;
if(!self->mImporting) self->mLocationText = location_text;
else location_text = self->mLocationText;
self->mImporting = false;
}
S32 region_x = llround((F32)pick_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
S32 region_y = llround((F32)pick_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
S32 region_z = llround((F32)pick_info->pos_global.mdV[VZ]);
location_text.append(llformat("(%d, %d, %d)", region_x, region_y, region_z));
mDataReceived = TRUE;
// Found the panel, now fill in the information
mPickID = pick_info->pick_id;
mCreatorID = pick_info->creator_id;
mParcelID = pick_info->parcel_id;
mSimName = pick_info->sim_name;
mPosGlobal = pick_info->pos_global;
// Update UI controls
mNameEditor->setText(pick_info->name);
mDescEditor->setText(pick_info->desc);
mSnapshotCtrl->setImageAssetID(pick_info->snapshot_id);
mLocationEditor->setText(location_text);
mEnabledCheck->set(pick_info->enabled);
mSortOrderEditor->setText(llformat("%d", pick_info->sort_order));
}
// Fill in some reasonable defaults for a new pick.
void LLPanelPick::initNewPick()
@@ -307,12 +381,9 @@ std::string LLPanelPick::getPickName()
void LLPanelPick::sendPickInfoRequest()
{
// Must ask for a pick based on the creator id because
// the pick database is distributed to the inventory cluster. JC
std::vector<std::string> strings;
strings.push_back( mCreatorID.asString() );
strings.push_back( mPickID.asString() );
send_generic_message("pickinforequest", strings);
//llassert_always(mCreatorID != gAgent.getID());
LLAvatarPropertiesProcessor::getInstance()->addObserver(mCreatorID, this);
LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(mCreatorID, mPickID);
mDataRequested = TRUE;
}
@@ -320,6 +391,8 @@ void LLPanelPick::sendPickInfoRequest()
void LLPanelPick::sendPickInfoUpdate()
{
LLPickData pick_data;
// If we don't have a pick id yet, we'll need to generate one,
// otherwise we'll keep overwriting pick_id 00000 in the database.
if (mPickID.isNull())
@@ -327,146 +400,29 @@ void LLPanelPick::sendPickInfoUpdate()
mPickID.generate();
}
LLMessageSystem* msg = gMessageSystem;
pick_data.agent_id = gAgent.getID();
pick_data.session_id = gAgent.getSessionID();
pick_data.pick_id = mPickID;
pick_data.creator_id = gAgent.getID();
msg->newMessage("PickInfoUpdate");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("PickID", mPickID);
msg->addUUID("CreatorID", mCreatorID);
msg->addBOOL("TopPick", mTopPick);
// fills in on simulator if null
msg->addUUID("ParcelID", mParcelID);
msg->addString("Name", mNameEditor->getText());
msg->addString("Desc", mDescEditor->getText());
msg->addUUID("SnapshotID", mSnapshotCtrl->getImageAssetID());
msg->addVector3d("PosGlobal", mPosGlobal);
// Only top picks have a sort order
S32 sort_order;
if (mTopPick)
{
sort_order = atoi(mSortOrderEditor->getText().c_str());
}
//legacy var need to be deleted
pick_data.top_pick = mTopPick;
pick_data.parcel_id = mParcelID;
pick_data.name = mNameEditor->getText();
pick_data.desc = mDescEditor->getText();
pick_data.snapshot_id = mSnapshotCtrl->getImageAssetID();
pick_data.pos_global = mPosGlobal;
if(mTopPick)
pick_data.sort_order = atoi(mSortOrderEditor->getText().c_str());
else
{
sort_order = 0;
}
msg->addS32("SortOrder", sort_order);
msg->addBOOL("Enabled", mEnabledCheck->get());
gAgent.sendReliableMessage();
pick_data.sort_order = 0;
pick_data.enabled = mEnabledCheck->get();
LLAvatarPropertiesProcessor::getInstance()->sendPickInfoUpdate(&pick_data);
}
//static
void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **)
{
// Extract the agent id and verify the message is for this
// client.
LLUUID agent_id;
msg->getUUID("AgentData", "AgentID", agent_id );
if (agent_id != gAgent.getID())
{
llwarns << "Agent ID mismatch in processPickInfoReply"
<< llendl;
return;
}
LLUUID pick_id;
msg->getUUID("Data", "PickID", pick_id);
LLUUID creator_id;
msg->getUUID("Data", "CreatorID", creator_id);
BOOL top_pick;
msg->getBOOL("Data", "TopPick", top_pick);
LLUUID parcel_id;
msg->getUUID("Data", "ParcelID", parcel_id);
std::string name;
msg->getString("Data", "Name", name);
std::string desc;
msg->getString("Data", "Desc", desc);
LLUUID snapshot_id;
msg->getUUID("Data", "SnapshotID", snapshot_id);
// "Location text" is actually the owner name, the original
// name that owner gave the parcel, and the location.
std::string location_text;
msg->getString("Data", "User", location_text);
location_text.append(", ");
std::string original_name;
msg->getString("Data", "OriginalName", original_name);
if (!original_name.empty())
{
location_text.append(original_name);
location_text.append(", ");
}
std::string sim_name;
msg->getString("Data", "SimName", sim_name);
location_text.append(sim_name);
location_text.append(" ");
//Fix for location text importing - RK
for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter)
{
LLPanelPick* self = *iter;
if(!self->mImporting) self->mLocationText = location_text;
else location_text = self->mLocationText;
self->mImporting = false;
}
LLVector3d pos_global;
msg->getVector3d("Data", "PosGlobal", pos_global);
S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
S32 region_z = llround((F32)pos_global.mdV[VZ]);
location_text.append(llformat("(%d, %d, %d)", region_x, region_y, region_z));
S32 sort_order;
msg->getS32("Data", "SortOrder", sort_order);
BOOL enabled;
msg->getBOOL("Data", "Enabled", enabled);
// Look up the panel to fill in
for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter)
{
LLPanelPick* self = *iter;
// For top picks, must match pick id
if (self->mPickID != pick_id)
{
continue;
}
self->mDataReceived = TRUE;
// Found the panel, now fill in the information
self->mPickID = pick_id;
self->mCreatorID = creator_id;
self->mParcelID = parcel_id;
self->mSimName.assign(sim_name);
self->mPosGlobal = pos_global;
// Update UI controls
self->mNameEditor->setText(std::string(name));
self->mDescEditor->setText(std::string(desc));
self->mSnapshotCtrl->setImageAssetID(snapshot_id);
self->mLocationEditor->setText(location_text);
self->mEnabledCheck->set(enabled);
self->mSortOrderEditor->setText(llformat("%d", sort_order));
}
}
void LLPanelPick::draw()
{
@@ -611,6 +567,9 @@ void LLPanelPick::onCommitAny(LLUICtrl* ctrl, void* data)
{
LLPanelPick* self = (LLPanelPick*)data;
if(self->mCreatorID != gAgent.getID())
return;
// have we received up to date data for this pick?
if (self->mDataReceived)
{

View File

@@ -40,6 +40,7 @@
#include "llpanel.h"
#include "v3dmath.h"
#include "lluuid.h"
#include "llavatarpropertiesprocessor.h"
class LLButton;
class LLCheckBoxCtrl;
@@ -52,7 +53,7 @@ class LLUICtrl;
class LLMessageSystem;
class AIFilePicker;
class LLPanelPick : public LLPanel
class LLPanelPick : public LLPanel, public LLAvatarPropertiesObserver
{
public:
LLPanelPick(BOOL top_pick);
@@ -66,6 +67,8 @@ public:
/*virtual*/ void refresh();
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
// Setup a new pick, including creating an id, giving a sane
// initial position, etc.
void initNewPick();
@@ -91,8 +94,6 @@ public:
void sendPickInfoRequest();
void sendPickInfoUpdate();
static void processPickInfoReply(LLMessageSystem* msg, void**);
protected:
static void onClickTeleport(void* data);
static void onClickMap(void* data);

View File

@@ -469,7 +469,7 @@ LLUUID LLPreviewTexture::getItemID()
if ((perms & PERM_TRANSFER) &&
(perms & PERM_COPY))
{
return item->getUUID();
return item->getAssetUUID();
}
}
return LLUUID::null;

View File

@@ -3617,20 +3617,20 @@ void register_viewer_callbacks(LLMessageSystem* msg)
LLViewerParcelMgr::processParcelDwellReply);
msg->setHandlerFunc("AvatarPropertiesReply",
LLPanelAvatar::processAvatarPropertiesReply);
&LLAvatarPropertiesProcessor::processAvatarPropertiesReply);
msg->setHandlerFunc("AvatarInterestsReply",
LLPanelAvatar::processAvatarInterestsReply);
&LLAvatarPropertiesProcessor::processAvatarInterestsReply);
msg->setHandlerFunc("AvatarGroupsReply",
LLPanelAvatar::processAvatarGroupsReply);
&LLAvatarPropertiesProcessor::processAvatarGroupsReply);
// ratings deprecated
//msg->setHandlerFuncFast(_PREHASH_AvatarStatisticsReply,
// LLPanelAvatar::processAvatarStatisticsReply);
msg->setHandlerFunc("AvatarNotesReply",
LLPanelAvatar::processAvatarNotesReply);
&LLAvatarPropertiesProcessor::processAvatarNotesReply);
msg->setHandlerFunc("AvatarPicksReply",
LLPanelAvatar::processAvatarPicksReply);
&LLAvatarPropertiesProcessor::processAvatarPicksReply);
msg->setHandlerFunc("AvatarClassifiedReply",
LLPanelAvatar::processAvatarClassifiedReply);
&LLAvatarPropertiesProcessor::processAvatarClassifiedsReply);
msg->setHandlerFuncFast(_PREHASH_CreateGroupReply,
LLGroupMgr::processCreateGroupReply);
@@ -3704,8 +3704,9 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFunc("MapItemReply", LLWorldMap::processMapItemReply);
msg->setHandlerFunc("EventInfoReply", LLPanelEvent::processEventInfoReply);
msg->setHandlerFunc("PickInfoReply", LLPanelPick::processPickInfoReply);
msg->setHandlerFunc("ClassifiedInfoReply", LLPanelClassified::processClassifiedInfoReply);
msg->setHandlerFunc("PickInfoReply", &LLAvatarPropertiesProcessor::processPickInfoReply);
//msg->setHandlerFunc("ClassifiedInfoReply", LLPanelClassified::processClassifiedInfoReply);
msg->setHandlerFunc("ClassifiedInfoReply", LLAvatarPropertiesProcessor::processClassifiedInfoReply);
msg->setHandlerFunc("ParcelInfoReply", LLPanelPlace::processParcelInfoReply);
msg->setHandlerFunc("ScriptDialog", process_script_dialog);
msg->setHandlerFunc("LoadURL", process_load_url);

View File

@@ -1358,6 +1358,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//roll back to try UDP
if(mCanUseNET)
{
resetFormattedData();
mState = INIT ;
mCanUseHTTP = false ;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
@@ -1405,6 +1406,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
//roll back to try UDP
if(mCanUseNET)
{
resetFormattedData();
mState = INIT ;
mCanUseHTTP = false ;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);

View File

@@ -668,7 +668,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
//See LL jira VWR-3258 comment section. Implemented by LL in 2.1 -Shyotl
gSavedSettings.getControl("ShyotlRenderUseStreamVBO")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
//gSavedSettings.getControl("ShyotlUseLegacyRenderPath")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("ShyotlUseLegacyTextureBatching")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUseFBO")->getSignal()->connect(boost::bind(&handleRenderUseFBOChanged, _2));
gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));

View File

@@ -99,6 +99,7 @@ bool toggle_build_mode();
void handle_object_build(void*);
void handle_save_snapshot(void *);
void handle_toggle_flycam();
void handle_fake_away_status(void*);
bool handle_sit_or_stand();
bool handle_give_money_dialog();

View File

@@ -676,8 +676,9 @@ protected:
TPACKETID mLatestRecvPacketID; // Latest time stamp on message from simulator
// extra data sent from the sim...currently only used for tree species info
U8* mData;
public://Jay: IDGAF
LLPointer<LLViewerPartSourceScript> mPartSourcep; // Particle source associated with this object.
protected:
LLAudioSourceVO* mAudioSourcep;
F32 mAudioGain;

View File

@@ -310,8 +310,7 @@ void LLViewerShaderMgr::setShaders()
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
static const LLCachedControl<bool> no_texture_indexing("ShyotlUseLegacyTextureBatching",false);
//static const LLCachedControl<bool> use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching.
if(no_texture_indexing /*|| use_legacy_path*/)
if(no_texture_indexing)
LLGLSLShader::sIndexedTextureChannels = 1;
//NEVER use more than 16 texture channels (work around for prevalent driver bug)
@@ -372,8 +371,7 @@ void LLViewerShaderMgr::setShaders()
&& gSavedSettings.getBOOL("VertexShaderEnable"))
{
//using shaders, disable fixed function
//static const LLCachedControl<bool> renderforcefixedfuncs("ShyotlUseLegacyRenderPath",false);
LLGLSLShader::sNoFixedFunction = true;//!renderforcefixedfuncs;
LLGLSLShader::sNoFixedFunction = true;
S32 light_class = 2;
S32 env_class = 2;
S32 obj_class = 2;
@@ -621,8 +619,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders()
S32 ch = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
static const LLCachedControl<bool> no_texture_indexing("ShyotlUseLegacyTextureBatching",false);
//static const LLCachedControl<bool> use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching.
if (gGLManager.mGLVersion < 3.1f || no_texture_indexing /*|| use_legacy_path*/)
if (gGLManager.mGLVersion < 3.1f || no_texture_indexing)
{ //force to 1 texture index channel for old drivers
ch = 1;
}

View File

@@ -2771,8 +2771,12 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
void LLViewerWindow::moveCursorToCenter()
{
S32 x = getWorldViewWidthScaled() / 2;
S32 y = getWorldViewHeightScaled() / 2;
if (gSavedSettings.getBOOL("SGAbsolutePointer")) {
return;
}
S32 x = getWorldViewWidthScaled() / 2;
S32 y = getWorldViewHeightScaled() / 2;
//on a forced move, all deltas get zeroed out to prevent jumping
mCurrentMousePoint.set(x,y);

View File

@@ -46,6 +46,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llanimationstates.h"
#include "llavatarpropertiesprocessor.h"
#include "llviewercontrol.h"
#include "lldrawpoolavatar.h"
#include "lldriverparam.h"
@@ -7936,9 +7937,7 @@ bool LLVOAvatar::sendAvatarTexturesRequest()
bool sent = false;
if (mRuthTimer.getElapsedTimeF32() > DERUTHING_TIMEOUT_SECONDS)
{
std::vector<std::string> strings;
strings.push_back(getID().asString());
send_generic_message("avatartexturesrequest", strings);
LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
mRuthTimer.reset();
sent = true;
}

View File

@@ -992,6 +992,9 @@ private:
LLFrameTimer mTimeVisible;
std::deque<LLChat> mChats;
BOOL mTyping;
public:
BOOL isTyping(){ return mTyping; }
private:
LLFrameTimer mTypingTimer;
static void on_avatar_name_response(const LLUUID& agent_id, const LLAvatarName& av_name, void *userdata);

View File

@@ -2,31 +2,25 @@
* @file llvosky.cpp
* @brief LLVOSky class implementation
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -348,7 +342,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
blue_density = LLColor3();
blue_horizon = LLColor3();
haze_density = 0.f;
haze_horizon = LLColor3();
haze_horizon = 1.f;
density_multiplier = 0.f;
max_y = 0.f;
glow = LLColor3();
@@ -659,17 +653,17 @@ void LLVOSky::initAtmospherics(void)
sunlight_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("sunlight_color", error));
ambient = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("ambient", error));
//lightnorm = LLWLParamManager::getInstance()->mCurParams.getVector("lightnorm", error);
gamma = LLWLParamManager::getInstance()->mCurParams.getVector("gamma", error)[0];
gamma = LLWLParamManager::getInstance()->mCurParams.getFloat("gamma", error);
blue_density = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_density", error));
blue_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_horizon", error));
haze_density = LLWLParamManager::getInstance()->mCurParams.getVector("haze_density", error)[0];
haze_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("haze_horizon", error));
density_multiplier = LLWLParamManager::getInstance()->mCurParams.getVector("density_multiplier", error)[0];
max_y = LLWLParamManager::getInstance()->mCurParams.getVector("max_y", error)[0];
haze_density = LLWLParamManager::getInstance()->mCurParams.getFloat("haze_density", error);
haze_horizon = LLWLParamManager::getInstance()->mCurParams.getFloat("haze_horizon", error);
density_multiplier = LLWLParamManager::getInstance()->mCurParams.getFloat("density_multiplier", error);
max_y = LLWLParamManager::getInstance()->mCurParams.getFloat("max_y", error);
glow = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("glow", error));
cloud_shadow = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_shadow", error)[0];
cloud_shadow = LLWLParamManager::getInstance()->mCurParams.getFloat("cloud_shadow", error);
cloud_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_color", error));
cloud_scale = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_scale", error)[0];
cloud_scale = LLWLParamManager::getInstance()->mCurParams.getFloat("cloud_scale", error);
cloud_pos_density1 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density1", error));
cloud_pos_density2 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density2", error));
@@ -833,7 +827,7 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo
// Haze color above cloud
vary_HazeColor = (blue_horizon * blue_weight * (sunlight + ambient)
+ componentMult(haze_horizon.mV[0] * haze_weight, sunlight * temp2.mV[0] + ambient)
+ componentMult(haze_horizon * haze_weight, sunlight * temp2.mV[0] + ambient)
);
// Increase ambient when there are more clouds
@@ -844,7 +838,7 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo
// Haze color below cloud
LLColor3 additiveColorBelowCloud = (blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ componentMult(haze_horizon.mV[0] * haze_weight, sunlight * temp2.mV[0] + tmpAmbient)
+ componentMult(haze_horizon * haze_weight, sunlight * temp2.mV[0] + tmpAmbient)
);
// Final atmosphere additive
@@ -1010,7 +1004,7 @@ void LLVOSky::calcAtmospherics(void)
//haze color
vary_HazeColor =
(blue_horizon * blue_weight * (sunlight*(1.f - cloud_shadow) + tmpAmbient)
+ componentMult(haze_horizon.mV[0] * haze_weight, sunlight*(1.f - cloud_shadow) * temp2.mV[0] + tmpAmbient)
+ componentMult(haze_horizon * haze_weight, sunlight*(1.f - cloud_shadow) * temp2.mV[0] + tmpAmbient)
);
//brightness of surface both sunlight and ambient

View File

@@ -416,7 +416,7 @@ public:
LLColor3 blue_density;
LLColor3 blue_horizon;
F32 haze_density;
LLColor3 haze_horizon;
F32 haze_horizon;
F32 density_multiplier;
F32 max_y;
LLColor3 glow;

View File

@@ -3692,10 +3692,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
else
{
if (te->getColor().mV[3] > 0.f)
{
{ //only treat as alpha in the pipeline if < 100% transparent
drawablep->setState(LLDrawable::HAS_ALPHA);
alpha_faces.push_back(facep);
}
alpha_faces.push_back(facep);
}
}
else
@@ -3986,8 +3986,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
S32 texture_index_channels = LLGLSLShader::sIndexedTextureChannels-1; //always reserve one for shiny for now just for simplicity
static const LLCachedControl<bool> no_texture_indexing("ShyotlUseLegacyTextureBatching",false);
//static const LLCachedControl<bool> use_legacy_path("ShyotlUseLegacyRenderPath", false); //Legacy does not jive with new batching.
if (gGLManager.mGLVersion < 3.1f || no_texture_indexing /*|| use_legacy_path*/)
if (gGLManager.mGLVersion < 3.1f || no_texture_indexing)
{
texture_index_channels = 1;
}
@@ -4224,7 +4223,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (is_alpha)
{
// can we safely treat this as an alpha mask?
if (facep->canRenderAsMask())
if (facep->getFaceColor().mV[3] <= 0.f)
{ //100% transparent, don't render unless we're highlighting transparent
registerFace(group, facep, LLRenderPass::PASS_ALPHA_INVISIBLE);
}
else if (facep->canRenderAsMask())
{
if (te->getFullbright() || LLPipeline::sNoAlpha)
{

View File

@@ -202,6 +202,12 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
F32 size_inv = 1.f / size;
F32 z_fudge = 0.f;
if (getIsEdgePatch())
{ //bump edge patches down 10 cm to prevent aliasing along edges
z_fudge = -0.1f;
}
for (y = 0; y < size; y++)
{
for (x = 0; x < size; x++)
@@ -210,6 +216,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
position_agent = getPositionAgent() - getScale() * 0.5f;
position_agent.mV[VX] += (x + 0.5f) * step_x;
position_agent.mV[VY] += (y + 0.5f) * step_y;
position_agent.mV[VZ] += z_fudge;
*verticesp++ = position_agent - right + up;
*verticesp++ = position_agent - right - up;

View File

@@ -102,10 +102,10 @@ LLWaterParamManager::~LLWaterParamManager()
void LLWaterParamManager::loadAllPresets()
{
// First, load system (coming out of the box) water presets.
loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
loadPresetsFromDir(getSysDir());
// Then load user presets. Note that user day presets will modify any system ones already loaded.
loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
loadPresetsFromDir(getUserDir());
}
void LLWaterParamManager::loadPresetsFromDir(const std::string& dir)
@@ -327,7 +327,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader)
shader->uniform4fv("waterPlane", 1, mWaterPlane.mV);
shader->uniform1f("waterFogDensity", getFogDensity());
shader->uniform1f("waterFogKS", mWaterFogKS);
shader->uniform4f("distance_multiplier", 0, 0, 0, 0);
shader->uniform1f("distance_multiplier", 0);
}
}
@@ -349,7 +349,7 @@ void LLWaterParamManager::applyParams(const LLSD& params, bool interpolate)
}
}
//static LLFastTimer::DeclareTimer FTM_UPDATE_WATERPARAM("Update Water Params");
static LLFastTimer::DeclareTimer FTM_UPDATE_WATERPARAM("Update Water Params");
void LLWaterParamManager::updateShaderLinks()
{
@@ -375,7 +375,7 @@ void LLWaterParamManager::updateShaderLinks()
void LLWaterParamManager::update(LLViewerCamera * cam)
{
//LLFastTimer ftm(LLFastTimer::FTM_UPDATE_WLPARAM);
LLFastTimer ftm(FTM_UPDATE_WATERPARAM);
// update the shaders and the menu
propagateParameters();

View File

@@ -319,9 +319,6 @@ public:
F32 getFogDensity(void);
LLColor4 getFogColor(void);
// singleton pattern implementation
static LLWaterParamManager * instance();
public:
LLWaterParamSet mCurParams;

View File

@@ -2,31 +2,25 @@
* @file llwaterparamset.cpp
* @brief Implementation for the LLWaterParamSet class.
*
* $LicenseInfo:firstyear=2005&license=viewergpl$
*
* Copyright (c) 2005-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -35,7 +29,6 @@
#include "llwaterparamset.h"
#include "llsd.h"
#include "llfloaterwater.h"
#include "llwaterparammanager.h"
#include "lluictrlfactory.h"
#include "llsliderctrl.h"

View File

@@ -2,31 +2,25 @@
* @file llwlparamset.h
* @brief Interface for the LLWaterParamSet class.
*
* $LicenseInfo:firstyear=2005&license=viewergpl$
*
* Copyright (c) 2005-2009, Linden Research, Inc.
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
* Copyright (C) 2010, Linden Research, Inc.
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/

View File

@@ -91,10 +91,10 @@ LLWLParamManager::LLWLParamManager() :
mWLGamma(1.0f, "gamma"),
mBlueHorizon(0.25f, 0.25f, 1.0f, 1.0f, "blue_horizon", "WLBlueHorizon"),
mHazeDensity(1.0f, 1.0f, 1.0f, 0.5f, "haze_density"),
mHazeDensity(1.0f, "haze_density"),
mBlueDensity(0.25f, 0.25f, 0.25f, 1.0f, "blue_density", "WLBlueDensity"),
mDensityMult(1.0f, "density_multiplier", 1000),
mHazeHorizon(1.0f, 1.0f, 1.0f, 0.5f, "haze_horizon"),
mHazeHorizon(1.0f, "haze_horizon"),
mMaxAlt(4000.0f, "max_y"),
// Lighting
@@ -284,10 +284,10 @@ void LLWLParamManager::refreshRegionPresets()
void LLWLParamManager::loadAllPresets()
{
// First, load system (coming out of the box) sky presets.
loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
loadPresetsFromDir(getSysDir());
// Then load user presets. Note that user day presets will modify any system ones already loaded.
loadPresetsFromDir(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
loadPresetsFromDir(getUserDir());
}
void LLWLParamManager::loadPresetsFromDir(const std::string& dir)

View File

@@ -120,9 +120,8 @@ struct WLFloatControl {
{
}
inline WLFloatControl & operator = (LLVector4 const & val) {
x = val.mV[0];
inline WLFloatControl & operator = (F32 val) {
x = val;
return *this;
}
@@ -289,10 +288,10 @@ public:
/// Atmospherics
WLColorControl mBlueHorizon;
WLColorControl mHazeDensity;
WLFloatControl mHazeDensity;
WLColorControl mBlueDensity;
WLFloatControl mDensityMult;
WLColorControl mHazeHorizon;
WLFloatControl mHazeHorizon;
WLFloatControl mMaxAlt;
/// Lighting
@@ -315,15 +314,11 @@ public:
private:
friend class LLWLAnimator;
std::vector<LLGLSLShader *> mShaderList;
friend class LLSingleton<LLWLParamManager>;
/*virtual*/ void initSingleton();
LLWLParamManager();
~LLWLParamManager();
static void loadWindlightNotecard(LLVFS *vfs, const LLUUID& asset_id, LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status);
void loadAllPresets();
@@ -333,6 +328,11 @@ private:
static std::string getSysDir();
static std::string getUserDir();
friend class LLSingleton<LLWLParamManager>;
/*virtual*/ void initSingleton();
LLWLParamManager();
~LLWLParamManager();
// list of all the parameters, listed by name
std::map<LLWLParamKey, LLWLParamSet> mParamList;

View File

@@ -101,36 +101,62 @@ void LLWLParamSet::update(LLGLSLShader * shader) const
val.mV[1] = F32(i->second[1].asReal()) + mCloudScrollYOffset;
val.mV[2] = (F32) i->second[2].asReal();
val.mV[3] = (F32) i->second[3].asReal();
shader->uniform4fv(param, 1, val.mV);
}
else
stop_glerror();
shader->uniform4fv(param, 1, val.mV);
stop_glerror();
}
else if (param == "cloud_scale" || param == "cloud_shadow" ||
param == "density_multiplier" || param == "distance_multiplier" ||
param == "haze_density" || param == "haze_horizon" ||
param == "max_y" )
{
F32 val = (F32) i->second[0].asReal();
stop_glerror();
shader->uniform1f(param, val);
stop_glerror();
}
else // param is the uniform name
{
LLVector4 val;
// handle all the different cases
if(i->second.isArray() && i->second.size() == 4)
if (i->second.isArray() && i->second.size() == 4)
{
LLVector4 val;
val.mV[0] = (F32) i->second[0].asReal();
val.mV[1] = (F32) i->second[1].asReal();
val.mV[2] = (F32) i->second[2].asReal();
val.mV[3] = (F32) i->second[3].asReal();
stop_glerror();
shader->uniform4fv(param, 1, val.mV);
stop_glerror();
}
else if(i->second.isReal())
else if (i->second.isReal())
{
val.mV[0] = (F32) i->second.asReal();
F32 val = (F32) i->second.asReal();
stop_glerror();
shader->uniform1f(param, val);
stop_glerror();
}
else if(i->second.isInteger())
else if (i->second.isInteger())
{
val.mV[0] = (F32) i->second.asReal();
S32 val = (S32) i->second.asInteger();
stop_glerror();
shader->uniform1i(param, val);
stop_glerror();
}
else if(i->second.isBoolean())
else if (i->second.isBoolean())
{
val.mV[0] = i->second.asBoolean();
S32 val = (i->second.asBoolean() ? 1 : 0);
stop_glerror();
shader->uniform1i(param, val);
stop_glerror();
}
shader->uniform4fv(param, 1, val.mV);
}
}
}
@@ -151,7 +177,8 @@ void LLWLParamSet::set(const std::string& paramName, float x)
}
}
void LLWLParamSet::set(const std::string& paramName, float x, float y) {
void LLWLParamSet::set(const std::string& paramName, float x, float y)
{
mParamValues[paramName][0] = x;
mParamValues[paramName][1] = y;
}

View File

@@ -3105,6 +3105,8 @@ void renderSoundHighlights(LLDrawable* drawablep)
}
}
void updateParticleActivity(LLDrawable *drawablep);
void LLPipeline::postSort(LLCamera& camera)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT);
@@ -3235,6 +3237,9 @@ void LLPipeline::postSort(LLCamera& camera)
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
}
llpushcallstacks ;
forAllVisibleDrawables(updateParticleActivity);
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
static const LLCachedControl<bool> beacons_visible("BeaconsVisible", false);
if (beacons_visible && !sShadowRender)
@@ -4249,7 +4254,9 @@ void LLPipeline::renderDebug()
}
/*for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
/*gGL.flush();
glLineWidth(16-i*2);
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
LLViewerRegion* region = *iter;
@@ -4264,10 +4271,17 @@ void LLPipeline::renderDebug()
}
}
}
}*/
}
gGL.flush();
glLineWidth(1.f);*/
}
}
if (mRenderDebugMask & RENDER_DEBUG_WIND_VECTORS)
{
gAgent.getRegion()->mWind.renderVectors();
}
if (mRenderDebugMask & RENDER_DEBUG_COMPOSITION)
{
// Debug composition layers
@@ -6500,9 +6514,12 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b
mDeferredLight.flush();
}
U32 dof_width = mScreen.getWidth()*CameraDoFResScale;
U32 dof_height = mScreen.getHeight()*CameraDoFResScale;
{ //perform DoF sampling at half-res (preserve alpha channel)
mScreen.bindTarget();
glViewport(0,0,(GLsizei) (mScreen.getWidth()*CameraDoFResScale), (GLsizei) (mScreen.getHeight()*CameraDoFResScale));
glViewport(0,0, dof_width, dof_height);
gGL.setColorMask(true, false);
shader = &gDeferredPostProgram;
@@ -6560,6 +6577,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b
shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
shader->uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
shader->uniform1f(LLShaderMgr::DOF_WIDTH, dof_width-1);
shader->uniform1f(LLShaderMgr::DOF_HEIGHT, dof_height-1);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);

View File

@@ -325,8 +325,8 @@ std::string RlvExtGetSet::onGetEnv(std::string strSetting)
else if ("densitymultiplier" == strSetting) nValue = pWLParams->mDensityMult.x * pWLParams->mDensityMult.mult;
else if ("distancemultiplier" == strSetting) nValue = pWLParams->mDistanceMult;
else if ("eastangle" == strSetting) nValue = pWLParams->mCurParams.getEastAngle() / F_TWO_PI;
else if ("hazedensity" == strSetting) nValue = pWLParams->mHazeDensity.r;
else if ("hazehorizon" == strSetting) nValue = pWLParams->mHazeHorizon.r;
else if ("hazedensity" == strSetting) nValue = pWLParams->mHazeDensity;
else if ("hazehorizon" == strSetting) nValue = pWLParams->mHazeHorizon;
else if ("maxaltitude" == strSetting) nValue = pWLParams->mMaxAlt;
else if ("scenegamma" == strSetting) nValue = pWLParams->mWLGamma;
else if ("starbrightness" == strSetting) nValue = pWLParams->mCurParams.getStarBrightness();
@@ -472,8 +472,8 @@ ERlvCmdRet RlvExtGetSet::onSetEnv(std::string strSetting, const std::string& str
else if ("maxaltitude" == strSetting) pFloat = &pWLParams->mMaxAlt;
else if ("scenegamma" == strSetting) pFloat = &pWLParams->mWLGamma;
// See LLFloaterWindLight::onColorControlRMoved()
else if ("hazedensity" == strSetting) pColour = &pWLParams->mHazeDensity;
else if ("hazehorizon" == strSetting) pColour = &pWLParams->mHazeHorizon;
else if ("hazedensity" == strSetting) pFloat = &pWLParams->mHazeDensity;
else if ("hazehorizon" == strSetting) pFloat = &pWLParams->mHazeHorizon;
if (pFloat)
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -21,22 +21,21 @@
<string name="ChangePermissions">Change its permissions</string>
<string name="TrackYourCamera">Track your camera</string>
<string name="ControlYourCamera">Control your camera</string>
<layout_stack border="false" bottom="2" follows="left|top|right|bottom" height="255" left="2" orientation="horizontal" width="430" name="panels">
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="260" left="0" orientation="horizontal" width="430" name="panels">
<layout_panel border="false" bottom="0" default_tab_group="1" height="135" left="0" min_width="275" name="im_contents_panel" width="305">
<combo_box follows="left|top" height="18" label="Gestures" left="5" name="Gesture" width="120">
<combo_box follows="left|top" height="18" label="Gestures" left="6" name="Gesture" width="120">
<combo_item name="Gestures">Gestures</combo_item>
</combo_box>
<check_box bottom_delta="-2" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Show Muted Text" left_delta="125" name="show mutes" width="116"/>
<check_box bottom_delta="-2" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Show Muted Text" left_delta="124" name="show mutes" width="116"/>
<!--check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Translate Chat (powered by Google)" name="translate chat" width="100"/-->
<button bottom_delta="2" left_delta="120" follows="left|top" font="SansSerifSmall" height="20" width="100" label="Open History" name="chat_history_open" tool_top="Click here to open chat history in external editor."/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="272" name="toggle_active_speakers_btn" right="305"
tool_tip="Click here to show list of active participants in this IM session." width="70"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="28" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="82" left="5" max_length="2147483647" name="Chat History Editor" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="28" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="82" max_length="2147483647" name="Chat History Editor with mute" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
<button bottom_delta="2" left_delta="120" follows="left|top" font="SansSerifSmall" height="20" width="100" label="Open History" name="chat_history_open" tool_tip="Click here to open chat history in external editor."/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="272" name="toggle_active_speakers_btn" right="305" tool_tip="Click here to show a list of active participants in this IM session." width="80"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="28" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="81" left="5" max_length="2147483647" name="Chat History Editor" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="28" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="81" max_length="2147483647" name="Chat History Editor with mute" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
<panel bottom="5" follows="left|right|bottom" left="5" name="chat_panel" right="-5" tab_group="1" top="25">
<string name="gesture_label">Gestures</string>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" follows="left|right|bottom" font="SansSerif" handle_edit_keys_directly="false" height="20" label="Click here to chat." left="0" max_length="2147483647" name="Chat Editor" right="-70" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" spell_check="true"/>
<flyout_button bottom="0" follows="right|bottom" height="20" label="Say" left="-65" list_position="above" name="Say" tool_tip="(Enter)" width="70">
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" follows="left|right|bottom" font="SansSerif" handle_edit_keys_directly="false" height="20" label="Click here to chat." left="0" max_length="2147483647" name="Chat Editor" right="-60" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" spell_check="true"/>
<flyout_button bottom_delta="0" follows="right|bottom" height="20" label="Say" left="-57" list_position="above" name="Say" tool_tip="(Enter)" width="60">
<flyout_button_item value="shout" name="shout_item">Shout</flyout_button_item>
<flyout_button_item value="say" name="say_item">Say</flyout_button_item>
<flyout_button_item value="whisper" name="whisper_item">Whisper</flyout_button_item>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater border="true" bottom="-298" can_close="true" can_resize="true" default_tab_group="1" follows="left|top|right|bottom" height="297" label="(unknown)" left="1" min_height="155" min_width="345" name="im_floater" rect_control="" title="(unknown)" width="501">
<floater border="true" bottom="-298" can_close="true" can_resize="true" default_tab_group="1" follows="left|top|right|bottom" height="297" label="(unknown)" left="1" min_height="155" min_width="425" name="im_floater" rect_control="" title="(unknown)" width="501">
<string name="answering">Connecting...</string>
<string name="ringing">Calling...</string>
<string name="connected">Connected, click End Call to hang up</string>
@@ -11,19 +11,19 @@
<string name="default_text_label">Click here to instant message.</string>
<string name="unavailable_text_label">Text chat is not available for this call.</string>
<string name="inventory_item_offered">Inventory item offered</string>
<button bottom="-40" height="20" label="Profile" left="5" name="profile_callee_btn" width="80"/>
<button bottom="-40" height="20" label="Teleport" left_delta="80" name="profile_tele_btn" width="80"/>
<button bottom="-40" follows="left|top" halign="center" height="20" label="History" left_delta="80" name="history_btn" visible="true" width="80"/>
<check_box bottom="-40" follows="top" height="20" left_delta="80" name="rp_mode">RP Mode</check_box>
<button bottom="-40" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="80" name="start_call_btn" width="53"/>
<button bottom="-40" follows="top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End" name="end_call_btn" visible="false" width="53"/>
<panel border="false" bottom="-37" follows="left|top" height="20" left_delta="50" name="speaker_controls" width="100">
<button bottom="-37" height="20" label="Profile" left="5" name="profile_callee_btn" width="80"/>
<button bottom="-37" height="20" label="Teleport" left_delta="80" name="profile_tele_btn" width="80"/>
<button bottom="-37" follows="left|top" halign="center" height="20" label="History" left_delta="80" name="history_btn" visible="true" width="80"/>
<check_box bottom="-37" follows="top" height="20" left_delta="80" name="rp_mode">RP Mode</check_box>
<button bottom="-37" follows="left|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="80" name="start_call_btn" width="80"/>
<button bottom="-37" follows="top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End" name="end_call_btn" visible="false" width="80"/>
<panel border="false" bottom="-34" follows="left|top" height="20" left_delta="50" name="speaker_controls" width="100">
<volume_slider bottom="0" follows="bottom" height="15" increment="0.05" initial_val="0.5" max_val="1.0" min_val="0.0" name="speaker_volume" width="56"/>
<button bottom="0" height="20" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" label="" left_delta="56" name="mute_btn" tool_tip="Mute voice" width="25"/>
</panel>
<text_editor bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" height="221" left="5" max_length="2147483647" name="im_history" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="7" follows="left|right" font="SansSerif" height="20" label="Click here to instant message" max_length="2147483647" name="chat_editor" tab_group="1" width="436" spell_check="true"/>
<button bottom="7" height="20" label="Send" left="-56" name="send_btn" scale_image="true" width="50"/>
<text_editor bottom="28" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" height="228" left="5" max_length="2147483647" name="im_history" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="488" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="5" follows="left|right" font="SansSerif" height="20" label="Click here to instant message" max_length="2147483647" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="423" spell_check="true"/>
<button bottom="5" follows="right|bottom" height="20" label="Send" left="433" name="send_btn" scale_image="true" width="60"/>
<string name="live_help_dialog">*** Welcome to Help Request ***
Please first check our SL Help Pages by pressing F1, or by accessing the Knowledge Base http://secondlife.com/knowledgebase/
If your answer is not there, please enter your question to begin, then allow a few moments for available helpers to respond.

View File

@@ -8,14 +8,14 @@
<string name="typing_start_string">[NAME] is typing...</string>
<string name="session_start_string">Starting session with [NAME], please wait.</string>
<string name="default_text_label">Click here to instant message.</string>
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="277" left="0" orientation="horizontal" tab_group="1" width="496" name="panels">
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="280" left="0" orientation="horizontal" tab_group="1" width="496" name="panels">
<layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" height="295" left="0" min_width="115" name="im_contents_panel" width="495">
<button bottom="-20" enabled="false" follows="left|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left="5" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="left|top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" visible="false" width="80" />
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="463" name="toggle_active_speakers_btn" right="496" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="-265" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="239" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="7" follows="left|right|bottom" font="SansSerif" handle_edit_keys_directly="false" height="20" label="Click here to instant message" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="426" spell_check="true"/>
<button bottom_delta="0" enabled="true" follows="right|bottom" halign="center" height="20" label="Send" left="438" name="send_btn" scale_image="true" width="60"/>
<button bottom_delta="0" follows="left|top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="462" name="toggle_active_speakers_btn" right="495" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>
<text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="243" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="5" follows="left|right|bottom" font="SansSerif" handle_edit_keys_directly="false" height="20" label="Click here to instant message" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="425" spell_check="true"/>
<button bottom_delta="0" enabled="true" follows="right|bottom" height="20" label="Send" left="435" name="send_btn" scale_image="true" width="60"/>
</layout_panel>
<layout_panel auto_resize="false" bottom="0" can_resize="true" filename="panel_speaker_controls.xml" height="120" left="0" min_width="140" name="active_speakers_panel" top_delta="0" visible="false" width="140"/>
</layout_stack>

View File

@@ -10,15 +10,15 @@
<string name="default_text_label">Click here to instant message.</string>
<string name="moderated_chat_label">(Moderated: Voices off by default)</string>
<string name="muted_text_label">Your text chat has been disabled by a Group Moderator.</string>
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="277" left="0" orientation="horizontal" tab_group="1" width="496" name="panels">
<layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" height="130" left="0" min_width="210" name="im_contents_panel" width="175">
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="280" left="0" orientation="horizontal" tab_group="1" width="496" name="panels">
<layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" height="295" left="0" min_width="210" name="im_contents_panel" width="495">
<button bottom="-20" follows="left|top" height="20" label="Group Info" left="5" name="group_info_btn" tab_group="0" width="80"/>
<button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="85" name="start_call_btn" pad_right="12" width="80"/>
<button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Join Call" left_delta="80" name="start_call_btn" width="80"/>
<button bottom_delta="0" follows="left|top" halign="right" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End Call" left_delta="0" name="end_call_btn" pad_right="12" visible="false" width="80"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="145" name="toggle_active_speakers_btn" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="33"/>
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="30" enabled="false" follows="left|top|right|bottom" font="SansSerif" left="5" max_length="2147483647" name="im_history" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" top="104" width="170" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="7" follows="left|right|bottom" font="SansSerif" height="20" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="106" spell_check="true"/>
<button bottom="7" enabled="true" follows="right|bottom" height="20" label="Send" left="118" name="send_btn" scale_image="true" width="60"/>
<button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" label_selected="&gt; &gt;" left="462" name="toggle_active_speakers_btn" right="495" tool_tip="Click here to toggle a list of active participants in this IM session." visible="true" width="80"/>
<text_editor bottom="28" type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="243" left="5" max_length="2147483647" name="im_history" track_bottom="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" width="490" word_wrap="true"/>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="5" follows="left|right|bottom" font="SansSerif" height="20" left="5" max_length="1022" name="chat_editor" select_all_on_focus_received="false" select_on_focus="false" tab_group="1" width="425" spell_check="true"/>
<button bottom="5" enabled="true" follows="right|bottom" height="20" label="Send" left="435" name="send_btn" scale_image="true" width="60"/>
</layout_panel>
<layout_panel auto_resize="false" bottom="0" can_resize="true" filename="panel_speaker_controls.xml" height="120" left="0" min_width="140" name="active_speakers_panel" top_delta="0" visible="false" width="140"/>
</layout_stack>

View File

@@ -13,7 +13,8 @@
<column name="distance" label="Dist." width="48" tool_tip="Distance from your avatar (red=within chat range, yellow=within shout range, green=within draw distance)"/>
<column name="position" label="Pos." width="60" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims"/>
<column name="altitude" label="Alt." width="48" tool_tip="Altitude"/>
<column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
<column name="activity" label="Act." width="24" tool_tip="Activity"/>
<column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
</scroll_list>
<tab_container border="false" bottom_delta="-130" height="120" left="6" mouse_opaque="false"

View File

@@ -7020,5 +7020,18 @@ Click 'Wear' to attach the Physics Wearable, or click 'Cancel' if you wish to ma
</form>
</notification>
<notification
icon="alert.tga"
name="SGIncompleteAppearence"
type="alert">
Sending incomplete appearence. You may appear to others as a cloud.
Your shape, skin, hair or eyes might be defect.
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
</notifications>

View File

@@ -1,60 +1,17 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel border="false" follows="left|top|right|bottom" height="160"
label="Audio &amp; Video" name="Media panel" width="175">
<slider bottom_delta="-20" control_name="AudioLevelMaster" follows="left|top|right"
height="15" increment="0.05" initial_val="0.5" label="Master"
label_width="55" left="10" max_val="1" min_val="0" mouse_opaque="true"
name="System Volume" show_text="false" volume="true" width="180" />
<button bottom_delta="0" control_name="MuteAudio" follows="top|right" height="16"
image_selected="icn_speaker-muted_dark.tga"
image_unselected="icn_speaker_dark.tga" label="" label_width="55"
left="150" name="mute_audio" tab_stop="false" toggle="true" width="25" />
<slider bottom_delta="-30" control_name="AudioLevelMusic" follows="left|top|right"
height="15" increment="0.05" initial_val="0.5" label="Music"
label_width="55" left="10" max_val="1" min_val="0" name="Music Volume"
show_text="false" volume="true" width="180" />
<button bottom_delta="0" control_name="MuteMusic" follows="top|right" height="16"
image_selected="icn_speaker-muted_dark.tga"
image_unselected="icn_speaker_dark.tga" label="" label_width="55"
left="150" name="mute_music" tab_stop="false" toggle="true" width="25" />
<slider bottom_delta="-20" control_name="AudioLevelMedia" follows="left|top|right"
height="15" increment="0.05" initial_val="0.5" label="Media"
label_width="55" left="10" max_val="1" min_val="0" name="Media Volume"
show_text="false" volume="true" width="180" />
<button bottom_delta="0" control_name="MuteMedia" follows="top|right" height="16"
image_selected="icn_speaker-muted_dark.tga"
image_unselected="icn_speaker_dark.tga" label="" label_width="55"
left="150" name="mute_media" tab_stop="false" toggle="true" width="25" />
<slider bottom_delta="-20" control_name="AudioLevelVoice" follows="left|top|right"
height="15" increment="0.05" initial_val="0.5" label="Voice"
label_width="55" left="10" max_val="1" min_val="0" name="Voice Volume"
show_text="false" volume="true" width="180" />
<button bottom_delta="0" control_name="MuteVoice" follows="top|right" height="16"
image_selected="icn_speaker-muted_dark.tga"
image_unselected="icn_speaker_dark.tga" label="" label_width="55"
left="150" name="mute_voice" tab_stop="false" toggle="true" width="25" />
<slider bottom_delta="-20" control_name="AudioLevelSFX" follows="left|top|right"
height="15" increment="0.05" initial_val="0.5" label="Sounds"
label_width="55" left="10" max_val="1" min_val="0" name="SFX Volume"
show_text="false" volume="true" width="180" />
<button bottom_delta="0" control_name="MuteSounds" follows="top|right" height="16"
image_selected="icn_speaker-muted_dark.tga"
image_unselected="icn_speaker_dark.tga" label="" label_width="55"
left="150" name="mute_sfx" tab_stop="false" toggle="true" width="25" />
<slider bottom_delta="-20" control_name="AudioLevelAmbient" follows="left|top|right"
height="15" increment="0.05" initial_val="0.5" label="Ambient"
label_width="55" left="10" max_val="1" min_val="0" name="Wind Volume"
show_text="false" volume="true" width="180" />
<button bottom_delta="0" control_name="MuteAmbient" follows="top|right" height="16"
image_selected="icn_speaker-muted_dark.tga"
image_unselected="icn_speaker_dark.tga" label="" label_width="55"
left="150" name="mute_wind" tab_stop="false" toggle="true" width="25" />
<slider bottom_delta="-20" control_name="AudioLevelUI" follows="left|top|right"
height="15" increment="0.05" initial_val="0.5" label="UI" label_width="55"
left="10" max_val="1" min_val="0" name="UI Volume" show_text="false"
volume="true" width="180" />
<button bottom_delta="0" control_name="MuteUI" follows="top|right" height="16"
image_selected="icn_speaker-muted_dark.tga"
image_unselected="icn_speaker_dark.tga" label="" label_width="55"
left="150" name="mute_ui" tab_stop="false" toggle="true" width="25" />
<panel border="false" height="100" label="Audio &amp; Video" name="Media panel" width="250">
<slider control_name="AudioLevelMaster" follows="top" height="15" increment="0.005" initial_val="0.5" label="Master" label_width="55" left="10" max_val="1" min_val="0" name="System Volume" show_text="false" volume="true" width="181"/>
<button bottom_delta="0" control_name="MuteAudio" follows="top" height="16" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" label="" right="-28" name="mute_audio" toggle="true" width="25"/>
<slider bottom_delta="-30" control_name="AudioLevelMusic" follows="top" height="15" increment="0.005" initial_val="0.5" label="Music" label_width="55" left="10" max_val="1" min_val="0" name="Music Volume" show_text="false" volume="true" width="181"/>
<button bottom_delta="0" control_name="MuteMusic" follows="top" height="16" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" label="" right="-28" name="mute_music" toggle="true" width="25"/>
<slider control_name="AudioLevelMedia" follows="top" height="15" increment="0.005" initial_val="0.5" label="Media" label_width="55" left="10" max_val="1" min_val="0" name="Media Volume" show_text="false" volume="true" width="181"/>
<button bottom_delta="0" control_name="MuteMedia" follows="top" height="16" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" label="" right="-28" name="mute_media" toggle="true" width="25"/>
<slider control_name="AudioLevelVoice" follows="top" height="15" increment="0.005" initial_val="0.5" label="Voice" label_width="55" left="10" max_val="1" min_val="0" name="Voice Volume" show_text="false" volume="true" width="181"/>
<button bottom_delta="0" control_name="MuteVoice" follows="top" height="16" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" label="" right="-28" name="mute_voice" toggle="true" width="25"/>
<slider control_name="AudioLevelSFX" follows="top" height="15" increment="0.005" initial_val="0.5" label="Sounds" label_width="55" left="10" max_val="1" min_val="0" name="SFX Volume" show_text="false" volume="true" width="181"/>
<button bottom_delta="0" control_name="MuteSounds" follows="top" height="16" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" label="" right="-28" name="mute_sfx" toggle="true" width="25"/>
<slider control_name="AudioLevelAmbient" follows="top" height="15" increment="0.005" initial_val="0.5" label="Ambient" label_width="55" left="10" max_val="1" min_val="0" name="Wind Volume" show_text="false" volume="true" width="181"/>
<button bottom_delta="0" control_name="MuteAmbient" follows="top" height="16" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" right="-28" label="" name="mute_wind" toggle="true" width="25"/>
<slider control_name="AudioLevelUI" follows="top" height="15" increment="0.005" initial_val="0.5" label="UI" label_width="55" left="10" max_val="1" min_val="0" name="UI Volume" show_text="false" volume="true" width="181"/>
<button bottom_delta="0" control_name="MuteUI" follows="top" height="16" image_selected="icn_speaker-muted_dark.tga" image_unselected="icn_speaker_dark.tga" right="-28" label="" name="mute_ui" toggle="true" width="25"/>
</panel>

View File

@@ -13,7 +13,7 @@
handle_edit_keys_directly="false" height="20" label="Click here to chat."
left="107" max_length="2147483647" name="Chat Editor"
select_all_on_focus_received="false" select_on_focus="false" tab_group="1"
tool_tip="Press Enter to say, Ctrl-Enter to shout." width="105" spell_check="true" />
tool_tip="Press Enter to say, Shift-Enter to whisper, Ctrl-Enter to shout." width="105" spell_check="true" />
<flyout_button bottom="-23" follows="right|bottom" height="20" label="Say" left_delta="110"
list_position="above" mouse_opaque="true" name="Say" tool_tip="(Enter)"
width="80">

View File

@@ -1,81 +1,35 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel border="true" name="friends">
<string name="Multiple">Multiple friends...</string>
<scroll_list bottom="10" can_resize="true" column_padding="0" draw_heading="true"
follows="left|top|bottom|right" left="10" multi_select="true"
name="friend_list" right="-100" search_column="1"
tool_tip="Hold shift or control while clicking to select multiple friends"
top="-40">
<column image="ff_online_status_button.tga" name="icon_online_status"
tool_tip="Online status" width="20" />
<column dynamicwidth="true" label="Name" name="friend_name" tool_tip="Name" />
<column image="ff_visible_online_button.tga" name="icon_visible_online"
tool_tip="Friend can see when you're online" width="20" />
<column image="ff_visible_map_button.tga" name="icon_visible_map"
tool_tip="Friend can locate you on the map" width="20" />
<column image="ff_edit_mine_button.tga" name="icon_edit_mine"
tool_tip="Friend can edit, delete or take objects" width="20" />
<column image="ff_visible_online_button.tga" name="icon_visible_online_theirs"
tool_tip="You can see when they are online (only updates on login)" width="20" />
<column image="ff_visible_map_button.tga" name="icon_visible_map_theirs"
tool_tip="You can locate them on the map" width="20" />
<column image="ff_edit_theirs_button.tga" name="icon_edit_theirs"
tool_tip="You can edit this friend's objects" width="20" />
<column name="friend_last_update_generation" width="0" />
<scroll_list bottom="10" can_resize="true" column_padding="0" draw_heading="true" follows="left|top|bottom|right" left="10" multi_select="true"
name="friend_list" right="-100" search_column="1" tool_tip="Hold shift or control while clicking to select multiple friends" top="-40">
<column image="ff_online_status_button.tga" name="icon_online_status" tool_tip="Online status" width="20"/>
<column dynamicwidth="true" label="Name" name="friend_name" tool_tip="Name"/>
<column image="ff_visible_online_button.tga" name="icon_visible_online" tool_tip="Friend can see when you're online" width="20"/>
<column image="ff_visible_map_button.tga" name="icon_visible_map" tool_tip="Friend can locate you on the map" width="20"/>
<column image="ff_edit_mine_button.tga" name="icon_edit_mine" tool_tip="Friend can edit, delete or take objects" width="20"/>
<column image="ff_visible_online_button.tga" name="icon_visible_online_theirs" tool_tip="You can see when they are online (only updates on login)" width="20"/>
<column image="ff_visible_map_button.tga" name="icon_visible_map_theirs" tool_tip="You can locate them on the map" width="20"/>
<column image="ff_edit_theirs_button.tga" name="icon_edit_theirs" tool_tip="You can edit this friend's objects" width="20"/>
<column name="friend_last_update_generation" width="0"/>
</scroll_list>
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" left_delta="0"
name="friends" width="110">
Contact Group:
</text-->
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" left_delta="0"
name="friends" width="110">
Contact Search:
</text-->
<!--combo_box allow_text_entry="false" enabled="true" follows="right|top"
bottom_delta="20" height="18" hidden="false" left="-255" max_chars="20" mouse_opaque="true"
tool_tip="Buddy group" name="buddy_group_combobox" width="130">
<combo_item type="string" length="20" enabled="true" name="All" value="All">
All
</combo_item>
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" name="friends" width="110">Contact Group:</text-->
<!--combo_box allow_text_entry="false" enabled="true" follows="right|top" bottom_delta="20" height="18" hidden="false" left="-255" max_chars="20" tool_tip="Buddy group" name="buddy_group_combobox" width="130">
<combo_item type="string" length="20" enabled="true" name="All" value="All">All</combo_item>
</combo_box-->
<search_editor bottom_delta="-40" enabled="true" follows="left|top" font="SansSerif"
height="18" left_delta="0" name="buddy_search_lineedit" label="Type here to search"
tool_tip="The friend name you want to search for" width="160" />
<button bottom_delta="-3" follows="top|right" height="22" label="0"
left="-120" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info"
width="22" />
<pad bottom="-7" height="0" left="-90" width="1" />
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact"
left_delta="0" name="assign_btn" tool_tip="Assign a friend to a Contact Group"
width="80" /-->
<button bottom_delta="-25" follows="top|right" height="22" label="IM/Call"
left_delta="0" name="im_btn" tool_tip="Open Instant Message session"
width="80" />
<button bottom_delta="-25" follows="top|right" height="22" label="Profile"
left_delta="0" name="profile_btn"
tool_tip="Show picture, groups, and other information" width="80" />
<button bottom_delta="-25" follows="top|right" height="22" label="Teleport..."
left_delta="0" name="offer_teleport_btn"
tool_tip="Offer this friend a teleport to your current location" width="80" />
<button bottom_delta="-25" follows="top|right" height="22" label="Pay..."
left_delta="0" name="pay_btn"
tool_tip="Give in-world money ([CURRENCY]) to this friend" width="80" />
<button bottom_delta="-25" follows="top|right" height="22" label="Remove..."
left_delta="0" name="remove_btn"
tool_tip="Remove this person from your friends list" width="80" />
<button bottom_delta="-25" follows="top|right" height="22" label="Add..."
left_delta="0" name="add_btn" tool_tip="Offer friendship to a resident"
width="80" />
<text bottom_delta="-35" follows="right|top" font="SansSerif" height="32" left_delta="0" name="friends" width="95">
Online:
</text>
<text bottom_delta="-15" follows="right|top" font="SansSerif" height="32" left_delta="0" name="f_num" width="95">
0000
</text>
<text bottom_delta="-15" follows="right|top" font="SansSerif" height="32" left_delta="0" name="sel" width="95">
Selected:
</text>
<text bottom_delta="0" follows="right|top" font="SansSerif" height="32" left_delta="55" name="s_num" width="95">
0000
</text>
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" name="Contact Search:" width="110">Contact Search:</text-->
<search_editor bottom_delta="-40" enabled="true" follows="left|top" font="SansSerif" height="18" name="buddy_search_lineedit" label="Contact Search" tool_tip="The friend name you want to search for" width="160"/>
<button bottom_delta="0" follows="top|right" height="22" label="0" left="-120" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info" width="22"/>
<pad bottom="-7" height="0" left="-90" width="1"/>
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact" name="assign_btn" tool_tip="Assign a friend to a Contact Group" width="80"/-->
<button bottom_delta="-25" follows="top|right" height="22" label="IM/Call" name="im_btn" tool_tip="Open Instant Message session" width="80"/>
<button bottom_delta="-25" follows="top|right" height="22" label="Profile" name="profile_btn" tool_tip="Show picture, groups, and other information" width="80"/>
<button bottom_delta="-25" follows="top|right" height="22" label="Teleport..." name="offer_teleport_btn" tool_tip="Offer this friend a teleport to your current location" width="80" />
<button bottom_delta="-25" follows="top|right" height="22" label="Pay..." name="pay_btn" tool_tip="Give in-world money ([CURRENCY]) to this friend" width="80"/>
<button bottom_delta="-25" follows="top|right" height="22" label="Remove..." name="remove_btn" tool_tip="Remove this person from your friends list" width="80"/>
<button bottom_delta="-25" follows="top|right" height="22" label="Add..." name="add_btn" tool_tip="Offer friendship to a resident" width="80"/>
<text bottom_delta="-35" follows="right|top" height="32" name="friends" width="95">Online:</text>
<text bottom_delta="-15" follows="right|top" height="32" name="f_num" width="95">0000</text>
<text bottom_delta="-15" follows="right|top" height="32" name="sel" width="95">Selected:</text>
<text bottom_delta="0" follows="right|top" height="32" left_delta="55" name="s_num" width="95">0000</text>
</panel>

View File

@@ -23,7 +23,7 @@
label="Do not echo/log notifications in chat" name="hide_notifications_in_chat_check"/>
<check_box bottom="-120" left="10" control_name="AscentAllowMUpose" initial_value="false"
label="Allow MU pose method." tool_tip="Allows the use of both /me and : to perform emotes." name="allow_mu_pose_check"/>
<check_box bottom_delta="-20" follows="left|top"
<check_box bottom_delta="-20" follows="left|top" control_name="AscentAutoCloseOOC"
label="Auto-close OOC comments." tool_tip="Will automatically append '))' to any message starting with '((', or visa versa." name="close_ooc_check"/>
<text bottom_delta="-15" follows="left|top" name="objects_link_text_box">Show links on chatting object names in chat history for:</text>
<radio_group bottom_delta="-26" control_name="LinksForChattingObjects" tool_tip="Enables a link to show you the owner of the speaking object."

View File

@@ -74,6 +74,8 @@
<check_box bottom_delta="-24" follows="top" initial_value="false" label="Use same position between sims" name="map_to_keep_pos" control_name="AscentMapToKeepPos"/>
<text bottom_delta="-18" follows="top" height="16" name="cmd_line_text_13">Teleport to avatar (usage: cmd name)</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" tool_tip="The syntax of this command allows partial names and is not case sensitive. Better results if used while the Radar is open." name="AscentCmdLineTP2" width="200"/>
<text bottom_delta="-18" follows="top" height="16" name="cmd_line_text_14">Toggle Fake Away Status (usage: cmd)</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-20" follows="top" height="20" max_length="256" name="SinguCmdLineAway" width="200"/>
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Security" name="Security">
@@ -81,6 +83,7 @@
<check_box bottom_delta="-20" control_name="DisablePointAtAndBeam" follows="top" initial_value="true" label="Disable Point At And Beam" tool_tip="Don't point at or show your edit beam when selecting an object." name="disable_point_at_and_beams_check"/>
<check_box bottom_delta="-20" control_name="PrivateLookAt" follows="top" initial_value="false" label="Do not Look At objects (defeats ShowLookAt)" tool_tip="Turns off broadcasting headturns and lookat beacons for yourself." name="private_look_at_check"/>
<check_box bottom_delta="-20" control_name="AscentShowLookAt" follows="top" initial_value="false" label="Show others' LookAt beacons" tool_tip="Shows you where others are looking." name="show_look_at_check"/>
<check_box bottom_delta="-20" control_name="QuietSnapshotsToDisk" follows="top" initial_value="false" label="Quiet Snapshots to Disk" tool_tip="Doesn't make a camera sound nor alert everyone when you take a snapshot to your computer" name="quiet_snapshots_check"/>
<check_box bottom_delta="-20" control_name="RevokePermsOnStandUp" follows="top" initial_value="false" label="On standing up, revoke perms for the object your avatar was sitting on" tool_tip="Objects generally retain Take Control and Trigger Animation permissions until reset or given permission by another user. Enabling this will make sure you revoke these permissions immediately." name="revoke_perms_on_stand_up_check"/>
<check_box bottom_delta="-20" control_name="DisableClickSit" follows="top" initial_value="false" label="Disable click-to-sit objects" tool_tip="Some griefer tools rely on forcing or tricking you to click on an object that will make you sit, giving the object automatic permissions to trigger animations amongst other things. This will disable llSitTarget - It does mean that you will need to select 'Sit' on poseballs and furniture." name="disable_click_sit_check"/>
<check_box bottom_delta="-20" follows="top" initial_value="false" label="Display Total Script Count changes:" name="totalscriptjumps" control_name="AscentDisplayTotalScriptJumps" tool_tip="Displays script count changes in your region, dependant on the threshold you choose to the right."/>

View File

@@ -61,8 +61,8 @@
<text bottom="-317" height="12" left="10" name="AvatarRenderingText">Avatar Rendering:</text>
<check_box bottom_delta="-18" control_name="RenderUseImpostors" initial_value="true" label="Avatar Impostors" name="AvatarImpostors"/>
<slider bottom_delta="-12" control_name="RenderAvatarMaxVisible" decimal_digits="0" increment="1" initial_val="35" label="Max non-impostors" label_width="100" left_delta="8" max_val="50" min_val="1" name="AvatarMaxVisible" width="195"/>
<check_box bottom_delta="-22" control_name="RenderAvatarVP" initial_value="true" label="Hardware Skinning" name="AvatarVertexProgram"/>
<slider bottom_delta="-12" left_delta="8" control_name="RenderAvatarMaxVisible" decimal_digits="0" increment="1" initial_val="35" label="Max non-impostors" label_width="100" max_val="50" min_val="1" name="AvatarMaxVisible" width="195"/>
<check_box bottom_delta="-22" left_delta="-8" control_name="RenderAvatarVP" initial_value="true" label="Hardware Skinning" name="AvatarVertexProgram"/>
<check_box bottom_delta="-17" control_name="RenderAvatarCloth" initial_value="true" label="Avatar Cloth" name="AvatarCloth"/>
<!--text bottom="-131" height="12" left="464" name="DrawDistanceMeterText1">m</text-->
<text bottom="-131" height="12" left="470" name="DrawDistanceMeterText2">m</text>

View File

@@ -12,7 +12,7 @@
<button bottom="0" height="24" label="Fly" image_overlay="icn_toolbar_fly.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" label_selected="Stop Flying" name="fly_btn" tool_tip="Start flying(F or Home). Use E/C or PgUp/PgDn to fly up and down." width="50" follows="left|right" user_resize="false"/>
<button bottom="0" height="24" label="Snapshot" image_overlay="icn_toolbar_snapshot.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="snapshot_btn" tool_tip="Save a screen shot to disk or inventory.(Ctrl-Shift-S for floater, Ctrl-`(~) takes snapshot w/o floater)" width="50" follows="left|right" user_resize="false"/>
<button bottom="0" height="24" label="Search" image_overlay="icn_toolbar_search.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="directory_btn" tool_tip="Search for places, events, people, and more.(Ctrl-F)" width="50" follows="left|right" user_resize="false"/>
<button bottom="0" height="24" label="Build" name="build_btn" image_overlay="icn_toolbar_build.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Create new objects." width="50" follows="left|right" user_resize="false"/>
<button bottom="0" height="24" label="Build" name="build_btn" image_overlay="icn_toolbar_build.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Create new objects. (B)" width="50" follows="left|right" user_resize="false"/>
<button bottom="0" height="24" label="Map" name="map_btn" image_overlay="icn_toolbar_map.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Map of the world. (Ctrl-M)" width="50" follows="left|right" user_resize="false"/>
<button bottom="0" height="24" label="Mini-Map" image_overlay="icn_toolbar_minimap.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="radar_btn" tool_tip="Map of the area around you. (Ctrl-Shift-M)" width="50" follows="left|right" user_resize="false"/>
<button bottom="0" height="24" label="Inventory" image_overlay="icn_toolbar_inventory.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" name="inventory_btn" tool_tip="Your items. (Ctrl-I)" width="50" follows="left|right" user_resize="false"/>

View File

@@ -1,14 +1,22 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel bg_visible="false" border="false" border_visible="false" height="220" name="Adv_Settings" use_bounding_rect="true" width="220">
<panel bottom="1" filename="panel_bg_tab.xml" height="185" width="197"/>
<slider bottom="160" left="5" control_name="RenderFarClip" decimal_digits="0" height="20" increment="8" label="Draw Dist.:" can_edit_text="true" label_width="53" max_val="1024" min_val="24" val_width="36" name="DrawDistance" width="189" tool_tip="Change your Draw Distance"/>
<slider bottom_delta="-20" control_name="ThrottleBandwidthKBPS" decimal_digits="0" height="20" increment="50" label="Bandwidth:" can_edit_text="true" label_width="53" max_val="5000" min_val="50" val_width="36" name="max_bandwidth" width="189" tool_tip="Set your Network bandwidth in kbps (kilobits per second)"/>
<slider bottom_delta="-20" control_name="RenderMaxPartCount" decimal_digits="0" height="20" increment="256" label="Particles:" can_edit_text="true" label_width="53" max_val="8192" min_val="0" val_width="36" name="MaxParticleCount" width="189" tool_tip="Amount of particles to render"/>
<slider bottom_delta="-20" control_name="RenderAvatarMaxVisible" decimal_digits="0" height="20" increment="1" label="Max Avs:" can_edit_text="true" label_width="53" max_val="50" min_val="1" val_width="36" name="RenderAvatarMaxVisible" width="189" tool_tip="How many avatars to fully render on screen. Lowering this greatly improves FPS in crowded situations. Requires Avatar Impostors to be on. [Default 35]"/>
<slider bottom_delta="-20" control_name="RenderVolumeLODFactor" height="20" increment="0.125" label="Obj. Detail:" can_edit_text="true" label_width="53" max_val="2" min_val="0.5" name="Object Detail" val_width="36" width="189" tool_tip="Controls level of detail of primitives (multiplier for current screen area when calculated level of detail[0.5 to 2.0 is stable])"/>
<text bottom_delta="-17" height="16" name="cmd_line_text_7">Windlight Sky Preset:</text>
<combo_box name="WLSkyPresetsCombo" bottom_delta="-20" height="18" width="189" tool_tip="WindLight Presets for your Sky." />
<text bottom_delta="-20" height="16" name="cmd_line_text_7">Windlight Water Preset:</text>
<combo_box name="WLWaterPresetsCombo" bottom_delta="-20" height="18" width="166" tool_tip="WindLight Presets for your Water."/>
<panel bg_visible="false" border="false" border_visible="false" height="200" name="Adv_Settings" use_bounding_rect="true" width="220">
<panel bottom="1" filename="panel_bg_tab.xml" height="197" width="197"/>
<slider bottom="177" left="5" control_name="RenderFarClip" decimal_digits="0" height="20" increment="8" label="Draw Dist.:" can_edit_text="true" label_width="60" max_val="1024" min_val="24" val_width="36" name="DrawDistance" width="189" tool_tip="Change your Draw Distance"/>
<slider bottom_delta="-20" control_name="ThrottleBandwidthKBPS" decimal_digits="0" height="20" increment="50" label="Bandwidth:" can_edit_text="true" label_width="60" max_val="5000" min_val="50" val_width="36" name="max_bandwidth" width="189" tool_tip="Set your Network bandwidth in kbps (kilobits per second)"/>
<slider bottom_delta="-20" control_name="RenderMaxPartCount" decimal_digits="0" height="20" increment="256" label="Particles:" can_edit_text="true" label_width="60" max_val="8192" min_val="0" val_width="36" name="MaxParticleCount" width="189" tool_tip="Amount of particles to render"/>
<slider bottom_delta="-20" control_name="RenderAvatarMaxVisible" decimal_digits="0" height="20" increment="1" label="Max Avs:" can_edit_text="true" label_width="60" max_val="50" min_val="1" val_width="36" name="RenderAvatarMaxVisible" width="189" tool_tip="How many avatars to fully render on screen. Lowering this greatly improves FPS in crowded situations. Requires Avatar Impostors to be on. [Default 35]"/>
<slider bottom_delta="-20" control_name="RenderVolumeLODFactor" height="20" increment="0.125" label="Obj. Detail:" can_edit_text="true" label_width="60" max_val="2" min_val="0.5" name="Object Detail" val_width="36" width="189" tool_tip="Controls level of detail of primitives (multiplier for current screen area when calculated level of detail[0.5 to 2.0 is stable])"/>
<button left="5" height="20" name="EnvAdvancedSkyButton" width="20" image_overlay="Inv_WindLight.png" label="" tool_tip="Advanced Sky"/>
<combo_box name="WLSkyPresetsCombo" bottom_delta="1" left_delta="20" height="18" width="133" tool_tip="WindLight Presets for your Sky."/>
<button bottom_delta="0" height="18" label="&lt;" left="158" image_overlay="arrow_left.tga" name="WLprev" scale_image="true" width="18"/>
<button bottom_delta="0" height="18" label="&gt;" left_delta="18" image_overlay="arrow_right.tga" name="WLnext" width="18"/>
<button left="5" height="20" name="EnvAdvancedWaterButton" width="20" image_overlay="Inv_WaterLight.png" label="" tool_tip="Advanced Water"/>
<combo_box name="WLWaterPresetsCombo" bottom_delta="1" left_delta="20" height="18" width="133" tool_tip="WindLight Presets for your Water."/>
<button bottom_delta="0" height="18" label="&lt;" left="158" image_overlay="arrow_left.tga" name="WWprev" width="18"/>
<button bottom_delta="0" height="18" label="&gt;" left_delta="18" image_overlay="arrow_right.tga" name="WWnext" width="18"/>
<check_box left="5" label="Region Environment" control_name="UseEnvironmentFromRegion" height="16" name="use_estate_wl" tool_tip="Use the region/parcel's windlight settings when available."/>
<check_box bottom_delta="0" left_delta="125" label="Always?" control_name="UseEnvironmentFromRegionAlways" height="16" name="Always" tool_tip="Always use region/parcel settings when they exist, automatically."/>
<icon bottom_delta="-18" height="14" image_name="icon_day_cycle.tga" left="10" width="150"/>
<slider bottom_delta="-8" control_name="EnvTimeSlider" left="5" height="10" increment="0.00000001" label="" max_val="1" min_val="0" name="EnvTimeSlider" show_text="false" width="160"/>
<button bottom="1" height="22" label="" left="172" name="expand" scale_image="true" toggle="true" tool_tip="Hide the Settings Panel" width="22"/>
</panel>

View File

@@ -405,7 +405,7 @@ class WindowsManifest(ViewerManifest):
!define VIEWERNAME "%(channel)s"
!define INSTFLAGS "%(flags)s"
!define INSTNAME "%(channel_oneword)s"
!define SHORTCUT "%(channel)s"
!define SHORTCUT "%(channel)s Viewer"
!define URLNAME "secondlife"
!define INSTALL_ICON "install_icon_singularity.ico"
!define UNINSTALL_ICON "install_icon_singularity.ico"