aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-04-03 06:40:21 +1000
committerDavid Walter Seikel2012-04-03 06:40:21 +1000
commita28736172e5adff7c68cc924d999834b2c3d348d (patch)
tree51142317d6728f4de003c41da40b685793c623f2 /linden
parentMerge a bunch of duplicated Windlight sharing code. (diff)
downloadmeta-impy-a28736172e5adff7c68cc924d999834b2c3d348d.zip
meta-impy-a28736172e5adff7c68cc924d999834b2c3d348d.tar.gz
meta-impy-a28736172e5adff7c68cc924d999834b2c3d348d.tar.bz2
meta-impy-a28736172e5adff7c68cc924d999834b2c3d348d.tar.xz
Yay for automated white space fixes.
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llfloaterwater.cpp100
-rw-r--r--linden/indra/newview/llwlparamset.h72
2 files changed, 86 insertions, 86 deletions
diff --git a/linden/indra/newview/llfloaterwater.cpp b/linden/indra/newview/llfloaterwater.cpp
index 782c56e..1101a10 100644
--- a/linden/indra/newview/llfloaterwater.cpp
+++ b/linden/indra/newview/llfloaterwater.cpp
@@ -1,11 +1,11 @@
1/** 1/**
2 * @file llfloaterwater.cpp 2 * @file llfloaterwater.cpp
3 * @brief LLFloaterWater class definition 3 * @brief LLFloaterWater class definition
4 * 4 *
5 * $LicenseInfo:firstyear=2007&license=viewergpl$ 5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2007-2009, Linden Research, Inc. 7 * Copyright (c) 2007-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0 11 * to you under the terms of the GNU General Public License, version 2.0
@@ -13,17 +13,17 @@
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception 21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 * 22 *
23 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations. 25 * and agree to abide by those obligations.
26 * 26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE. 29 * COMPLETENESS OR PERFORMANCE.
@@ -75,15 +75,15 @@ std::set<std::string> LLFloaterWater::sDefaultPresets;
75LLFloaterWater::LLFloaterWater() : LLFloater(std::string("water floater")) 75LLFloaterWater::LLFloaterWater() : LLFloater(std::string("water floater"))
76{ 76{
77 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_water.xml"); 77 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_water.xml");
78 78
79 // add the combo boxes 79 // add the combo boxes
80 LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo"); 80 LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");
81 81
82 if(comboBox != NULL) { 82 if(comboBox != NULL) {
83 83
84 std::map<std::string, LLWaterParamSet>::iterator mIt = 84 std::map<std::string, LLWaterParamSet>::iterator mIt =
85 LLWaterParamManager::instance()->mParamList.begin(); 85 LLWaterParamManager::instance()->mParamList.begin();
86 for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++) 86 for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++)
87 { 87 {
88 comboBox->add(mIt->first); 88 comboBox->add(mIt->first);
89 } 89 }
@@ -117,7 +117,7 @@ void LLFloaterWater::initCallbacks(void) {
117 initHelpBtn("WaterFogColorHelp", "HelpWaterFogColor"); 117 initHelpBtn("WaterFogColorHelp", "HelpWaterFogColor");
118 initHelpBtn("WaterFogDensityHelp", "HelpWaterFogDensity"); 118 initHelpBtn("WaterFogDensityHelp", "HelpWaterFogDensity");
119 initHelpBtn("WaterUnderWaterFogModHelp", "HelpUnderWaterFogMod"); 119 initHelpBtn("WaterUnderWaterFogModHelp", "HelpUnderWaterFogMod");
120 initHelpBtn("WaterGlowHelp", "HelpWaterGlow"); 120 initHelpBtn("WaterGlowHelp", "HelpWaterGlow");
121 initHelpBtn("WaterNormalScaleHelp", "HelpWaterNormalScale"); 121 initHelpBtn("WaterNormalScaleHelp", "HelpWaterNormalScale");
122 initHelpBtn("WaterFresnelScaleHelp", "HelpWaterFresnelScale"); 122 initHelpBtn("WaterFresnelScaleHelp", "HelpWaterFresnelScale");
123 initHelpBtn("WaterFresnelOffsetHelp", "HelpWaterFresnelOffset"); 123 initHelpBtn("WaterFresnelOffsetHelp", "HelpWaterFresnelOffset");
@@ -134,7 +134,7 @@ void LLFloaterWater::initCallbacks(void) {
134 134
135 childSetCommitCallback("WaterFogColor", onWaterFogColorMoved, &param_mgr->mFogColor); 135 childSetCommitCallback("WaterFogColor", onWaterFogColorMoved, &param_mgr->mFogColor);
136 136
137 // 137 //
138 childSetCommitCallback("WaterGlow", onColorControlAMoved, &param_mgr->mFogColor); 138 childSetCommitCallback("WaterGlow", onColorControlAMoved, &param_mgr->mFogColor);
139 139
140 // fog density 140 // fog density
@@ -212,11 +212,11 @@ bool LLFloaterWater::newPromptCallback(const LLSD& notification, const LLSD& res
212 212
213 // add the current parameters to the list 213 // add the current parameters to the list
214 // see if it's there first 214 // see if it's there first
215 std::map<std::string, LLWaterParamSet>::iterator mIt = 215 std::map<std::string, LLWaterParamSet>::iterator mIt =
216 param_mgr->mParamList.find(text); 216 param_mgr->mParamList.find(text);
217 217
218 // if not there, add a new one 218 // if not there, add a new one
219 if(mIt == param_mgr->mParamList.end()) 219 if(mIt == param_mgr->mParamList.end())
220 { 220 {
221 param_mgr->addParamSet(text, param_mgr->mCurParams); 221 param_mgr->addParamSet(text, param_mgr->mCurParams);
222 comboBox->add(text); 222 comboBox->add(text);
@@ -227,8 +227,8 @@ bool LLFloaterWater::newPromptCallback(const LLSD& notification, const LLSD& res
227 param_mgr->savePreset(text); 227 param_mgr->savePreset(text);
228 228
229 // otherwise, send a message to the user 229 // otherwise, send a message to the user
230 } 230 }
231 else 231 else
232 { 232 {
233 LLNotifications::instance().add("ExistsWaterPresetAlert"); 233 LLNotifications::instance().add("ExistsWaterPresetAlert");
234 } 234 }
@@ -261,13 +261,13 @@ void LLFloaterWater::syncMenu()
261 colCtrl->set(col); 261 colCtrl->set(col);
262 262
263 // fog and wavelets 263 // fog and wavelets
264 param_mgr->mFogDensity.mExp = 264 param_mgr->mFogDensity.mExp =
265 log(current_params.getFloat(param_mgr->mFogDensity.mName, err)) / 265 log(current_params.getFloat(param_mgr->mFogDensity.mName, err)) /
266 log(param_mgr->mFogDensity.mBase); 266 log(param_mgr->mFogDensity.mBase);
267 param_mgr->setDensitySliderValue(param_mgr->mFogDensity.mExp); 267 param_mgr->setDensitySliderValue(param_mgr->mFogDensity.mExp);
268 childSetValue("WaterFogDensity", param_mgr->mFogDensity.mExp); 268 childSetValue("WaterFogDensity", param_mgr->mFogDensity.mExp);
269 269
270 param_mgr->mUnderWaterFogMod.mX = 270 param_mgr->mUnderWaterFogMod.mX =
271 current_params.getFloat(param_mgr->mUnderWaterFogMod.mName, err); 271 current_params.getFloat(param_mgr->mUnderWaterFogMod.mName, err);
272 childSetValue("WaterUnderWaterFogMod", param_mgr->mUnderWaterFogMod.mX); 272 childSetValue("WaterUnderWaterFogMod", param_mgr->mUnderWaterFogMod.mX);
273 273
@@ -433,14 +433,14 @@ void LLFloaterWater::onColorControlRMoved(LLUICtrl* ctrl, void* userData)
433 colorControl->mR = sldrCtrl->getValueF32(); 433 colorControl->mR = sldrCtrl->getValueF32();
434 434
435 // move i if it's the max 435 // move i if it's the max
436 if(colorControl->mR >= colorControl->mG 436 if(colorControl->mR >= colorControl->mG
437 && colorControl->mR >= colorControl->mB 437 && colorControl->mR >= colorControl->mB
438 && colorControl->mHasSliderName) 438 && colorControl->mHasSliderName)
439 { 439 {
440 colorControl->mI = colorControl->mR; 440 colorControl->mI = colorControl->mR;
441 std::string name = colorControl->mSliderName; 441 std::string name = colorControl->mSliderName;
442 name.append("I"); 442 name.append("I");
443 443
444 sWaterMenu->childSetValue(name, colorControl->mR); 444 sWaterMenu->childSetValue(name, colorControl->mR);
445 } 445 }
446 446
@@ -457,7 +457,7 @@ void LLFloaterWater::onColorControlGMoved(LLUICtrl* ctrl, void* userData)
457 colorControl->mG = sldrCtrl->getValueF32(); 457 colorControl->mG = sldrCtrl->getValueF32();
458 458
459 // move i if it's the max 459 // move i if it's the max
460 if(colorControl->mG >= colorControl->mR 460 if(colorControl->mG >= colorControl->mR
461 && colorControl->mG >= colorControl->mB 461 && colorControl->mG >= colorControl->mB
462 && colorControl->mHasSliderName) 462 && colorControl->mHasSliderName)
463 { 463 {
@@ -517,9 +517,9 @@ void LLFloaterWater::onColorControlIMoved(LLUICtrl* ctrl, void* userData)
517 WaterColorControl * colorControl = static_cast<WaterColorControl *>(userData); 517 WaterColorControl * colorControl = static_cast<WaterColorControl *>(userData);
518 518
519 colorControl->mI = sldrCtrl->getValueF32(); 519 colorControl->mI = sldrCtrl->getValueF32();
520 520
521 // only for sliders where we pass a name 521 // only for sliders where we pass a name
522 if(colorControl->mHasSliderName) 522 if(colorControl->mHasSliderName)
523 { 523 {
524 // set it to the top 524 // set it to the top
525 F32 maxVal = std::max(std::max(colorControl->mR, colorControl->mG), colorControl->mB); 525 F32 maxVal = std::max(std::max(colorControl->mR, colorControl->mG), colorControl->mB);
@@ -541,7 +541,7 @@ void LLFloaterWater::onColorControlIMoved(LLUICtrl* ctrl, void* userData)
541 colorControl->mR = 0; 541 colorControl->mR = 0;
542 colorControl->mG = 0; 542 colorControl->mG = 0;
543 colorControl->mB = 0; 543 colorControl->mB = 0;
544 544
545 // if all at the start 545 // if all at the start
546 // set them all to the intensity 546 // set them all to the intensity
547 } 547 }
@@ -597,7 +597,7 @@ void LLFloaterWater::onFloatControlMoved(LLUICtrl* ctrl, void* userData)
597void LLFloaterWater::onWaterFogColorMoved(LLUICtrl* ctrl, void* userData) 597void LLFloaterWater::onWaterFogColorMoved(LLUICtrl* ctrl, void* userData)
598{ 598{
599 LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl); 599 LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
600 WaterColorControl * colorControl = static_cast<WaterColorControl *>(userData); 600 WaterColorControl * colorControl = static_cast<WaterColorControl *>(userData);
601 *colorControl = swatch->get(); 601 *colorControl = swatch->get();
602 602
603 colorControl->update(LLWaterParamManager::instance()->mCurParams); 603 colorControl->update(LLWaterParamManager::instance()->mCurParams);
@@ -652,7 +652,7 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData)
652 } 652 }
653 653
654 if (ctrl->getValue().asString() == "save_inventory_item") 654 if (ctrl->getValue().asString() == "save_inventory_item")
655 { 655 {
656 // Check if this is already a notecard. 656 // Check if this is already a notecard.
657 if(LLWaterParamManager::instance()->mCurParams.mInventoryID.notNull()) 657 if(LLWaterParamManager::instance()->mCurParams.mInventoryID.notNull())
658 { 658 {
@@ -668,7 +668,7 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData)
668 } 668 }
669 LLPointer<KVFloaterWaterNotecardCreatedCallback> cb = new KVFloaterWaterNotecardCreatedCallback(); 669 LLPointer<KVFloaterWaterNotecardCreatedCallback> cb = new KVFloaterWaterNotecardCreatedCallback();
670 // Create a notecard and then save it. 670 // Create a notecard and then save it.
671 create_inventory_item(gAgent.getID(), 671 create_inventory_item(gAgent.getID(),
672 gAgent.getSessionID(), 672 gAgent.getSessionID(),
673 LLUUID::null, 673 LLUUID::null,
674 LLTransactionID::tnull, 674 LLTransactionID::tnull,
@@ -679,7 +679,7 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData)
679 NOT_WEARABLE, 679 NOT_WEARABLE,
680 PERM_ITEM_UNRESTRICTED, 680 PERM_ITEM_UNRESTRICTED,
681 cb); 681 cb);
682 682
683 } 683 }
684 } 684 }
685 else if (ctrl->getValue().asString() == "send_to_server_item") 685 else if (ctrl->getValue().asString() == "send_to_server_item")
@@ -690,13 +690,13 @@ void LLFloaterWater::onSavePreset(LLUICtrl* ctrl, void* userData)
690 } 690 }
691 else 691 else
692 { 692 {
693 LLWaterParamManager::instance()->mCurParams.mName = 693 LLWaterParamManager::instance()->mCurParams.mName =
694 comboBox->getSelectedItemLabel(); 694 comboBox->getSelectedItemLabel();
695 695
696 // check to see if it's a default and shouldn't be overwritten 696 // check to see if it's a default and shouldn't be overwritten
697 std::set<std::string>::iterator sIt = sDefaultPresets.find( 697 std::set<std::string>::iterator sIt = sDefaultPresets.find(
698 comboBox->getSelectedItemLabel()); 698 comboBox->getSelectedItemLabel());
699 if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets")) 699 if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets"))
700 { 700 {
701 LLNotifications::instance().add("WLNoEditDefault"); 701 LLNotifications::instance().add("WLNoEditDefault");
702 return; 702 return;
@@ -710,7 +710,7 @@ bool LLFloaterWater::saveNotecardCallback(const LLSD& notification, const LLSD&
710{ 710{
711 S32 option = LLNotification::getSelectedOption(notification, response); 711 S32 option = LLNotification::getSelectedOption(notification, response);
712 // if they choose save, do it. Otherwise, don't do anything 712 // if they choose save, do it. Otherwise, don't do anything
713 if(option == 0) 713 if(option == 0)
714 { 714 {
715 LLWaterParamManager * param_mgr = LLWaterParamManager::instance(); 715 LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
716 param_mgr->setParamSet(param_mgr->mCurParams.mName, param_mgr->mCurParams); 716 param_mgr->setParamSet(param_mgr->mCurParams.mName, param_mgr->mCurParams);
@@ -723,12 +723,12 @@ bool LLFloaterWater::saveAlertCallback(const LLSD& notification, const LLSD& res
723{ 723{
724 S32 option = LLNotification::getSelectedOption(notification, response); 724 S32 option = LLNotification::getSelectedOption(notification, response);
725 // if they choose save, do it. Otherwise, don't do anything 725 // if they choose save, do it. Otherwise, don't do anything
726 if(option == 0) 726 if(option == 0)
727 { 727 {
728 LLWaterParamManager * param_mgr = LLWaterParamManager::instance(); 728 LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
729 729
730 param_mgr->setParamSet( 730 param_mgr->setParamSet(
731 param_mgr->mCurParams.mName, 731 param_mgr->mCurParams.mName,
732 param_mgr->mCurParams); 732 param_mgr->mCurParams);
733 733
734 // comment this back in to save to file 734 // comment this back in to save to file
@@ -755,14 +755,14 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r
755{ 755{
756 S32 option = LLNotification::getSelectedOption(notification, response); 756 S32 option = LLNotification::getSelectedOption(notification, response);
757 // if they choose delete, do it. Otherwise, don't do anything 757 // if they choose delete, do it. Otherwise, don't do anything
758 if(option == 0) 758 if(option == 0)
759 { 759 {
760 LLComboBox* combo_box = sWaterMenu->getChild<LLComboBox>("WaterPresetsCombo"); 760 LLComboBox* combo_box = sWaterMenu->getChild<LLComboBox>("WaterPresetsCombo");
761 LLFloaterDayCycle* day_cycle = NULL; 761 LLFloaterDayCycle* day_cycle = NULL;
762 LLComboBox* key_combo = NULL; 762 LLComboBox* key_combo = NULL;
763 LLMultiSliderCtrl* mult_sldr = NULL; 763 LLMultiSliderCtrl* mult_sldr = NULL;
764 764
765 if(LLFloaterDayCycle::isOpen()) 765 if(LLFloaterDayCycle::isOpen())
766 { 766 {
767 day_cycle = LLFloaterDayCycle::instance(); 767 day_cycle = LLFloaterDayCycle::instance();
768 key_combo = day_cycle->getChild<LLComboBox>("WaterKeyPresets"); 768 key_combo = day_cycle->getChild<LLComboBox>("WaterKeyPresets");
@@ -773,20 +773,20 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r
773 773
774 // check to see if it's a default and shouldn't be deleted 774 // check to see if it's a default and shouldn't be deleted
775 std::set<std::string>::iterator sIt = sDefaultPresets.find(name); 775 std::set<std::string>::iterator sIt = sDefaultPresets.find(name);
776 if(sIt != sDefaultPresets.end()) 776 if(sIt != sDefaultPresets.end())
777 { 777 {
778 LLNotifications::instance().add("WaterNoEditDefault"); 778 LLNotifications::instance().add("WaterNoEditDefault");
779 return false; 779 return false;
780 } 780 }
781 781
782 LLWaterParamManager::instance()->removeParamSet(name, true); 782 LLWaterParamManager::instance()->removeParamSet(name, true);
783 783
784 // remove and choose another 784 // remove and choose another
785 S32 new_index = combo_box->getCurrentIndex(); 785 S32 new_index = combo_box->getCurrentIndex();
786 786
787 combo_box->remove(name); 787 combo_box->remove(name);
788 788
789 if(key_combo != NULL) 789 if(key_combo != NULL)
790 { 790 {
791 key_combo->remove(name); 791 key_combo->remove(name);
792 792
@@ -795,12 +795,12 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r
795 } 795 }
796 796
797 // pick the previously selected index after delete 797 // pick the previously selected index after delete
798 if(new_index > 0) 798 if(new_index > 0)
799 { 799 {
800 new_index--; 800 new_index--;
801 } 801 }
802 802
803 if(combo_box->getItemCount() > 0) 803 if(combo_box->getItemCount() > 0)
804 { 804 {
805 combo_box->setCurrentByIndex(new_index); 805 combo_box->setCurrentByIndex(new_index);
806 } 806 }
@@ -812,12 +812,12 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r
812void LLFloaterWater::onChangePresetName(LLUICtrl* ctrl, void * userData) 812void LLFloaterWater::onChangePresetName(LLUICtrl* ctrl, void * userData)
813{ 813{
814 LLComboBox * combo_box = static_cast<LLComboBox*>(ctrl); 814 LLComboBox * combo_box = static_cast<LLComboBox*>(ctrl);
815 815
816 if(combo_box->getSimple() == "") 816 if(combo_box->getSimple() == "")
817 { 817 {
818 return; 818 return;
819 } 819 }
820 820
821 LLWaterParamManager::instance()->loadPreset( 821 LLWaterParamManager::instance()->loadPreset(
822 combo_box->getSelectedValue().asString()); 822 combo_box->getSelectedValue().asString());
823 sWaterMenu->syncMenu(); 823 sWaterMenu->syncMenu();
@@ -829,12 +829,12 @@ void LLFloaterWater::onClickNext(void* user_data)
829 LLWaterParamSet& currentParams = param_mgr->mCurParams; 829 LLWaterParamSet& currentParams = param_mgr->mCurParams;
830 830
831 // find place of current param 831 // find place of current param
832 std::map<std::string, LLWaterParamSet>::iterator mIt = 832 std::map<std::string, LLWaterParamSet>::iterator mIt =
833 param_mgr->mParamList.find(currentParams.mName); 833 param_mgr->mParamList.find(currentParams.mName);
834 834
835 // if at the end, loop 835 // if at the end, loop
836 std::map<std::string, LLWaterParamSet>::iterator last = param_mgr->mParamList.end(); --last; 836 std::map<std::string, LLWaterParamSet>::iterator last = param_mgr->mParamList.end(); --last;
837 if(mIt == last) 837 if(mIt == last)
838 { 838 {
839 mIt = param_mgr->mParamList.begin(); 839 mIt = param_mgr->mParamList.begin();
840 } 840 }
@@ -853,11 +853,11 @@ void LLFloaterWater::onClickPrev(void* user_data)
853 LLWaterParamSet & currentParams = param_mgr->mCurParams; 853 LLWaterParamSet & currentParams = param_mgr->mCurParams;
854 854
855 // find place of current param 855 // find place of current param
856 std::map<std::string, LLWaterParamSet>::iterator mIt = 856 std::map<std::string, LLWaterParamSet>::iterator mIt =
857 param_mgr->mParamList.find(currentParams.mName); 857 param_mgr->mParamList.find(currentParams.mName);
858 858
859 // if at the beginning, loop 859 // if at the beginning, loop
860 if(mIt == param_mgr->mParamList.begin()) 860 if(mIt == param_mgr->mParamList.begin())
861 { 861 {
862 std::map<std::string, LLWaterParamSet>::iterator last = param_mgr->mParamList.end(); --last; 862 std::map<std::string, LLWaterParamSet>::iterator last = param_mgr->mParamList.end(); --last;
863 mIt = last; 863 mIt = last;
diff --git a/linden/indra/newview/llwlparamset.h b/linden/indra/newview/llwlparamset.h
index 038490d..3a59f6b 100644
--- a/linden/indra/newview/llwlparamset.h
+++ b/linden/indra/newview/llwlparamset.h
@@ -3,9 +3,9 @@
3 * @brief Interface for the LLWLParamSet class. 3 * @brief Interface for the LLWLParamSet class.
4 * 4 *
5 * $LicenseInfo:firstyear=2005&license=viewergpl$ 5 * $LicenseInfo:firstyear=2005&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2005-2009, Linden Research, Inc. 7 * Copyright (c) 2005-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0 11 * to you under the terms of the GNU General Public License, version 2.0
@@ -13,17 +13,17 @@
13 * ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 * 16 *
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception 21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 * 22 *
23 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations. 25 * and agree to abide by those obligations.
26 * 26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE. 29 * COMPLETENESS OR PERFORMANCE.
@@ -55,7 +55,7 @@ public:
55private: 55private:
56 56
57 LLSD mParamValues; 57 LLSD mParamValues;
58 58
59 float mCloudScrollXOffset, mCloudScrollYOffset; 59 float mCloudScrollXOffset, mCloudScrollYOffset;
60 60
61public: 61public:
@@ -67,10 +67,10 @@ public:
67 67
68 /// set the total llsd 68 /// set the total llsd
69 void setAll(const LLSD& val); 69 void setAll(const LLSD& val);
70 70
71 /// get the total llsd 71 /// get the total llsd
72 const LLSD& getAll(); 72 const LLSD& getAll();
73 73
74 74
75 /// Set a float parameter. 75 /// Set a float parameter.
76 /// \param paramName The name of the parameter to set. 76 /// \param paramName The name of the parameter to set.
@@ -120,61 +120,61 @@ public:
120 120
121 /// Get an integer parameter 121 /// Get an integer parameter
122 /// \param paramName The name of the parameter to set. 122 /// \param paramName The name of the parameter to set.
123 /// \param error A flag to set if it's not the proper return type 123 /// \param error A flag to set if it's not the proper return type
124 F32 getFloat(const std::string& paramName, bool& error); 124 F32 getFloat(const std::string& paramName, bool& error);
125 125
126 126
127 // specific getters and setters 127 // specific getters and setters
128 128
129 129
130 /// set the star's brightness 130 /// set the star's brightness
131 /// \param val brightness value 131 /// \param val brightness value
132 void setStarBrightness(F32 val); 132 void setStarBrightness(F32 val);
133 133
134 /// get the star brightness value; 134 /// get the star brightness value;
135 F32 getStarBrightness(); 135 F32 getStarBrightness();
136 136
137 void setSunAngle(F32 val); 137 void setSunAngle(F32 val);
138 F32 getSunAngle(); 138 F32 getSunAngle();
139 139
140 void setEastAngle(F32 val); 140 void setEastAngle(F32 val);
141 F32 getEastAngle(); 141 F32 getEastAngle();
142 142
143 143
144 144
145 /// set the cloud scroll x enable value 145 /// set the cloud scroll x enable value
146 /// \param val scroll x value 146 /// \param val scroll x value
147 void setEnableCloudScrollX(bool val); 147 void setEnableCloudScrollX(bool val);
148 148
149 /// get the scroll x enable value; 149 /// get the scroll x enable value;
150 bool getEnableCloudScrollX(); 150 bool getEnableCloudScrollX();
151 151
152 /// set the star's brightness 152 /// set the star's brightness
153 /// \param val scroll y bool value 153 /// \param val scroll y bool value
154 void setEnableCloudScrollY(bool val); 154 void setEnableCloudScrollY(bool val);
155 155
156 /// get the scroll enable y value; 156 /// get the scroll enable y value;
157 bool getEnableCloudScrollY(); 157 bool getEnableCloudScrollY();
158 158
159 /// set the cloud scroll x enable value 159 /// set the cloud scroll x enable value
160 /// \param val scroll x value 160 /// \param val scroll x value
161 void setCloudScrollX(F32 val); 161 void setCloudScrollX(F32 val);
162 162
163 /// get the scroll x enable value; 163 /// get the scroll x enable value;
164 F32 getCloudScrollX(); 164 F32 getCloudScrollX();
165 165
166 /// set the star's brightness 166 /// set the star's brightness
167 /// \param val scroll y bool value 167 /// \param val scroll y bool value
168 void setCloudScrollY(F32 val); 168 void setCloudScrollY(F32 val);
169 169
170 /// get the scroll enable y value; 170 /// get the scroll enable y value;
171 F32 getCloudScrollY(); 171 F32 getCloudScrollY();
172 172
173 /// interpolate two parameter sets 173 /// interpolate two parameter sets
174 /// \param src The parameter set to start with 174 /// \param src The parameter set to start with
175 /// \param dest The parameter set to end with 175 /// \param dest The parameter set to end with
176 /// \param weight The amount to interpolate 176 /// \param weight The amount to interpolate
177 void mix(LLWLParamSet& src, LLWLParamSet& dest, 177 void mix(LLWLParamSet& src, LLWLParamSet& dest,
178 F32 weight); 178 F32 weight);
179 179
180 void updateCloudScrolling(void); 180 void updateCloudScrolling(void);