From ea9739bd2c5121f1368518163c8242c9c34830fe Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 31 Mar 2012 22:57:34 +1000 Subject: Remove some left over WindLight cruft. --- linden/indra/newview/CMakeLists.txt | 1 - linden/indra/newview/llfloaterenvsettings.cpp | 15 -- linden/indra/newview/windlightsettingsupdate.cpp | 200 ----------------------- 3 files changed, 216 deletions(-) delete mode 100644 linden/indra/newview/windlightsettingsupdate.cpp (limited to 'linden') diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 2a976ff..1db6eab 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -503,7 +503,6 @@ set(viewer_SOURCE_FILES slfloatermediafilter.cpp viewerinfo.cpp viewertime.cpp - windlightsettingsupdate.cpp wlfloatermanager.cpp wlfloaterwindlightsend.cpp wlretrievesettings.cpp diff --git a/linden/indra/newview/llfloaterenvsettings.cpp b/linden/indra/newview/llfloaterenvsettings.cpp index 801ff49..2cb1988 100644 --- a/linden/indra/newview/llfloaterenvsettings.cpp +++ b/linden/indra/newview/llfloaterenvsettings.cpp @@ -291,21 +291,6 @@ void LLFloaterEnvSettings::onOpenWLManager(void* userData) WLFloaterManager::show(); } -void LLFloaterEnvSettings::onSubmitWindlight(void* userData) -{ - Meta7WindlightPacket * wl = new Meta7WindlightPacket(); - - LLWaterParamManager * param_mgr = LLWaterParamManager::instance(); - wl->reflectionWaveletScale.X = param_mgr->mNormalScale.mX; - wl->reflectionWaveletScale.Y = param_mgr->mNormalScale.mY; - wl->reflectionWaveletScale.Z = param_mgr->mNormalScale.mZ; - - - std::vector strings; - strings.push_back((char*)wl); - send_generic_message("Windlight", strings); -} - void LLFloaterEnvSettings::onUseEstateTime(void* userData) { if(LLFloaterWindLight::isOpen()) diff --git a/linden/indra/newview/windlightsettingsupdate.cpp b/linden/indra/newview/windlightsettingsupdate.cpp deleted file mode 100644 index ad6e7c9..0000000 --- a/linden/indra/newview/windlightsettingsupdate.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* - * @file kowopenregionsettings.cpp - * @brief Handler for OpenRegionInfo event queue message. - * - * Copyright (c) 2010, Patrick Sapinski - * - * The source code in this file ("Source Code") is provided to you - * under the terms of the GNU General Public License, version 2.0 - * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in - * this distribution, or online at - * http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - */ - -#include "llviewerprecompiledheaders.h" -#include "llhttpnode.h" -#include "hippolimits.h" -#include "llfloatertools.h" -#include "llviewercontrol.h" -#include "llagent.h" -#include "llsurface.h" -#include "llviewerregion.h" -#include "llviewerobject.h" - -#include "linden_common.h" -#include "llwaterparammanager.h" -#include "llwaterparamset.h" -#include "llwlparammanager.h" -#include "llwlparamset.h" -#include "message.h" -#include "meta7windlight.h" -#include "lightshare.h" -#include "wlsettingsmanager.h" - -//DEBUG includes -//#include "llsdserialize.h" //LLSDNotationStreamer - for dumping LLSD to string - -class WindLightSettingsUpdate : public LLHTTPNode -{ - /*virtual*/ void post( - LLHTTPNode::ResponsePtr response, - const LLSD& context, - const LLSD& input) const - { - if (!input.isMap() || !input.has("body")) - { - llinfos << "malformed WindLightSettingsUpdate update!" << llendl; - return; - } - LLWaterParamSet* mWater; - LLWLParamSet* mSky; - LLUUID* mWaterNormal; - - mWater = new LLWaterParamSet(); - mSky = new LLWLParamSet(); - mWaterNormal = new LLUUID(); - - LLSD body = input["body"]; - - mWater->set("waterFogColor", - body["waterColorX"].asReal() / 256.f, - body["waterColorY"].asReal() / 256.f, - body["waterColorZ"].asReal() / 256.f, - body["waterColorW"].asReal() / 256.f); - mWater->set("waterFogDensity", body["waterFogDensityExponent"].asReal()); - mWater->set("underWaterFogMod", body["underwaterFogModifier"].asReal()); - mWater->set("normScale", body["reflectionWaveletScaleX"].asReal(), - body["reflectionWaveletScaleY"].asReal(), - body["reflectionWaveletScaleZ"].asReal()); - mWater->set("fresnelScale", body["fresnelScale"].asReal()); - mWater->set("fresnelOffset", body["fresnelOffset"].asReal()); - mWater->set("scaleAbove", body["refractScaleAbove"].asReal()); - mWater->set("scaleBelow", body["refractScaleBelow"].asReal()); - mWater->set("blurMultiplier", body["blurMultiplier"].asReal()); - mWater->set("wave2Dir", body["bigWaveDirectionX"].asReal(), - body["bigWaveDirectionY"].asReal()); - mWater->set("wave1Dir", body["littleWaveDirectionX"].asReal(), - body["littleWaveDirectionY"].asReal()); - mWaterNormal->parseUUID(body["normalMapTexture"].asUUID().asString(), mWaterNormal); - - mSky->setSunAngle(body["sunMoonPosition"].asReal()); - mSky->setEastAngle(body["eastAngle"].asReal()); - - mSky->set("sunlight_color", - body["sunMoonColorX"].asReal() * 3.0f, - body["sunMoonColorY"].asReal() * 3.0f, - body["sunMoonColorZ"].asReal() * 3.0f, - body["sunMoonColorW"].asReal() * 3.0f); - - mSky->set("ambient", - body["ambientX"].asReal() * 3.0f, - body["ambientY"].asReal() * 3.0f, - body["ambientZ"].asReal() * 3.0f, - body["ambientW"].asReal() * 3.0f); - - mSky->set("blue_horizon", - body["horizonX"].asReal() * 2.0f, - body["horizonY"].asReal() * 2.0f, - body["horizonZ"].asReal() * 2.0f, - body["horizonW"].asReal() * 2.0f); - - mSky->set("blue_density", - body["blueDensityX"].asReal(), - body["blueDensityY"].asReal(), - body["blueDensityZ"].asReal(), - 1.0); - - mSky->set("haze_horizon", - body["hazeHorizon"].asReal(), - body["hazeHorizon"].asReal(), - body["hazeHorizon"].asReal(), - 1.f); - - mSky->set("haze_density", - body["hazeDensity"].asReal(), - 0.f, 0.f, 1.f); - - mSky->set("cloud_shadow", - body["cloudCoverage"].asReal(), - 0.f, 0.f, 1.f); - - mSky->set("density_multiplier", - body["densityMultiplier"].asReal() / 1000.0f, - 0.f, 0.f, 1.f); - - mSky->set("distance_multiplier", - body["distanceMultiplier"].asReal(), - 0.f, 0.f, 1.f); - - mSky->set("max_y", - body["maxAltitude"].asReal(), - 0.f, 0.f, 1.f); - - mSky->set("cloud_color", - body["cloudColorX"].asReal(), - body["cloudColorY"].asReal(), - body["cloudColorZ"].asReal(), - body["cloudColorW"].asReal()); - - mSky->set("cloud_pos_density1", - body["cloudXYDensityX"].asReal(), - body["cloudXYDensityY"].asReal(), - body["cloudXYDensityZ"].asReal(), - 1.f); - - mSky->set("cloud_pos_density2", - body["cloudDetailXYDensityX"].asReal(), - body["cloudDetailXYDensityY"].asReal(), - body["cloudDetailXYDensityZ"].asReal(), - 1.f); - - mSky->set("cloud_scale", - body["cloudScale"].asReal(), - 0.f, 0.f, 1.f); - - mSky->set("gamma", - body["sceneGamma"].asReal(), - 0.f, 0.f, 1.f); - - mSky->set("glow", - (2 - body["sunGlowSize"].asReal()) * 20, - 0.f, - -body["sunGlowFocus"].asReal() * 5, - 1.f); - - mSky->setCloudScrollX(body["cloudScrollX"].asReal() + 10.0f); - mSky->setCloudScrollY(body["cloudScrollY"].asReal() + 10.0f); - - mSky->setEnableCloudScrollX(!body["cloudScrollXLock"].asBoolean()); - mSky->setEnableCloudScrollY(!body["cloudScrollYLock"].asBoolean()); - - mSky->setStarBrightness(body["starBrightness"].asReal()); - - mSky->set("fade", body["fade"].asReal()); - - //Update this here.. since it isn't a part of WL... go figure - gHippoLimits->skyUseClassicClouds = body["drawClassicClouds"].asBoolean(); - gSavedSettings.setF32("ClassicCloudHeight",body["classicCloudHeight"].asReal()); - gSavedSettings.setF32("ClassicCloudRange",body["classicCloudRange"].asReal()); - - WLSettingsManager::Apply(mSky, mWater, mWaterNormal); -} -}; - -LLHTTPRegistration -gHTTPRegistrationWindLightSettingsUpdate( - "/message/WindLightSettingsUpdate"); \ No newline at end of file -- cgit v1.1