From bf7bc88cfcdbd08c2afd965844f64bf315ba4b7e Mon Sep 17 00:00:00 2001
From: Jacek Antonelli
Date: Wed, 21 Apr 2010 01:51:11 -0500
Subject: Applied patch for LightShare viewer-side implementation.
Ported from Meta7 viewer by Armin.
---
.../lscript/lscript_library/lscript_library.cpp | 7 ++
linden/indra/newview/app_settings/keywords.ini | 37 ++++++++
linden/indra/newview/app_settings/settings.xml | 15 +++
linden/indra/newview/llfloaterenvsettings.cpp | 19 +++-
linden/indra/newview/llfloaterenvsettings.h | 3 +
linden/indra/newview/llviewergenericmessage.cpp | 103 ++++++++++++++++++---
linden/indra/newview/llviewergenericmessage.h | 2 +-
linden/indra/newview/llviewermessage.cpp | 9 ++
linden/indra/newview/meta7windlight.h | 96 +++++++++++++++++++
9 files changed, 276 insertions(+), 15 deletions(-)
create mode 100644 linden/indra/newview/meta7windlight.h
diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp
index 13996d7..af08d2c 100644
--- a/linden/indra/lscript/lscript_library/lscript_library.cpp
+++ b/linden/indra/lscript/lscript_library/lscript_library.cpp
@@ -563,6 +563,13 @@ void LLScriptLibrary::init()
addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "osSetSpeed", NULL, "kf", "osSetSpeed(key AVATAR, float SpeedModifier)\nMultiplies the normal running, walking, and flying speed of the specified avatar.\n(OpenSim only.)"));
addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "osCauseDamage", NULL, "kf", "osCauseDamage(key AVATAR, float damage)\nCauses damage to specified AVATAR (UUID).\n(OpenSim only.)"));
addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "osCauseHealing", NULL, "kf", "osCauseHealing(key AVATAR, float healing)\nCauses Healing to specified AVATAR (UUID).\n(OpenSim only.)"));
+
+
+ // LightShare functions
+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "cmSetWindlightScene", "i", "l", "integer cmSetWindlightScene(list rules)\nSet the current WindLight scene. Restricted to estate managers and owners only."));
+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "cmSetWindlightSceneTargeted", "i", "lk", "integer cmSetWindlightSceneTargeted(list rules, key target)\nSet the current WindLight scene directed to a specific avatar. Restricted to estate managers and owners only."));
+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "cmGetWindlightScene", "l", "l", "list cmGetWindlightScene(list rules)\nGet the current WindLight settings."));
+
}
LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, const char *desc, BOOL god_only)
diff --git a/linden/indra/newview/app_settings/keywords.ini b/linden/indra/newview/app_settings/keywords.ini
index b0851ef..647723f 100644
--- a/linden/indra/newview/app_settings/keywords.ini
+++ b/linden/indra/newview/app_settings/keywords.ini
@@ -558,6 +558,43 @@ STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist
+WL_WATER_COLOR Windlight Water Colour
+WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent
+WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier
+WL_REFLECTION_WAVELET_SCALE Windlight Reflection Wavelet Scale
+WL_FRESNEL_SCALE Windlight Fresnel Scale
+WL_FRESNEL_OFFSET Windlight Fresnel Offset
+WL_REFRACT_SCALE_ABOVE Windlight Refract Scale Above
+WL_REFRACT_SCALE_BELOW Windlight Refract Scale Below
+WL_BLUR_MULTIPLIER Windlight Blur Multiplier
+WL_BIG_WAVE_DIRECTION Windlight Big Wave Direction
+WL_LITTLE_WAVE_DIRECTION Windlight Little Wave Direction
+WL_NORMAL_MAP_TEXTURE Windlight Normal Map Texture
+WL_HORIZON Windlight Horizon Colour
+WL_HAZE_HORIZON Windlight Haze Horizon
+WL_BLUE_DENSITY Windlight Blue Density
+WL_HAZE_DENSITY Windlight Haze Density
+WL_DENSITY_MULTIPLIER Windlight Density Multiplier
+WL_DISTANCE_MULTIPLIER Windlight Distance Multiplier
+WL_MAX_ALTITUDE Windlight Max Altitude
+WL_SUN_MOON_COLOR Windlight Sun/Moon Colour
+WL_AMBIENT Windlight Ambient Colour
+WL_EAST_ANGLE Windlight Sun/Position East
+WL_SUN_GLOW_FOCUS Windlight Sun Glow Focus
+WL_SUN_GLOW_SIZE Windlight Sun Glow Size
+WL_SCENE_GAMMA Windlight Scene Gamma
+WL_STAR_BRIGHTNESS Windlight Star Brightness
+WL_CLOUD_COLOR Windlight Cloud Colour
+WL_CLOUD_XY_DENSITY Windlight Cloud X/Y/Density
+WL_CLOUD_COVERAGE Windlight Cloud Coverage
+WL_CLOUD_SCALE Windlight Cloud Scale
+WL_CLOUD_DETAIL_XY_DENSITY Windlight Cloud Detail X/Y/Density
+WL_CLOUD_SCROLL_X Windlight Cloud Scroll X
+WL_CLOUD_SCROLL_Y Windlight Cloud Scroll Y
+WL_CLOUD_SCROLL_Y_LOCK Windlight Cloud Scroll Y Lock
+WL_CLOUD_SCROLL_X_LOCK Windlight Cloud Scroll X Lock
+WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds
+
# string constants
[word .1, .3, .5]
NULL_KEY Indicates an empty key
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index b883231..3b5fa3f 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -12018,6 +12018,21 @@
Value
1
+
+
+ UseServersideWindlightSettings
+
+
+
UseStartScreen