diff --git a/FIRESTORM-SOURCE_LICENSE_HEADER.txt b/FIRESTORM-SOURCE_LICENSE_HEADER.txt index 91442a794d..886e242398 100644 --- a/FIRESTORM-SOURCE_LICENSE_HEADER.txt +++ b/FIRESTORM-SOURCE_LICENSE_HEADER.txt @@ -2,9 +2,9 @@ * @file * @brief * - * $LicenseInfo:firstyear=2017&license=fsviewerlgpl$ + * $LicenseInfo:firstyear=2018&license=fsviewerlgpl$ * Phoenix Firestorm Viewer Source Code - * Copyright (C) 2017, The Phoenix Firestorm Project, Inc. + * Copyright (C) 2018, The Phoenix Firestorm Project, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/autobuild.xml b/autobuild.xml index c15b62fc06..3ea428b54a 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -586,6 +586,66 @@ version 2.0.1.297014 + fmodstudio + + copyright + FMOD Studio, copyright (c) Firelight Technologies Pty, Ltd., 2012-2017. + description + FMOD Studio audio system library + license + fmodstudio + license_file + LICENSES/fmodstudio.txt + name + fmodstudio + platforms + + darwin + + archive + + hash + 6324120be383af3564f2b46b07f1b765 + hash_algorithm + md5 + url + file:///opt/firestorm/fmodstudio-1.10.02-darwin-.tar.bz2 + + name + darwin + + linux + + archive + + hash + eccdcb4a1e96bb829284d01255f4f913 + hash_algorithm + md5 + url + file:///opt/firestorm/fmodstudio-1.10.02-linux-201801091647.tar.bz2 + + name + linux + + windows + + archive + + hash + 206f34d4a262a09323bc9d03cd81a2f6 + hash_algorithm + md5 + url + file:///c:/cygwin/opt/firestorm/fmodstudio-1.10.02-windows-173500059.tar.bz2 + + name + windows + + + version + 1.10.02 + fmodex copyright @@ -2512,7 +2572,7 @@ package_description copyright - Copyright (c) 2017, The Phoenix Firestorm Project, Inc. + Copyright (c) 2018, The Phoenix Firestorm Project, Inc. description Firestorm Viewer license @@ -3184,7 +3244,7 @@ options --kdu - --fmodex + --fmodstudio --platform linux32 --package --btype RelWithDebInfo @@ -3238,7 +3298,7 @@ options --kdu - --fmodex + --fmodstudio --platform linux32 @@ -3262,7 +3322,7 @@ options --kdu - --fmodex + --fmodstudio --platform linux32 @@ -3286,7 +3346,7 @@ options --kdu - --fmodex + --fmodstudio --platform linux32 @@ -3488,7 +3548,7 @@ options - --fmodex + --fmodstudio --kdu --version --btype RelWithDebInfo @@ -3562,7 +3622,7 @@ options - --fmodex + --fmodstudio --kdu --version --platform win32 @@ -3598,7 +3658,7 @@ options - --fmodex + --fmodstudio --kdu --version --platform win32 @@ -3634,7 +3694,7 @@ options - --fmodex + --fmodstudio --kdu --version --platform win32 diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 43e05aeee2..857a6499ef 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -26,6 +26,7 @@ set(cmake_SOURCE_FILES FindAPR.cmake FindAutobuild.cmake FindBerkeleyDB.cmake + FindFMODSTUDIO.cmake FindFMODEX.cmake FindGLH.cmake FindGoogleBreakpad.cmake @@ -38,6 +39,7 @@ set(cmake_SOURCE_FILES FindURIPARSER.cmake FindXmlRpcEpi.cmake FindZLIB.cmake + FMODSTUDIO.cmake FMODEX.cmake FreeType.cmake GLEXT.cmake diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 2fcf1ca6f1..36d8030b11 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -57,7 +57,7 @@ if(WINDOWS) if( NOT ND_USE_OPENJPEG2 ) set(debug_files ${debug_files} openjpegd.dll ) set(release_files ${release_files} openjpeg.dll ) - else() + else() set(debug_files ${debug_files} openjp2.dll ) set(release_files ${release_files} openjp2.dll ) endif( NOT ND_USE_OPENJPEG2 ) @@ -70,6 +70,16 @@ if(WINDOWS) set(release_files ${release_files} libtcmalloc_minimal.dll) endif(USE_TCMALLOC) + if (FMODSTUDIO) + if( NOT ND_BUILD64BIT_ARCH ) + set(debug_files ${debug_files} fmodL.dll) + set(release_files ${release_files} fmod.dll) + else( NOT ND_BUILD64BIT_ARCH ) + set(debug_files ${debug_files} fmodL64.dll) + set(release_files ${release_files} fmod64.dll) + endif( NOT ND_BUILD64BIT_ARCH ) + endif (FMODSTUDIO) + if (FMODEX) if( NOT ND_BUILD64BIT_ARCH ) set(debug_files ${debug_files} fmodexL.dll) @@ -185,10 +195,15 @@ elseif(DARWIN) libGLOD.dylib libhunspell-1.3.0.dylib libndofdev.dylib - libgrowl.dylib + libgrowl.dylib libgrowl++.dylib ) + if (FMODSTUDIO) + set(debug_files ${debug_files} libfmodL.dylib) + set(release_files ${release_files} libfmod.dylib) + endif (FMODSTUDIO) + if (FMODEX) set(debug_files ${debug_files} libfmodexL.dylib) set(release_files ${release_files} libfmodex.dylib) @@ -247,7 +262,7 @@ elseif(LINUX) libdb-5.1.so libfreetype.so.6.6.2 libfreetype.so.6 - ) + ) endif( NOT ND_BUILD64BIT_ARCH ) if( NOT ND_USE_OPENJPEG2 ) set(release_files ${release_files} libopenjpeg.so ) @@ -258,6 +273,11 @@ elseif(LINUX) set(release_files ${release_files} "libtcmalloc_minimal.so") endif (USE_TCMALLOC) + if (FMODSTUDIO) + set(debug_files ${debug_files} "libfmodL.so") + set(release_files ${release_files} "libfmod.so") + endif (FMODSTUDIO) + #if (FMODEX) # set(debug_files ${debug_files} "libfmodexL.so") # set(release_files ${release_files} "libfmodex.so") diff --git a/indra/cmake/FMODEX.cmake b/indra/cmake/FMODEX.cmake index 06f7ecff81..21fd92016b 100644 --- a/indra/cmake/FMODEX.cmake +++ b/indra/cmake/FMODEX.cmake @@ -1,6 +1,6 @@ # -*- cmake -*- -# FMOD can be set when launching the make using the argument -DFMOD:BOOL=ON +# FMOD can be set when launching the make using the argument -DFMODEX:BOOL=ON # When building using proprietary binaries though (i.e. having access to LL private servers), # we always build with FMODEX. # Open source devs should use the -DFMODEX:BOOL=ON then if they want to build with FMOD, whether diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake new file mode 100644 index 0000000000..bbf7bb7ff9 --- /dev/null +++ b/indra/cmake/FMODSTUDIO.cmake @@ -0,0 +1,53 @@ +# -*- cmake -*- + +# FMOD can be set when launching the make using the argument -DFMODSTUDIO:BOOL=ON +# When building using proprietary binaries though (i.e. having access to LL private servers), +# we always build with FMODSTUDIO. +# Open source devs should use the -DFMODSTUDIO:BOOL=ON then if they want to build with FMOD, whether +# they are using USESYSTEMLIBS or not. +if (INSTALL_PROPRIETARY) + set(FMODSTUDIO ON CACHE BOOL "Using FMOD Studio sound library.") +endif (INSTALL_PROPRIETARY) + + +if (FMODSTUDIO) + if (USESYSTEMLIBS) + # In that case, we use the version of the library installed on the system + set(FMODSTUDIO_FIND_REQUIRED ON) + include(FindFMODSTUDIO) + else (USESYSTEMLIBS) + if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) + # If the path have been specified in the arguments, use that + set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY}) + MESSAGE(STATUS "Using FMODSTUDIO path: ${FMODSTUDIO_LIBRARIES}, ${FMODSTUDIO_INCLUDE_DIR}") + else (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) + # If not, we're going to try to get the package listed in autobuild.xml + # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL) + # as accessing the private LL location will fail if you don't have the credential + include(Prebuilt) + use_prebuilt_binary(fmodstudio) + if (WINDOWS) + if (NOT ND_BUILD64BIT_ARCH) + set(FMODSTUDIO_LIBRARY + debug fmodL_vc + optimized fmod_vc) + elseif (ND_BUILD64BIT_ARCH) + set(FMODSTUDIO_LIBRARY + debug fmodL64_vc + optimized fmod64_vc) + endif(NOT ND_BUILD64BIT_ARCH) + elseif (DARWIN) + set(FMODSTUDIO_LIBRARY + debug fmodL + optimized fmod) + elseif (LINUX) + set(FMODSTUDIO_LIBRARY + debug fmodL + optimized fmod) + endif (WINDOWS) + set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY}) + set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio) + endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) + endif (USESYSTEMLIBS) +endif (FMODSTUDIO) + diff --git a/indra/cmake/FindFMODSTUDIO.cmake b/indra/cmake/FindFMODSTUDIO.cmake new file mode 100644 index 0000000000..4562b0ae45 --- /dev/null +++ b/indra/cmake/FindFMODSTUDIO.cmake @@ -0,0 +1,65 @@ +# -*- cmake -*- + +# - Find FMODSTUDIO +# Find the FMODSTUDIO includes and library +# This module defines +# FMODSTUDIO_INCLUDE_DIR, where to find fmod.h and fmod_errors.h +# FMODSTUDIO_LIBRARIES, the libraries needed to use FMODSTUDIO. +# FMODSTUDIO, If false, do not try to use FMODSTUDIO. +# also defined, but not for general use are +# FMODSTUDIO_LIBRARY, where to find the FMODSTUDIO library. + +FIND_PATH(FMODSTUDIO_INCLUDE_DIR fmod.h PATH_SUFFIXES fmod) + +SET(FMODSTUDIO_NAMES ${FMODSTUDIO_NAMES} fmod fmod_vc) +FIND_LIBRARY(FMODSTUDIO_LIBRARY + NAMES ${FMODSTUDIO_NAMES} + PATH_SUFFIXES fmod + ) + +IF (FMODSTUDIO_SDK_DIR OR WINDOWS) + if(WINDOWS) + set(FMODSTUDIO_SDK_DIR "$ENV{PROGRAMFILES}/FMOD SoundSystem/FMOD Programmers API Windows" CACHE PATH "Path to FMODSTUDIO") + STRING(REGEX REPLACE "\\\\" "/" FMODSTUDIO_SDK_DIR ${FMODSTUDIO_SDK_DIR}) + endif(WINDOWS) + find_library(FMODSTUDIO_LIBRARY + fmod_vc fmodL_vc + PATHS + ${FMODSTUDIO_SDK_DIR}/api/lib + ${FMODSTUDIO_SDK_DIR}/api + ${FMODSTUDIO_SDK_DIR} + ) + find_path(FMODSTUDIO_INCLUDE_DIR fmod.h + ${FMODSTUDIO_SDK_DIR}/api/inc + ${FMODSTUDIO_SDK_DIR}/api + ${FMODSTUDIO_SDK_DIR} + ) + find_path(FMODSTUDIO_INCLUDE_DIR fmod.h + ${FMODSTUDIO_SDK_DIR}/api/inc + ${FMODSTUDIO_SDK_DIR}/api + ${FMODSTUDIO_SDK_DIR} + ) + IF (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) + SET(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY}) + SET(FMODSTUDIO_FOUND "YES") + endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) +ENDIF (FMODSTUDIO_SDK_DIR OR WINDOWS) + +IF (FMODSTUDIO_FOUND) + IF (NOT FMODSTUDIO_FIND_QUIETLY) + MESSAGE(STATUS "Found FMODSTUDIO: ${FMODSTUDIO_LIBRARIES}") + ENDIF (NOT FMODSTUDIO_FIND_QUIETLY) +ELSE (FMODSTUDIO_FOUND) + IF (FMODSTUDIO_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find FMODSTUDIO library") + ENDIF (FMODSTUDIO_FIND_REQUIRED) +ENDIF (FMODSTUDIO_FOUND) + +# Deprecated declarations. +SET (NATIVE_FMODSTUDIO_INCLUDE_PATH ${FMODSTUDIO_INCLUDE_DIR} ) +GET_FILENAME_COMPONENT (NATIVE_FMODSTUDIO_LIB_PATH ${FMODSTUDIO_LIBRARY} PATH) + +MARK_AS_ADVANCED( + FMODSTUDIO_LIBRARY + FMODSTUDIO_INCLUDE_DIR + ) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 4c8ea563e1..a320d61209 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -177,7 +177,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_OSX_SYSROOT macosx10.9) message(STATUS "OS X SDK 10.9 found.") else(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk") - error("Unable to determine which OS X SDK to use. Giving up.") + message(FATAL_ERROR "Unable to determine which OS X SDK to use. Giving up.") endif(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk") set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt index 9f9ca6c39c..6f2087d580 100644 --- a/indra/edit-me-to-trigger-new-build.txt +++ b/indra/edit-me-to-trigger-new-build.txt @@ -1,4 +1,2 @@ 2014-02-25 10:34 - - diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index e943dd5d5c..0df1be69b9 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -4,6 +4,7 @@ project(llaudio) include(00-Common) include(LLAudio) +include(FMODSTUDIO) include(FMODEX) include(OPENAL) include(LLCommon) @@ -42,6 +43,23 @@ set(llaudio_HEADER_FILES llwindgen.h ) +if (FMODSTUDIO) + include_directories( + ${FMODSTUDIO_INCLUDE_DIR} + ) + list(APPEND llaudio_SOURCE_FILES + llaudioengine_fmodstudio.cpp + lllistener_fmodstudio.cpp + llstreamingaudio_fmodstudio.cpp + ) + + list(APPEND llaudio_HEADER_FILES + llaudioengine_fmodstudio.h + lllistener_fmodstudio.h + llstreamingaudio_fmodstudio.h + ) +endif (FMODSTUDIO) + if (FMODEX) include_directories( ${FMODEX_INCLUDE_DIR} diff --git a/indra/llaudio/llaudioengine_fmodstudio.cpp b/indra/llaudio/llaudioengine_fmodstudio.cpp new file mode 100644 index 0000000000..e55485bb02 --- /dev/null +++ b/indra/llaudio/llaudioengine_fmodstudio.cpp @@ -0,0 +1,753 @@ +/** + * @file audioengine_fmodstudio.cpp + * @brief Implementation of LLAudioEngine class abstracting the audio + * support as a FMOD Studio implementation + * + * $LicenseInfo:firstyear=2014&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2014, 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 "linden_common.h" + +#include "llstreamingaudio.h" +#include "llstreamingaudio_fmodstudio.h" + +#include "llaudioengine_fmodstudio.h" +#include "lllistener_fmodstudio.h" + +#include "llerror.h" +#include "llmath.h" +#include "llrand.h" + +#include "fmod.hpp" +#include "fmod_errors.h" +#include "lldir.h" + +#include "sound_ids.h" + +#include "indra_constants.h" + +const U32 EXTRA_SOUND_CHANNELS = 10; + +FMOD_RESULT F_CALLBACK windDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels); + +FMOD::ChannelGroup *LLAudioEngine_FMODSTUDIO::mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT] = {0}; + +LLAudioEngine_FMODSTUDIO::LLAudioEngine_FMODSTUDIO(bool enable_profiler, U32 resample_method) + : mInited(false) + , mWindGen(NULL) + , mWindDSPDesc(NULL) + , mWindDSP(NULL) + , mSystem(NULL) + , mEnableProfiler(enable_profiler) + , mResampleMethod(resample_method) +{ +} + +LLAudioEngine_FMODSTUDIO::~LLAudioEngine_FMODSTUDIO() +{ +} + +static inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string) +{ + if(result == FMOD_OK) + return false; + + if (result != FMOD_ERR_INVALID_HANDLE) + { + LL_WARNS() << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL; + } + else + { + LL_DEBUGS() << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL; + } + + return true; +} + +bool LLAudioEngine_FMODSTUDIO::init(const S32 num_channels, void* userdata) +{ + U32 version; + FMOD_RESULT result; + + LL_DEBUGS("AppInit") << "LLAudioEngine_FMODSTUDIO::init() initializing FMOD" << LL_ENDL; + + result = FMOD::System_Create(&mSystem); + if(Check_FMOD_Error(result, "FMOD::System_Create")) + return false; + + //will call LLAudioEngine_FMODSTUDIO::allocateListener, which needs a valid mSystem pointer. + LLAudioEngine::init(num_channels, userdata); + + result = mSystem->getVersion(&version); + Check_FMOD_Error(result, "FMOD::System::getVersion"); + + if (version < FMOD_VERSION) + { + LL_WARNS("AppInit") << "Error : You are using the wrong FMOD Studio version (" << version + << ")! You should be using FMOD Studio" << FMOD_VERSION << LL_ENDL; + } + + // In this case, all sounds, PLUS wind and stream will be software. + result = mSystem->setSoftwareChannels(num_channels + EXTRA_SOUND_CHANNELS); + Check_FMOD_Error(result,"FMOD::System::setSoftwareChannels"); + + FMOD_ADVANCEDSETTINGS adv_settings = { }; + adv_settings.cbSize = sizeof(FMOD_ADVANCEDSETTINGS); + switch (mResampleMethod) + { + default: + case RESAMPLE_LINEAR: + adv_settings.resamplerMethod = FMOD_DSP_RESAMPLER_LINEAR; + break; + case RESAMPLE_CUBIC: + adv_settings.resamplerMethod = FMOD_DSP_RESAMPLER_CUBIC; + break; + case RESAMPLE_SPLINE: + adv_settings.resamplerMethod = FMOD_DSP_RESAMPLER_SPLINE; + break; + } + + result = mSystem->setAdvancedSettings(&adv_settings); + Check_FMOD_Error(result, "FMOD::System::setAdvancedSettings"); + + U32 fmod_flags = FMOD_INIT_NORMAL | FMOD_INIT_3D_RIGHTHANDED | FMOD_INIT_THREAD_UNSAFE; + if(mEnableProfiler) + { + fmod_flags |= FMOD_INIT_PROFILE_ENABLE; + } + +#if LL_LINUX + bool audio_ok = false; + + if (!audio_ok) + { + if (NULL == getenv("LL_BAD_FMOD_PULSEAUDIO")) /*Flawfinder: ignore*/ + { + LL_DEBUGS("AppInit") << "Trying PulseAudio audio output..." << LL_ENDL; + if((result = mSystem->setOutput(FMOD_OUTPUTTYPE_PULSEAUDIO)) == FMOD_OK && + (result = mSystem->init(num_channels + EXTRA_SOUND_CHANNELS, fmod_flags, const_cast(APP_NAME.c_str()))) == FMOD_OK) + { + LL_DEBUGS("AppInit") << "PulseAudio output initialized OKAY" << LL_ENDL; + audio_ok = true; + } + else + { + Check_FMOD_Error(result, "PulseAudio audio output FAILED to initialize"); + } + } + else + { + LL_DEBUGS("AppInit") << "PulseAudio audio output SKIPPED" << LL_ENDL; + } + } + if (!audio_ok) + { + if (NULL == getenv("LL_BAD_FMOD_ALSA")) /*Flawfinder: ignore*/ + { + LL_DEBUGS("AppInit") << "Trying ALSA audio output..." << LL_ENDL; + if((result = mSystem->setOutput(FMOD_OUTPUTTYPE_ALSA)) == FMOD_OK && + (result = mSystem->init(num_channels + EXTRA_SOUND_CHANNELS, fmod_flags, 0)) == FMOD_OK) + { + LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL; + audio_ok = true; + } + else + { + Check_FMOD_Error(result, "ALSA audio output FAILED to initialize"); + } + } + else + { + LL_DEBUGS("AppInit") << "ALSA audio output SKIPPED" << LL_ENDL; + } + } + if (!audio_ok) + { + LL_WARNS("AppInit") << "Overall audio init failure." << LL_ENDL; + return false; + } + + // We're interested in logging which output method we + // ended up with, for QA purposes. + FMOD_OUTPUTTYPE output_type; + if(!Check_FMOD_Error(mSystem->getOutput(&output_type), "FMOD::System::getOutput")) + { + switch (output_type) + { + case FMOD_OUTPUTTYPE_NOSOUND: + LL_INFOS("AppInit") << "Audio output: NoSound" << LL_ENDL; break; + case FMOD_OUTPUTTYPE_PULSEAUDIO: + LL_INFOS("AppInit") << "Audio output: PulseAudio" << LL_ENDL; break; + case FMOD_OUTPUTTYPE_ALSA: + LL_INFOS("AppInit") << "Audio output: ALSA" << LL_ENDL; break; + default: + LL_INFOS("AppInit") << "Audio output: Unknown!" << LL_ENDL; break; + }; + } +#else // LL_LINUX + + // initialize the FMOD engine + result = mSystem->init( num_channels + EXTRA_SOUND_CHANNELS, fmod_flags, 0); + if (result == FMOD_ERR_OUTPUT_CREATEBUFFER) + { + /* + Ok, the speaker mode selected isn't supported by this soundcard. Switch it + back to stereo... + */ + result = mSystem->setSoftwareFormat(44100, FMOD_SPEAKERMODE_STEREO, 0); + Check_FMOD_Error(result,"Error falling back to stereo mode"); + /* + ... and re-init. + */ + result = mSystem->init( num_channels + EXTRA_SOUND_CHANNELS, fmod_flags, 0); + } + if(Check_FMOD_Error(result, "Error initializing FMOD Studio")) + return false; +#endif + + if (mEnableProfiler) + { + Check_FMOD_Error(mSystem->createChannelGroup("None", &mChannelGroups[AUDIO_TYPE_NONE]), "FMOD::System::createChannelGroup"); + Check_FMOD_Error(mSystem->createChannelGroup("SFX", &mChannelGroups[AUDIO_TYPE_SFX]), "FMOD::System::createChannelGroup"); + Check_FMOD_Error(mSystem->createChannelGroup("UI", &mChannelGroups[AUDIO_TYPE_UI]), "FMOD::System::createChannelGroup"); + Check_FMOD_Error(mSystem->createChannelGroup("Ambient", &mChannelGroups[AUDIO_TYPE_AMBIENT]), "FMOD::System::createChannelGroup"); + } + + // set up our favourite FMOD-native streaming audio implementation if none has already been added + if (!getStreamingAudioImpl()) // no existing implementation added + setStreamingAudioImpl(new LLStreamingAudio_FMODSTUDIO(mSystem)); + + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init() FMOD Studio initialized correctly" << LL_ENDL; + + FMOD_ADVANCEDSETTINGS adv_settings_dump = { }; + mSystem->getAdvancedSettings(&adv_settings_dump); + + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): resampler=" << adv_settings.resamplerMethod << " bytes" << LL_ENDL; + + int r_numbuffers, r_samplerate, r_channels; + unsigned int r_bufferlength; + mSystem->getDSPBufferSize(&r_bufferlength, &r_numbuffers); + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): r_bufferlength=" << r_bufferlength << " bytes" << LL_ENDL; + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): r_numbuffers=" << r_numbuffers << LL_ENDL; + + char r_name[512]; + mSystem->getDriverInfo(0, r_name, 511, NULL, &r_samplerate, NULL, &r_channels); + r_name[511] = '\0'; + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): r_name=\"" << r_name << "\"" << LL_ENDL; + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): r_samplerate=" << r_samplerate << "Hz" << LL_ENDL; + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): r_channels=" << r_channels << LL_ENDL; + + int latency = 100; // optimistic default - i suspect if sample rate is 0, everything breaks. + if ( r_samplerate != 0 ) + latency = (int)(1000.0f * r_bufferlength * r_numbuffers / r_samplerate); + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): latency=" << latency << "ms" << LL_ENDL; + + mInited = true; + + LL_INFOS("AppInit") << "LLAudioEngine_FMODSTUDIO::init(): initialization complete." << LL_ENDL; + + return true; +} + + +std::string LLAudioEngine_FMODSTUDIO::getDriverName(bool verbose) +{ + llassert_always(mSystem); + if (verbose) + { + U32 version; + if(!Check_FMOD_Error(mSystem->getVersion(&version), "FMOD::System::getVersion")) + { + return llformat("FMOD Studio %1x.%02x.%02x", version >> 16, version >> 8 & 0x000000FF, version & 0x000000FF); + } + } + return "FMOD Studio"; +} + + +void LLAudioEngine_FMODSTUDIO::allocateListener(void) +{ + try + { + mListenerp = (LLListener *) new LLListener_FMODSTUDIO(mSystem); + } + catch (const std::bad_alloc& e) + { + LL_WARNS() << "Listener allocation failed due to: " << e.what() << LL_ENDL; + } +} + + +void LLAudioEngine_FMODSTUDIO::shutdown() +{ + LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL; + LLAudioEngine::shutdown(); + + LL_INFOS() << "LLAudioEngine_FMODSTUDIO::shutdown() closing FMOD Studio" << LL_ENDL; + if ( mSystem ) // speculative fix for MAINT-2657 + { + Check_FMOD_Error(mSystem->close(), "FMOD::System::close"); + Check_FMOD_Error(mSystem->release(), "FMOD::System::release"); + } + LL_INFOS() << "LLAudioEngine_FMODSTUDIO::shutdown() done closing FMOD Studio" << LL_ENDL; + + delete mListenerp; + mListenerp = NULL; +} + + +LLAudioBuffer * LLAudioEngine_FMODSTUDIO::createBuffer() +{ + return new LLAudioBufferFMODSTUDIO(mSystem); +} + + +LLAudioChannel * LLAudioEngine_FMODSTUDIO::createChannel() +{ + return new LLAudioChannelFMODSTUDIO(mSystem); +} + +bool LLAudioEngine_FMODSTUDIO::initWind() +{ + mNextWindUpdate = 0.0; + + cleanupWind(); + + mWindDSPDesc = new FMOD_DSP_DESCRIPTION(); + memset(mWindDSPDesc, 0, sizeof(*mWindDSPDesc)); //Set everything to zero + mWindDSPDesc->pluginsdkversion = FMOD_PLUGIN_SDK_VERSION; + strncpy(mWindDSPDesc->name, "Wind Unit", sizeof(mWindDSPDesc->name)); //Set name to "Wind Unit" + mWindDSPDesc->numoutputbuffers = 1; + mWindDSPDesc->read = &windDSPCallback; //Assign callback. + if (Check_FMOD_Error(mSystem->createDSP(mWindDSPDesc, &mWindDSP), "FMOD::createDSP") || !mWindDSP) + return false; + + int frequency = 44100; + FMOD_SPEAKERMODE mode; + if (!Check_FMOD_Error(mSystem->getSoftwareFormat(&frequency, &mode, nullptr), "FMOD::System::getSoftwareFormat")) + { + mWindGen = new LLWindGen((U32)frequency); + + if (!Check_FMOD_Error(mWindDSP->setUserData((void*)mWindGen), "FMOD::DSP::setUserData") && + !Check_FMOD_Error(mWindDSP->setChannelFormat(FMOD_CHANNELMASK_STEREO, 2, mode), "FMOD::DSP::setChannelFormat") && + !Check_FMOD_Error(mSystem->playDSP(mWindDSP, nullptr, false, nullptr), "FMOD::System::playDSP")) + return true; //Success + } + + cleanupWind(); + return false; +} + + +void LLAudioEngine_FMODSTUDIO::cleanupWind() +{ + if (mWindDSP) + { + FMOD::ChannelGroup* mastergroup = NULL; + if (!Check_FMOD_Error(mSystem->getMasterChannelGroup(&mastergroup), "FMOD::System::getMasterChannelGroup") && mastergroup) + Check_FMOD_Error(mastergroup->removeDSP(mWindDSP), "FMOD::ChannelGroup::removeDSP"); + Check_FMOD_Error(mWindDSP->release(), "FMOD::DSP::release"); + mWindDSP = NULL; + } + + delete mWindDSPDesc; + mWindDSPDesc = NULL; + + delete mWindGen; + mWindGen = NULL; +} + + +//----------------------------------------------------------------------- +void LLAudioEngine_FMODSTUDIO::updateWind(LLVector3 wind_vec, F32 camera_height_above_water) +{ + LLVector3 wind_pos; + F64 pitch; + F64 center_freq; + + if (!mEnableWind) + { + return; + } + + if (mWindUpdateTimer.checkExpirationAndReset(LL_WIND_UPDATE_INTERVAL)) + { + + // wind comes in as Linden coordinate (+X = forward, +Y = left, +Z = up) + // need to convert this to the conventional orientation DS3D and OpenAL use + // where +X = right, +Y = up, +Z = backwards + + wind_vec.setVec(-wind_vec.mV[1], wind_vec.mV[2], -wind_vec.mV[0]); + + // cerr << "Wind update" << endl; + + pitch = 1.0 + mapWindVecToPitch(wind_vec); + center_freq = 80.0 * pow(pitch,2.5*(mapWindVecToGain(wind_vec)+1.0)); + + mWindGen->mTargetFreq = (F32)center_freq; + mWindGen->mTargetGain = (F32)mapWindVecToGain(wind_vec) * mMaxWindGain; + mWindGen->mTargetPanGainR = (F32)mapWindVecToPan(wind_vec); + } +} + +//----------------------------------------------------------------------- +void LLAudioEngine_FMODSTUDIO::setInternalGain(F32 gain) +{ + if (!mInited) + { + return; + } + + gain = llclamp( gain, 0.0f, 1.0f ); + + FMOD::ChannelGroup *master_group; + if(Check_FMOD_Error(mSystem->getMasterChannelGroup(&master_group), "FMOD::System::getMasterChannelGroup")) + return; + + master_group->setVolume(gain); + + LLStreamingAudioInterface *saimpl = getStreamingAudioImpl(); + if ( saimpl ) + { + // fmod likes its streaming audio channel gain re-asserted after + // master volume change. + saimpl->setGain(saimpl->getGain()); + } +} + +// +// LLAudioChannelFMODSTUDIO implementation +// + +LLAudioChannelFMODSTUDIO::LLAudioChannelFMODSTUDIO(FMOD::System *system) : LLAudioChannel(), mSystemp(system), mChannelp(NULL), mLastSamplePos(0) +{ +} + + +LLAudioChannelFMODSTUDIO::~LLAudioChannelFMODSTUDIO() +{ + cleanup(); +} + +bool LLAudioChannelFMODSTUDIO::updateBuffer() +{ + if (mCurrentSourcep) + { + if (LLAudioChannel::updateBuffer()) + { + // Base class update returned true, which means that we need to actually + // set up the channel for a different buffer. + + LLAudioBufferFMODSTUDIO *bufferp = (LLAudioBufferFMODSTUDIO *) mCurrentSourcep->getCurrentBuffer(); + + // Grab the FMOD sample associated with the buffer + FMOD::Sound *soundp = bufferp->getSound(); + if (!soundp) + { + // This is bad, there should ALWAYS be a sound associated with a legit + // buffer. + LL_ERRS() << "No FMOD sound!" << LL_ENDL; + return false; + } + + + // Actually play the sound. Start it off paused so we can do all the necessary + // setup. + if (!mChannelp) + { + FMOD_RESULT result = getSystem()->playSound(soundp, nullptr, true, &mChannelp); + Check_FMOD_Error(result, "FMOD::System::playSound"); + } + + //LL_INFOS() << "Setting up channel " << std::hex << mChannelID << std::dec << LL_ENDL; + } + + //FMOD_RESULT result; + + mChannelp->setVolume(getSecondaryGain() * mCurrentSourcep->getGain()); + //Check_FMOD_Error(result, "FMOD::Channel::setVolume"); + + mChannelp->setMode(mCurrentSourcep->isLoop() ? FMOD_LOOP_NORMAL : FMOD_LOOP_OFF); + /*if(Check_FMOD_Error(result, "FMOD::Channel::setMode")) + { + S32 index; + mChannelp->getIndex(&index); + LL_WARNS() << "Channel " << index << "Source ID: " << mCurrentSourcep->getID() + << " at " << mCurrentSourcep->getPositionGlobal() << LL_ENDL; + }*/ + } + else + { + LL_DEBUGS() << "No source buffer!" << LL_ENDL; + return false; + } + + return true; +} + + +void LLAudioChannelFMODSTUDIO::update3DPosition() +{ + if (!mChannelp) + { + // We're not actually a live channel (i.e., we're not playing back anything) + return; + } + + LLAudioBufferFMODSTUDIO *bufferp = (LLAudioBufferFMODSTUDIO *)mCurrentBufferp; + if (!bufferp) + { + // We don't have a buffer associated with us (should really have been picked up + // by the above if. + return; + } + + if (mCurrentSourcep->isAmbient()) + { + // Ambient sound, don't need to do any positional updates. + set3DMode(false); + } + else + { + // Localized sound. Update the position and velocity of the sound. + set3DMode(true); + + LLVector3 float_pos; + float_pos.setVec(mCurrentSourcep->getPositionGlobal()); + FMOD_RESULT result = mChannelp->set3DAttributes((FMOD_VECTOR*)float_pos.mV, (FMOD_VECTOR*)mCurrentSourcep->getVelocity().mV); + Check_FMOD_Error(result, "FMOD::Channel::set3DAttributes"); + } +} + + +void LLAudioChannelFMODSTUDIO::updateLoop() +{ + if (!mChannelp) + { + // May want to clear up the loop/sample counters. + return; + } + + // + // Hack: We keep track of whether we looped or not by seeing when the + // sample position looks like it's going backwards. Not reliable; may + // yield false negatives. + // + U32 cur_pos; + Check_FMOD_Error(mChannelp->getPosition(&cur_pos,FMOD_TIMEUNIT_PCMBYTES),"FMOD::Channel::getPosition"); + + if (cur_pos < (U32)mLastSamplePos) + { + mLoopedThisFrame = true; + } + mLastSamplePos = cur_pos; +} + + +void LLAudioChannelFMODSTUDIO::cleanup() +{ + if (!mChannelp) + { + //LL_INFOS() << "Aborting cleanup with no channel handle." << LL_ENDL; + return; + } + + //LL_INFOS() << "Cleaning up channel: " << mChannelID << LL_ENDL; + Check_FMOD_Error(mChannelp->stop(),"FMOD::Channel::stop"); + + mCurrentBufferp = NULL; + mChannelp = NULL; +} + + +void LLAudioChannelFMODSTUDIO::play() +{ + if (!mChannelp) + { + LL_WARNS() << "Playing without a channel handle, aborting" << LL_ENDL; + return; + } + + Check_FMOD_Error(mChannelp->setPaused(false), "FMOD::Channel::setPaused"); + + getSource()->setPlayedOnce(true); + + if(LLAudioEngine_FMODSTUDIO::mChannelGroups[getSource()->getType()]) + Check_FMOD_Error(mChannelp->setChannelGroup(LLAudioEngine_FMODSTUDIO::mChannelGroups[getSource()->getType()]),"FMOD::Channel::setChannelGroup"); +} + + +void LLAudioChannelFMODSTUDIO::playSynced(LLAudioChannel *channelp) +{ + LLAudioChannelFMODSTUDIO *fmod_channelp = (LLAudioChannelFMODSTUDIO*)channelp; + if (!(fmod_channelp->mChannelp && mChannelp)) + { + // Don't have channels allocated to both the master and the slave + return; + } + + U32 cur_pos; + if(Check_FMOD_Error(mChannelp->getPosition(&cur_pos,FMOD_TIMEUNIT_PCMBYTES), "Unable to retrieve current position")) + return; + + cur_pos %= mCurrentBufferp->getLength(); + + // Try to match the position of our sync master + Check_FMOD_Error(mChannelp->setPosition(cur_pos,FMOD_TIMEUNIT_PCMBYTES),"Unable to set current position"); + + // Start us playing + play(); +} + + +bool LLAudioChannelFMODSTUDIO::isPlaying() +{ + if (!mChannelp) + { + return false; + } + + bool paused, playing; + Check_FMOD_Error(mChannelp->getPaused(&paused),"FMOD::Channel::getPaused"); + Check_FMOD_Error(mChannelp->isPlaying(&playing),"FMOD::Channel::isPlaying"); + return !paused && playing; +} + + +// +// LLAudioChannelFMODSTUDIO implementation +// + + +LLAudioBufferFMODSTUDIO::LLAudioBufferFMODSTUDIO(FMOD::System *system) : mSystemp(system), mSoundp(NULL) +{ +} + + +LLAudioBufferFMODSTUDIO::~LLAudioBufferFMODSTUDIO() +{ + if(mSoundp) + { + Check_FMOD_Error(mSoundp->release(),"FMOD::Sound::Release"); + mSoundp = NULL; + } +} + + +bool LLAudioBufferFMODSTUDIO::loadWAV(const std::string& filename) +{ + // Try to open a wav file from disk. This will eventually go away, as we don't + // really want to block doing this. + if (filename.empty()) + { + // invalid filename, abort. + return false; + } + + if (!gDirUtilp->fileExists(filename)) + { + // File not found, abort. + return false; + } + + if (mSoundp) + { + // If there's already something loaded in this buffer, clean it up. + Check_FMOD_Error(mSoundp->release(),"FMOD::Sound::release"); + mSoundp = NULL; + } + + FMOD_MODE base_mode = FMOD_LOOP_NORMAL; + FMOD_CREATESOUNDEXINFO exinfo; + memset(&exinfo,0,sizeof(exinfo)); + exinfo.cbsize = sizeof(exinfo); + exinfo.suggestedsoundtype = FMOD_SOUND_TYPE_WAV; //Hint to speed up loading. + // Load up the wav file into an fmod sample + FMOD_RESULT result = getSystem()->createSound(filename.c_str(), base_mode, &exinfo, &mSoundp); + if (result != FMOD_OK) + { + // We failed to load the file for some reason. + LL_WARNS() << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << LL_ENDL; + + // + // If we EVER want to load wav files provided by end users, we need + // to rethink this! + // + // file is probably corrupt - remove it. + LLFile::remove(filename); + return false; + } + + // Everything went well, return true + return true; +} + + +U32 LLAudioBufferFMODSTUDIO::getLength() +{ + if (!mSoundp) + { + return 0; + } + + U32 length; + Check_FMOD_Error(mSoundp->getLength(&length, FMOD_TIMEUNIT_PCMBYTES),"FMOD::Sound::getLength"); + return length; +} + + +void LLAudioChannelFMODSTUDIO::set3DMode(bool use3d) +{ + FMOD_MODE current_mode; + if(Check_FMOD_Error(mChannelp->getMode(¤t_mode),"FMOD::Channel::getMode")) + return; + FMOD_MODE new_mode = current_mode; + new_mode &= ~(use3d ? FMOD_2D : FMOD_3D); + new_mode |= use3d ? FMOD_3D : FMOD_2D; + + if(current_mode != new_mode) + { + Check_FMOD_Error(mChannelp->setMode(new_mode),"FMOD::Channel::setMode"); + } +} + +// *NOTE: This is almost certainly being called on the mixer thread, +// not the main thread. May have implications for callees or audio +// engine shutdown. + +FMOD_RESULT F_CALLBACK windDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels) +{ + // inbuffer = incomming data. + // newbuffer = outgoing data. AKA this DSP's output. + // length = length in samples at this mix time. True buffer size, in bytes, would be (length * sizeof(float) * inchannels). + // userdata = user-provided data attached this DSP via FMOD::DSP::setUserData. + + LLWindGen *windgen; + FMOD::DSP *thisdsp = (FMOD::DSP *)dsp_state->instance; + + thisdsp->getUserData((void **)&windgen); + + if (windgen) + windgen->windGenerate((LLAudioEngine_FMODSTUDIO::MIXBUFFERFORMAT *)outbuffer, length); + + return FMOD_OK; +} diff --git a/indra/llaudio/llaudioengine_fmodstudio.h b/indra/llaudio/llaudioengine_fmodstudio.h new file mode 100644 index 0000000000..fb1b8ae2cd --- /dev/null +++ b/indra/llaudio/llaudioengine_fmodstudio.h @@ -0,0 +1,137 @@ +/** + * @file audioengine_fmodstudio.h + * @brief Definition of LLAudioEngine class abstracting the audio + * support as a FMOD Studio implementation + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2014, 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_AUDIOENGINE_FMODSTUDIO_H +#define LL_AUDIOENGINE_FMODSTUDIO_H + +#include "llaudioengine.h" +#include "llwindgen.h" + +//Stubs +class LLAudioStreamManagerFMODSTUDIO; +namespace FMOD +{ + class System; + class Channel; + class ChannelGroup; + class Sound; + class DSP; +} +typedef struct FMOD_DSP_DESCRIPTION FMOD_DSP_DESCRIPTION; + +//Interfaces +class LLAudioEngine_FMODSTUDIO : public LLAudioEngine +{ +public: + enum + { + RESAMPLE_LINEAR=0, + RESAMPLE_CUBIC, + RESAMPLE_SPLINE + }; + LLAudioEngine_FMODSTUDIO(bool enable_profiler, U32 resample_method); + virtual ~LLAudioEngine_FMODSTUDIO(); + + // initialization/startup/shutdown + virtual bool init(const S32 num_channels, void *user_data); + virtual std::string getDriverName(bool verbose); + virtual void allocateListener(); + + virtual void shutdown(); + + /*virtual*/ bool initWind(); + /*virtual*/ void cleanupWind(); + + /*virtual*/void updateWind(LLVector3 direction, F32 camera_height_above_water); + + typedef F32 MIXBUFFERFORMAT; + + FMOD::System *getSystem() const {return mSystem;} +protected: + /*virtual*/ LLAudioBuffer *createBuffer(); // Get a free buffer, or flush an existing one if you have to. + /*virtual*/ LLAudioChannel *createChannel(); // Create a new audio channel. + + /*virtual*/ void setInternalGain(F32 gain); + + bool mInited; + + LLWindGen *mWindGen; + + FMOD_DSP_DESCRIPTION *mWindDSPDesc; + FMOD::DSP *mWindDSP; + FMOD::System *mSystem; + bool mEnableProfiler; + U32 mResampleMethod; + +public: + static FMOD::ChannelGroup *mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT]; +}; + + +class LLAudioChannelFMODSTUDIO : public LLAudioChannel +{ +public: + LLAudioChannelFMODSTUDIO(FMOD::System *audioengine); + virtual ~LLAudioChannelFMODSTUDIO(); + +protected: + /*virtual*/ void play(); + /*virtual*/ void playSynced(LLAudioChannel *channelp); + /*virtual*/ void cleanup(); + /*virtual*/ bool isPlaying(); + + /*virtual*/ bool updateBuffer(); + /*virtual*/ void update3DPosition(); + /*virtual*/ void updateLoop(); + + void set3DMode(bool use3d); +protected: + FMOD::System *getSystem() const {return mSystemp;} + FMOD::System *mSystemp; + FMOD::Channel *mChannelp; + S32 mLastSamplePos; +}; + + +class LLAudioBufferFMODSTUDIO : public LLAudioBuffer +{ +public: + LLAudioBufferFMODSTUDIO(FMOD::System *audioengine); + virtual ~LLAudioBufferFMODSTUDIO(); + + /*virtual*/ bool loadWAV(const std::string& filename); + /*virtual*/ U32 getLength(); + friend class LLAudioChannelFMODSTUDIO; +protected: + FMOD::System *getSystem() const {return mSystemp;} + FMOD::System *mSystemp; + FMOD::Sound *getSound() const{ return mSoundp; } + FMOD::Sound *mSoundp; +}; + + +#endif // LL_AUDIOENGINE_FMODSTUDIO_H diff --git a/indra/llaudio/lllistener_fmodstudio.cpp b/indra/llaudio/lllistener_fmodstudio.cpp new file mode 100644 index 0000000000..f5a10442dc --- /dev/null +++ b/indra/llaudio/lllistener_fmodstudio.cpp @@ -0,0 +1,127 @@ +/** + * @file listener_fmodstudio.cpp + * @brief Implementation of LISTENER class abstracting the audio + * support as a FMOD Studio implementation + * + * $LicenseInfo:firstyear=2002&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 "linden_common.h" +#include "llaudioengine.h" +#include "lllistener_fmodstudio.h" +#include "fmod.hpp" + +//----------------------------------------------------------------------- +// constructor +//----------------------------------------------------------------------- +LLListener_FMODSTUDIO::LLListener_FMODSTUDIO(FMOD::System *system) + : LLListener(), + mDopplerFactor(1.0f), + mRolloffFactor(1.0f) +{ + mSystem = system; +} + +//----------------------------------------------------------------------- +LLListener_FMODSTUDIO::~LLListener_FMODSTUDIO() +{ +} + +//----------------------------------------------------------------------- +void LLListener_FMODSTUDIO::translate(LLVector3 offset) +{ + LLListener::translate(offset); + + mSystem->set3DListenerAttributes(0, (FMOD_VECTOR*)mPosition.mV, NULL, NULL, NULL); +} + +//----------------------------------------------------------------------- +void LLListener_FMODSTUDIO::setPosition(LLVector3 pos) +{ + LLListener::setPosition(pos); + + mSystem->set3DListenerAttributes(0, (FMOD_VECTOR*)mPosition.mV, NULL, NULL, NULL); +} + +//----------------------------------------------------------------------- +void LLListener_FMODSTUDIO::setVelocity(LLVector3 vel) +{ + LLListener::setVelocity(vel); + + mSystem->set3DListenerAttributes(0, NULL, (FMOD_VECTOR*)mVelocity.mV, NULL, NULL); +} + +//----------------------------------------------------------------------- +void LLListener_FMODSTUDIO::orient(LLVector3 up, LLVector3 at) +{ + LLListener::orient(up, at); + + mSystem->set3DListenerAttributes(0, NULL, NULL, (FMOD_VECTOR*)at.mV, (FMOD_VECTOR*)up.mV); +} + +//----------------------------------------------------------------------- +void LLListener_FMODSTUDIO::commitDeferredChanges() +{ + if(!mSystem) + { + return; + } + + mSystem->update(); +} + + +void LLListener_FMODSTUDIO::setRolloffFactor(F32 factor) +{ + //An internal FMOD Studio optimization skips 3D updates if there have not been changes to the 3D sound environment. + //Sadly, a change in rolloff is not accounted for, thus we must touch the listener properties as well. + //In short: Changing the position ticks a dirtyflag inside fmod studio, which makes it not skip 3D processing next update call. + if(mRolloffFactor != factor) + { + LLVector3 tmp_pos = mPosition - LLVector3(0.f,0.f,.1f); + mSystem->set3DListenerAttributes(0, (FMOD_VECTOR*) tmp_pos.mV, NULL, NULL, NULL); + mSystem->set3DListenerAttributes(0, (FMOD_VECTOR*) mPosition.mV, NULL, NULL, NULL); + } + mRolloffFactor = factor; + mSystem->set3DSettings(mDopplerFactor, 1.f, mRolloffFactor); +} + + +F32 LLListener_FMODSTUDIO::getRolloffFactor() +{ + return mRolloffFactor; +} + + +void LLListener_FMODSTUDIO::setDopplerFactor(F32 factor) +{ + mDopplerFactor = factor; + mSystem->set3DSettings(mDopplerFactor, 1.f, mRolloffFactor); +} + + +F32 LLListener_FMODSTUDIO::getDopplerFactor() +{ + return mDopplerFactor; +} + + diff --git a/indra/llaudio/lllistener_fmodstudio.h b/indra/llaudio/lllistener_fmodstudio.h new file mode 100644 index 0000000000..ebe42f0e38 --- /dev/null +++ b/indra/llaudio/lllistener_fmodstudio.h @@ -0,0 +1,64 @@ +/** + * @file listener_fmodstudio.h + * @brief Description of LISTENER class abstracting the audio support + * as an FMOD Studio implementation (windows and Linux) + * + * $LicenseInfo:firstyear=2002&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_LISTENER_FMODSTUDIO_H +#define LL_LISTENER_FMODSTUDIO_H + +#include "lllistener.h" + +//Stubs +namespace FMOD +{ + class System; +} + +//Interfaces +class LLListener_FMODSTUDIO : public LLListener +{ + public: + LLListener_FMODSTUDIO(FMOD::System *system); + virtual ~LLListener_FMODSTUDIO(); + + virtual void translate(LLVector3 offset); + virtual void setPosition(LLVector3 pos); + virtual void setVelocity(LLVector3 vel); + virtual void orient(LLVector3 up, LLVector3 at); + virtual void commitDeferredChanges(); + + virtual void setDopplerFactor(F32 factor); + virtual F32 getDopplerFactor(); + virtual void setRolloffFactor(F32 factor); + virtual F32 getRolloffFactor(); + protected: + FMOD::System *mSystem; + F32 mDopplerFactor; + F32 mRolloffFactor; +}; + +#endif + + diff --git a/indra/llaudio/llstreamingaudio_fmodstudio.cpp b/indra/llaudio/llstreamingaudio_fmodstudio.cpp new file mode 100644 index 0000000000..654dcd519a --- /dev/null +++ b/indra/llaudio/llstreamingaudio_fmodstudio.cpp @@ -0,0 +1,526 @@ +/** + * @file streamingaudio_fmodstudio.cpp + * @brief LLStreamingAudio_FMODSTUDIO implementation + * + * $LicenseInfo:firstyear=2002&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 "linden_common.h" + +#include "llmath.h" + +#include "fmod.hpp" +#include "fmod_errors.h" + +#include "llstreamingaudio_fmodstudio.h" + +inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string) +{ + if (result == FMOD_OK) + return false; + LL_WARNS("AudioImpl") << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL; + return true; +} + +class LLAudioStreamManagerFMODSTUDIO +{ +public: + LLAudioStreamManagerFMODSTUDIO(FMOD::System *system, FMOD::ChannelGroup *group, const std::string& url); + FMOD::Channel* startStream(); + bool stopStream(); // Returns true if the stream was successfully stopped. + bool ready(); + + const std::string& getURL() { return mInternetStreamURL; } + + FMOD_RESULT getOpenState(FMOD_OPENSTATE& openstate, unsigned int* percentbuffered = NULL, bool* starving = NULL, bool* diskbusy = NULL); +protected: + FMOD::System* mSystem; + FMOD::ChannelGroup* mChannelGroup; + FMOD::Channel* mStreamChannel; + FMOD::Sound* mInternetStream; + bool mReady; + + std::string mInternetStreamURL; +}; + + + +//--------------------------------------------------------------------------- +// Internet Streaming +//--------------------------------------------------------------------------- +LLStreamingAudio_FMODSTUDIO::LLStreamingAudio_FMODSTUDIO(FMOD::System *system) : + mSystem(system), + mCurrentInternetStreamp(NULL), + mStreamGroup(NULL), + mFMODInternetStreamChannelp(NULL), + mGain(1.0f) +{ + FMOD_RESULT result; + + // Number of milliseconds of audio to buffer for the audio card. + // Must be larger than the usual Second Life frame stutter time. + const U32 buffer_seconds = 10; //sec + const U32 estimated_bitrate = 128; //kbit/sec + result = mSystem->setStreamBufferSize(estimated_bitrate * buffer_seconds * 128/*bytes/kbit*/, FMOD_TIMEUNIT_RAWBYTES); + Check_FMOD_Error(result, "FMOD::System::setStreamBufferSize"); + + Check_FMOD_Error(system->createChannelGroup("stream", &mStreamGroup), "FMOD::System::createChannelGroup"); +} + +LLStreamingAudio_FMODSTUDIO::~LLStreamingAudio_FMODSTUDIO() +{ + stop(); + for (U32 i = 0; i < 100; ++i) + { + if (releaseDeadStreams()) + break; + ms_sleep(10); + } + +} + +void LLStreamingAudio_FMODSTUDIO::start(const std::string& url) +{ + //if (!mInited) + //{ + // LL_WARNS() << "startInternetStream before audio initialized" << LL_ENDL; + // return; + //} + + // "stop" stream but don't clear url, etc. in case url == mInternetStreamURL + stop(); + + if (!url.empty()) + { + if(mDeadStreams.empty()) + { + LL_INFOS() << "Starting internet stream: " << url << LL_ENDL; + mCurrentInternetStreamp = new LLAudioStreamManagerFMODSTUDIO(mSystem, mStreamGroup, url); + mURL = url; + } + else + { + LL_INFOS() << "Deferring stream load until buffer release: " << url << LL_ENDL; + mPendingURL = url; + } + } + else + { + LL_INFOS() << "Set internet stream to null" << LL_ENDL; + mURL.clear(); + } +} + + +void LLStreamingAudio_FMODSTUDIO::update() +{ + if (!releaseDeadStreams()) + { + llassert_always(mCurrentInternetStreamp == NULL); + return; + } + + if(!mPendingURL.empty()) + { + llassert_always(mCurrentInternetStreamp == NULL); + LL_INFOS() << "Starting internet stream: " << mPendingURL << LL_ENDL; + mCurrentInternetStreamp = new LLAudioStreamManagerFMODSTUDIO(mSystem, mStreamGroup, mPendingURL); + mURL = mPendingURL; + mPendingURL.clear(); + } + + // Don't do anything if there are no streams playing + if (!mCurrentInternetStreamp) + { + return; + } + + unsigned int progress; + bool starving; + bool diskbusy; + FMOD_OPENSTATE open_state; + FMOD_RESULT result = mCurrentInternetStreamp->getOpenState(open_state, &progress, &starving, &diskbusy); + + if (result != FMOD_OK || open_state == FMOD_OPENSTATE_ERROR) + { + stop(); + return; + } + else if (open_state == FMOD_OPENSTATE_READY) + { + // Stream is live + + // start the stream if it's ready + if (!mFMODInternetStreamChannelp && + (mFMODInternetStreamChannelp = mCurrentInternetStreamp->startStream())) + { + // Reset volume to previously set volume + setGain(getGain()); + Check_FMOD_Error(mFMODInternetStreamChannelp->setPaused(false), "FMOD::Channel::setPaused"); + } + } + + + if(mFMODInternetStreamChannelp) + { + FMOD::Sound *sound = NULL; + + // FmodEX Error checking + //if(mFMODInternetStreamChannelp->getCurrentSound(&sound) == FMOD_OK && sound) + if (!Check_FMOD_Error(mFMODInternetStreamChannelp->getCurrentSound(&sound), "FMOD::Channel::getCurrentSound") && sound) + // + { + FMOD_TAG tag; + S32 tagcount, dirtytagcount; + + // FmodEX Error checking + //if(sound->getNumTags(&tagcount, &dirtytagcount) == FMOD_OK && dirtytagcount) + if (!Check_FMOD_Error(sound->getNumTags(&tagcount, &dirtytagcount), "FMOD::Sound::getNumTags") && dirtytagcount) + // + { + // Stream metadata - originally by Shyotl Khur + mMetadata.clear(); + mNewMetadata = true; + // + for(S32 i = 0; i < tagcount; ++i) + { + if(sound->getTag(NULL, i, &tag) != FMOD_OK) + continue; + + std::string name = tag.name; + switch(tag.type) + { + case(FMOD_TAGTYPE_ID3V2): + { + if(name == "TIT2") name = "TITLE"; + else if(name == "TPE1") name = "ARTIST"; + break; + } + case(FMOD_TAGTYPE_ASF): + { + if(name == "Title") name = "TITLE"; + else if(name == "WM/AlbumArtist") name = "ARTIST"; + break; + } + case(FMOD_TAGTYPE_FMOD): + { + if (!strcmp(tag.name, "Sample Rate Change")) + { + LL_INFOS() << "Stream forced changing sample rate to " << *((float *)tag.data) << LL_ENDL; + mFMODInternetStreamChannelp->setFrequency(*((float *)tag.data)); + } + continue; + } + default: + break; + } + switch(tag.datatype) + { + case(FMOD_TAGDATATYPE_INT): + { + (mMetadata)[name]=*(LLSD::Integer*)(tag.data); + LL_DEBUGS("StreamMetadata") << tag.name << ": " << *(int*)(tag.data) << LL_ENDL; + break; + } + case(FMOD_TAGDATATYPE_FLOAT): + { + (mMetadata)[name]=*(LLSD::Real*)(tag.data); + LL_DEBUGS("StreamMetadata") << tag.name << ": " << *(float*)(tag.data) << LL_ENDL; + break; + } + case(FMOD_TAGDATATYPE_STRING): + { + std::string out = rawstr_to_utf8(std::string((char*)tag.data,tag.datalen)); + (mMetadata)[name]=out; + LL_DEBUGS("StreamMetadata") << tag.name << ": " << out << LL_ENDL; + break; + } + case(FMOD_TAGDATATYPE_STRING_UTF16): + { + std::string out((char*)tag.data,tag.datalen); + (mMetadata)[std::string(tag.name)]=out; + LL_DEBUGS("StreamMetadata") << tag.name << ": " << out << LL_ENDL; + break; + } + case(FMOD_TAGDATATYPE_STRING_UTF16BE): + { + std::string out((char*)tag.data,tag.datalen); + //U16* buf = (U16*)out.c_str(); + //for(U32 j = 0; j < out.size()/2; ++j) + //(((buf[j] & 0xff)<<8) | ((buf[j] & 0xff00)>>8)); + (mMetadata)[std::string(tag.name)]=out; + LL_DEBUGS("StreamMetadata") << tag.name << ": " << out << LL_ENDL; + break; + } + default: + break; + } + } + } + + if(starving) + { + bool paused = false; + if (mFMODInternetStreamChannelp->getPaused(&paused) == FMOD_OK && !paused) + { + LL_INFOS() << "Stream starvation detected! Pausing stream until buffer nearly full." << LL_ENDL; + LL_INFOS() << " (diskbusy="<setPaused(true), "FMOD::Channel::setPaused"); + } + } + else if(progress > 80) + { + Check_FMOD_Error(mFMODInternetStreamChannelp->setPaused(false), "FMOD::Channel::setPaused"); + } + } + } +} + +void LLStreamingAudio_FMODSTUDIO::stop() +{ + mPendingURL.clear(); + + if (mFMODInternetStreamChannelp) + { + Check_FMOD_Error(mFMODInternetStreamChannelp->setPaused(true), "FMOD::Channel::setPaused"); + Check_FMOD_Error(mFMODInternetStreamChannelp->setPriority(0), "FMOD::Channel::setPriority"); + mFMODInternetStreamChannelp = NULL; + } + + if (mCurrentInternetStreamp) + { + LL_INFOS() << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << LL_ENDL; + if (mCurrentInternetStreamp->stopStream()) + { + delete mCurrentInternetStreamp; + } + else + { + LL_WARNS() << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << LL_ENDL; + mDeadStreams.push_back(mCurrentInternetStreamp); + } + mCurrentInternetStreamp = NULL; + } +} + +void LLStreamingAudio_FMODSTUDIO::pause(int pauseopt) +{ + if (pauseopt < 0) + { + pauseopt = mCurrentInternetStreamp ? 1 : 0; + } + + if (pauseopt) + { + if (mCurrentInternetStreamp) + { + stop(); + } + } + else + { + start(getURL()); + } +} + + +// A stream is "playing" if it has been requested to start. That +// doesn't necessarily mean audio is coming out of the speakers. +int LLStreamingAudio_FMODSTUDIO::isPlaying() +{ + if (mCurrentInternetStreamp) + { + return 1; // Active and playing + } + else if (!mURL.empty() || !mPendingURL.empty()) + { + return 2; // "Paused" + } + else + { + return 0; + } +} + + +F32 LLStreamingAudio_FMODSTUDIO::getGain() +{ + return mGain; +} + + +std::string LLStreamingAudio_FMODSTUDIO::getURL() +{ + return mURL; +} + + +void LLStreamingAudio_FMODSTUDIO::setGain(F32 vol) +{ + mGain = vol; + + if (mFMODInternetStreamChannelp) + { + vol = llclamp(vol * vol, 0.f, 1.f); //should vol be squared here? + + Check_FMOD_Error(mFMODInternetStreamChannelp->setVolume(vol), "FMOD::Channel::setVolume"); + } +} +// Streamtitle display +// virtual +bool LLStreamingAudio_FMODSTUDIO::getNewMetadata(LLSD& metadata) +{ + if (mCurrentInternetStreamp) + { + if (mNewMetadata) + { + metadata = mMetadata; + mNewMetadata = false; + return true; + } + + return mNewMetadata; + } + + metadata = LLSD(); + return false; +} +// +/////////////////////////////////////////////////////// +// manager of possibly-multiple internet audio streams + +LLAudioStreamManagerFMODSTUDIO::LLAudioStreamManagerFMODSTUDIO(FMOD::System *system, FMOD::ChannelGroup *group, const std::string& url) : + mSystem(system), + mChannelGroup(group), + mStreamChannel(NULL), + mInternetStream(NULL), + mReady(false) +{ + mInternetStreamURL = url; + + FMOD_RESULT result = mSystem->createStream(url.c_str(), FMOD_2D | FMOD_NONBLOCKING | FMOD_IGNORETAGS, 0, &mInternetStream); + + if (result!= FMOD_OK) + { + LL_WARNS() << "Couldn't open fmod stream, error " + << FMOD_ErrorString(result) + << LL_ENDL; + mReady = false; + return; + } + + mReady = true; +} + +FMOD::Channel *LLAudioStreamManagerFMODSTUDIO::startStream() +{ + // We need a live and opened stream before we try and play it. + FMOD_OPENSTATE open_state; + if (getOpenState(open_state) != FMOD_OK || open_state != FMOD_OPENSTATE_READY) + { + LL_WARNS() << "No internet stream to start playing!" << LL_ENDL; + return NULL; + } + + if(mStreamChannel) + return mStreamChannel; //Already have a channel for this stream. + + Check_FMOD_Error(mSystem->playSound(mInternetStream, mChannelGroup, true, &mStreamChannel), "FMOD::System::playSound"); + return mStreamChannel; +} + +bool LLAudioStreamManagerFMODSTUDIO::stopStream() +{ + if (mInternetStream) + { + bool close = true; + FMOD_OPENSTATE open_state; + if (getOpenState(open_state) == FMOD_OK) + { + switch (open_state) + { + case FMOD_OPENSTATE_CONNECTING: + close = false; + break; + default: + close = true; + } + } + + if (close && mInternetStream->release() == FMOD_OK) + { + mStreamChannel = NULL; + mInternetStream = NULL; + return true; + } + else + { + return false; + } + } + else + { + return true; + } +} + +FMOD_RESULT LLAudioStreamManagerFMODSTUDIO::getOpenState(FMOD_OPENSTATE& state, unsigned int* percentbuffered, bool* starving, bool* diskbusy) +{ + if (!mInternetStream) + return FMOD_ERR_INVALID_HANDLE; + FMOD_RESULT result = mInternetStream->getOpenState(&state, percentbuffered, starving, diskbusy); + Check_FMOD_Error(result, "FMOD::Sound::getOpenState"); + return result; +} + +void LLStreamingAudio_FMODSTUDIO::setBufferSizes(U32 streambuffertime, U32 decodebuffertime) +{ + Check_FMOD_Error(mSystem->setStreamBufferSize(streambuffertime / 1000 * 128 * 128, FMOD_TIMEUNIT_RAWBYTES), "FMOD::System::setStreamBufferSize"); + FMOD_ADVANCEDSETTINGS settings; + memset(&settings,0,sizeof(settings)); + settings.cbSize=sizeof(settings); + settings.defaultDecodeBufferSize = decodebuffertime;//ms + Check_FMOD_Error(mSystem->setAdvancedSettings(&settings), "FMOD::System::setAdvancedSettings"); +} + +bool LLStreamingAudio_FMODSTUDIO::releaseDeadStreams() +{ + // Kill dead internet streams, if possible + std::list::iterator iter; + for (iter = mDeadStreams.begin(); iter != mDeadStreams.end();) + { + LLAudioStreamManagerFMODSTUDIO *streamp = *iter; + if (streamp->stopStream()) + { + LL_INFOS() << "Closed dead stream" << LL_ENDL; + delete streamp; + mDeadStreams.erase(iter++); + } + else + { + iter++; + } + } + + return mDeadStreams.empty(); +} diff --git a/indra/llaudio/llstreamingaudio_fmodstudio.h b/indra/llaudio/llstreamingaudio_fmodstudio.h new file mode 100644 index 0000000000..d220ddd02c --- /dev/null +++ b/indra/llaudio/llstreamingaudio_fmodstudio.h @@ -0,0 +1,86 @@ +/** + * @file streamingaudio_fmodstudio.h + * @brief Definition of LLStreamingAudio_FMODSTUDIO implementation + * + * $LicenseInfo:firstyear=2002&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_STREAMINGAUDIO_FMODSTUDIO_H +#define LL_STREAMINGAUDIO_FMODSTUDIO_H + +#include "stdtypes.h" // from llcommon + +#include "llstreamingaudio.h" +#include "lltimer.h" + +//Stubs +class LLAudioStreamManagerFMODSTUDIO; +namespace FMOD +{ + class System; + class Channel; + class ChannelGroup; + class DSP; +} + +//Interfaces +class LLStreamingAudio_FMODSTUDIO : public LLStreamingAudioInterface +{ + public: + LLStreamingAudio_FMODSTUDIO(FMOD::System *system); + /*virtual*/ ~LLStreamingAudio_FMODSTUDIO(); + + /*virtual*/ void start(const std::string& url); + /*virtual*/ void stop(); + /*virtual*/ void pause(S32 pause); + /*virtual*/ void update(); + /*virtual*/ S32 isPlaying(); + /*virtual*/ void setGain(F32 vol); + /*virtual*/ F32 getGain(); + /*virtual*/ std::string getURL(); + + /*virtual*/ bool supportsAdjustableBufferSizes(){return true;} + /*virtual*/ void setBufferSizes(U32 streambuffertime, U32 decodebuffertime); + //Streamtitle display DKO + virtual bool getNewMetadata(LLSD& metadata); + // DKO +private: + bool releaseDeadStreams(); + + FMOD::System *mSystem; + + LLAudioStreamManagerFMODSTUDIO *mCurrentInternetStreamp; + FMOD::ChannelGroup* mStreamGroup; + FMOD::Channel *mFMODInternetStreamChannelp; + std::list mDeadStreams; + + std::string mURL; + std::string mPendingURL; + F32 mGain; + // Streamtitle display + bool mNewMetadata; + LLSD mMetadata; + // Streamtitle display +}; + + +#endif // LL_STREAMINGAUDIO_FMODSTUDIO_H diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 90bb25b6ef..f574c42e85 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -983,6 +983,9 @@ void LLFolderView::cut() LLClipboard::instance().reset(); if(getVisible() && getEnabled() && (mSelectedItems.size() > 0)) { + // Next item gets selected if cutting in inventory + bool cut_to_clipboard = true; + // Find out which item will be selected once the selection will be cut LLFolderViewItem* item_to_select = getNextUnselectedItem(); @@ -997,10 +1000,12 @@ void LLFolderView::cut() if (listener) { listener->cutToClipboard(); + cut_to_clipboard &= listener->isCutToClipboard(); // Next item gets selected if cutting in inventory } } // Update the selection + if (!cut_to_clipboard) // Next item gets selected if cutting in inventory setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel.get()->hasFocus()); } mSearchString.clear(); diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 7a59e11d08..2f568025ab 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -122,10 +122,6 @@ LLFolderViewItem::Params::Params() // Inventory specials for_inventory("for_inventory", false) { - // User-definable item height in folder views - static LLCachedControl FolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); - item_height = (S32)FolderViewItemHeight; - // } // Default constructor @@ -164,7 +160,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mArrowSize(p.arrow_size), mMaxFolderItemOverlap(p.max_folder_item_overlap), // Inventory specials - mForInventory(p.for_inventory) + mForInventory(p.for_inventory), + mItemTopPad(p.item_top_pad) { if (!sColorSetInitialized) { @@ -745,7 +742,9 @@ void LLFolderViewItem::drawOpenFolderArrow(const Params& default_params, const L //--------------------------------------------------------------------------------// // Draw open folder arrow // - const S32 TOP_PAD = default_params.item_top_pad; + // Inventory specials + //const S32 TOP_PAD = default_params.item_top_pad; + const S32 TOP_PAD = mItemTopPad; if (hasVisibleChildren() || !isFolderComplete()) { @@ -905,7 +904,9 @@ void LLFolderViewItem::draw() const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled const Params& default_params = LLUICtrlFactory::getDefaultParams(); - const S32 TOP_PAD = default_params.item_top_pad; + // Inventory specials + //const S32 TOP_PAD = default_params.item_top_pad; + const S32 TOP_PAD = mItemTopPad; const LLFontGL* font = getLabelFontForStyle(mLabelStyle); diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index 00a4856481..51d07769fc 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -135,6 +135,7 @@ protected: // Inventory specials bool mForInventory; + S32 mItemTopPad; // For now assuming all colors are the same in derived classes. static bool sColorSetInitialized; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4dfee491a6..684763c126 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -11,6 +11,7 @@ include(DBusGlib) include(DirectX) include(DragDrop) include(EXPAT) +include(FMODSTUDIO) include(FMODEX) include(GLOD) include(GooglePerfTools) @@ -66,6 +67,10 @@ endif (NOT HAVOK_TPV) endif( LLPHYSICSEXTENSIONS_SRC_DIR ) # +if(FMODSTUDIO) + include_directories(${FMODSTUDIO_INCLUDE_DIR}) +endif(FMODSTUDIO) + if(FMODEX) include_directories(${FMODEX_INCLUDE_DIR}) endif(FMODEX) @@ -161,6 +166,7 @@ set(viewer_SOURCE_FILES fsfloatervoicecontrols.cpp fsfloatervolumecontrols.cpp fsfloatervramusage.cpp + fsfloaterwearablefavorites.cpp fskeywords.cpp fslightshare.cpp fslslbridge.cpp @@ -909,6 +915,7 @@ set(viewer_HEADER_FILES fsfloatervoicecontrols.h fsfloatervolumecontrols.h fsfloatervramusage.h + fsfloaterwearablefavorites.h fsgridhandler.h fskeywords.h fslightshare.h @@ -2018,6 +2025,11 @@ if (OPENAL) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL") endif (OPENAL) +if (FMODSTUDIO) + set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO") + set(FMODWRAPPER_LIBRARY ${FMODSTUDIO_LIBRARY}) +endif (FMODSTUDIO) + if (FMODEX) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODEX") set(FMODWRAPPER_LIBRARY ${FMODEX_LIBRARY}) @@ -2151,6 +2163,14 @@ if (WINDOWS) set( VIEWERMANIFEST_PACKAGE_FLAGS ) endif( ND_BUILD64BIT_ARCH ) + if (FMODSTUDIO) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll + ${SHARED_LIB_STAGING_DIR}/Debug/fmodL.dll + ) + endif (FMODSTUDIO) + if (FMODEX) list(APPEND COPY_INPUT_DEPENDENCIES ${SHARED_LIB_STAGING_DIR}/Release/fmodex.dll @@ -2457,7 +2477,7 @@ if (DARWIN) set(MACOSX_BUNDLE_BUNDLE_NAME "Firestorm") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}") set(MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}") - set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2010-2017 The Phoenix Firestorm Project, Inc.") + set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2010-2018 The Phoenix Firestorm Project, Inc.") set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "Firestorm.nib") set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "LLNSApplication") diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 4922c2d5f1..51719f0429 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -3,4 +3,4 @@ CFBundleName = "Firestorm"; CFBundleShortVersionString = "Firestorm version %%VERSION%%"; -CFBundleGetInfoString = "Firestorm version %%VERSION%%, Copyright 2010-2017 The Phoenix Firestorm Project, Inc."; +CFBundleGetInfoString = "Firestorm version %%VERSION%%, Copyright 2010-2018 The Phoenix Firestorm Project, Inc."; diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 64f2a4b2ba..b28baa26d7 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -598,4 +598,14 @@ is_running_function="Floater.IsOpen" is_running_parameters="fs_group_titles" /> + diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b2e109064a..deef3fbb9a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13022,13 +13022,13 @@ Change of this parameter will affect the layout of buttons in notification toast RenderVolumeLODFactor Comment - Controls level of detail of primitives (multiplier for current screen area when calculated level of detail) + Influences the distance at which the viewer will display a lower detail model. Higher values = more lag. IMPORTANT: Please disregard advice to increase this value, such as is commonly distributed in notecards. Persist 1 Type F32 Value - 1.0 + 2.0 SanityCheckType LessThanEquals SanityValue @@ -19959,10 +19959,10 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1.0 - FMODExProfilerEnable + FMODProfilerEnable Comment - Enable profiler tool if using FMOD Ex + Enable profiler tool if using FMOD Persist 1 Type @@ -19970,7 +19970,7 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 - FMODExDecodeBufferSize + FMODDecodeBufferSize Comment Sets the streaming decode buffer size (in milliseconds) @@ -19981,7 +19981,7 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1000 - FMODExStreamBufferSize + FMODStreamBufferSize Comment Sets the streaming buffer size (in milliseconds) @@ -19992,6 +19992,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 7000 + FMODResampleMethod + + Comment + Sets the method used for internal resampler 0(Linear), 1(Cubic), 2(Spline) + Persist + 1 + Type + U32 + Value + 0 + DisablePrecacheDelayAfterTeleporting Comment @@ -24511,6 +24522,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + FSWearableFavoritesSortOrder + + Comment + The sort order for the wearable favorites item list + Persist + 1 + Type + U32 + Value + 3 + diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 5dfe0e32c5..c725635830 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -734,7 +734,16 @@ Value 1 - + ProtectWearableFavoritesFolders + + Comment + Keep the Wearable Favorites folder in Inventory safe from manual changes. + Type + Boolean + Value + 1 + + FSKeywordOn Comment diff --git a/indra/newview/app_settings/windlight/days/Anime%20Daze.xml b/indra/newview/app_settings/windlight/days/Anime%20Daze.xml new file mode 100644 index 0000000000..d0e69e2013 --- /dev/null +++ b/indra/newview/app_settings/windlight/days/Anime%20Daze.xml @@ -0,0 +1,48 @@ + + + + 0 + Anime - 12AM + + + 0.12499995529651642 + Anime - 3AM + + + 0.22916656732559204 + Anime - 5:30AM + + + 0.24999991059303284 + Anime - 6AM + + + 0.27083322405815125 + Anime - 6:30AM + + + 0.37499985098838806 + Anime - 9AM + + + 0.49999982118606567 + Anime - 12PM + + + 0.6249997615814209 + Anime - 3PM + + + 0.74999970197677612 + Anime - 6PM + + + 0.77083301544189453 + Anime - 6:30PM + + + 0.87499964237213135 + Anime - 9PM + + + diff --git a/indra/newview/app_settings/windlight/days/FALLOUT%20SL%201.0.xml b/indra/newview/app_settings/windlight/days/FALLOUT%20SL%201.0.xml new file mode 100644 index 0000000000..d7493a3704 --- /dev/null +++ b/indra/newview/app_settings/windlight/days/FALLOUT%20SL%201.0.xml @@ -0,0 +1,40 @@ + + + + 0 + FALLOUT - 12AM + + + 0.12499995529651642 + FALLOUT - 3AM + + + 0.20833325386047363 + FALLOUT - 5AM + + + 0.24999991059303284 + FALLOUT - 6AM + + + 0.37499985098838806 + FALLOUT - 9AM + + + 0.49999982118606567 + FALLOUT - 12PM + + + 0.6249997615814209 + FALLOUT - 3PM + + + 0.74999970197677612 + FALLOUT - 6PM + + + 0.87499964237213135 + FALLOUT - 9PM + + + diff --git a/indra/newview/app_settings/windlight/days/Hyborian%20Coast.xml b/indra/newview/app_settings/windlight/days/Hyborian%20Coast.xml new file mode 100644 index 0000000000..9c360550c8 --- /dev/null +++ b/indra/newview/app_settings/windlight/days/Hyborian%20Coast.xml @@ -0,0 +1,20 @@ + + + + 0 + Hyborian Dawn B - midnight + + + 0.24652767181396484 + Hyborian Age - Water E-morning + + + 0.49999982118606567 + Hyborian Age - Water F - noon + + + 0.74999970197677612 + Hyborian Age - Water E-evening + + + diff --git a/indra/newview/app_settings/windlight/skies/80%27s%20Wave.xml b/indra/newview/app_settings/windlight/skies/80%27s%20Wave.xml new file mode 100644 index 0000000000..54aab9d5b4 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/80%27s%20Wave.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.8988037109375 + 1.1949462890625 + 1.2279398441314697 + 1.8988037109375 + + blue_density + + 0.35260009765625 + 0.85935890674591064 + 1.35052490234375 + 1.35052490234375 + + blue_horizon + + 0.815185546875 + 1.02667236328125 + 1.153564453125 + 1.153564453125 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.74000002145772326 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.52999997138977051 + 0 + 0 + 1 + + density_multiplier + + 0.00026999998954124749 + 0 + 0 + 1 + + distance_multiplier + + 3.7000000476837158 + 0 + 0 + 1 + + east_angle + 3.1415927410125732 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 15.199999809265137 + 0.0010000000474974513 + -0.99999994039535522 + 1 + + haze_density + + 4 + 0 + 0 + 1 + + haze_horizon + + 0.065999999642372131 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 4.8569560817668389e-008 + 0.83146911859512329 + -0.55557101964950562 + 0 + + max_y + + 735 + 0 + 0 + 1 + + preset_num + 2 + star_brightness + 8.2799997329711914 + sun_angle + 0.98174679279327393 + sunlight_color + + 2.22052001953125 + 1.76385498046875 + 1.8066678047180176 + 2.22052001953125 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%2012AM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%2012AM.xml new file mode 100644 index 0000000000..f1f6e8f1cb --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%2012AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.4053955078125 + 1.1382696628570557 + 1.2821044921875 + 1.2821044921875 + + blue_density + + 0.41029912233352661 + 0.43446910381317139 + 0.79701787233352661 + 0.79701787233352661 + + blue_horizon + + 0.11019530892372131 + 0.12288269400596619 + 0.14980468153953552 + 0.14980468153953552 + + cloud_color + + 0.22615399956703186 + 0.31999999284744263 + 0.34000000357627869 + 0.34000000357627869 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69999998807907104 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.19999998807907104 + 0 + 0 + 1 + + density_multiplier + + 0.00014999999257270247 + 0 + 0 + 1 + + distance_multiplier + + 7.5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 5 + 0.0010000000474974513 + -0.47999998927116394 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.23999999463558197 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 1 + -1.1924880638503055e-008 + -0 + + max_y + + 971 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 50 + sun_angle + 4.7123889923095703 + sunlight_color + + 0.169921875 + 1.0309758186340332 + 1.330078125 + 1.330078125 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%2012PM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%2012PM.xml new file mode 100644 index 0000000000..819f20ab54 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%2012PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.6820068359375 + 1.5790386199951172 + 1.4586181640625 + 1.6820068359375 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.474609375 + 0.66494756937026978 + 0.791015625 + 0.791015625 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.74000002145772326 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.25 + 0 + 0 + 1 + + density_multiplier + + 0.00014999999257270247 + 0 + 0 + 1 + + distance_multiplier + + 5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 15.199999809265137 + 0.0010000000474974513 + -0.99999994039535522 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.088000006973743439 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 1 + 1.1483815569590661e-006 + 0 + + max_y + + 2588 + 0 + 0 + 1 + + preset_num + 2 + star_brightness + 0 + sun_angle + 1.5707951784133911 + sunlight_color + + 1.5765380859375 + 1.4519634246826172 + 1.3062744140625 + 1.5765380859375 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%203AM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%203AM.xml new file mode 100644 index 0000000000..93d6034da5 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%203AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.3659820556640625 + 1.0276046991348267 + 1.1574554443359375 + 1.1574554443359375 + + blue_density + + 0.19945311546325684 + 0.34193974733352661 + 0.72054684162139893 + 0.72054684162139893 + + blue_horizon + + 0.084902346134185791 + 0.10760286450386047 + 0.18509766459465027 + 0.18509766459465027 + + cloud_color + + 0.22615399956703186 + 0.31999999284744263 + 0.34000000357627869 + 0.34000000357627869 + + cloud_pos_density1 + + 1.6884100437164307 + 0.52609699964523315 + 0.87999999523162842 + 1 + + cloud_pos_density2 + + 1.6884100437164307 + 0.52609699964523315 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.25 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 9 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 5 + 0.0010000000474974513 + -0.47999998927116394 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.20000000298023224 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.70710688829421997 + -0.70710664987564087 + -0 + + max_y + + 471 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 27.709999084472656 + sun_angle + 5.4977869987487793 + sunlight_color + + 0.167266845703125 + 1.014866828918457 + 1.309295654296875 + 1.309295654296875 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%203PM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%203PM.xml new file mode 100644 index 0000000000..70158f8518 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%203PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.6820068359375 + 1.5790386199951172 + 1.4586181640625 + 1.6820068359375 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.387725830078125 + 0.61492735147476196 + 0.815399169921875 + 0.815399169921875 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10.01099967956543 + + cloud_shadow + + 0.25 + 0 + 0 + 1 + + density_multiplier + + 0.00014999999257270247 + 0 + 0 + 1 + + distance_multiplier + + 5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 15.199999809265137 + 0.0010000000474974513 + -0.99999994039535522 + 1 + + haze_density + + 2.5 + 0 + 0 + 1 + + haze_horizon + + 0.088000006973743439 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.85491263866424561 + -0.51877200603485107 + 0 + + max_y + + 2588 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0 + sun_angle + 2.1162102222442627 + sunlight_color + + 1.5765380859375 + 1.4519634246826172 + 1.3062744140625 + 1.5765380859375 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%205%3A30AM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%205%3A30AM.xml new file mode 100644 index 0000000000..5090d3db85 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%205%3A30AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.3659820556640625 + 1.0276046991348267 + 1.1574554443359375 + 1.1574554443359375 + + blue_density + + 0.19945311546325684 + 0.34193974733352661 + 0.72054684162139893 + 0.72054684162139893 + + blue_horizon + + 0.084902346134185791 + 0.10760286450386047 + 0.18509766459465027 + 0.18509766459465027 + + cloud_color + + 0.22615399956703186 + 0.31999999284744263 + 0.34000000357627869 + 0.34000000357627869 + + cloud_pos_density1 + + 1.6884100437164307 + 0.52609699964523315 + 0.87999999523162842 + 1 + + cloud_pos_density2 + + 1.6884100437164307 + 0.52609699964523315 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.25 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 9.5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 12 + 0.0010000000474974513 + -1.0499999523162842 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.20000000298023224 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0 + 1 + 0 + + max_y + + 500 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 27.709999084472656 + sun_angle + 6.152285099029541 + sunlight_color + + 0.167266845703125 + 1.014866828918457 + 1.309295654296875 + 1.309295654296875 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%206%3A30AM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%206%3A30AM.xml new file mode 100644 index 0000000000..cfb0d67b82 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%206%3A30AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.5087890625 + 0.955352783203125 + 0.3662109375 + 1.5087890625 + + blue_density + + 0.09296870231628418 + 0.7166895866394043 + 1.2670313119888306 + 1.2670313119888306 + + blue_horizon + + 0.0052734613418579102 + 0.4152558445930481 + 0.89472651481628418 + 0.44736325740814209 + + cloud_color + + 0.41999998688697815 + 0.41999998688697815 + 0.41999998688697815 + 0.41999998688697815 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.25 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 10.300000190734863 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 39.799999237060547 + 0.0010000000474974513 + -1.8999999761581421 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.20000000298023224 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.13052545487880707 + 0.99144494533538818 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0 + sun_angle + 0.13089895248413086 + sunlight_color + + 2.8590087890625 + 1.3701038360595703 + 0.5628662109375 + 2.8590087890625 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%206%3A30PM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%206%3A30PM.xml new file mode 100644 index 0000000000..cbc906a2d0 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%206%3A30PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.212158203125 + 1.1134529113769531 + 0.662841796875 + 1.212158203125 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.19804692268371582 + 0.8982093334197998 + 1.3619530200958252 + 1.3619530200958252 + + cloud_color + + 0.421875 + 0.421875 + 0.421875 + 0.421875 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10 + + cloud_shadow + + 0.19999998807907104 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 39.799999237060547 + 0.0010000000474974513 + -0.74999994039535522 + 1 + + haze_density + + 2.5 + 0 + 0 + 1 + + haze_horizon + + 0.21300001442432404 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0 + -1 + 0 + + max_y + + 471 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.63999998569488525 + sun_angle + 3.2724905014038086 + sunlight_color + + 0 + 0 + 0 + 0 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%206AM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%206AM.xml new file mode 100644 index 0000000000..704b509a65 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%206AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.5087890625 + 0.955352783203125 + 0.3662109375 + 1.5087890625 + + blue_density + + 0.09296870231628418 + 0.7166895866394043 + 1.2670313119888306 + 1.2670313119888306 + + blue_horizon + + 0.0052734613418579102 + 0.4152558445930481 + 0.89472651481628418 + 0.44736325740814209 + + cloud_color + + 0.41999998688697815 + 0.41999998688697815 + 0.41999998688697815 + 0.41999998688697815 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.25 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 10.300000190734863 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 18 + 0.0010000000474974513 + -1.3999999761581421 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.20000000298023224 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0 + 1 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.2199999988079071 + sun_angle + 6.2831845283508301 + sunlight_color + + 2.8590087890625 + 1.3701038360595703 + 0.5628662109375 + 2.8590087890625 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%206PM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%206PM.xml new file mode 100644 index 0000000000..6f2c49193a --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%206PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.5087890625 + 0.955352783203125 + 0.3662109375 + 1.5087890625 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.19804692268371582 + 0.8982093334197998 + 1.3619530200958252 + 1.3619530200958252 + + cloud_color + + 0.421875 + 0.421875 + 0.421875 + 0.421875 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10 + + cloud_shadow + + 0.19999998807907104 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 14.600000381469727 + 0.0010000000474974513 + -0.74999994039535522 + 1 + + haze_density + + 3 + 0 + 0 + 1 + + haze_horizon + + 0.15999999642372131 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 1.8199258420281694e-006 + -1 + 0 + + max_y + + 471 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.63999998569488525 + sun_angle + 3.1415908336639404 + sunlight_color + + 2.8590087890625 + 1.3701038360595703 + 0.5628662109375 + 2.8590087890625 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%209AM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%209AM.xml new file mode 100644 index 0000000000..67d1089b73 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%209AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.6820068359375 + 1.5790386199951172 + 1.4586181640625 + 1.6820068359375 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.4041748046875 + 0.53062635660171509 + 0.7989501953125 + 0.7989501953125 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.25 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 33.400001525878906 + 0.0010000000474974513 + -2.5 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.087999999523162842 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.80644398927688599 + 0.59131050109863281 + 0 + + max_y + + 1000 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0 + sun_angle + 0.93811345100402832 + sunlight_color + + 1.5765380859375 + 1.4519634246826172 + 1.3062744140625 + 1.5765380859375 + + + diff --git a/indra/newview/app_settings/windlight/skies/Anime%20-%209PM.xml b/indra/newview/app_settings/windlight/skies/Anime%20-%209PM.xml new file mode 100644 index 0000000000..fc2a9784f1 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Anime%20-%209PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.3659820556640625 + 1.0276046991348267 + 1.1574554443359375 + 1.1574554443359375 + + blue_density + + 0.19945311546325684 + 0.34193974733352661 + 0.72054684162139893 + 0.36027342081069946 + + blue_horizon + + 0.084902346134185791 + 0.10760286450386047 + 0.18509766459465027 + 0.092548832297325134 + + cloud_color + + 0.25 + 0.25 + 0.25 + 0.25 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.19999998807907104 + 0 + 0 + 1 + + density_multiplier + + 0.0001500000071246177 + 0 + 0 + 1 + + distance_multiplier + + 5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 11.400001525878906 + 0.0010000000474974513 + -0.74999994039535522 + 1 + + haze_density + + 2 + 0 + 0 + 1 + + haze_horizon + + 0.23999999463558197 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.70710521936416626 + 0.70710831880569458 + -0 + + max_y + + 471 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 19.10999870300293 + sun_angle + 3.9269886016845703 + sunlight_color + + 0.167266845703125 + 1.014866828918457 + 1.309295654296875 + 1.309295654296875 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%2012AM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%2012AM.xml new file mode 100644 index 0000000000..ad61807639 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%2012AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.31272691488265991 + 0.4980926513671875 + 0.2284698486328125 + 0.1660308837890625 + + blue_density + + 0.41029912233352661 + 0.43446910381317139 + 0.79701787233352661 + 0.39850893616676331 + + blue_horizon + + 0.080742180347442627 + 0.08920837938785553 + 0.17925781011581421 + 0.089628905057907104 + + cloud_color + + 0.33428794145584106 + 0.34057700634002686 + 0.22557699680328369 + 0.34057700634002686 + + cloud_pos_density1 + + 1.6884100437164307 + 0.52609699964523315 + 0.87999999523162842 + 1 + + cloud_pos_density2 + + 1.6884100437164307 + 0.52609699964523315 + 0.125 + 1 + + cloud_scale + + 0.10999999195337296 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.34999942779541 + 10.01099967956543 + + cloud_shadow + + 0.47999998927116394 + 0 + 0 + 1 + + density_multiplier + + 0.00065000000176951289 + 0 + 0 + 1 + + distance_multiplier + + 27 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0099999904632568 + 0 + 0 + 1 + + glow + + 5 + 0.0010000000474974513 + -0.47999998927116394 + 1 + + haze_density + + 2.7650001049041748 + 0 + 0 + 1 + + haze_horizon + + 0.16200000047683716 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 1 + -1.1924880638503055e-008 + 1 + + max_y + + 906.19991350494092 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 50 + sun_angle + 4.7123889923095703 + sunlight_color + + 0.954986572265625 + 0.79802370071411133 + 0.380950927734375 + 0.318328857421875 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%2012PM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%2012PM.xml new file mode 100644 index 0000000000..5a35b13f20 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%2012PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.74505615234375 + 0.58181476593017578 + 0.47369384765625 + 0.24835205078125 + + blue_density + + 0.23244559764862061 + 0.77074909210205078 + 1.0336413383483887 + 0.51682066917419434 + + blue_horizon + + 0.63999998569488525 + 1.1399999856948853 + 1.2799999713897705 + 0.63999998569488525 + + cloud_color + + 0.5660400390625 + 0.53396797180175781 + 0.4964599609375 + 0.5660400390625 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.18000000715255737 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.002444075434141 + + cloud_shadow + + 0.32999998331069946 + 0 + 0 + 1 + + density_multiplier + + 0.00019999999494757503 + 0 + 0 + 1 + + distance_multiplier + + 5.3000001907348633 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0799999237060547 + 0 + 0 + 1 + + glow + + 20 + 0.0010000000474974513 + -0.29999998211860657 + 1 + + haze_density + + 1.0290000438690186 + 0 + 0 + 1 + + haze_horizon + + 0.36800003051757813 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 1 + 1.1483815569590661e-006 + 0 + + max_y + + 324 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.17000000178813934 + sun_angle + 1.5707951784133911 + sunlight_color + + 1.74609375 + 1.45001220703125 + 1.25390625 + 0.58203125 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%203AM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%203AM.xml new file mode 100644 index 0000000000..fc025e71c5 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%203AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.2131640613079071 + 0.29683592915534973 + 0.23996521532535553 + 0.098945312201976776 + + blue_density + + 0.59999996423721313 + 0.70078122615814209 + 0.49921870231628418 + 0.35039061307907104 + + blue_horizon + + 0.098515614867210388 + 0.16148437559604645 + 0.15853270888328552 + 0.080742187798023224 + + cloud_color + + 0.2725030779838562 + 0.3394712507724762 + 0.22668275237083435 + 0.3394712507724762 + + cloud_pos_density1 + + 1.6884100437164307 + 0.52609699964523315 + 0.87999999523162842 + 1 + + cloud_pos_density2 + + 1.6884100437164307 + 0.52609699964523315 + 0.125 + 1 + + cloud_scale + + 0.53999996185302734 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.179999351501465 + 10.01099967956543 + + cloud_shadow + + 0.39999997615814209 + 0 + 0 + 1 + + density_multiplier + + 0.00039999998989515007 + 0 + 0 + 1 + + distance_multiplier + + 41.200000762939453 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0099999904632568 + 0 + 0 + 1 + + glow + + 5 + 0.0010000000474974513 + -0.47999998927116394 + 1 + + haze_density + + 1.9120000600814819 + 0 + 0 + 1 + + haze_horizon + + 0.23500001430511475 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.70710688829421997 + -0.70710664987564087 + 1 + + max_y + + 1074 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 1.9999994039535522 + sun_angle + 5.4977869987487793 + sunlight_color + + 0.15093749761581421 + 0.26906245946884155 + 0.23860837519168854 + 0.089687488973140717 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%203PM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%203PM.xml new file mode 100644 index 0000000000..d6dc4e924c --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%203PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.74981689453125 + 0.72567844390869141 + 0.46893310546875 + 0.24993896484375 + + blue_density + + 0.30415761470794678 + 0.91567981243133545 + 0.9619293212890625 + 0.48096466064453125 + + blue_horizon + + 0.65250003337860107 + 1.1810156106948853 + 1.2674999237060547 + 0.63374996185302734 + + cloud_color + + 0.56300735473632813 + 0.5989990234375 + 0.4635009765625 + 0.5989990234375 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.12999999523162842 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.159999847412109 + 10.002444075434141 + + cloud_shadow + + 0.34999999403953552 + 0 + 0 + 1 + + density_multiplier + + 0.00019999999494757503 + 0 + 0 + 1 + + distance_multiplier + + 5.3000001907348633 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0799999237060547 + 0 + 0 + 1 + + glow + + 20 + 0.0010000000474974513 + -0.29999998211860657 + 1 + + haze_density + + 1.0290000438690186 + 0 + 0 + 1 + + haze_horizon + + 0.36800003051757813 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.70710796117782593 + -0.70710557699203491 + 0 + + max_y + + 324 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.17000000178813934 + sun_angle + 2.3561928272247314 + sunlight_color + + 1.74609375 + 1.45001220703125 + 1.25390625 + 0.58203125 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%205AM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%205AM.xml new file mode 100644 index 0000000000..c20d057e19 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%205AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.35030929960043622 + 0.46551762368852856 + 0.31948245200936221 + 0.15517253929787689 + + blue_density + + 0.62214583095983045 + 0.55068354395088903 + 0.34089408471041693 + 0.32066405087450711 + + blue_horizon + + 0.39911341003996359 + 0.50879565638462854 + 0.26287115690945573 + 0.25439782819231427 + + cloud_color + + 0.30318339927105065 + 0.31483941629373824 + 0.25516060913757777 + 0.31483941629373824 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.42333327018552769 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.182777554922552 + 10.006722025016984 + + cloud_shadow + + 0.35611107127534236 + 0 + 0 + 1 + + density_multiplier + + 0.00031999999191612005 + 0 + 0 + 1 + + distance_multiplier + + 21.055553793907166 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.94611111104487833 + 0 + 0 + 1 + + glow + + 11.444444182183815 + 0.0010000000474974513 + -0.63333325452275346 + 1 + + haze_density + + 2.0988334751327926 + 0 + 0 + 1 + + haze_horizon + + 0.25911108684539741 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.17605249583721161 + 0.98438078165054321 + -0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 0.25499996542930603 + sun_angle + 3.3185675144195557 + sunlight_color + + 1.0367064853958254 + 0.85555024706991389 + 0.60542814274958801 + 0.35895459841412958 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%206AM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%206AM.xml new file mode 100644 index 0000000000..7b4b4e8148 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%206AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.95999997854232788 + 0.74666666984558105 + 0.39111104607582092 + 0.31999999284744263 + + blue_density + + 0.35999998450279236 + 0.49999505281448364 + 1 + 1 + + blue_horizon + + 0 + 0.60923081636428833 + 0.89999997615814209 + 0.44999998807907104 + + cloud_color + + 0.41999998688697815 + 0.41999998688697815 + 0.41999998688697815 + 0.41999998688697815 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.73999994993209839 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.47999998927116394 + 0 + 0 + 1 + + density_multiplier + + 0.00013000000035390258 + 0 + 0 + 1 + + distance_multiplier + + 19.100000381469727 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 20 + 0.0010000000474974513 + -0.34999999403953552 + 1 + + haze_density + + 2.3199999332427979 + 0 + 0 + 1 + + haze_horizon + + 0.38999998569488525 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.12533323466777802 + 0.99211472272872925 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.2199999988079071 + sun_angle + 0.12566371262073517 + sunlight_color + + 1.8300000429153442 + 1.0707448720932007 + 0.61773747205734253 + 0.61000001430511475 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%206PM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%206PM.xml new file mode 100644 index 0000000000..924ce723f0 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%206PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.49748563766479492 + 0.6832616925239563 + 0.48673826456069946 + 0.2277538925409317 + + blue_density + + 0.68343746662139893 + 0.4503515362739563 + 0.39656245708465576 + 0.34171873331069946 + + blue_horizon + + 0.80513662099838257 + 1.0481249094009399 + 0.51187503337860107 + 0.52406245470046997 + + cloud_color + + 0.34000000357627869 + 0.34000000357627869 + 0.34000000357627869 + 0.34000000357627869 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.23999999463558197 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10 + + cloud_shadow + + 0.23999999463558197 + 0 + 0 + 1 + + density_multiplier + + 0.00031999999191612005 + 0 + 0 + 1 + + distance_multiplier + + 12.5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0499999523162842 + 0 + 0 + 1 + + glow + + 11.19999885559082 + 0.0010000000474974513 + -0.44999998807907104 + 1 + + haze_density + + 2.6470000743865967 + 0 + 0 + 1 + + haze_horizon + + 0.13199999928474426 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.70264989137649536 + -0.7115357518196106 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.08999999612569809 + sun_angle + 2.3624777793884277 + sunlight_color + + 1.9921875 + 1.423095703125 + 1.0078125 + 0.6640625 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%209AM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%209AM.xml new file mode 100644 index 0000000000..0a99f53a33 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%209AM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.613311767578125 + 0.51300573348999023 + 0.371063232421875 + 0.204437255859375 + + blue_density + + 0.23244559764862061 + 0.77074909210205078 + 1.0336413383483887 + 0.51682066917419434 + + blue_horizon + + 0.63999998569488525 + 1.1399999856948853 + 1.2799999713897705 + 0.63999998569488525 + + cloud_color + + 0.34874999523162842 + 0.33482420444488525 + 0.27125000953674316 + 0.34874999523162842 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.079999998211860657 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.002444075434141 + + cloud_shadow + + 0.39999997615814209 + 0 + 0 + 1 + + density_multiplier + + 0.00019999999494757503 + 0 + 0 + 1 + + distance_multiplier + + 5.3000001907348633 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0799999237060547 + 0 + 0 + 1 + + glow + + 20 + 0.0010000000474974513 + -0.29999998211860657 + 1 + + haze_density + + 1.8399999141693115 + 0 + 0 + 1 + + haze_horizon + + 0.55000001192092896 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.70710611343383789 + 0.70710742473602295 + 0 + + max_y + + 324 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.17000000178813934 + sun_angle + 0.7853972315788269 + sunlight_color + + 1.7578125 + 1.5684814453125 + 1.2421875 + 0.5859375 + + + diff --git a/indra/newview/app_settings/windlight/skies/FALLOUT%20-%209PM.xml b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%209PM.xml new file mode 100644 index 0000000000..d8dae24355 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/FALLOUT%20-%209PM.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.25665158033370972 + 0.32695314288139343 + 0.21304687857627869 + 0.10898438096046448 + + blue_density + + 0.58314204216003418 + 0.61453121900558472 + 0.30546873807907104 + 0.30726560950279236 + + blue_horizon + + 0.14073486626148224 + 0.1655859500169754 + 0.10441406071186066 + 0.082792975008487701 + + cloud_color + + 0.279754638671875 + 0.298828125 + 0.201171875 + 0.298828125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.53999996185302734 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.210000038146973 + 10.01099967956543 + + cloud_shadow + + 0.42999997735023499 + 0 + 0 + 1 + + density_multiplier + + 0.00031999999191612005 + 0 + 0 + 1 + + distance_multiplier + + 26.5 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.87999999523162842 + 0 + 0 + 1 + + glow + + 11.600000381469727 + 0.0010000000474974513 + -0.74999994039535522 + 1 + + haze_density + + 1.75 + 0 + 0 + 1 + + haze_horizon + + 0.34000000357627869 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.70710521936416626 + 0.70710831880569458 + 1 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.35999998450279236 + sun_angle + 3.9269886016845703 + sunlight_color + + 0.42867279052734375 + 0.494384765625 + 0.349365234375 + 0.164794921875 + + + diff --git a/indra/newview/app_settings/windlight/skies/Glowing%20Sea.xml b/indra/newview/app_settings/windlight/skies/Glowing%20Sea.xml new file mode 100644 index 0000000000..14d5b35ed3 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Glowing%20Sea.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.11958788335323334 + 0.16424560546875 + 0.11700439453125 + 0.05474853515625 + + blue_density + + 0.68343746662139893 + 0.4503515362739563 + 0.39656245708465576 + 0.34171873331069946 + + blue_horizon + + 0.80513662099838257 + 1.0481249094009399 + 0.51187503337860107 + 0.52406245470046997 + + cloud_color + + 0.34000000357627869 + 0.34000000357627869 + 0.34000000357627869 + 0.34000000357627869 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.23999999463558197 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10 + + cloud_shadow + + 0.23999999463558197 + 0 + 0 + 1 + + density_multiplier + + 0.00041000000783242285 + 0 + 0 + 1 + + distance_multiplier + + 25.700000762939453 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0499999523162842 + 0 + 0 + 1 + + glow + + 11.19999885559082 + 0.0010000000474974513 + -0.44999998807907104 + 1 + + haze_density + + 2.6470000743865967 + 0 + 0 + 1 + + haze_horizon + + 0.044000003486871719 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.70264989137649536 + -0.7115357518196106 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.08999999612569809 + sun_angle + 2.3624777793884277 + sunlight_color + + 1.5589599609375 + 1.3221702575683594 + 0.7613525390625 + 0.5196533203125 + + + diff --git a/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20E-evening.xml b/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20E-evening.xml new file mode 100644 index 0000000000..5ed5c92977 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20E-evening.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.98492431640625 + 0.78996026515960693 + 0.56195068359375 + 0.98492431640625 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.828857421875 + 0.7533721923828125 + 0.686767578125 + 0.828857421875 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.74000002145772326 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.52999997138977051 + 0 + 0 + 1 + + density_multiplier + + 0.00019999999494757503 + 0 + 0 + 1 + + distance_multiplier + + 18.399999618530273 + 0 + 0 + 1 + + east_angle + 4.7123889923095703 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 15.199999809265137 + 0.0010000000474974513 + -0.99999994039535522 + 1 + + haze_density + + 2.8530001640319824 + 0 + 0 + 1 + + haze_horizon + + 0.088000006973743439 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0.55557101964950562 + 0.83146911859512329 + 6.6251182317955681e-009 + 0 + + max_y + + 941 + 0 + 0 + 1 + + preset_num + 2 + star_brightness + 8.2799997329711914 + sun_angle + 0.98174679279327393 + sunlight_color + + 1.8755950927734375 + 1.5636838674545288 + 1.2884674072265625 + 1.8755950927734375 + + + diff --git a/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20E-morning.xml b/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20E-morning.xml new file mode 100644 index 0000000000..c319bbb898 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20E-morning.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.98492431640625 + 0.78996026515960693 + 0.56195068359375 + 0.98492431640625 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.828857421875 + 0.7533721923828125 + 0.686767578125 + 0.828857421875 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.74000002145772326 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.52999997138977051 + 0 + 0 + 1 + + density_multiplier + + 0.00019999999494757503 + 0 + 0 + 1 + + distance_multiplier + + 18.399999618530273 + 0 + 0 + 1 + + east_angle + 1.5707963705062866 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 15.199999809265137 + 0.0010000000474974513 + -0.99999994039535522 + 1 + + haze_density + + 2.8530001640319824 + 0 + 0 + 1 + + haze_horizon + + 0.088000006973743439 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0.55557101964950562 + 0.83146911859512329 + -2.4284780408834195e-008 + 0 + + max_y + + 941 + 0 + 0 + 1 + + preset_num + 2 + star_brightness + 8.2799997329711914 + sun_angle + 0.98174679279327393 + sunlight_color + + 1.8755950927734375 + 1.5636838674545288 + 1.2884674072265625 + 1.8755950927734375 + + + diff --git a/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20F%20-%20noon.xml b/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20F%20-%20noon.xml new file mode 100644 index 0000000000..21372c1854 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Hyborian%20Age%20-%20Water%20F%20-%20noon.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.98492431640625 + 0.78996026515960693 + 0.56195068359375 + 0.98492431640625 + + blue_density + + 0.395843505859375 + 0.73051226139068604 + 1.307281494140625 + 1.307281494140625 + + blue_horizon + + 0.92669677734375 + 1.0150165557861328 + 1.04205322265625 + 1.04205322265625 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.74000002145772326 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.52999997138977051 + 0 + 0 + 1 + + density_multiplier + + 0.00019999999494757503 + 0 + 0 + 1 + + distance_multiplier + + 18.399999618530273 + 0 + 0 + 1 + + east_angle + 3.1415927410125732 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 15.199999809265137 + 0.0010000000474974513 + -0.99999994039535522 + 1 + + haze_density + + 2.8530001640319824 + 0 + 0 + 1 + + haze_horizon + + 0.088000006973743439 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 4.8569560817668389e-008 + 0.83146911859512329 + -0.55557101964950562 + 0 + + max_y + + 941 + 0 + 0 + 1 + + preset_num + 2 + star_brightness + 8.2799997329711914 + sun_angle + 0.98174679279327393 + sunlight_color + + 1.8755950927734375 + 1.5636838674545288 + 1.2884674072265625 + 1.8755950927734375 + + + diff --git a/indra/newview/app_settings/windlight/skies/Hyborian%20Dawn%20B%20-%20midnight.xml b/indra/newview/app_settings/windlight/skies/Hyborian%20Dawn%20B%20-%20midnight.xml new file mode 100644 index 0000000000..e93b1b909b --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Hyborian%20Dawn%20B%20-%20midnight.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.95999962091445923 + 0.7466665506362915 + 0.39111113548278809 + 0.95999962091445923 + + blue_density + + 0.015937447547912598 + 0.44135260581970215 + 1.344062328338623 + 1.344062328338623 + + blue_horizon + + 3.7193314028627356e-007 + 0.60923099517822266 + 0.90000009536743164 + 0.90000009536743164 + + cloud_color + + 0.42000007244688747 + 0.42000007244688747 + 0.42000007244688747 + 0.42000040173551301 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.74000002145772326 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.47999997496603469 + 0 + 0 + 1 + + density_multiplier + + 0.0001300000504218242 + 0 + 0 + 1 + + distance_multiplier + + 19.099992871280904 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 20.400001525878906 + 0.0010000000474974513 + -0.59999996423721313 + 1 + + haze_density + + 2.3199996399878295 + 0 + 0 + 1 + + haze_horizon + + 0.39000006251816299 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.30070504546165466 + 0.95371717214584351 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 2 + star_brightness + 8.2799997329711914 + sun_angle + 0.30543184280395508 + sunlight_color + + 1.791229248046875 + 1.0211048126220703 + 0.341583251953125 + 1.791229248046875 + + + diff --git a/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Moon%2001.xml b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Moon%2001.xml new file mode 100644 index 0000000000..ea00e555c5 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Moon%2001.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.4453125 + 0.4453125 + 0.4453125 + 0.1484375 + + blue_density + + 1.4818992614746094 + 1.2088453769683838 + 1.5099046230316162 + 0.75495231151580811 + + blue_horizon + + 0.062745101749897003 + 0.054901964962482452 + 0.062745101749897003 + 0.031372550874948502 + + cloud_color + + 1 + 1 + 1 + 1 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.5656999945640564 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.32999998331069946 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.49940013885498 + 10.01099967956543 + + cloud_shadow + + 0.29999998211860657 + 0 + 0 + 1 + + density_multiplier + + 9.0200002887286246e-005 + 0 + 0 + 1 + + distance_multiplier + + 30.100000381469727 + 0 + 0 + 1 + + east_angle + 6.2831854820251465 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.59999996423721313 + 0 + 0 + 1 + + glow + + 20 + 0.0010000000474974513 + -0 + 1 + + haze_density + + 0.34000000357627869 + 0 + 0 + 1 + + haze_horizon + + 0.34000000357627869 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -1.4580322726942541e-007 + 0.55191975831985474 + 0.83389723300933838 + 1 + + max_y + + 3037 + 0 + 0 + 1 + + preset_num + 21 + star_brightness + 3.7999999523162842 + sun_angle + 3.72625732421875 + sunlight_color + + 0 + 0 + 0 + 0 + + + diff --git a/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Moon%2002.xml b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Moon%2002.xml new file mode 100644 index 0000000000..57fa977d00 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Moon%2002.xml @@ -0,0 +1,141 @@ + + + ambient + + 0 + 0 + 0 + 0 + + blue_density + + 0.12089811412885521 + 0.33770671695460663 + 0.67541757891583387 + 0.76708334654569654 + + blue_horizon + + 0.13497034943045882 + 0.26690842067701936 + 0.4016666400432598 + 0.74541666984558219 + + cloud_color + + 0.5 + 0.5 + 1 + 1 + + cloud_pos_density1 + + 0.47999998927116394 + 0.97999995946884155 + 0.14630000293254852 + 1 + + cloud_pos_density2 + + 1 + 1 + 0.070000000298023224 + 1 + + cloud_scale + + 0.10260000079870224 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.088005410620646 + 13.300018310546875 + + cloud_shadow + + 0.41999998688697815 + 0 + 0 + 1 + + density_multiplier + + 0.00028125001798306321 + 0 + 0 + 1 + + distance_multiplier + + 6.3874998847643383 + 0 + 0 + 1 + + east_angle + 3.5185837745666504 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0900000333786011 + 0 + 0 + 1 + + glow + + 9.4000005722045898 + 0.0010000000474974513 + -0.44999998807907104 + 1 + + haze_density + + 0.51583333298563971 + 0 + 0 + 1 + + haze_horizon + + 0.13833333183079954 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0.28096383810043335 + 0.64612644910812378 + 0.70963364839553833 + 1 + + max_y + + 685.18749099969864 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 2 + sun_angle + 5.5806870460510254 + sunlight_color + + 0 + 0 + 0 + 0 + + + diff --git a/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Wasteland.xml b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Wasteland.xml new file mode 100644 index 0000000000..a8071f4d60 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Wasteland.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.29999998211860657 + 0.17999999225139618 + 0 + 0.29999998211860657 + + blue_density + + 0.97999995946884155 + 0.97999995946884155 + 0.97999995946884155 + 0.48999997973442078 + + blue_horizon + + 0.31999999284744263 + 0.31999999284744263 + 0.31999999284744263 + 0.15999999642372131 + + cloud_color + + 0.50999999046325684 + 0.50999999046325684 + 0.50999999046325684 + 1 + + cloud_pos_density1 + + 0.5 + 0.5 + 1 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.079999998211860657 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.49940013885498 + 10.01099967956543 + + cloud_shadow + + 0.25999999046325684 + 0 + 0 + 1 + + density_multiplier + + 0.00031000000308267772 + 0 + 0 + 1 + + distance_multiplier + + 6.8000001907348633 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1 + 0 + 0 + 1 + + glow + + 40 + 0.0010000000474974513 + -0.19999980926513672 + 1 + + haze_density + + 1.8899999856948853 + 0 + 0 + 1 + + haze_horizon + + 0.23999999463558197 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.36227512359619141 + -0.93207120895385742 + 0 + + max_y + + 752 + 0 + 0 + 1 + + preset_num + 21 + star_brightness + 0 + sun_angle + 2.7708849906921387 + sunlight_color + + 1.3799998760223389 + 1.3799998760223389 + 1.3799998760223389 + 0.45999997854232788 + + + diff --git a/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Winter.xml b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Winter.xml new file mode 100644 index 0000000000..ca0806a818 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Jean%27s%20Gothic%20Winter.xml @@ -0,0 +1,141 @@ + + + ambient + + 0 + 0 + 0.14999999105930328 + 0.14999999105930328 + + blue_density + + 0 + 0.37999999523162842 + 0.56000000238418579 + 0.56000000238418579 + + blue_horizon + + 0.45999997854232788 + 0.37999999523162842 + 0.57999998331069946 + 0.57999998331069946 + + cloud_color + + 0.11999999731779099 + 0.10999999940395355 + 0.11999999731779099 + 0.11999999731779099 + + cloud_pos_density1 + + 0.69999998807907104 + 0.34999999403953552 + 0.79999995231628418 + 1 + + cloud_pos_density2 + + 0.29999998211860657 + 0.17000000178813934 + 0.17000000178813934 + 1 + + cloud_scale + + 0.39999997615814209 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.359999656677246 + 10.029999732971191 + + cloud_shadow + + 0.29999998211860657 + 0 + 0 + 1 + + density_multiplier + + 9.9999997473787516e-005 + 0 + 0 + 1 + + distance_multiplier + + 37.200000762939453 + 0 + 0 + 1 + + east_angle + 1.1938052177429199 + enable_cloud_scroll + + 1 + 1 + + gamma + + 1.0099999904632568 + 0 + 0 + 1 + + glow + + 40 + 0.0010000000474974513 + -0.4999995231628418 + 1 + + haze_density + + 1.2699999809265137 + 0 + 0 + 1 + + haze_horizon + + 0.35999998450279236 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0.76900023221969604 + 0.56208312511444092 + -0.30446872115135193 + 0 + + max_y + + 349 + 0 + 0 + 1 + + preset_num + 24 + star_brightness + 2 + sun_angle + 2.5446903705596924 + sunlight_color + + 1.4099999666213989 + 1.6500000953674316 + 2.0399999618530273 + 2.0399999618530273 + + + diff --git a/indra/newview/app_settings/windlight/skies/Synthwave.xml b/indra/newview/app_settings/windlight/skies/Synthwave.xml new file mode 100644 index 0000000000..dd83add6fd --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/Synthwave.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.6011199951171875 + 0.4848175048828125 + 0.53714460134506226 + 1.6011199951171875 + + blue_density + + 0.35260009765625 + 0.85935890674591064 + 1.35052490234375 + 1.35052490234375 + + blue_horizon + + 0.815185546875 + 1.02667236328125 + 1.153564453125 + 1.153564453125 + + cloud_color + + 0.909454345703125 + 0.77801179885864258 + 0.551483154296875 + 0.909454345703125 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.74000002145772326 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.52999997138977051 + 0 + 0 + 1 + + density_multiplier + + 0.0004400000034365803 + 0 + 0 + 1 + + distance_multiplier + + 10.300000190734863 + 0 + 0 + 1 + + east_angle + 3.1415927410125732 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 15.199999809265137 + 0.0010000000474974513 + -0.99999994039535522 + 1 + + haze_density + + 4 + 0 + 0 + 1 + + haze_horizon + + 0.065999999642372131 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 4.8569560817668389e-008 + 0.83146911859512329 + -0.55557101964950562 + 0 + + max_y + + 735 + 0 + 0 + 1 + + preset_num + 2 + star_brightness + 8.2799997329711914 + sun_angle + 0.98174679279327393 + sunlight_color + + 2.547271728515625 + 1.437103271484375 + 1.5411819219589233 + 2.547271728515625 + + + diff --git a/indra/newview/app_settings/windlight/skies/The%20Shed.xml b/indra/newview/app_settings/windlight/skies/The%20Shed.xml new file mode 100644 index 0000000000..9f2462263c --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/The%20Shed.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.55059814453125 + 0.24620819091796875 + 0.17596435546875 + 0.55059814453125 + + blue_density + + 0.4730224609375 + 1.208868145942688 + 1.4644775390625 + 1.4644775390625 + + blue_horizon + + 0.18896484375 + 0.35201278328895569 + 0.48291015625 + 0.48291015625 + + cloud_color + + 0.31000000238418579 + 0.31000000238418579 + 0.31000000238418579 + 0.31000000238418579 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.26999998092651367 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10.01099967956543 + + cloud_shadow + + 0.31000000238418579 + 0 + 0 + 1 + + density_multiplier + + 0.0010000000474974513 + 0 + 0 + 1 + + distance_multiplier + + 34.600002288818359 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.94999998807907104 + 0 + 0 + 1 + + glow + + 12.600000381469727 + 0.0010000000474974513 + -0.64999997615814209 + 1 + + haze_density + + 4 + 0 + 0 + 1 + + haze_horizon + + 0.14000000059604645 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 1 + 1.8954237930302043e-006 + -0 + + max_y + + 676 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0 + sun_angle + 4.7123870849609375 + sunlight_color + + 0 + 0 + 0 + 0 + + + diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index b2392b1fed..9e6a86afeb 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -805,6 +805,16 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } return false; } + else if (command == "/zoffset_up") + { + gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ") + 0.05f); + return false; + } + else if (command == "/zoffset_down") + { + gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ") - 0.05f); + return false; + } else if (command == sFSCmdLineOfferTp()) { LLUUID target_key; diff --git a/indra/newview/fsfloaterwearablefavorites.cpp b/indra/newview/fsfloaterwearablefavorites.cpp new file mode 100644 index 0000000000..74d01fb93a --- /dev/null +++ b/indra/newview/fsfloaterwearablefavorites.cpp @@ -0,0 +1,376 @@ +/** + * @file fsfloaterwearablefavorites.cpp + * @brief Class for the favorite wearables floater + * + * $LicenseInfo:firstyear=2018&license=viewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (c) 2018 Ansariel Hiller @ Second Life + * + * 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 + * + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "fsfloaterwearablefavorites.h" +#include "fscommon.h" +#include "llappearancemgr.h" +#include "llbutton.h" +#include "llfiltereditor.h" +#include "llinventoryfunctions.h" +#include "llinventoryobserver.h" +#include "llmenugl.h" +#include "llmenubutton.h" +#include "lltoggleablemenu.h" +#include "llviewercontrol.h" // for gSavedSettings +#include "llviewermenu.h" // for gMenuHolder +#include "rlvactions.h" +#include "rlvlocks.h" + +#define FS_WEARABLE_FAVORITES_FOLDER "#Wearable Favorites" + +static LLDefaultChildRegistry::Register r("fs_wearable_favorites_items_list"); + +FSWearableFavoritesItemsList::FSWearableFavoritesItemsList(const Params& p) +: LLWearableItemsList(p) +{ +} + +BOOL FSWearableFavoritesItemsList::handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + // Scroll folder view if needed. Never accepts a drag or drop. + *accept = ACCEPT_NO; + autoScroll(x, y); + + if (cargo_type == DAD_BODYPART || cargo_type == DAD_CLOTHING || cargo_type == DAD_OBJECT) + { + if (drop) + { + LLInventoryItem* item = (LLInventoryItem*)cargo_data; + if (!mDADSignal.empty()) + { + mDADSignal(item->getUUID()); + } + } + else + { + *accept = ACCEPT_YES_SINGLE; + } + } + + return TRUE; +} + +LLUUID FSFloaterWearableFavorites::sFolderID = LLUUID(); + +FSFloaterWearableFavorites::FSFloaterWearableFavorites(const LLSD& key) + : LLFloater(key), + mItemsList(NULL), + mInitialized(false), + mDADCallbackConnection() +{ + mCategoriesObserver = new LLInventoryCategoriesObserver(); +} + +FSFloaterWearableFavorites::~FSFloaterWearableFavorites() +{ + if (gInventory.containsObserver(mCategoriesObserver)) + { + gInventory.removeObserver(mCategoriesObserver); + } + delete mCategoriesObserver; + + if (mDADCallbackConnection.connected()) + { + mDADCallbackConnection.disconnect(); + } + + if (mOptionsMenuHandle.get()) + { + mOptionsMenuHandle.get()->die(); + } +} + +//virtual +BOOL FSFloaterWearableFavorites::postBuild() +{ + mItemsList = getChild("favorites_list"); + mItemsList->setNoFilteredItemsMsg(getString("search_no_items")); + mItemsList->setDoubleClickCallback(boost::bind(&FSFloaterWearableFavorites::onDoubleClick, this)); + + mRemoveItemBtn = getChild("remove_btn"); + mRemoveItemBtn->setCommitCallback(boost::bind(&FSFloaterWearableFavorites::handleRemove, this)); + + mFilterEditor = getChild("wearable_filter_input"); + mFilterEditor->setCommitCallback(boost::bind(&FSFloaterWearableFavorites::onFilterEdit, this, _2)); + + // Create menus. + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + + registrar.add("FavWearables.Action", boost::bind(&FSFloaterWearableFavorites::onOptionsMenuItemClicked, this, _2)); + enable_registrar.add("FavWearables.CheckAction", boost::bind(&FSFloaterWearableFavorites::onOptionsMenuItemChecked, this, _2)); + + mOptionsButton = getChild("options_btn"); + + LLToggleableMenu* options_menu = LLUICtrlFactory::getInstance()->createFromFile("menu_fs_wearable_favorites.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + if (options_menu) + { + mOptionsMenuHandle = options_menu->getHandle(); + mOptionsButton->setMenu(options_menu, LLMenuButton::MP_BOTTOM_LEFT); + } + + return TRUE; +} + +//virtual +void FSFloaterWearableFavorites::onOpen(const LLSD& /*info*/) +{ + if (!mInitialized) + { + if (!gInventory.isInventoryUsable()) + { + return; + } + + initCategory(); + + LLViewerInventoryCategory* category = gInventory.getCategory(sFolderID); + if (!category) + { + return; + } + + const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); + LLViewerInventoryCategory* category_cof = gInventory.getCategory(cof); + if (!category_cof) + { + return; + } + + gInventory.addObserver(mCategoriesObserver); + mCategoriesObserver->addCategory(sFolderID, boost::bind(&FSFloaterWearableFavorites::updateList, this, sFolderID)); + mCategoriesObserver->addCategory(cof, boost::bind(&FSFloaterWearableFavorites::updateList, this, sFolderID)); + category->fetch(); + + mItemsList->setSortOrder((LLWearableItemsList::ESortOrder)gSavedSettings.getU32("FSWearableFavoritesSortOrder")); + updateList(sFolderID); + mItemsList->setDADCallback(boost::bind(&FSFloaterWearableFavorites::onItemDAD, this, _1)); + + mInitialized = true; + } +} + +//virtual +void FSFloaterWearableFavorites::draw() +{ + LLFloater::draw(); + + mRemoveItemBtn->setEnabled(mItemsList->numSelected() > 0); +} + +//virtual +BOOL FSFloaterWearableFavorites::handleKeyHere(KEY key, MASK mask) +{ + if (FSCommon::isFilterEditorKeyCombo(key, mask)) + { + mFilterEditor->setFocus(TRUE); + return TRUE; + } + + return LLFloater::handleKeyHere(key, mask); +} + +void FSFloaterWearableFavorites::initCategory() +{ + LLUUID fs_favs_id; + + LLUUID fs_root_cat_id = gInventory.findCategoryByName(ROOT_FIRESTORM_FOLDER); + if (!fs_root_cat_id.isNull()) + { + LLInventoryModel::item_array_t* items; + LLInventoryModel::cat_array_t* cats; + gInventory.getDirectDescendentsOf(fs_root_cat_id, cats, items); + if (cats) + { + for (LLInventoryModel::cat_array_t::iterator it = cats->begin(); it != cats->end(); ++it) + { + if ((*it)->getName() == FS_WEARABLE_FAVORITES_FOLDER) + { + fs_favs_id = (*it)->getUUID(); + break; + } + } + } + } + else + { + fs_root_cat_id = gInventory.createNewCategory(gInventory.getRootFolderID(), LLFolderType::FT_NONE, ROOT_FIRESTORM_FOLDER); + } + + if (fs_favs_id.isNull()) + { + fs_favs_id = gInventory.createNewCategory(fs_root_cat_id, LLFolderType::FT_NONE, FS_WEARABLE_FAVORITES_FOLDER); + } + + sFolderID = fs_favs_id; +} + +//static +LLUUID FSFloaterWearableFavorites::getFavoritesFolder() +{ + if (sFolderID.notNull()) + { + return sFolderID; + } + + LLUUID fs_root_cat_id = gInventory.findCategoryByName(ROOT_FIRESTORM_FOLDER); + if (!fs_root_cat_id.isNull()) + { + LLInventoryModel::item_array_t* items; + LLInventoryModel::cat_array_t* cats; + gInventory.getDirectDescendentsOf(fs_root_cat_id, cats, items); + if (cats) + { + for (LLInventoryModel::cat_array_t::iterator it = cats->begin(); it != cats->end(); ++it) + { + if ((*it)->getName() == FS_WEARABLE_FAVORITES_FOLDER) + { + sFolderID = (*it)->getUUID(); + break; + } + } + } + } + + return sFolderID; +} + +void FSFloaterWearableFavorites::updateList(const LLUUID& folder_id) +{ + mItemsList->updateList(folder_id); + + if (gInventory.isCategoryComplete(folder_id)) + { + mItemsList->setNoItemsCommentText(getString("empty_list")); // Have to reset it here because LLWearableItemsList::updateList might override it + } +} + +void FSFloaterWearableFavorites::onItemDAD(const LLUUID& item_id) +{ + link_inventory_object(sFolderID, item_id, LLPointer(NULL)); +} + +void FSFloaterWearableFavorites::handleRemove() +{ + uuid_vec_t selected_item_ids; + mItemsList->getSelectedUUIDs(selected_item_ids); + + for (uuid_vec_t::iterator it = selected_item_ids.begin(); it != selected_item_ids.end(); ++it) + { + remove_inventory_item(*it, LLPointer(NULL)); + } +} + +void FSFloaterWearableFavorites::onFilterEdit(const std::string& search_string) +{ + mItemsList->setFilterSubString(search_string); + mItemsList->setNoItemsCommentText(getString("empty_list")); +} + +void FSFloaterWearableFavorites::onOptionsMenuItemClicked(const LLSD& userdata) +{ + const std::string action = userdata.asString(); + + if (action == "sort_by_name") + { + mItemsList->setSortOrder(LLWearableItemsList::E_SORT_BY_NAME); + gSavedSettings.setU32("FSWearableFavoritesSortOrder", LLWearableItemsList::E_SORT_BY_NAME); + } + else if (action == "sort_by_most_recent") + { + mItemsList->setSortOrder(LLWearableItemsList::E_SORT_BY_MOST_RECENT); + gSavedSettings.setU32("FSWearableFavoritesSortOrder", LLWearableItemsList::E_SORT_BY_MOST_RECENT); + } + else if (action == "sort_by_type_name") + { + mItemsList->setSortOrder(LLWearableItemsList::E_SORT_BY_TYPE_NAME); + gSavedSettings.setU32("FSWearableFavoritesSortOrder", LLWearableItemsList::E_SORT_BY_TYPE_NAME); + } +} + +bool FSFloaterWearableFavorites::onOptionsMenuItemChecked(const LLSD& userdata) +{ + const std::string action = userdata.asString(); + + if (action == "sort_by_name") + { + return mItemsList->getSortOrder() == LLWearableItemsList::E_SORT_BY_NAME; + } + else if (action == "sort_by_most_recent") + { + return mItemsList->getSortOrder() == LLWearableItemsList::E_SORT_BY_MOST_RECENT; + } + else if (action == "sort_by_type_name") + { + return mItemsList->getSortOrder() == LLWearableItemsList::E_SORT_BY_TYPE_NAME; + } + + return false; +} + +void FSFloaterWearableFavorites::onDoubleClick() +{ + LLUUID selected_item_id = mItemsList->getSelectedUUID(); + if (selected_item_id.notNull()) + { + uuid_vec_t ids; + ids.push_back(selected_item_id); + LLViewerInventoryItem* item = gInventory.getItem(selected_item_id); + + if (get_is_item_worn(selected_item_id)) + { + if ((item->getType() == LLAssetType::AT_CLOTHING && (!RlvActions::isRlvEnabled() || gRlvWearableLocks.canRemove(item))) || + (item->getType() == LLAssetType::AT_OBJECT) && (!RlvActions::isRlvEnabled() || gRlvAttachmentLocks.canDetach(item))) + { + LLAppearanceMgr::instance().removeItemsFromAvatar(ids); + } + } + else + { + if (item->getType() == LLAssetType::AT_BODYPART && (!RlvActions::isRlvEnabled() || (gRlvWearableLocks.canWear(item) & RLV_WEAR_REPLACE) == RLV_WEAR_REPLACE)) + { + wear_multiple(ids, true); + } + else if (item->getType() == LLAssetType::AT_CLOTHING && LLAppearanceMgr::instance().canAddWearables(ids) && (!RlvActions::isRlvEnabled() || (gRlvWearableLocks.canWear(item) & RLV_WEAR_ADD) == RLV_WEAR_ADD)) + { + wear_multiple(ids, false); + } + else if (item->getType() == LLAssetType::AT_OBJECT && LLAppearanceMgr::instance().canAddWearables(ids) && (!RlvActions::isRlvEnabled() || (gRlvAttachmentLocks.canAttach(item) & RLV_WEAR_ADD) == RLV_WEAR_ADD)) + { + wear_multiple(ids, false); + } + } + } +} + diff --git a/indra/newview/fsfloaterwearablefavorites.h b/indra/newview/fsfloaterwearablefavorites.h new file mode 100644 index 0000000000..40d6d41a22 --- /dev/null +++ b/indra/newview/fsfloaterwearablefavorites.h @@ -0,0 +1,110 @@ +/** + * @file fsfloaterwearablefavorites.h + * @brief Class for the favorite wearables floater + * + * $LicenseInfo:firstyear=2018&license=viewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (c) 2018 Ansariel Hiller @ Second Life + * + * 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 + * + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org + * $/LicenseInfo$ + */ + +#ifndef FS_FLOATERWEARABLEFAVORITES_H +#define FS_FLOATERWEARABLEFAVORITES_H + +#include "llfloater.h" +#include "llwearableitemslist.h" + +class LLButton; +class LLFilterEditor; +class LLMenuButton; +class LLInventoryCategoriesObserver; + +class FSWearableFavoritesItemsList : public LLWearableItemsList +{ +public: + struct Params : public LLInitParam::Block + { + Params() + {} + }; + + virtual ~FSWearableFavoritesItemsList() {} + + /* virtual */ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); + + typedef boost::signals2::signal item_dad_callback_t; + boost::signals2::connection setDADCallback(const item_dad_callback_t::slot_type& cb) + { + return mDADSignal.connect(cb); + } + +protected: + friend class LLUICtrlFactory; + FSWearableFavoritesItemsList(const Params&); + + item_dad_callback_t mDADSignal; +}; + +class FSFloaterWearableFavorites : public LLFloater +{ +public: + FSFloaterWearableFavorites(const LLSD& key); + virtual ~FSFloaterWearableFavorites(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& info); + /*virtual*/ void draw(); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool hasAccelerators() const { return true; } + + static LLUUID getFavoritesFolder(); + +private: + void initCategory(); + void updateList(const LLUUID& folder_id); + + void onItemDAD(const LLUUID& item_id); + void handleRemove(); + void onFilterEdit(const std::string& search_string); + void onDoubleClick(); + + void onOptionsMenuItemClicked(const LLSD& userdata); + bool onOptionsMenuItemChecked(const LLSD& userdata); + + bool mInitialized; + + boost::signals2::connection mDADCallbackConnection; + + LLInventoryCategoriesObserver* mCategoriesObserver; + + FSWearableFavoritesItemsList* mItemsList; + LLButton* mRemoveItemBtn; + LLFilterEditor* mFilterEditor; + LLMenuButton* mOptionsButton; + LLHandle mOptionsMenuHandle; + + static LLUUID sFolderID; +}; + +#endif // FS_FLOATERWEARABLEFAVORITES_H diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 16cdc28060..fe3b72d86f 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -314,7 +314,7 @@ void LLFloaterRegionInfo::requestRegionInfo() void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) { static LLDispatcher dispatch; - LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance("region_info"); + LLFloaterRegionInfo* floater = LLFloaterReg::findTypedInstance("region_info"); if(!floater) { return; @@ -350,7 +350,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) { LLPanel* panel; - LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance("region_info"); + LLFloaterRegionInfo* floater = LLFloaterReg::findTypedInstance("region_info"); if(!floater) { return; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index dad6e05485..1955a2c656 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -126,6 +126,9 @@ void commit_radio_group_land(LLUICtrl* ctrl); void commit_grid_mode(LLUICtrl *); void commit_slider_zoom(LLUICtrl *ctrl); +// show/hide build highlight +void commit_show_highlight(void *ctrl); + /** * Class LLLandImpactsObserver * @@ -268,9 +271,13 @@ BOOL LLFloaterTools::postBuild() // show highlight mCheckShowHighlight = getChild("checkbox show highlight"); + mCheckShowHighlight->setValue(gSavedSettings.getBOOL("RenderHighlightSelections")); + LLSelectMgr::instance().setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_NORMAL); + mCheckActualRoot = getChild("checkbox actual root"); // + // // Create Buttons // @@ -476,6 +483,9 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) // FIRE-7802: Grass and tree selection in build tool mCommitCallbackRegistrar.add("BuildTool.TreeGrass", boost::bind(&LLFloaterTools::onSelectTreeGrassCombo, this)); + // show/hide build highlight + mCommitCallbackRegistrar.add("BuildTool.commitShowHighlight", boost::bind(&commit_show_highlight, this)); + mLandImpactsObserver = new LLLandImpactsObserver(); LLViewerParcelMgr::getInstance()->addObserver(mLandImpactsObserver); } @@ -1070,6 +1080,15 @@ void LLFloaterTools::onOpen(const LLSD& key) { mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection(); mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); + + // Set the check box value from the saved setting + // this function runs on selection change + if (!mOpen) + { + mOpen = TRUE; + mCheckShowHighlight->setValue(gSavedSettings.getBOOL("RenderHighlightSelections")); + } + // std::string panel = key.asString(); if (!panel.empty()) @@ -1099,6 +1118,12 @@ void LLFloaterTools::onClose(bool app_quitting) LLSelectMgr::getInstance()->promoteSelectionToRoot(); gSavedSettings.setBOOL("EditLinkedParts", FALSE); + // + LLSelectMgr::instance().setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_NORMAL); + + mOpen = FALSE; //hack cause onOpen runs on every selection change but onClose doesnt. + // + gViewerWindow->showCursor(); resetToolState(); @@ -1295,6 +1320,23 @@ void commit_select_component(void *data) } } +// show/hide build highlight +void commit_show_highlight(void *data) +{ + LLFloaterTools* floaterp = (LLFloaterTools*)data; + BOOL show_highlight = floaterp->mCheckShowHighlight->get(); + if (show_highlight) + { + LLSelectMgr::getInstance()->setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_SHOW); + } + else + { + LLSelectMgr::getInstance()->setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_HIDE); + } +} +// + + // static void LLFloaterTools::setObjectType( LLPCode pcode ) { diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 5013cd9ada..3e03d9efe4 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -224,12 +224,14 @@ public: private: BOOL mDirty; BOOL mHasSelection; + BOOL mOpen; //Phoenix:KC //Phoenix:KC S32 mCollapsedHeight; S32 mExpandedHeight; std::map mStatusText; + protected: LLSD mMediaSettings; diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index f9abb0ae7e..f2da4cdce2 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -536,7 +536,10 @@ void LLGroupListItem::onProfileBtnClick() void LLGroupListItem::changed(LLGroupChange gc) { LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID); - if(group_data) + // FIRE-22148: Only update group icon if the received group data actually contains group icon info + //if (group_data) + if ((gc == GC_ALL || gc == GC_PROPERTIES) && group_data) + // setGroupIconID(group_data->mInsigniaID); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6e1d441f42..86cc843b72 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -100,6 +100,7 @@ #endif // #include "fsfloaterplacedetails.h" +#include "fsfloaterwearablefavorites.h" #include "llviewerattachmenu.h" #include "llresmgr.h" @@ -1375,6 +1376,13 @@ BOOL LLInvFVBridge::isProtectedFolder(bool ignore_setting /*= false*/) const return TRUE; } + if ((mUUID == FSFloaterWearableFavorites::getFavoritesFolder() + || model->isObjectDescendentOf(mUUID, FSFloaterWearableFavorites::getFavoritesFolder())) + && gSavedPerAccountSettings.getBOOL("ProtectWearableFavoritesFolders")) + { + return TRUE; + } + return FALSE; } // @@ -5670,9 +5678,11 @@ bool LLFolderBridge::isProtected() const { static LLCachedControl protectAOFolders(gSavedPerAccountSettings, "ProtectAOFolders"); static LLCachedControl protectBridgeFolder(gSavedPerAccountSettings, "ProtectBridgeFolder"); + static LLCachedControl WearableFavoritesprotectBridgeFolder(gSavedPerAccountSettings, "ProtectWearableFavoritesFolders"); return ((mUUID == AOEngine::instance().getAOFolder() && protectAOFolders) || - (mUUID == FSLSLBridge::instance().getBridgeFolder() && protectBridgeFolder)); + (mUUID == FSLSLBridge::instance().getBridgeFolder() && protectBridgeFolder) || + (mUUID == FSFloaterWearableFavorites::getFavoritesFolder() && WearableFavoritesprotectBridgeFolder)); } // diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 3c9207169e..71f678dd31 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -94,6 +94,7 @@ // Firestorm includes #include "aoengine.h" +#include "fsfloaterwearablefavorites.h" #include "fslslbridge.h" BOOL LLInventoryState::sWearNewClothing = FALSE; @@ -433,7 +434,10 @@ void copy_inventory_category(LLInventoryModel* model, LLInventoryItem* item = *iter; LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid)); - if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + // FIRE-21719: Copy-pasting a folder doesn't copy contained links + //if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + if (!item->getIsLinkType() && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + // { // If the item is nocopy, we do nothing or, optionally, move it if (move_no_copy_items) @@ -445,6 +449,12 @@ void copy_inventory_category(LLInventoryModel* model, // Decrement the count in root_id since that one item won't be copied over LLMarketplaceData::instance().decrementValidationWaiting(root_id); } + // FIRE-21719: Copy-pasting a folder doesn't copy contained links + else if (item->getIsLinkType()) + { + link_inventory_object(new_cat_uuid, item->getLinkedUUID(), cb); + } + // else { copy_inventory_item( @@ -640,6 +650,9 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) || (model->isObjectDescendentOf(id, FSLSLBridge::instance().getBridgeFolder()) && gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder")) + || + (model->isObjectDescendentOf(id, FSFloaterWearableFavorites::getFavoritesFolder()) + && gSavedPerAccountSettings.getBOOL("ProtectWearableFavoritesFolders")) ) { return FALSE; @@ -707,6 +720,9 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) || ((id == FSLSLBridge::instance().getBridgeFolder() || model->isObjectDescendentOf(id, FSLSLBridge::instance().getBridgeFolder())) && gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder")) + || + ((id == FSFloaterWearableFavorites::getFavoritesFolder() || model->isObjectDescendentOf(id, FSFloaterWearableFavorites::getFavoritesFolder())) + && gSavedPerAccountSettings.getBOOL("ProtectWearableFavoritesFolders")) ) { return FALSE; @@ -762,6 +778,9 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) || ((id == FSLSLBridge::instance().getBridgeFolder() || model->isObjectDescendentOf(id, FSLSLBridge::instance().getBridgeFolder())) && gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder")) + || + ((id == FSFloaterWearableFavorites::getFavoritesFolder() || model->isObjectDescendentOf(id, FSFloaterWearableFavorites::getFavoritesFolder())) + && gSavedPerAccountSettings.getBOOL("ProtectWearableFavoritesFolders")) ) { return FALSE; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index bd1e2cd88b..4edb583d8a 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -64,11 +64,11 @@ #include "rlvhandler.h" #include "rlvlocks.h" // [/RLVa:KB] -//-TT Patch: ReplaceWornItemsOnly +// Patch: ReplaceWornItemsOnly #include "llviewerobjectlist.h" #include "llviewerobject.h" #include "llgesturemgr.h" -//-TT +// //#define DIFF_INVENTORY_FILES #ifdef DIFF_INVENTORY_FILES @@ -76,6 +76,7 @@ #endif #include "aoengine.h" +#include "fsfloaterwearablefavorites.h" #include "fslslbridge.h" #ifdef OPENSIM #include "llviewernetwork.h" @@ -1310,7 +1311,9 @@ void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item, if ((isObjectDescendentOf(item->getUUID(), AOEngine::instance().getAOFolder()) && gSavedPerAccountSettings.getBOOL("ProtectAOFolders")) || (isObjectDescendentOf(item->getUUID(), FSLSLBridge::instance().getBridgeFolder()) - && gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder"))) + && gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder")) || + (isObjectDescendentOf(item->getUUID(), FSFloaterWearableFavorites::getFavoritesFolder()) + && gSavedPerAccountSettings.getBOOL("ProtectWearableFavoritesFolders"))) { LL_INFOS("Inventory") << "Cannot move item because it is descendent of a protected folder" << LL_ENDL; return; @@ -1352,7 +1355,9 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat, if ((isObjectDescendentOf(cat->getUUID(), AOEngine::instance().getAOFolder()) && gSavedPerAccountSettings.getBOOL("ProtectAOFolders")) || (isObjectDescendentOf(cat->getUUID(), FSLSLBridge::instance().getBridgeFolder()) - && gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder"))) + && gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder")) || + (isObjectDescendentOf(cat->getUUID(), FSFloaterWearableFavorites::getFavoritesFolder()) + && gSavedPerAccountSettings.getBOOL("ProtectWearableFavoritesFolders"))) { LL_INFOS("Inventory") << "Cannot move category because it is descendent of a protected folder" << LL_ENDL; return; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4f87522e71..49db38a95a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -211,6 +211,12 @@ LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) // Inventory specials p.for_inventory = true; + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + p.item_height = fsFolderViewItemHeight; + p.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // + return LLUICtrlFactory::create(p); } @@ -857,6 +863,12 @@ LLFolderViewFolder * LLInventoryPanel::createFolderViewFolder(LLInvFVBridge * br // Inventory specials params.for_inventory = true; + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + params.item_height = fsFolderViewItemHeight; + params.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // + return LLUICtrlFactory::create(params); } @@ -876,6 +888,12 @@ LLFolderViewItem * LLInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge // Inventory specials params.for_inventory = true; + + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + params.item_height = fsFolderViewItemHeight; + params.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // return LLUICtrlFactory::create(params); } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index eb70c8c57f..6dd2b251dc 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -220,6 +220,8 @@ public: // Optional hiding of Inbox folder void updateShowInboxFolder(const LLSD &data); + void updateFolderLabel(const LLUUID& folder_id); + // DEBUG ONLY: static void dumpSelectionInformation(void* user_data); diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 0975a21b15..dc162dfa8d 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -83,6 +83,15 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge params.font_color = item_color; params.font_highlight_color = item_color; params.allow_drop = allow_drop; + + // Inventory specials + params.for_inventory = true; + + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + params.item_height = fsFolderViewItemHeight; + params.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // return LLUICtrlFactory::create(params); } @@ -102,6 +111,15 @@ LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * b params.font_color = item_color; params.font_highlight_color = item_color; + // Inventory specials + params.for_inventory = true; + + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + params.item_height = fsFolderViewItemHeight; + params.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // + return LLUICtrlFactory::create(params); } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 9b729a2e3c..f1dc79c7a6 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1736,6 +1736,12 @@ void LLPanelObjectInventory::reset() // Inventory specials p.for_inventory = true; + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + p.item_height = fsFolderViewItemHeight; + p.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // + mFolders = LLUICtrlFactory::create(p); mFolders->setCallbackRegistrar(&mCommitCallbackRegistrar); @@ -1900,6 +1906,12 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root // Inventory specials p.for_inventory = true; + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + p.item_height = fsFolderViewItemHeight; + p.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // + LLFolderViewFolder* new_folder = LLUICtrlFactory::create(p); new_folder->addToFolder(mFolders); new_folder->toggleOpen(); @@ -1950,6 +1962,12 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li // Inventory specials p.for_inventory = true; + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + p.item_height = fsFolderViewItemHeight; + p.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // + view = LLUICtrlFactory::create(p); child_categories.push_back(new obj_folder_pair(obj, (LLFolderViewFolder*)view)); @@ -1969,6 +1987,12 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li // Inventory specials params.for_inventory = true; + static LLCachedControl fsFolderViewItemHeight(*LLUI::sSettingGroups["config"], "FSFolderViewItemHeight"); + const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); + params.item_height = fsFolderViewItemHeight; + params.item_top_pad = default_params.item_top_pad - (default_params.item_height - fsFolderViewItemHeight) / 2 - 1; + // + view = LLUICtrlFactory::create (params); } view->addToFolder(folder); diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 608507a0d2..98b253f291 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -72,7 +72,10 @@ LLUUID notification_id_to_object_id(const LLUUID& notification_id) LLScriptFloater::LLScriptFloater(const LLSD& key) -: LLDockableFloater(NULL, true, key) +// FIRE-21546: Don't close docked floater if IMs arrive, but only if IMs shown in tabs - still hide when using docked windows! +//: LLDockableFloater(NULL, true, key) +: LLDockableFloater(NULL, gSavedSettings.getS32("FSChatWindow") != 1, key) +// , mScriptForm(NULL) , mSaveFloaterPosition(false) { diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index f3926f8659..21aaa33f3d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -238,6 +238,11 @@ LLSelectMgr::LLSelectMgr() mForceSelection = FALSE; mShowSelection = FALSE; + + // show/hide build highlight + mFSShowHideHighlight = FS_SHOW_HIDE_HIGHLIGHT_NORMAL; + // + } @@ -5948,7 +5953,10 @@ void LLSelectMgr::updateSelectionSilhouette(LLObjectSelectionHandle object_handl } void LLSelectMgr::renderSilhouettes(BOOL for_hud) { - if (!mRenderSilhouettes || !mRenderHighlightSelections) + // show/hide build highlight + // if (!mRenderSilhouettes || !mRenderHighlightSelections) + if (((mFSShowHideHighlight == FS_SHOW_HIDE_HIGHLIGHT_NORMAL) && (!mRenderSilhouettes || !mRenderHighlightSelections)) || (mFSShowHideHighlight == FS_SHOW_HIDE_HIGHLIGHT_HIDE)) + // { return; } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 4f8944828c..d551c28496 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -69,6 +69,15 @@ const S32 MAX_CHILDREN_PER_TASK = 255; const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; // +// show/hide build highlight +enum EFSShowHideHighlight +{ + FS_SHOW_HIDE_HIGHLIGHT_NORMAL = 0, + FS_SHOW_HIDE_HIGHLIGHT_SHOW = 1, + FS_SHOW_HIDE_HIGHLIGHT_HIDE = 2 +}; +// + // This is used by the DeRezObject message to determine where to put // derezed tasks. enum EDeRezDestination @@ -612,6 +621,10 @@ public: void renderSilhouettes(BOOL for_hud); void enableSilhouette(BOOL enable) { mRenderSilhouettes = enable; } + // show/hide build highlight + void setFSShowHideHighlight(EFSShowHideHighlight state) { mFSShowHideHighlight = state; } + // + //////////////////////////////////////////////////////////////// // Utility functions that operate on the current selection //////////////////////////////////////////////////////////////// @@ -913,6 +926,10 @@ private: LLAnimPauseRequest mPauseRequest; +// show/hide build highlight + EFSShowHideHighlight mFSShowHideHighlight; +// + // Warning when trying to duplicate while in edit linked parts/select face mode public: // returns TRUE if current selection does not contain individual selections diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6a21242c10..7657addcef 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -39,6 +39,10 @@ #include "llviewermedia_streamingaudio.h" #include "llaudioengine.h" +#ifdef LL_FMODSTUDIO +# include "llaudioengine_fmodstudio.h" +#endif + #ifdef LL_FMODEX # include "llaudioengine_fmodex.h" #endif @@ -955,12 +959,21 @@ bool idle_startup() delete gAudiop; gAudiop = NULL; -#ifdef LL_FMODEX +#ifdef LL_FMODSTUDIO +#if !LL_WINDOWS + if (NULL == getenv("LL_BAD_FMODSTUDIO_DRIVER")) +#endif // !LL_WINDOWS + { + gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODSTUDIO(gSavedSettings.getBOOL("FMODProfilerEnable"), gSavedSettings.getU32("FMODResampleMethod")); + } +#endif + +#ifdef LL_FMODEX #if !LL_WINDOWS if (NULL == getenv("LL_BAD_FMODEX_DRIVER")) #endif // !LL_WINDOWS { - gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODEX(gSavedSettings.getBOOL("FMODExProfilerEnable")); + gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODEX(gSavedSettings.getBOOL("FMODProfilerEnable")); } #endif @@ -977,7 +990,7 @@ bool idle_startup() if (gAudiop) { #if LL_WINDOWS - // FMOD Ex on Windows needs the window handle to stop playing audio + // FMOD Studio and FMOD Ex on Windows needs the window handle to stop playing audio // when window is minimized. JC void* window_handle = (HWND)gViewerWindow->getPlatformWindow(); #else @@ -1072,6 +1085,36 @@ bool idle_startup() // *TODO: Does this need to be here? LLStringOps::setupDatetimeInfo(false); + // [FIRE-22130] for LOD Factors > 4 reset to the detected dafault + if (gSavedSettings.getF32("RenderVolumeLODFactor") > 4.f) + { + bool feature_table_success = false; + LLFeatureManager& feature_manager = LLFeatureManager::instance(); + U32 level = gSavedSettings.getU32("RenderQualityPerformance"); + if (feature_manager.isValidGraphicsLevel(level)) + { + std::string level_name = feature_manager.getNameForGraphicsLevel(level); + LLFeatureList* feature_list = feature_manager.findMask(level_name); + if (feature_list) + { + F32 new_val = feature_list->getRecommendedValue("RenderVolumeLODFactor"); + if (new_val > 0.f) + { + feature_table_success = true; + gSavedSettings.setF32("RenderVolumeLODFactor", new_val); + LL_INFOS("AppInit") << "LOD Factor too high. Resetting to recommended value for graphics level '" << level_name << "': " << new_val << LL_ENDL; + } + } + } + + if (!feature_table_success) + { + gSavedSettings.getControl("RenderVolumeLODFactor")->resetToDefault(true); + LL_INFOS("AppInit") << "LOD Factor too high. Resetting to recommended value for global default: " << gSavedSettings.getF32("RenderVolumeLODFactor") << LL_ENDL; + } + } + // + // Go to the next startup state LLStartUp::setStartupState( STATE_BROWSER_INIT ); return FALSE; @@ -3038,14 +3081,6 @@ void login_show() //LLPanelLogin::show( gViewerWindow->getWindowRectScaled(), login_callback, NULL ); FSPanelLogin::show( gViewerWindow->getWindowRectScaled(), login_callback, NULL ); // [FS Login Panel] - - // Warning about too high LOD on startup - if (gSavedSettings.getF32("RenderVolumeLODFactor") >= 4.0f) - { - LLNotificationsUtil::add("RenderVolumeLODFactorWarning"); - } - // - } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index d95ce7f6d2..5019a3b58b 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -127,7 +127,7 @@ void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI) LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl(); if(stream && stream->supportsAdjustableBufferSizes()) - stream->setBufferSizes(gSavedSettings.getU32("FMODExStreamBufferSize"),gSavedSettings.getU32("FMODExDecodeBufferSize")); + stream->setBufferSizes(gSavedSettings.getU32("FMODStreamBufferSize"),gSavedSettings.getU32("FMODDecodeBufferSize")); gAudiop->startInternetStream(mNextStreamURI); startFading(); @@ -192,7 +192,7 @@ bool LLViewerAudio::onIdleUpdate() { LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl(); if(stream && stream->supportsAdjustableBufferSizes()) - stream->setBufferSizes(gSavedSettings.getU32("FMODExStreamBufferSize"),gSavedSettings.getU32("FMODExDecodeBufferSize")); + stream->setBufferSizes(gSavedSettings.getU32("FMODStreamBufferSize"),gSavedSettings.getU32("FMODDecodeBufferSize")); gAudiop->startInternetStream(mNextStreamURI); } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 291745ae7a..5c9aacb58e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -286,7 +286,7 @@ static bool handleVolumeLODChanged(const LLSD& newvalue) LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; // Warning about too high LOD on LOD change - if (LLVOVolume::sLODFactor >= 4.0f) + if (LLVOVolume::sLODFactor > 4.0f) { LLNotificationsUtil::add("RenderVolumeLODFactorWarning"); } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 7da87f08a4..89625cf36c 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -194,6 +194,7 @@ #include "fsfloatervoicecontrols.h" #include "fsfloatervolumecontrols.h" #include "fsfloatervramusage.h" +#include "fsfloaterwearablefavorites.h" #include "fsmoneytracker.h" #include "fspanelclassified.h" #include "lggbeamcolormapfloater.h" @@ -466,6 +467,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("fs_teleporthistory", "floater_fs_teleporthistory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_voice_controls", "floater_fs_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("fs_volume_controls", "floater_fs_volume_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("fs_wearable_favorites", "floater_fs_wearable_favorites.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("imcontacts", "floater_fs_contacts.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("lgg_beamcolormap", "floater_beamcolor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("lgg_beamshape", "floater_beamshape.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 979a6ec33d..56d73c108c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -743,7 +743,7 @@ void LLVOVolume::updateTextures() if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive()) { //delete vertex buffer to free up some VRAM LLSpatialGroup* group = mDrawable->getSpatialGroup(); - if (group) + if (group && (group->mVertexBuffer.notNull() || !group->mBufferMap.empty() || !group->mDrawMap.empty())) { group->destroyGL(true); diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 34b415e92b..036f79fc82 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -663,6 +663,7 @@ static const LLDefaultChildRegistry::Register r("wearable_i LLWearableItemsList::Params::Params() : standalone("standalone", true) , worn_indication_enabled("worn_indication_enabled", true) +, show_create_new("show_create_new", true) // Optional "Create new" menu item {} LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) @@ -676,6 +677,7 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) setRightMouseDownCallback(boost::bind(&LLWearableItemsList::onRightClick, this, _2, _3)); } mWornIndicationEnabled = p.worn_indication_enabled; + mShowCreateNew = p.show_create_new; // Optional "Create new" menu item setNoItemsCommentText(LLTrans::getString("NoneFound")); } @@ -950,8 +952,16 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu // [/RLVa:KB] } // for - bool standalone = mParent ? mParent->isStandalone() : false; + // Standalone check doesn't make sense here as the context + // menu is only shown if standalone is true. If not, this + // method isn't called at all and it is assumed you provide + // your own right-click handler (LLWearableItemsList::ContextMenu + // is only used in LLWearableItemsList::onRightClick handler + // method which in return is only set as event handler if + // standalone is true). + bool standalone = /*mParent ? mParent->isStandalone() :*/ false; bool wear_add_visible = mask & (MASK_CLOTHING|MASK_ATTACHMENT) && n_worn == 0 && can_be_worn && (n_already_worn != 0 || mask & MASK_ATTACHMENT); + bool show_create_new = mParent ? mParent->showCreateNew() : true; // Optional "Create new" menu item // *TODO: eliminate multiple traversals over the menu items setMenuItemVisible(menu, "wear_wear", n_already_worn == 0 && n_worn == 0 && can_be_worn); @@ -970,7 +980,10 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu setMenuItemVisible(menu, "edit", !standalone && mask & (MASK_CLOTHING|MASK_BODYPART|MASK_ATTACHMENT) && n_worn == n_items && n_worn == 1); // [/SL:KB] setMenuItemEnabled(menu, "edit", n_editable == 1 && n_worn == 1 && n_items == 1); - setMenuItemVisible(menu, "create_new", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1); + // Optional "Create new" menu item + //setMenuItemVisible(menu, "create_new", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1); + setMenuItemVisible(menu, "create_new", show_create_new && mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1); + // setMenuItemEnabled(menu, "create_new", LLAppearanceMgr::instance().canAddWearables(ids)); setMenuItemVisible(menu, "show_original", !standalone); setMenuItemEnabled(menu, "show_original", n_items == 1 && n_links == n_items); diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index f3182ed163..4115e4b681 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -439,6 +439,7 @@ public: { Optional standalone; Optional worn_indication_enabled; + Optional show_create_new; // Optional "Create new" menu item Params(); }; @@ -469,6 +470,8 @@ public: void setSortOrder(ESortOrder sort_order, bool sort_now = true); + bool showCreateNew() const { return mShowCreateNew; } // Optional "Create new" menu item + protected: friend class LLUICtrlFactory; LLWearableItemsList(const LLWearableItemsList::Params& p); @@ -477,6 +480,7 @@ protected: bool mIsStandalone; bool mWornIndicationEnabled; + bool mShowCreateNew; // Optional "Create new" menu item ESortOrder mSortOrder; }; diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index 2c36896e05..6e29cad500 100755 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -160,7 +160,7 @@ BEGIN VALUE "FileDescription", "Firestorm" VALUE "FileVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}" VALUE "InternalName", "Firestorm" - VALUE "LegalCopyright", "Copyright \251 2010-2017, The Phoenix Firestorm Project, Inc." + VALUE "LegalCopyright", "Copyright \251 2010-2018, The Phoenix Firestorm Project, Inc." VALUE "OriginalFilename", "Firestorm.exe" VALUE "ProductName", "Firestorm" VALUE "ProductVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}" diff --git a/indra/newview/skins/ansastorm/themes/blood/colors.xml b/indra/newview/skins/ansastorm/themes/blood/colors.xml index 6b6372292c..42650a9737 100644 --- a/indra/newview/skins/ansastorm/themes/blood/colors.xml +++ b/indra/newview/skins/ansastorm/themes/blood/colors.xml @@ -726,7 +726,7 @@ reference="White" /> + reference="White_50" /> diff --git a/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml b/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml index 0dc5644077..510fe7c119 100644 --- a/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml +++ b/indra/newview/skins/ansastorm/themes/ectoplasma/colors.xml @@ -717,7 +717,7 @@ reference="White" /> + reference="White_50" /> diff --git a/indra/newview/skins/default/textures/legacy/inv_folder_object.tga b/indra/newview/skins/default/textures/legacy/inv_folder_object.tga index c3d04bf27c..0ec121de3e 100644 Binary files a/indra/newview/skins/default/textures/legacy/inv_folder_object.tga and b/indra/newview/skins/default/textures/legacy/inv_folder_object.tga differ diff --git a/indra/newview/skins/default/textures/legacy/inv_folder_snapshot.tga b/indra/newview/skins/default/textures/legacy/inv_folder_snapshot.tga index d32538d9ca..6957a0a93b 100644 Binary files a/indra/newview/skins/default/textures/legacy/inv_folder_snapshot.tga and b/indra/newview/skins/default/textures/legacy/inv_folder_snapshot.tga differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index b1091b1626..15fdb5b2fd 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -793,6 +793,7 @@ with the same filename but different name + diff --git a/indra/newview/skins/default/textures/toolbar_icons/wearable_favorites.png b/indra/newview/skins/default/textures/toolbar_icons/wearable_favorites.png new file mode 100644 index 0000000000..5e73f9a046 Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/wearable_favorites.png differ diff --git a/indra/newview/skins/default/xui/de/floater_fs_wearable_favorites.xml b/indra/newview/skins/default/xui/de/floater_fs_wearable_favorites.xml new file mode 100644 index 0000000000..798e3d1dbd --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_fs_wearable_favorites.xml @@ -0,0 +1,14 @@ + + + + Kleidung oder Objekt hier hinziehen, um zur Liste hinzuzufügen. + + + Keine treffenden Objekte gefunden. + + + + +