From 0ef24cfda006f16d6c2bbac9a3ca08fec948a0e4 Mon Sep 17 00:00:00 2001 From: Beeks Date: Wed, 6 Oct 2010 14:49:48 -0400 Subject: [PATCH] Oh right these might be needed too. e.e --- .../windlight/days/Happy%20Bivouac.xml | 44 ++ .../app_settings/windlight/skies/E%2D12am.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D12pm.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D3am.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D3pm.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D4am.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D6am.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D6pm.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D7pm.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D9am.xml | 141 +++++++ .../app_settings/windlight/skies/E%2D9pm.xml | 141 +++++++ indra/newview/ascentdaycyclemanager.cpp | 378 ++++++++++++++++++ indra/newview/ascentdaycyclemanager.h | 109 +++++ .../xui/en-us/floater_new_outfit_dialog.xml | 4 +- 14 files changed, 1943 insertions(+), 2 deletions(-) create mode 100644 indra/newview/app_settings/windlight/days/Happy%20Bivouac.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D12am.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D12pm.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D3am.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D3pm.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D4am.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D6am.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D6pm.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D7pm.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D9am.xml create mode 100644 indra/newview/app_settings/windlight/skies/E%2D9pm.xml create mode 100644 indra/newview/ascentdaycyclemanager.cpp create mode 100644 indra/newview/ascentdaycyclemanager.h diff --git a/indra/newview/app_settings/windlight/days/Happy%20Bivouac.xml b/indra/newview/app_settings/windlight/days/Happy%20Bivouac.xml new file mode 100644 index 000000000..2fa7178d3 --- /dev/null +++ b/indra/newview/app_settings/windlight/days/Happy%20Bivouac.xml @@ -0,0 +1,44 @@ + + + + 0 + E-12am + + + 0.125 + E-3am + + + 0.1666666716337204 + E-4am + + + 0.25 + E-6am + + + 0.375 + E-9am + + + 0.5 + E-12pm + + + 0.625 + E-3pm + + + 0.75 + E-6pm + + + 0.79166668653488159 + E-7pm + + + 0.875 + E-9pm + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D12am.xml b/indra/newview/app_settings/windlight/skies/E%2D12am.xml new file mode 100644 index 000000000..8fcf8bf5b --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D12am.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.17999999225139618 + 0.26999998092651367 + 0.32999998331069946 + 0.32999998331069946 + + blue_density + + 0.56341457366943359 + 0.65999996662139893 + 0.5473170280456543 + 0.32999998331069946 + + blue_horizon + + 0.099999994039535522 + 0.14000000059604645 + 0.15999999642372131 + 0.15999999642372131 + + 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.41999998688697815 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.11999999731779099 + 0 + 0 + 1 + + density_multiplier + + 7.9999997979030013e-005 + 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 + + 1.7999999523162842 + 0 + 0 + 1 + + haze_horizon + + 0.20999999344348907 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.99992102384567261 + -0.012566247954964638 + 1 + + max_y + + 906.19991350494092 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 1.9999994039535522 + sun_angle + 4.7249555587768555 + sunlight_color + + 0.14999999105930328 + 0.21000000834465027 + 0.26999998092651367 + 0.26999998092651367 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D12pm.xml b/indra/newview/app_settings/windlight/skies/E%2D12pm.xml new file mode 100644 index 000000000..eb41debe9 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D12pm.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.0799999237060547 + 1.0660644769668579 + 0.89999997615814209 + 0.35999998450279236 + + blue_density + + 0.2800000011920929 + 0.39393550157546997 + 0.47999998927116394 + 0.47999998927116394 + + blue_horizon + + 0.41999998688697815 + 0.62000000476837158 + 1.0399999618530273 + 1.0399999618530273 + + 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.11999999731779099 + 0 + 0 + 1 + + density_multiplier + + 0.00020999999833293259 + 0 + 0 + 1 + + distance_multiplier + + 7.4000000953674316 + 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 + + 1.9099999666213989 + 0 + 0 + 1 + + haze_horizon + + 0.25999999046325684 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.99950653314590454 + -0.031410936266183853 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0 + sun_angle + 1.6022124290466309 + sunlight_color + + 0.77586203813552856 + 0.89999997615814209 + 0.84000003337860107 + 0.89999997615814209 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D3am.xml b/indra/newview/app_settings/windlight/skies/E%2D3am.xml new file mode 100644 index 000000000..f05c4306f --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D3am.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.17999999225139618 + 0.26999998092651367 + 0.32999998331069946 + 0.32999998331069946 + + blue_density + + 0.56000000238418579 + 0.65999996662139893 + 0.53999996185302734 + 0.65999996662139893 + + blue_horizon + + 0.099999994039535522 + 0.14000000059604645 + 0.15999999642372131 + 0.15999999642372131 + + 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.41999998688697815 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.26999998092651367 + 0 + 0 + 1 + + density_multiplier + + 0.00026000000070780516 + 0 + 0 + 1 + + distance_multiplier + + 24.30000114440918 + 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.4599999189376831 + 0 + 0 + 1 + + haze_horizon + + 0.20999999344348907 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.84767758846282959 + -0.53051173686981201 + 1 + + max_y + + 1074 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 1.9999994039535522 + sun_angle + 5.2715930938720703 + sunlight_color + + 0.14999999105930328 + 0.21000000834465027 + 0.26999998092651367 + 0.26999998092651367 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D3pm.xml b/indra/newview/app_settings/windlight/skies/E%2D3pm.xml new file mode 100644 index 000000000..d6e408c05 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D3pm.xml @@ -0,0 +1,141 @@ + + + ambient + + 1.2571429014205933 + 1.3199999332427979 + 1.0057142972946167 + 0.43999999761581421 + + blue_density + + 0.20495410263538361 + 0.56451046466827393 + 0.69999998807907104 + 0.34999999403953552 + + blue_horizon + + 0.39999997615814209 + 0.6721307635307312 + 1 + 0.5 + + cloud_color + + 0.53962135314941406 + 0.53962135314941406 + 0.53962135314941406 + 1 + + cloud_pos_density1 + + 0.5 + 0.5 + 0.69569224119186401 + 1 + + cloud_pos_density2 + + 0.5 + 0.5 + 0.125 + 1 + + cloud_scale + + 0.10999999195337296 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10.01099967956543 + + cloud_shadow + + 0.08999999612569809 + 0 + 0 + 1 + + density_multiplier + + 0.00016999999934341758 + 0 + 0 + 1 + + distance_multiplier + + 5.3000001907348633 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.91999995708465576 + 0 + 0 + 1 + + glow + + 10.799999237060547 + 0.0010000000474974513 + -0.64999997615814209 + 1 + + haze_density + + 1.9099999666213989 + 0 + 0 + 1 + + haze_horizon + + 0.25999999046325684 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.85099434852600098 + -0.52517479658126831 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0 + sun_angle + 2.1237168312072754 + sunlight_color + + 0.66705864667892456 + 0.80999994277954102 + 0.64323520660400391 + 0.26999998092651367 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D4am.xml b/indra/newview/app_settings/windlight/skies/E%2D4am.xml new file mode 100644 index 000000000..30935d114 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D4am.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.17999999225139618 + 0.26999998092651367 + 0.32999998331069946 + 0.32999998331069946 + + blue_density + + 0.58048778772354126 + 0.68000000715255737 + 0.56390243768692017 + 0.34000000357627869 + + blue_horizon + + 0.099999994039535522 + 0.14000000059604645 + 0.15999999642372131 + 0.15999999642372131 + + 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.41999998688697815 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.069999694824219 + 10.01099967956543 + + cloud_shadow + + 0.26999998092651367 + 0 + 0 + 1 + + density_multiplier + + 0.00026000000070780516 + 0 + 0 + 1 + + distance_multiplier + + 24.30000114440918 + 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.4599999189376831 + 0 + 0 + 1 + + haze_horizon + + 0.22999998927116394 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.65658539533615112 + -0.75425165891647339 + 1 + + max_y + + 1074 + 0 + 0 + 1 + + preset_num + 22 + star_brightness + 1.9999994039535522 + sun_angle + 5.5669026374816895 + sunlight_color + + 0.14999999105930328 + 0.23999999463558197 + 0.26999998092651367 + 0.26999998092651367 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D6am.xml b/indra/newview/app_settings/windlight/skies/E%2D6am.xml new file mode 100644 index 000000000..c73bae805 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D6am.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.41999998688697815 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10.01099967956543 + + cloud_shadow + + 0.29999998211860657 + 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 + -1.5999999046325684 + 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/E%2D6pm.xml b/indra/newview/app_settings/windlight/skies/E%2D6pm.xml new file mode 100644 index 000000000..8d1dc5934 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D6pm.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.65999996662139893 + 0.65999996662139893 + 0.50999999046325684 + 0.2199999988079071 + + blue_density + + 0.18153078854084015 + 0.49999505281448364 + 0.65999996662139893 + 0.65999996662139893 + + blue_horizon + + 0.43070217967033386 + 0.85394656658172607 + 1.0399999618530273 + 1.0399999618530273 + + 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.26999998092651367 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10 + + cloud_shadow + + 0.10999999940395355 + 0 + 0 + 1 + + density_multiplier + + 0.00016999999934341758 + 0 + 0 + 1 + + distance_multiplier + + 5.3000001907348633 + 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 + + 1.8499999046325684 + 0 + 0 + 1 + + haze_horizon + + 0.35999998450279236 + 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 + + 0.84000003337860107 + 0.87000000476837158 + 0.80999994277954102 + 0.87000000476837158 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D7pm.xml b/indra/newview/app_settings/windlight/skies/E%2D7pm.xml new file mode 100644 index 000000000..bdd67db63 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D7pm.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.53999996185302734 + 0.36947363615036011 + 0.22736841440200806 + 0.17999999225139618 + + blue_density + + 0.22608692944049835 + 0.59193676710128784 + 1.0399999618530273 + 0.51999998092651367 + + blue_horizon + + 0.63999998569488525 + 1.1399999856948853 + 1.2799999713897705 + 0.63999998569488525 + + 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.23444875962174549 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10.002444075434141 + + cloud_shadow + + 0.10999999940395355 + 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 + -1.4499999284744263 + 1 + + haze_density + + 1.8399999141693115 + 0 + 0 + 1 + + haze_horizon + + 0.55000001192092896 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + 0 + 0.2729516327381134 + -0.96202772855758667 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.17000000178813934 + sun_angle + 2.8651328086853027 + sunlight_color + + 1.1100000143051147 + 0.7580488920211792 + 0.54146337509155273 + 0.37000000476837158 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D9am.xml b/indra/newview/app_settings/windlight/skies/E%2D9am.xml new file mode 100644 index 000000000..76b3301d7 --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D9am.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.44785711169242859 + 0.56999999284744263 + 0.44785711169242859 + 0.18999999761581421 + + blue_density + + 0.2800000011920929 + 0.37999999523162842 + 0.53999996185302734 + 0.53999996185302734 + + blue_horizon + + 0.35999998450279236 + 0.85394656658172607 + 1.1000000238418579 + 1.1000000238418579 + + cloud_color + + 0.53962135314941406 + 0.53962135314941406 + 0.53962135314941406 + 1 + + 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.22999998927116394 + 0 + 0 + 1 + + density_multiplier + + 0.00019999999494757503 + 0 + 0 + 1 + + distance_multiplier + + 8.6000003814697266 + 0 + 0 + 1 + + east_angle + 0 + enable_cloud_scroll + + 1 + 1 + + gamma + + 0.81000000238418579 + 0 + 0 + 1 + + glow + + 14.800000190734863 + 0.0010000000474974513 + -0.34999999403953552 + 1 + + haze_density + + 1.9099999666213989 + 0 + 0 + 1 + + haze_horizon + + 0.49740666151046753 + 0.19915600121021271 + 0.19915600121021271 + 1 + + lightnorm + + -0 + 0.80156701803207397 + 0.59790498018264771 + 0 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0 + sun_angle + 0.92991143465042114 + sunlight_color + + 0.84000003337860107 + 0.77538466453552246 + 0.68999993801116943 + 0.2800000011920929 + + + diff --git a/indra/newview/app_settings/windlight/skies/E%2D9pm.xml b/indra/newview/app_settings/windlight/skies/E%2D9pm.xml new file mode 100644 index 000000000..d5cb7c5cf --- /dev/null +++ b/indra/newview/app_settings/windlight/skies/E%2D9pm.xml @@ -0,0 +1,141 @@ + + + ambient + + 0.21000000834465027 + 0.29999998211860657 + 0.32999998331069946 + 0.32999998331069946 + + blue_density + + 0.25999999046325684 + 0.53999996185302734 + 0.65999996662139893 + 0.65999996662139893 + + blue_horizon + + 0.11000000685453415 + 0.13999997079372406 + 0.15999999642372131 + 0.079999998211860657 + + 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.10999999195337296 + 0 + 0 + 1 + + cloud_scroll_rate + + 10.139999389648437 + 10.01099967956543 + + cloud_shadow + + 0.11999999731779099 + 0 + 0 + 1 + + density_multiplier + + 0.00016999999934341758 + 0 + 0 + 1 + + distance_multiplier + + 5.3000001907348633 + 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.7862887978553772 + 0.6178591251373291 + 1 + + max_y + + 600 + 0 + 0 + 1 + + preset_num + 10 + star_brightness + 0.35999998450279236 + sun_angle + 4.0463719367980957 + sunlight_color + + 0.14538462460041046 + 0.20769229531288147 + 0.26999998092651367 + 0.08999999612569809 + + + diff --git a/indra/newview/ascentdaycyclemanager.cpp b/indra/newview/ascentdaycyclemanager.cpp new file mode 100644 index 000000000..b83168f64 --- /dev/null +++ b/indra/newview/ascentdaycyclemanager.cpp @@ -0,0 +1,378 @@ +/** + * @file ascentdaycyclemanager.cpp + * @Author Duncan Garrett + * Manager for Windlight Daycycles so we can actually save more than one + * + * Created August 27 2010 + * + * ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * k ilu bye + */ + +#include "llviewerprecompiledheaders.h" + +#include "ascentdaycyclemanager.h" + +#include "pipeline.h" +#include "llsky.h" + +#include "llsliderctrl.h" +#include "llspinctrl.h" +#include "llcheckboxctrl.h" +#include "lluictrlfactory.h" +#include "llviewercamera.h" +#include "llcombobox.h" +#include "lllineeditor.h" +#include "llsdserialize.h" + +#include "v4math.h" +#include "llviewerdisplay.h" +#include "llviewercontrol.h" +#include "llviewerwindow.h" +#include "lldrawpoolwater.h" +#include "llagent.h" +#include "llviewerregion.h" + +#include "llwldaycycle.h" +#include "llfloaterwindlight.h" +#include "llfloaterdaycycle.h" +#include "llfloaterenvsettings.h" + +#include "curl/curl.h" + +AscentDayCycleManager * AscentDayCycleManager::sInstance = NULL; + +AscentDayCycleManager::AscentDayCycleManager() +{ +} + +AscentDayCycleManager::~AscentDayCycleManager() +{ +} + +void AscentDayCycleManager::loadPresets(const std::string& file_name) +{ + std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", "")); + LL_INFOS2("AppInit", "Shaders") << "Loading Default Day Cycle preset from " << path_name << LL_ENDL; + + bool found = true; + while(found) + { + std::string name; + found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false); + if(found) + { + + name=name.erase(name.length()-4); + + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_unescape(name.c_str(), name.size()); + std::string unescaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL; + loadPreset(unescaped_name,FALSE); + } + } + + // And repeat for user presets, note the user presets will modify any system presets already loaded + + std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", "")); + LL_INFOS2("AppInit", "Shaders") << "Loading User Daycycle preset from " << path_name2 << LL_ENDL; + + found = true; + while(found) + { + std::string name; + found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name, false); + if(found) + { + name=name.erase(name.length()-4); + + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_unescape(name.c_str(), name.size()); + std::string unescaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL; + loadPreset(unescaped_name,FALSE); + } + } + +} + +void AscentDayCycleManager::savePresets(const std::string & fileName) +{ + //Nobody currently calls me, but if they did, then its reasonable to write the data out to the user's folder + //and not over the RO system wide version. + + LLSD paramsData(LLSD::emptyMap()); + + std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", fileName)); + + /*for(std::map::iterator mIt = mParamList.begin(); + mIt != mParamList.end(); + ++mIt) + { + paramsData[mIt->first] = mIt->second.getAll(); + }*/ + + llofstream presetsXML(pathName); + + LLPointer formatter = new LLSDXMLFormatter(); + + formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); + + presetsXML.close(); +} + +void AscentDayCycleManager::loadPreset(const std::string & name,bool propagate) +{ + + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_escape(name.c_str(), name.size()); + std::string escaped_filename(curl_str); + curl_free(curl_str); + curl_str = NULL; + + escaped_filename += ".xml"; + + std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", escaped_filename)); + llinfos << "Loading Day Cycle preset from " << pathName << llendl; + + llifstream presetsXML; + presetsXML.open(pathName.c_str()); + + // That failed, try loading from the users area instead. + if(!presetsXML) + { + pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", escaped_filename); + llinfos << "Loading User Day Cycle preset from " << pathName << llendl; + presetsXML.open(pathName.c_str()); + } + + if (presetsXML) + { + LLSD paramsData(LLSD::emptyMap()); + + LLPointer parser = new LLSDXMLParser(); + + parser->parse(presetsXML, paramsData, LLSDSerialize::SIZE_UNLIMITED); + + std::map::iterator mIt = mParamList.find(name); + if(mIt == mParamList.end()) + { + addParamSet(name, paramsData); + } + else + { + setParamSet(name, paramsData); + } + presetsXML.close(); + } + else + { + llwarns << "Can't find " << name << llendl; + return; + } + + +} + +void AscentDayCycleManager::savePreset(const std::string & name) +{ + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_escape(name.c_str(), name.size()); + std::string escaped_filename(curl_str); + curl_free(curl_str); + curl_str = NULL; + + escaped_filename += ".xml"; + + // make an empty llsd + LLSD paramsData(LLSD::emptyMap()); + std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", escaped_filename)); + + // fill it with LLSD windlight params + //paramsData = mParamList[name].getAll(); + + // write to file + llofstream presetsXML(pathName); + LLPointer formatter = new LLSDXMLFormatter(); + formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); + presetsXML.close(); +} + +void AscentDayCycleManager::update(LLViewerCamera * cam) +{ + LLFastTimer ftm(LLFastTimer::FTM_UPDATE_WLPARAM); + + // sync menus if they exist + if(LLFloaterWindLight::isOpen()) + { + LLFloaterWindLight::instance()->syncMenu(); + } + if(LLFloaterDayCycle::isOpen()) + { + LLFloaterDayCycle::instance()->syncMenu(); + } + if(LLFloaterEnvSettings::isOpen()) + { + LLFloaterEnvSettings::instance()->syncMenu(); + } + + stop_glerror(); +} + +// static +void AscentDayCycleManager::initClass(void) +{ + instance(); +} + +// static +void AscentDayCycleManager::cleanupClass() +{ + delete sInstance; + sInstance = NULL; +} + +void AscentDayCycleManager::resetAnimator(F32 curTime, bool run) +{ + mAnimator.setTrack(mDay.mTimeMap, mDay.mDayRate, + curTime, run); + + return; +} +bool AscentDayCycleManager::addParamSet(const std::string& name, LLWLDayCycle& param) +{ + // add a new one if not one there already + std::map::iterator mIt = mParamList.find(name); + if(mIt == mParamList.end()) + { + mParamList[name] = param; + return true; + } + + return false; +} + +BOOL AscentDayCycleManager::addParamSet(const std::string& name, LLSD const & param) +{ + // add a new one if not one there already + std::map::const_iterator finder = mParamList.find(name); + if(finder == mParamList.end()) + { + mParamList[name].mName = name; + return TRUE; + } + else + { + return FALSE; + } +} + +bool AscentDayCycleManager::getParamSet(const std::string& name, LLWLDayCycle& param) +{ + // find it and set it + std::map::iterator mIt = mParamList.find(name); + if(mIt != mParamList.end()) + { + param = mParamList[name]; + param.mName = name; + return true; + } + + return false; +} + +bool AscentDayCycleManager::setParamSet(const std::string& name, LLWLDayCycle& param) +{ + mParamList[name] = param; + + return true; +} + +bool AscentDayCycleManager::setParamSet(const std::string& name, const LLSD & param) +{ + // quick, non robust (we won't be working with files, but assets) check + if(!param.isMap()) + { + return false; + } + + return true; +} + +bool AscentDayCycleManager::removeParamSet(const std::string& name, bool delete_from_disk) +{ + // remove from param list + std::map::iterator mIt = mParamList.find(name); + if(mIt != mParamList.end()) + { + mParamList.erase(mIt); + } + + F32 key; + + // remove all references + bool stat = true; + do + { + // get it + stat = mDay.getKey(name, key); + if(stat == false) + { + break; + } + + // and remove + stat = mDay.removeKey(key); + + } while(stat == true); + + if(delete_from_disk) + { + std::string path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", "")); + + // use full curl escaped name + char * curl_str = curl_escape(name.c_str(), name.size()); + std::string escaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + gDirUtilp->deleteFilesInDir(path_name, escaped_name + ".xml"); + } + + return true; +} + + +// static +AscentDayCycleManager * AscentDayCycleManager::instance() +{ + if(NULL == sInstance) + { + sInstance = new AscentDayCycleManager(); + + sInstance->loadPresets(LLStringUtil::null); + + // load the day + sInstance->mDay.loadDayCycle(gSavedSettings.getString("AscentActiveDayCycle")); + + // *HACK - sets cloud scrolling to what we want... fix this better in the future + sInstance->getParamSet("Default", sInstance->mCurParams); + + // set it to noon + sInstance->resetAnimator(0.5, true); + + // but use linden time sets it to what the estate is + sInstance->mAnimator.mUseLindenTime = true; + } + + return sInstance; +} diff --git a/indra/newview/ascentdaycyclemanager.h b/indra/newview/ascentdaycyclemanager.h new file mode 100644 index 000000000..6c84901c9 --- /dev/null +++ b/indra/newview/ascentdaycyclemanager.h @@ -0,0 +1,109 @@ +/** + * @file ascentdaycyclemanager.h + * @Author Duncan Garrett + * Manager for Windlight Daycycles so we can actually save more than one + * + * Created October 04 2010 + * + * ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * k ilu bye + */ + +#ifndef ASCENT_DAYCYCLEMANAGER_H +#define ASCENT_DAYCYCLEMANAGER_H + +#include +#include +#include "llwldaycycle.h" +#include "llwlanimator.h" +#include "llwldaycycle.h" +#include "llviewercamera.h" + +/// WindLight parameter manager class - what controls all the wind light shaders +class AscentDayCycleManager +{ +public: + + AscentDayCycleManager(); + ~AscentDayCycleManager(); + + /// load a preset file + void loadPresets(const std::string & fileName); + + /// save the preset file + void savePresets(const std::string & fileName); + + /// load an individual preset into the sky + void loadPreset(const std::string & name,bool propogate=true); + + /// save the parameter presets to file + void savePreset(const std::string & name); + + /// Set shader uniforms dirty, so they'll update automatically. + void propagateParameters(void); + + /// Update shader uniforms that have changed. + void updateShaderUniforms(LLGLSLShader * shader); + + /// setup the animator to run + void resetAnimator(F32 curTime, bool run); + + /// update information camera dependent parameters + void update(LLViewerCamera * cam); + + + /// Perform global initialization for this class. + static void initClass(void); + + // Cleanup of global data that's only inited once per class. + static void cleanupClass(); + + /// add a param to the list + bool addParamSet(const std::string& name, LLWLDayCycle& param); + + /// add a param to the list + BOOL addParamSet(const std::string& name, LLSD const & param); + + /// get a param from the list + bool getParamSet(const std::string& name, LLWLDayCycle& param); + + /// set the param in the list with a new param + bool setParamSet(const std::string& name, LLWLDayCycle& param); + + /// set the param in the list with a new param + bool setParamSet(const std::string& name, LLSD const & param); + + /// gets rid of a parameter and any references to it + /// returns true if successful + bool removeParamSet(const std::string& name, bool delete_from_disk); + + // singleton pattern implementation + static AscentDayCycleManager * instance(); + +public: + + // helper variables + LLWLAnimator mAnimator; + + + // list of params and how they're cycled for days + LLWLDayCycle mDay; + + LLWLDayCycle mCurParams; + + /// Sun Delta Terrain tweak variables. + F32 mSunDeltaYaw; + + // list of all the day cycles, listed by name + std::map mParamList; + + +private: + // our parameter manager singleton instance + static AscentDayCycleManager * sInstance; + +}; + +#endif diff --git a/indra/newview/skins/default/xui/en-us/floater_new_outfit_dialog.xml b/indra/newview/skins/default/xui/en-us/floater_new_outfit_dialog.xml index b9a17b05b..14e97ce86 100644 --- a/indra/newview/skins/default/xui/en-us/floater_new_outfit_dialog.xml +++ b/indra/newview/skins/default/xui/en-us/floater_new_outfit_dialog.xml @@ -3,10 +3,10 @@ can_minimize="false" can_resize="false" can_tear_off="true" enabled="true" height="510" left="278" min_height="100" min_width="100" mouse_opaque="true" name="modal container" title="" width="515"> -