diff options
Diffstat (limited to 'linden/indra')
41 files changed, 273 insertions, 119 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 077da53..fc12f33 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -537,7 +537,9 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera) | |||
537 | gMenuHolder->hideMenus(); | 537 | gMenuHolder->hideMenus(); |
538 | } | 538 | } |
539 | 539 | ||
540 | if (change_camera && !gSavedSettings.getBOOL("FreezeTime")) | 540 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
541 | |||
542 | if (change_camera && !(*sFreezeTime)) | ||
541 | { | 543 | { |
542 | changeCameraToDefault(); | 544 | changeCameraToDefault(); |
543 | 545 | ||
@@ -561,7 +563,7 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera) | |||
561 | } | 563 | } |
562 | 564 | ||
563 | 565 | ||
564 | if (reset_camera && !gSavedSettings.getBOOL("FreezeTime")) | 566 | if (reset_camera && !(*sFreezeTime)) |
565 | { | 567 | { |
566 | if (!gViewerWindow->getLeftMouseDown() && cameraThirdPerson()) | 568 | if (!gViewerWindow->getLeftMouseDown() && cameraThirdPerson()) |
567 | { | 569 | { |
@@ -1976,7 +1978,9 @@ void LLAgent::cameraOrbitIn(const F32 meters) | |||
1976 | 1978 | ||
1977 | mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist; | 1979 | mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist; |
1978 | 1980 | ||
1979 | if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f) | 1981 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
1982 | |||
1983 | if (!(*sFreezeTime) && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f) | ||
1980 | { | 1984 | { |
1981 | // No need to animate, camera is already there. | 1985 | // No need to animate, camera is already there. |
1982 | changeCameraToMouselook(FALSE); | 1986 | changeCameraToMouselook(FALSE); |
@@ -2901,7 +2905,8 @@ static const LLFloaterView::skip_list_t& get_skip_list() | |||
2901 | { | 2905 | { |
2902 | static LLFloaterView::skip_list_t skip_list; | 2906 | static LLFloaterView::skip_list_t skip_list; |
2903 | skip_list.insert(LLFloaterMap::getInstance()); | 2907 | skip_list.insert(LLFloaterMap::getInstance()); |
2904 | if(gSavedSettings.getBOOL("ShowStatusBarInMouselook")) | 2908 | static BOOL *sShowStatusBarInMouselook = rebind_llcontrol<BOOL>("ShowStatusBarInMouselook", &gSavedSettings, true); |
2909 | if(*sShowStatusBarInMouselook) | ||
2905 | { | 2910 | { |
2906 | skip_list.insert(LLFloaterStats::getInstance()); | 2911 | skip_list.insert(LLFloaterStats::getInstance()); |
2907 | } | 2912 | } |
@@ -6283,7 +6288,10 @@ void LLAgent::setTeleportState(ETeleportState state) | |||
6283 | { | 6288 | { |
6284 | mbTeleportKeepsLookAt = false; | 6289 | mbTeleportKeepsLookAt = false; |
6285 | } | 6290 | } |
6286 | if (mTeleportState > TELEPORT_NONE && gSavedSettings.getBOOL("FreezeTime")) | 6291 | |
6292 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
6293 | |||
6294 | if (mTeleportState > TELEPORT_NONE && (*sFreezeTime)) | ||
6287 | { | 6295 | { |
6288 | LLFloaterSnapshot::hide(0); | 6296 | LLFloaterSnapshot::hide(0); |
6289 | } | 6297 | } |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index b3f3e59..817517e 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -4146,9 +4146,10 @@ void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs) | |||
4146 | { | 4146 | { |
4147 | if(secs < 0.0f) | 4147 | if(secs < 0.0f) |
4148 | { | 4148 | { |
4149 | secs = gSavedSettings.getF32("MainloopTimeoutDefault"); | 4149 | static F32 *sMainloopTimeoutDefault = rebind_llcontrol<F32>("MainloopTimeoutDefault", &gSavedSettings, true); |
4150 | secs = *sMainloopTimeoutDefault; | ||
4150 | } | 4151 | } |
4151 | 4152 | ||
4152 | mMainloopTimeout->setTimeout(secs); | 4153 | mMainloopTimeout->setTimeout(secs); |
4153 | mMainloopTimeout->start(state); | 4154 | mMainloopTimeout->start(state); |
4154 | } | 4155 | } |
@@ -4173,7 +4174,8 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs) | |||
4173 | { | 4174 | { |
4174 | if(secs < 0.0f) | 4175 | if(secs < 0.0f) |
4175 | { | 4176 | { |
4176 | secs = gSavedSettings.getF32("MainloopTimeoutDefault"); | 4177 | static F32 *sMainloopTimeoutDefault = rebind_llcontrol<F32>("MainloopTimeoutDefault", &gSavedSettings, true); |
4178 | secs = *sMainloopTimeoutDefault; | ||
4177 | } | 4179 | } |
4178 | 4180 | ||
4179 | mMainloopTimeout->setTimeout(secs); | 4181 | mMainloopTimeout->setTimeout(secs); |
diff --git a/linden/indra/newview/lldrawpoolbump.cpp b/linden/indra/newview/lldrawpoolbump.cpp index fb7a213..93fadca 100644 --- a/linden/indra/newview/lldrawpoolbump.cpp +++ b/linden/indra/newview/lldrawpoolbump.cpp | |||
@@ -185,7 +185,8 @@ void LLDrawPoolBump::prerender() | |||
185 | // static | 185 | // static |
186 | S32 LLDrawPoolBump::numBumpPasses() | 186 | S32 LLDrawPoolBump::numBumpPasses() |
187 | { | 187 | { |
188 | if (gSavedSettings.getBOOL("RenderObjectBump")) | 188 | static BOOL* sRenderObjectBump = rebind_llcontrol<BOOL>("RenderObjectBump", &gSavedSettings, true); |
189 | if (*sRenderObjectBump) | ||
189 | { | 190 | { |
190 | if (mVertexShaderLevel > 1) | 191 | if (mVertexShaderLevel > 1) |
191 | { | 192 | { |
diff --git a/linden/indra/newview/lldrawpoolterrain.cpp b/linden/indra/newview/lldrawpoolterrain.cpp index cac5162..d0bf2c1 100644 --- a/linden/indra/newview/lldrawpoolterrain.cpp +++ b/linden/indra/newview/lldrawpoolterrain.cpp | |||
@@ -207,9 +207,10 @@ void LLDrawPoolTerrain::render(S32 pass) | |||
207 | renderFull4TU(); | 207 | renderFull4TU(); |
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | static BOOL* sShowParcelOwners = rebind_llcontrol<BOOL>("ShowParcelOwners", &gSavedSettings, true); | |
211 | |||
211 | // Special-case for land ownership feedback | 212 | // Special-case for land ownership feedback |
212 | if (gSavedSettings.getBOOL("ShowParcelOwners")) | 213 | if (*sShowParcelOwners) |
213 | { | 214 | { |
214 | if (mVertexShaderLevel > 1) | 215 | if (mVertexShaderLevel > 1) |
215 | { //use fullbright shader for highlighting | 216 | { //use fullbright shader for highlighting |
diff --git a/linden/indra/newview/lldrawpooltree.cpp b/linden/indra/newview/lldrawpooltree.cpp index 46cd2d5..e4560f2 100644 --- a/linden/indra/newview/lldrawpooltree.cpp +++ b/linden/indra/newview/lldrawpooltree.cpp | |||
@@ -102,7 +102,9 @@ void LLDrawPoolTree::render(S32 pass) | |||
102 | LLGLEnable test(GL_ALPHA_TEST); | 102 | LLGLEnable test(GL_ALPHA_TEST); |
103 | LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f); | 103 | LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f); |
104 | 104 | ||
105 | if (gSavedSettings.getBOOL("RenderAnimateTrees")) | 105 | static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true); |
106 | |||
107 | if (*sRenderAnimateTrees) | ||
106 | { | 108 | { |
107 | renderTree(); | 109 | renderTree(); |
108 | } | 110 | } |
@@ -198,7 +200,9 @@ void LLDrawPoolTree::renderForSelect() | |||
198 | gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); | 200 | gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); |
199 | gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); | 201 | gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); |
200 | 202 | ||
201 | if (gSavedSettings.getBOOL("RenderAnimateTrees")) | 203 | static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true); |
204 | |||
205 | if (*sRenderAnimateTrees) | ||
202 | { | 206 | { |
203 | renderTree(TRUE); | 207 | renderTree(TRUE); |
204 | } | 208 | } |
diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp index 51e7b89..f8c3166 100644 --- a/linden/indra/newview/llfloateractivespeakers.cpp +++ b/linden/indra/newview/llfloateractivespeakers.cpp | |||
@@ -511,7 +511,9 @@ void LLPanelActiveSpeakers::refreshSpeakers() | |||
511 | } | 511 | } |
512 | else | 512 | else |
513 | { | 513 | { |
514 | name_cell->setColor(LLColor4::black); | 514 | static LLColor4* sDefaultListText = rebind_llcontrol<LLColor4>("DefaultListText", &gColors, true); |
515 | |||
516 | name_cell->setColor((*sDefaultListText)); | ||
515 | } | 517 | } |
516 | 518 | ||
517 | std::string speaker_name; | 519 | std::string speaker_name; |
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 9e8c38b..c0e972d 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp | |||
@@ -738,7 +738,10 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) | |||
738 | 738 | ||
739 | LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin(); | 739 | LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin(); |
740 | LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion(); | 740 | LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion(); |
741 | if (gSavedSettings.getBOOL("FreezeTime") && | 741 | |
742 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
743 | |||
744 | if ((*sFreezeTime) && | ||
742 | (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)) | 745 | (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)) |
743 | { | 746 | { |
744 | previewp->mCameraPos = new_camera_pos; | 747 | previewp->mCameraPos = new_camera_pos; |
@@ -2334,8 +2337,10 @@ LLSnapshotFloaterView::~LLSnapshotFloaterView() | |||
2334 | 2337 | ||
2335 | BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent) | 2338 | BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent) |
2336 | { | 2339 | { |
2340 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
2341 | |||
2337 | // use default handler when not in freeze-frame mode | 2342 | // use default handler when not in freeze-frame mode |
2338 | if(!gSavedSettings.getBOOL("FreezeTime")) | 2343 | if(!(*sFreezeTime)) |
2339 | { | 2344 | { |
2340 | return LLFloaterView::handleKey(key, mask, called_from_parent); | 2345 | return LLFloaterView::handleKey(key, mask, called_from_parent); |
2341 | } | 2346 | } |
@@ -2355,8 +2360,9 @@ BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_paren | |||
2355 | 2360 | ||
2356 | BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask) | 2361 | BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask) |
2357 | { | 2362 | { |
2363 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
2358 | // use default handler when not in freeze-frame mode | 2364 | // use default handler when not in freeze-frame mode |
2359 | if(!gSavedSettings.getBOOL("FreezeTime")) | 2365 | if(!(*sFreezeTime)) |
2360 | { | 2366 | { |
2361 | return LLFloaterView::handleMouseDown(x, y, mask); | 2367 | return LLFloaterView::handleMouseDown(x, y, mask); |
2362 | } | 2368 | } |
@@ -2370,8 +2376,9 @@ BOOL LLSnapshotFloaterView::handleMouseDown(S32 x, S32 y, MASK mask) | |||
2370 | 2376 | ||
2371 | BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask) | 2377 | BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask) |
2372 | { | 2378 | { |
2379 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
2373 | // use default handler when not in freeze-frame mode | 2380 | // use default handler when not in freeze-frame mode |
2374 | if(!gSavedSettings.getBOOL("FreezeTime")) | 2381 | if(!(*sFreezeTime)) |
2375 | { | 2382 | { |
2376 | return LLFloaterView::handleMouseUp(x, y, mask); | 2383 | return LLFloaterView::handleMouseUp(x, y, mask); |
2377 | } | 2384 | } |
@@ -2385,8 +2392,9 @@ BOOL LLSnapshotFloaterView::handleMouseUp(S32 x, S32 y, MASK mask) | |||
2385 | 2392 | ||
2386 | BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask) | 2393 | BOOL LLSnapshotFloaterView::handleHover(S32 x, S32 y, MASK mask) |
2387 | { | 2394 | { |
2395 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
2388 | // use default handler when not in freeze-frame mode | 2396 | // use default handler when not in freeze-frame mode |
2389 | if(!gSavedSettings.getBOOL("FreezeTime")) | 2397 | if(!(*sFreezeTime)) |
2390 | { | 2398 | { |
2391 | return LLFloaterView::handleHover(x, y, mask); | 2399 | return LLFloaterView::handleHover(x, y, mask); |
2392 | } | 2400 | } |
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 7a9efcb..f6f09b1 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -1056,7 +1056,9 @@ void click_apply_to_selection(void* user) | |||
1056 | 1056 | ||
1057 | void commit_select_tool(LLUICtrl *ctrl, void *data) | 1057 | void commit_select_tool(LLUICtrl *ctrl, void *data) |
1058 | { | 1058 | { |
1059 | S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners"); | 1059 | static BOOL* sShowParcelOwners = rebind_llcontrol<BOOL>("ShowParcelOwners", &gSavedSettings, true); |
1060 | |||
1061 | S32 show_owners = *sShowParcelOwners; | ||
1060 | gFloaterTools->setEditTool(data); | 1062 | gFloaterTools->setEditTool(data); |
1061 | gSavedSettings.setBOOL("ShowParcelOwners", show_owners); | 1063 | gSavedSettings.setBOOL("ShowParcelOwners", show_owners); |
1062 | } | 1064 | } |
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index 16c0aa9..ce2b2b4 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp | |||
@@ -2893,7 +2893,9 @@ const std::string LLFolderView::getFilterSubString(BOOL trim) | |||
2893 | void LLFolderView::filter( LLInventoryFilter& filter ) | 2893 | void LLFolderView::filter( LLInventoryFilter& filter ) |
2894 | { | 2894 | { |
2895 | LLFastTimer t2(LLFastTimer::FTM_FILTER); | 2895 | LLFastTimer t2(LLFastTimer::FTM_FILTER); |
2896 | filter.setFilterCount(llclamp(gSavedSettings.getS32("FilterItemsPerFrame"), 1, 5000)); | 2896 | static S32 *sFilterItemsPerFrame = rebind_llcontrol<S32>("FilterItemsPerFrame", &gSavedSettings, true); |
2897 | |||
2898 | filter.setFilterCount(llclamp(*sFilterItemsPerFrame, 1, 5000)); | ||
2897 | 2899 | ||
2898 | if (getCompletedFilterGeneration() < filter.getCurrentGeneration()) | 2900 | if (getCompletedFilterGeneration() < filter.getCurrentGeneration()) |
2899 | { | 2901 | { |
@@ -3264,8 +3266,10 @@ void LLFolderView::draw() | |||
3264 | setShowSingleSelection(FALSE); | 3266 | setShowSingleSelection(FALSE); |
3265 | } | 3267 | } |
3266 | 3268 | ||
3269 | static F32 *sTypeAheadTimeout = rebind_llcontrol<F32>("TypeAheadTimeout", &gSavedSettings, true); | ||
3270 | |||
3267 | 3271 | ||
3268 | if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout") || !mSearchString.size()) | 3272 | if (mSearchTimer.getElapsedTimeF32() > *sTypeAheadTimeout || !mSearchString.size()) |
3269 | { | 3273 | { |
3270 | mSearchString.clear(); | 3274 | mSearchString.clear(); |
3271 | } | 3275 | } |
@@ -3995,8 +3999,11 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char) | |||
3995 | LLMenuGL::sMenuContainer->hideMenus(); | 3999 | LLMenuGL::sMenuContainer->hideMenus(); |
3996 | } | 4000 | } |
3997 | 4001 | ||
4002 | static F32 *sTypeAheadTimeout = rebind_llcontrol<F32>("TypeAheadTimeout", &gSavedSettings, true); | ||
4003 | |||
4004 | |||
3998 | //do text search | 4005 | //do text search |
3999 | if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout")) | 4006 | if (mSearchTimer.getElapsedTimeF32() > *sTypeAheadTimeout) |
4000 | { | 4007 | { |
4001 | mSearchString.clear(); | 4008 | mSearchString.clear(); |
4002 | } | 4009 | } |
@@ -4340,10 +4347,10 @@ void LLFolderView::doIdle() | |||
4340 | { | 4347 | { |
4341 | LLFastTimer t2(LLFastTimer::FTM_INVENTORY); | 4348 | LLFastTimer t2(LLFastTimer::FTM_INVENTORY); |
4342 | 4349 | ||
4343 | BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters"); | 4350 | static BOOL* debug_filters = rebind_llcontrol<BOOL>("DebugInventoryFilters", &gSavedSettings, true); |
4344 | if (debug_filters != getDebugFilters()) | 4351 | if (*debug_filters != getDebugFilters()) |
4345 | { | 4352 | { |
4346 | mDebugFilters = debug_filters; | 4353 | mDebugFilters = *debug_filters; |
4347 | arrangeAll(); | 4354 | arrangeAll(); |
4348 | } | 4355 | } |
4349 | 4356 | ||
diff --git a/linden/indra/newview/llgroupnotify.cpp b/linden/indra/newview/llgroupnotify.cpp index d906633..1b00dfb 100644 --- a/linden/indra/newview/llgroupnotify.cpp +++ b/linden/indra/newview/llgroupnotify.cpp | |||
@@ -115,7 +115,10 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject, | |||
115 | setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); | 115 | setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); |
116 | setBackgroundVisible(TRUE); | 116 | setBackgroundVisible(TRUE); |
117 | setBackgroundOpaque(TRUE); | 117 | setBackgroundOpaque(TRUE); |
118 | setBackgroundColor( gColors.getColor("GroupNotifyBoxColor") ); | 118 | |
119 | static LLColor4* sGroupNotifyBoxColor = rebind_llcontrol<LLColor4>("GroupNotifyBoxColor", &gColors, true); | ||
120 | |||
121 | setBackgroundColor( (*sGroupNotifyBoxColor) ); | ||
119 | 122 | ||
120 | LLIconCtrl* icon; | 123 | LLIconCtrl* icon; |
121 | LLTextEditor* text; | 124 | LLTextEditor* text; |
@@ -133,7 +136,10 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject, | |||
133 | setFontStyle(LLFontGL::DROP_SHADOW_SOFT); | 136 | setFontStyle(LLFontGL::DROP_SHADOW_SOFT); |
134 | setBorderVisible(FALSE); | 137 | setBorderVisible(FALSE); |
135 | setColor( gColors.getColor("GroupNotifyTextColor") ); | 138 | setColor( gColors.getColor("GroupNotifyTextColor") ); |
136 | setBackgroundColor( gColors.getColor("GroupNotifyBoxColor") ); | 139 | |
140 | static LLColor4* sGroupNotifyBoxColor = rebind_llcontrol<LLColor4>("GroupNotifyBoxColor", &gColors, true); | ||
141 | |||
142 | setBackgroundColor( (*sGroupNotifyBoxColor) ); | ||
137 | } | 143 | } |
138 | }; | 144 | }; |
139 | 145 | ||
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index 58d2c6a..23fc947 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp | |||
@@ -299,14 +299,14 @@ void LLHUDEffectLookAt::packData(LLMessageSystem *mesgsys) | |||
299 | 299 | ||
300 | 300 | ||
301 | bool is_self = source_avatar->isSelf(); | 301 | bool is_self = source_avatar->isSelf(); |
302 | bool is_private = gSavedSettings.getBOOL("PrivateLookAtTarget"); | 302 | static BOOL *sPrivateLookAtTarget = rebind_llcontrol<BOOL>("PrivateLookAtTarget", &gSavedSettings, true); |
303 | if (!is_self) //imprudence TODO: find out why this happens at all and fix there | 303 | if (!is_self) //imprudence TODO: find out why this happens at all and fix there |
304 | { | 304 | { |
305 | LL_DEBUGS("HUDEffect")<< "Non-self Avatar HUDEffectLookAt message for ID: " << source_avatar->getID().asString() << LL_ENDL; | 305 | LL_DEBUGS("HUDEffect")<< "Non-self Avatar HUDEffectLookAt message for ID: " << source_avatar->getID().asString() << LL_ENDL; |
306 | markDead(); | 306 | markDead(); |
307 | return; | 307 | return; |
308 | } | 308 | } |
309 | else if (is_private && target_type != LOOKAT_TARGET_AUTO_LISTEN) | 309 | else if (*sPrivateLookAtTarget && target_type != LOOKAT_TARGET_AUTO_LISTEN) |
310 | { | 310 | { |
311 | //this mimicks "do nothing" | 311 | //this mimicks "do nothing" |
312 | target_type = LOOKAT_TARGET_AUTO_LISTEN; | 312 | target_type = LOOKAT_TARGET_AUTO_LISTEN; |
@@ -574,7 +574,8 @@ void LLHUDEffectLookAt::render() | |||
574 | } gGL.end(); | 574 | } gGL.end(); |
575 | gGL.popMatrix(); | 575 | gGL.popMatrix(); |
576 | 576 | ||
577 | if( gSavedSettings.getBOOL("ShowLookAtNames") ) | 577 | static BOOL *sEmeraldShowLookAtNames = rebind_llcontrol<BOOL>("EmeraldShowLookAtNames", &gSavedSettings, true); |
578 | if (*sEmeraldShowLookAtNames) | ||
578 | { | 579 | { |
579 | const LLFontGL* fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); | 580 | const LLFontGL* fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); |
580 | LLGLEnable color_mat(GL_COLOR_MATERIAL); | 581 | LLGLEnable color_mat(GL_COLOR_MATERIAL); |
diff --git a/linden/indra/newview/llhudeffecttrail.cpp b/linden/indra/newview/llhudeffecttrail.cpp index 08f4c78..1b0f3b3 100644 --- a/linden/indra/newview/llhudeffecttrail.cpp +++ b/linden/indra/newview/llhudeffecttrail.cpp | |||
@@ -181,7 +181,9 @@ void LLHUDEffectSpiral::triggerLocal() | |||
181 | { | 181 | { |
182 | mKillTime = mTimer.getElapsedTimeF32() + mDuration; | 182 | mKillTime = mTimer.getElapsedTimeF32() + mDuration; |
183 | 183 | ||
184 | BOOL show_beam = gSavedSettings.getBOOL("ShowSelectionBeam"); | 184 | static BOOL* sShowSelectionBeam = rebind_llcontrol<BOOL>("ShowSelectionBeam", &gSavedSettings, true); |
185 | |||
186 | BOOL show_beam = *sShowSelectionBeam; | ||
185 | 187 | ||
186 | LLColor4 color; | 188 | LLColor4 color; |
187 | color.setVec(mColor); | 189 | color.setVec(mColor); |
@@ -278,10 +280,12 @@ void LLHUDEffectSpiral::render() | |||
278 | { | 280 | { |
279 | F32 time = mTimer.getElapsedTimeF32(); | 281 | F32 time = mTimer.getElapsedTimeF32(); |
280 | 282 | ||
283 | static BOOL* sShowSelectionBeam = rebind_llcontrol<BOOL>("ShowSelectionBeam", &gSavedSettings, true); | ||
284 | |||
281 | if ((!mSourceObject.isNull() && mSourceObject->isDead()) || | 285 | if ((!mSourceObject.isNull() && mSourceObject->isDead()) || |
282 | (!mTargetObject.isNull() && mTargetObject->isDead()) || | 286 | (!mTargetObject.isNull() && mTargetObject->isDead()) || |
283 | mKillTime < time || | 287 | mKillTime < time || |
284 | (!mPartSourcep.isNull() && !gSavedSettings.getBOOL("ShowSelectionBeam")) ) | 288 | (!mPartSourcep.isNull() && !*sShowSelectionBeam) ) |
285 | { | 289 | { |
286 | markDead(); | 290 | markDead(); |
287 | return; | 291 | return; |
diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp index 661a786..7d9f7f9 100644 --- a/linden/indra/newview/llhudtext.cpp +++ b/linden/indra/newview/llhudtext.cpp | |||
@@ -292,9 +292,14 @@ void LLHUDText::renderText(BOOL for_select) | |||
292 | // *TODO: cache this image | 292 | // *TODO: cache this image |
293 | LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); | 293 | LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); |
294 | 294 | ||
295 | static LLColor4* sBackgroundChatColor = rebind_llcontrol<LLColor4>("BackgroundChatColor", &gSavedSettings, true); | ||
296 | |||
295 | // *TODO: make this a per-text setting | 297 | // *TODO: make this a per-text setting |
296 | LLColor4 bg_color = gSavedSettings.getColor4("BackgroundChatColor"); | 298 | LLColor4 bg_color = *sBackgroundChatColor; |
297 | bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); | 299 | |
300 | static F32* sChatBubbleOpacity = rebind_llcontrol<F32>("ChatBubbleOpacity", &gSavedSettings, true); | ||
301 | |||
302 | bg_color.setAlpha(*sChatBubbleOpacity * alpha_factor); | ||
298 | 303 | ||
299 | const S32 border_height = 16; | 304 | const S32 border_height = 16; |
300 | const S32 border_width = 16; | 305 | const S32 border_width = 16; |
@@ -394,7 +399,7 @@ void LLHUDText::renderText(BOOL for_select) | |||
394 | { | 399 | { |
395 | LLUI::pushMatrix(); | 400 | LLUI::pushMatrix(); |
396 | { | 401 | { |
397 | gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor); | 402 | gGL.color4f(text_color.mV[VX], text_color.mV[VY], text_color.mV[VZ], *sChatBubbleOpacity * alpha_factor); |
398 | LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec; | 403 | LLVector3 label_height = (mFontp->getLineHeight() * mLabelSegments.size() + (VERTICAL_PADDING / 3.f)) * y_pixel_vec; |
399 | LLVector3 label_offset = height_vec - label_height; | 404 | LLVector3 label_offset = height_vec - label_height; |
400 | LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]); | 405 | LLUI::translate(label_offset.mV[VX], label_offset.mV[VY], label_offset.mV[VZ]); |
diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp index f2ec414..67cb758 100644 --- a/linden/indra/newview/llmediaremotectrl.cpp +++ b/linden/indra/newview/llmediaremotectrl.cpp | |||
@@ -151,8 +151,11 @@ void LLMediaRemoteCtrl::enableMediaButtons() | |||
151 | bool play_music_enabled = false; | 151 | bool play_music_enabled = false; |
152 | bool stop_music_enabled = false; | 152 | bool stop_music_enabled = false; |
153 | bool media_show_pause = false; | 153 | bool media_show_pause = false; |
154 | LLColor4 music_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); | 154 | |
155 | LLColor4 media_icon_color = LLUI::sColorsGroup->getColor( "IconDisabledColor" ); | 155 | static LLColor4* sIconDisabledColor = rebind_llcontrol<LLColor4>("IconDisabledColor", &gColors, true); |
156 | |||
157 | LLColor4 music_icon_color = (*sIconDisabledColor).getValue(); | ||
158 | LLColor4 media_icon_color = (*sIconDisabledColor).getValue(); | ||
156 | std::string media_type = "none/none"; | 159 | std::string media_type = "none/none"; |
157 | 160 | ||
158 | // Put this in xui file | 161 | // Put this in xui file |
@@ -161,7 +164,7 @@ void LLMediaRemoteCtrl::enableMediaButtons() | |||
161 | 164 | ||
162 | if (gSavedSettings.getBOOL("AudioStreamingVideo")) | 165 | if (gSavedSettings.getBOOL("AudioStreamingVideo")) |
163 | { | 166 | { |
164 | if ( parcel && parcel->getMediaURL()[0]) | 167 | if ( parcel && !parcel->getMediaURL().empty()) |
165 | { | 168 | { |
166 | // Set the tooltip | 169 | // Set the tooltip |
167 | // Put this text into xui file | 170 | // Put this text into xui file |
@@ -197,10 +200,10 @@ void LLMediaRemoteCtrl::enableMediaButtons() | |||
197 | } | 200 | } |
198 | } | 201 | } |
199 | } | 202 | } |
203 | |||
200 | if (gSavedSettings.getBOOL("AudioStreamingMusic") && gAudiop) | 204 | if (gSavedSettings.getBOOL("AudioStreamingMusic") && gAudiop) |
201 | { | 205 | { |
202 | 206 | if ( parcel && !parcel->getMusicURL().empty()) | |
203 | if ( parcel && parcel->getMusicURL()[0]) | ||
204 | { | 207 | { |
205 | music_icon_color = LLUI::sColorsGroup->getColor( "IconEnabledColor" ); | 208 | music_icon_color = LLUI::sColorsGroup->getColor( "IconEnabledColor" ); |
206 | 209 | ||
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 8f7dd03..8a12ff3 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -350,11 +350,21 @@ void LLNetMap::draw() | |||
350 | F32 min_pick_dist = mDotRadius * MIN_PICK_SCALE; | 350 | F32 min_pick_dist = mDotRadius * MIN_PICK_SCALE; |
351 | 351 | ||
352 | // Draw avatars | 352 | // Draw avatars |
353 | LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); | 353 | static LLColor4* sMapAvatar = rebind_llcontrol<LLColor4>("MapAvatar", &gColors, true); |
354 | LLColor4 friend_color = gColors.getColor( "MapFriend" ); | 354 | LLColor4 avatar_color = (*sMapAvatar).getValue(); |
355 | LLColor4 muted_color = gColors.getColor( "MapMuted" ); | 355 | |
356 | LLColor4 selected_color = gColors.getColor( "MapSelected" ); | 356 | static LLColor4* sMapFriend = rebind_llcontrol<LLColor4>("MapFriend", &gColors, true); |
357 | LLColor4 imp_dev_color = gColors.getColor( "MapImpDev" ); | 357 | LLColor4 friend_color = (*sMapFriend).getValue(); |
358 | |||
359 | static LLColor4* sMapMuted = rebind_llcontrol<LLColor4>("MapMuted", &gColors, true); | ||
360 | LLColor4 muted_color = (*sMapMuted).getValue(); | ||
361 | |||
362 | static LLColor4* sMapSelected = rebind_llcontrol<LLColor4>("MapSelected", &gColors, true); | ||
363 | LLColor4 selected_color = (*sMapSelected).getValue(); | ||
364 | |||
365 | static LLColor4* sMapImpDev = rebind_llcontrol<LLColor4>("MapImpDev", &gColors, true); | ||
366 | LLColor4 imp_dev_color = (*sMapImpDev).getValue(); | ||
367 | |||
358 | LLColor4 glyph_color; | 368 | LLColor4 glyph_color; |
359 | int selected = -1; | 369 | int selected = -1; |
360 | 370 | ||
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index ef57aaf..1a7b247 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -227,7 +227,10 @@ LLNotifyBox::LLNotifyBox(LLNotificationPtr notification, | |||
227 | 227 | ||
228 | caution_box->setFontStyle(LLFontGL::BOLD); | 228 | caution_box->setFontStyle(LLFontGL::BOLD); |
229 | caution_box->setColor(gColors.getColor("NotifyCautionWarnColor")); | 229 | caution_box->setColor(gColors.getColor("NotifyCautionWarnColor")); |
230 | caution_box->setBackgroundColor(gColors.getColor("NotifyCautionBoxColor")); | 230 | |
231 | static LLColor4* sNotifyCautionBoxColor = rebind_llcontrol<LLColor4>("NotifyCautionBoxColor", &gColors, true); | ||
232 | |||
233 | caution_box->setBackgroundColor((*sNotifyCautionBoxColor)); | ||
231 | caution_box->setBorderVisible(FALSE); | 234 | caution_box->setBorderVisible(FALSE); |
232 | caution_box->setWrappedText(notification->getMessage()); | 235 | caution_box->setWrappedText(notification->getMessage()); |
233 | 236 | ||
@@ -485,7 +488,10 @@ void LLNotifyBox::drawBackground() const | |||
485 | { | 488 | { |
486 | gGL.getTexUnit(0)->bind(imagep->getImage()); | 489 | gGL.getTexUnit(0)->bind(imagep->getImage()); |
487 | // set proper background color depending on whether notify box is a caution or not | 490 | // set proper background color depending on whether notify box is a caution or not |
488 | LLColor4 color = mIsCaution? gColors.getColor("NotifyCautionBoxColor") : gColors.getColor("NotifyBoxColor"); | 491 | static LLColor4* sNotifyCautionBoxColor = rebind_llcontrol<LLColor4>("NotifyCautionBoxColor", &gColors, true); |
492 | static LLColor4* sNotifyBoxColor = rebind_llcontrol<LLColor4>("NotifyBoxColor", &gColors, true); | ||
493 | |||
494 | LLColor4 color = mIsCaution? (*sNotifyCautionBoxColor) : (*sNotifyBoxColor); | ||
489 | if(gFocusMgr.childHasKeyboardFocus( this )) | 495 | if(gFocusMgr.childHasKeyboardFocus( this )) |
490 | { | 496 | { |
491 | const S32 focus_width = 2; | 497 | const S32 focus_width = 2; |
@@ -500,9 +506,9 @@ void LLNotifyBox::drawBackground() const | |||
500 | gl_segmented_rect_2d_tex(0, getRect().getHeight(), getRect().getWidth(), 0, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); | 506 | gl_segmented_rect_2d_tex(0, getRect().getHeight(), getRect().getWidth(), 0, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); |
501 | 507 | ||
502 | if( mIsCaution ) | 508 | if( mIsCaution ) |
503 | color = gColors.getColor("NotifyCautionBoxColor"); | 509 | color = (*sNotifyCautionBoxColor); |
504 | else | 510 | else |
505 | color = gColors.getColor("NotifyBoxColor"); | 511 | color = (*sNotifyBoxColor); |
506 | 512 | ||
507 | gGL.color4fv(color.mV); | 513 | gGL.color4fv(color.mV); |
508 | gl_segmented_rect_2d_tex(1, getRect().getHeight()-1, getRect().getWidth()-1, 1, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); | 514 | gl_segmented_rect_2d_tex(1, getRect().getHeight()-1, getRect().getWidth()-1, 1, imagep->getTextureWidth(), imagep->getTextureHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); |
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index 6191a01..14ae3ff 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp | |||
@@ -359,19 +359,22 @@ void LLOverlayBar::refresh() | |||
359 | // update "remotes" | 359 | // update "remotes" |
360 | childSetVisible("media_remote_container", TRUE); | 360 | childSetVisible("media_remote_container", TRUE); |
361 | childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); | 361 | childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); |
362 | childSetVisible("windlight_remote_container", gSavedSettings.getBOOL("EnableWindlightRemote")); | 362 | static BOOL *sEnableWindlightRemote = rebind_llcontrol<BOOL>("EnableWindlightRemote", &gSavedSettings, true); |
363 | childSetVisible("ao_remote_container", gSavedSettings.getBOOL("EnableAORemote")); | 363 | childSetVisible("windlight_remote_container", (*sEnableWindlightRemote)); |
364 | static BOOL *sEnableAORemote = rebind_llcontrol<BOOL>("EnableAORemote", &gSavedSettings, true); | ||
365 | childSetVisible("ao_remote_container", (*sEnableAORemote)); | ||
364 | childSetVisible("state_buttons", TRUE); | 366 | childSetVisible("state_buttons", TRUE); |
365 | } | 367 | } |
366 | 368 | ||
369 | static BOOL *sChatVisible = rebind_llcontrol<BOOL>("ChatVisible", &gSavedSettings, true); | ||
367 | // always let user toggle into and out of chatbar | 370 | // always let user toggle into and out of chatbar |
368 | childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); | 371 | childSetVisible("chat_bar", *sChatVisible);//gSavedSettings.getBOOL("ChatVisible")); |
372 | |||
369 | 373 | ||
370 | if (buttons_changed) | 374 | if (buttons_changed) |
371 | { | 375 | { |
372 | layoutButtons(); | 376 | layoutButtons(); |
373 | } | 377 | } |
374 | |||
375 | } | 378 | } |
376 | 379 | ||
377 | //----------------------------------------------------------------------- | 380 | //----------------------------------------------------------------------- |
diff --git a/linden/indra/newview/llpanelaudiovolume.cpp b/linden/indra/newview/llpanelaudiovolume.cpp index 5045e8f..bb10f80 100644 --- a/linden/indra/newview/llpanelaudiovolume.cpp +++ b/linden/indra/newview/llpanelaudiovolume.cpp | |||
@@ -67,8 +67,9 @@ LLPanelAudioVolume::~LLPanelAudioVolume () | |||
67 | // | 67 | // |
68 | void LLPanelAudioVolume::draw() | 68 | void LLPanelAudioVolume::draw() |
69 | { | 69 | { |
70 | BOOL mute = gSavedSettings.getBOOL("MuteAudio"); | 70 | |
71 | bool enable = mute ? false : true; | 71 | static BOOL* sMuteAudio = rebind_llcontrol<BOOL>("MuteAudio", &gSavedSettings, true); |
72 | bool enable = (*sMuteAudio) ? false : true; | ||
72 | childSetEnabled("Music Volume", enable); | 73 | childSetEnabled("Music Volume", enable); |
73 | childSetEnabled("Media Volume", enable); | 74 | childSetEnabled("Media Volume", enable); |
74 | childSetEnabled("Voice Volume", enable); | 75 | childSetEnabled("Voice Volume", enable); |
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 33f4cd6..e88a16a 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp | |||
@@ -1499,13 +1499,15 @@ void LLPanelAvatar::resetGroupList() | |||
1499 | row["columns"][0]["width"] = 0; | 1499 | row["columns"][0]["width"] = 0; |
1500 | if (group_data.mListInProfile) | 1500 | if (group_data.mListInProfile) |
1501 | { | 1501 | { |
1502 | static LLColor4 *sScrollUnselectedColor = rebind_llcontrol<LLColor4>("ScrollUnselectedColor", LLUI::sColorsGroup, true); | ||
1502 | row["columns"][0]["value"] = group_string; | 1503 | row["columns"][0]["value"] = group_string; |
1503 | row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | 1504 | row["columns"][0]["color"] = (*sScrollUnselectedColor).getValue(); |
1504 | } | 1505 | } |
1505 | else | 1506 | else |
1506 | { | 1507 | { |
1508 | static LLColor4 *sScrollReadOnlyColor = rebind_llcontrol<LLColor4>("ScrollReadOnlyColor", LLUI::sColorsGroup, true); | ||
1507 | row["columns"][0]["value"] = group_string + " " + getString("HiddenLabel"); | 1509 | row["columns"][0]["value"] = group_string + " " + getString("HiddenLabel"); |
1508 | row["columns"][0]["color"] = gColors.getColor("ScrollReadOnlyColor").getValue(); | 1510 | row["columns"][0]["color"] = (*sScrollReadOnlyColor).getValue(); |
1509 | } | 1511 | } |
1510 | group_list->addElement(row); | 1512 | group_list->addElement(row); |
1511 | } | 1513 | } |
@@ -2063,13 +2065,15 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) | |||
2063 | // Set normal color if not found or if group is visible in profile | 2065 | // Set normal color if not found or if group is visible in profile |
2064 | if (!group_data || group_data->mListInProfile) | 2066 | if (!group_data || group_data->mListInProfile) |
2065 | { | 2067 | { |
2068 | static LLColor4 *sScrollUnselectedColor = rebind_llcontrol<LLColor4>("ScrollUnselectedColor", LLUI::sColorsGroup, true); | ||
2066 | row["columns"][0]["value"] = group_string; | 2069 | row["columns"][0]["value"] = group_string; |
2067 | row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); | 2070 | row["columns"][0]["color"] = (*sScrollUnselectedColor).getValue(); |
2068 | } | 2071 | } |
2069 | else | 2072 | else |
2070 | { | 2073 | { |
2074 | static LLColor4 *sScrollReadOnlyColor = rebind_llcontrol<LLColor4>("ScrollReadOnlyColor", LLUI::sColorsGroup, true); | ||
2071 | row["columns"][0]["value"] = group_string + " " + self->getString("HiddenLabel"); | 2075 | row["columns"][0]["value"] = group_string + " " + self->getString("HiddenLabel"); |
2072 | row["columns"][0]["color"] = gColors.getColor("ScrollReadOnlyColor").getValue(); | 2076 | row["columns"][0]["color"] = (*sScrollReadOnlyColor).getValue(); |
2073 | } | 2077 | } |
2074 | if (group_list) | 2078 | if (group_list) |
2075 | { | 2079 | { |
diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp index b2313f6..e17ba2b 100644 --- a/linden/indra/newview/llpaneldisplay.cpp +++ b/linden/indra/newview/llpaneldisplay.cpp | |||
@@ -325,8 +325,9 @@ BOOL LLPanelDisplay::postBuild() | |||
325 | mLightingText = getChild<LLTextBox>("LightingDetailText"); | 325 | mLightingText = getChild<LLTextBox>("LightingDetailText"); |
326 | mMeshDetailText = getChild<LLTextBox>("MeshDetailText"); | 326 | mMeshDetailText = getChild<LLTextBox>("MeshDetailText"); |
327 | 327 | ||
328 | childSetValue("toggle_windlight_control", gSavedSettings.getBOOL("EnableWindlightRemote")); | 328 | static BOOL* sEnableWindlightRemote = rebind_llcontrol<BOOL>("EnableWindlightRemote", &gSavedSettings, true); |
329 | mWLControl = gSavedSettings.getBOOL("EnableWindlightRemote"); | 329 | childSetValue("toggle_windlight_control", (*sEnableWindlightRemote)); |
330 | mWLControl = (*sEnableWindlightRemote); | ||
330 | 331 | ||
331 | refresh(); | 332 | refresh(); |
332 | 333 | ||
@@ -387,7 +388,8 @@ void LLPanelDisplay::refresh() | |||
387 | mCustomSettings = gSavedSettings.getBOOL("RenderCustomSettings"); | 388 | mCustomSettings = gSavedSettings.getBOOL("RenderCustomSettings"); |
388 | 389 | ||
389 | // shader settings | 390 | // shader settings |
390 | mBumpShiny = gSavedSettings.getBOOL("RenderObjectBump"); | 391 | static BOOL* sRenderObjectBump = rebind_llcontrol<BOOL>("RenderObjectBump", &gSavedSettings, true); |
392 | mBumpShiny = *sRenderObjectBump; | ||
391 | mShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable"); | 393 | mShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable"); |
392 | mWindLight = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); | 394 | mWindLight = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); |
393 | mReflections = gSavedSettings.getBOOL("RenderWaterReflections"); | 395 | mReflections = gSavedSettings.getBOOL("RenderWaterReflections"); |
@@ -418,7 +420,8 @@ void LLPanelDisplay::refresh() | |||
418 | mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail"); | 420 | mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail"); |
419 | 421 | ||
420 | // windlight remote | 422 | // windlight remote |
421 | mWLControl = gSavedSettings.getBOOL("EnableWindlightRemote"); | 423 | static BOOL* sEnableWindlightRemote = rebind_llcontrol<BOOL>("EnableWindlightRemote", &gSavedSettings, true); |
424 | mWLControl = (*sEnableWindlightRemote); | ||
422 | 425 | ||
423 | // max avatar count | 426 | // max avatar count |
424 | mAvatarMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); | 427 | mAvatarMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); |
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index cb0416e..aa62b34 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp | |||
@@ -83,8 +83,10 @@ BOOL LLPrefsAdvanced::postBuild() | |||
83 | { | 83 | { |
84 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); | 84 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); |
85 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); | 85 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); |
86 | childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); | 86 | static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true); |
87 | childSetValue("client_name_color_check", gSavedSettings.getBOOL("ShowClientColor")); | 87 | childSetValue("client_name_tag_check", (*sShowClientNameTag)); |
88 | static BOOL* sShowClientColor = rebind_llcontrol<BOOL>("ShowClientColor", &gSavedSettings, true); | ||
89 | childSetValue("client_name_color_check", (*sShowClientColor)); | ||
88 | childSetValue("client_name_hover_check", gSavedSettings.getBOOL("ShowClientNameHoverTip")); | 90 | childSetValue("client_name_hover_check", gSavedSettings.getBOOL("ShowClientNameHoverTip")); |
89 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); | 91 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); |
90 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); | 92 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); |
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index b4614b8..6ebc880 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp | |||
@@ -140,9 +140,10 @@ void LLPrefsChatImpl::refreshValues() | |||
140 | mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); | 140 | mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); |
141 | mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); | 141 | mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); |
142 | mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); | 142 | mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); |
143 | mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); | ||
144 | mTranslateLanguage = gSavedSettings.getString("TranslateLanguage"); | 143 | mTranslateLanguage = gSavedSettings.getString("TranslateLanguage"); |
145 | mTranslateChat = gSavedSettings.getBOOL("TranslateChat"); | 144 | mTranslateChat = gSavedSettings.getBOOL("TranslateChat"); |
145 | static F32* sChatBubbleOpacity = rebind_llcontrol<F32>("ChatBubbleOpacity", &gSavedSettings, true); | ||
146 | mBubbleOpacity = *sChatBubbleOpacity; | ||
146 | } | 147 | } |
147 | 148 | ||
148 | void LLPrefsChatImpl::cancel() | 149 | void LLPrefsChatImpl::cancel() |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 4fd4daa..39d9ab6 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -1938,7 +1938,9 @@ bool idle_startup() | |||
1938 | LLFloaterActiveSpeakers::showInstance(); | 1938 | LLFloaterActiveSpeakers::showInstance(); |
1939 | } | 1939 | } |
1940 | 1940 | ||
1941 | if (gSavedSettings.getBOOL("BeaconsEnabled")) | 1941 | static BOOL* sBeaconsEnabled = rebind_llcontrol<BOOL>("BeaconsEnabled", &gSavedSettings, true); |
1942 | |||
1943 | if (*sBeaconsEnabled) | ||
1942 | { | 1944 | { |
1943 | LLFloaterBeacons::showInstance(); | 1945 | LLFloaterBeacons::showInstance(); |
1944 | } | 1946 | } |
diff --git a/linden/indra/newview/llstatgraph.cpp b/linden/indra/newview/llstatgraph.cpp index 26b7494..ace1731 100644 --- a/linden/indra/newview/llstatgraph.cpp +++ b/linden/indra/newview/llstatgraph.cpp | |||
@@ -109,7 +109,9 @@ void LLStatGraph::draw() | |||
109 | // gColors.getColor("ColorDropShadow"), | 109 | // gColors.getColor("ColorDropShadow"), |
110 | // (S32) gSavedSettings.getF32("DropShadowFloater") ); | 110 | // (S32) gSavedSettings.getF32("DropShadowFloater") ); |
111 | 111 | ||
112 | color = gColors.getColor( "MenuDefaultBgColor" ); | 112 | static LLColor4* sMenuDefaultBgColor = rebind_llcontrol<LLColor4>("MenuDefaultBgColor", &gColors, true); |
113 | color = (*sMenuDefaultBgColor).getValue(); | ||
114 | |||
113 | gGL.color4fv(color.mV); | 115 | gGL.color4fv(color.mV); |
114 | gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE); | 116 | gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE); |
115 | 117 | ||
diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index 366363b..fbb99f0 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp | |||
@@ -227,12 +227,15 @@ void LLStatusBar::draw() | |||
227 | { | 227 | { |
228 | refresh(); | 228 | refresh(); |
229 | 229 | ||
230 | /*static LLColor4* sColorDropShadow = rebind_llcontrol<LLColor4>("ColorDropShadow", LLUI::sColorsGroup, true); | ||
231 | static S32* sDropShadowFloater = rebind_llcontrol<S32>("DropShadowFloater", LLUI::sConfigGroup, true); | ||
232 | |||
230 | if (isBackgroundVisible()) | 233 | if (isBackgroundVisible()) |
231 | { | 234 | { |
232 | gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, | 235 | gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, |
233 | LLUI::sColorsGroup->getColor("ColorDropShadow"), | 236 | (*sColorDropShadow), |
234 | LLUI::sConfigGroup->getS32("DropShadowFloater") ); | 237 | (*sDropShadowFloater) ); |
235 | } | 238 | }*/ |
236 | LLPanel::draw(); | 239 | LLPanel::draw(); |
237 | } | 240 | } |
238 | 241 | ||
diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 2184478..5cad14c 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp | |||
@@ -750,7 +750,9 @@ bool LLTextureFetchWorker::doWork(S32 param) | |||
750 | 750 | ||
751 | if (mState == LOAD_FROM_NETWORK) | 751 | if (mState == LOAD_FROM_NETWORK) |
752 | { | 752 | { |
753 | bool get_url = gSavedSettings.getBOOL("ImagePipelineUseHTTP"); | 753 | static BOOL* sImagePipelineUseHTTP = rebind_llcontrol<BOOL>("ImagePipelineUseHTTP", &gSavedSettings, true); |
754 | |||
755 | bool get_url = *sImagePipelineUseHTTP; | ||
754 | if (!mUrl.empty()) get_url = false; | 756 | if (!mUrl.empty()) get_url = false; |
755 | // if (mHost != LLHost::invalid) get_url = false; | 757 | // if (mHost != LLHost::invalid) get_url = false; |
756 | if ( get_url && mCanUseHTTP && mUrl.empty())//get http url. | 758 | if ( get_url && mCanUseHTTP && mUrl.empty())//get http url. |
diff --git a/linden/indra/newview/lltoolfocus.cpp b/linden/indra/newview/lltoolfocus.cpp index 351c02b..ae0cd1e 100644 --- a/linden/indra/newview/lltoolfocus.cpp +++ b/linden/indra/newview/lltoolfocus.cpp | |||
@@ -216,10 +216,12 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) | |||
216 | gAgent.setFocusGlobal(pick_info); | 216 | gAgent.setFocusGlobal(pick_info); |
217 | } | 217 | } |
218 | 218 | ||
219 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
220 | |||
219 | if (!(pick_info.mKeyMask & MASK_ALT) && | 221 | if (!(pick_info.mKeyMask & MASK_ALT) && |
220 | gAgent.cameraThirdPerson() && | 222 | gAgent.cameraThirdPerson() && |
221 | gViewerWindow->getLeftMouseDown() && | 223 | gViewerWindow->getLeftMouseDown() && |
222 | !gSavedSettings.getBOOL("FreezeTime") && | 224 | !(*sFreezeTime) && |
223 | (hit_obj == gAgent.getAvatarObject() || | 225 | (hit_obj == gAgent.getAvatarObject() || |
224 | (hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf()))) | 226 | (hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf()))) |
225 | { | 227 | { |
diff --git a/linden/indra/newview/llvieweraudio.cpp b/linden/indra/newview/llvieweraudio.cpp index f043fb5..672836d 100644 --- a/linden/indra/newview/llvieweraudio.cpp +++ b/linden/indra/newview/llvieweraudio.cpp | |||
@@ -114,10 +114,14 @@ void init_audio() | |||
114 | 114 | ||
115 | void audio_update_volume(bool force_update) | 115 | void audio_update_volume(bool force_update) |
116 | { | 116 | { |
117 | F32 master_volume = gSavedSettings.getF32("AudioLevelMaster"); | ||
118 | bool wind_muted = gSavedSettings.getBOOL("MuteWind"); | ||
119 | bool mute_audio = gSavedSettings.getBOOL("MuteAudio"); | ||
120 | 117 | ||
118 | static BOOL* sMuteAudio = rebind_llcontrol<BOOL>("MuteAudio", &gSavedSettings, true); | ||
119 | static BOOL* sMuteWind = rebind_llcontrol<BOOL>("MuteWind", &gSavedSettings, true); | ||
120 | static F32 *sAudioLevelMaster = rebind_llcontrol<F32>("AudioLevelMaster", &gSavedSettings, true); | ||
121 | |||
122 | F32 master_volume = (*sAudioLevelMaster); | ||
123 | bool wind_muted = (*sMuteWind); | ||
124 | BOOL mute_audio = (*sMuteAudio); | ||
121 | if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) | 125 | if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) |
122 | { | 126 | { |
123 | mute_audio = TRUE; | 127 | mute_audio = TRUE; |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 026f652..e109673 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -7509,7 +7509,9 @@ class LLViewEnableMouselook : public view_listener_t | |||
7509 | { | 7509 | { |
7510 | // You can't go directly from customize avatar to mouselook. | 7510 | // You can't go directly from customize avatar to mouselook. |
7511 | // TODO: write code with appropriate dialogs to handle this transition. | 7511 | // TODO: write code with appropriate dialogs to handle this transition. |
7512 | bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime")); | 7512 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
7513 | |||
7514 | bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !(*sFreezeTime)); | ||
7513 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 7515 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
7514 | return true; | 7516 | return true; |
7515 | } | 7517 | } |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index e216c44..35fd395 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -3022,7 +3022,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
3022 | 3022 | ||
3023 | if (!is_muted && !is_busy) | 3023 | if (!is_muted && !is_busy) |
3024 | { | 3024 | { |
3025 | visible_in_chat_bubble = gSavedSettings.getBOOL("UseChatBubbles"); | 3025 | static BOOL* sUseChatBubbles = rebind_llcontrol<BOOL>("UseChatBubbles", &gSavedSettings, true); |
3026 | visible_in_chat_bubble = *sUseChatBubbles; | ||
3026 | ((LLVOAvatar*)chatter)->addChat(chat); | 3027 | ((LLVOAvatar*)chatter)->addChat(chat); |
3027 | } | 3028 | } |
3028 | } | 3029 | } |
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index bfb248b..78ce247 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp | |||
@@ -698,7 +698,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) | |||
698 | } | 698 | } |
699 | } | 699 | } |
700 | 700 | ||
701 | if (gSavedSettings.getBOOL("FreezeTime")) | 701 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
702 | |||
703 | if ((*sFreezeTime)) | ||
702 | { | 704 | { |
703 | for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin(); | 705 | for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin(); |
704 | iter != idle_list.end(); iter++) | 706 | iter != idle_list.end(); iter++) |
diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp index 93e69ca..607f871 100644 --- a/linden/indra/newview/llviewerstats.cpp +++ b/linden/indra/newview/llviewerstats.cpp | |||
@@ -533,7 +533,8 @@ void update_statistics(U32 frame_count) | |||
533 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); | 533 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); |
534 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gSavedSettings.getS32("RenderLightingDetail")); | 534 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gSavedSettings.getS32("RenderLightingDetail")); |
535 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); | 535 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); |
536 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); | 536 | static BOOL* sUseChatBubbles = rebind_llcontrol<BOOL>("UseChatBubbles", &gSavedSettings, true); |
537 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)*sUseChatBubbles); | ||
537 | #if 0 // 1.9.2 | 538 | #if 0 // 1.9.2 |
538 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_OBJECTS, (F64)gSavedSettings.getS32("VertexShaderLevelObject")); | 539 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_OBJECTS, (F64)gSavedSettings.getS32("VertexShaderLevelObject")); |
539 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_AVATAR, (F64)gSavedSettings.getBOOL("VertexShaderLevelAvatar")); | 540 | LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_AVATAR, (F64)gSavedSettings.getBOOL("VertexShaderLevelAvatar")); |
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 43a0d19..3a68f0f 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -298,7 +298,9 @@ public: | |||
298 | U32 ypos = 64; | 298 | U32 ypos = 64; |
299 | const U32 y_inc = 20; | 299 | const U32 y_inc = 20; |
300 | 300 | ||
301 | if (gSavedSettings.getBOOL("DebugShowTime")) | 301 | static BOOL *sDebugShowTime = rebind_llcontrol<BOOL>("DebugShowTime", &gSavedSettings, true); |
302 | |||
303 | if(*sDebugShowTime) | ||
302 | { | 304 | { |
303 | const U32 y_inc2 = 15; | 305 | const U32 y_inc2 = 15; |
304 | for (std::map<S32,LLFrameTimer>::reverse_iterator iter = gDebugTimers.rbegin(); | 306 | for (std::map<S32,LLFrameTimer>::reverse_iterator iter = gDebugTimers.rbegin(); |
@@ -513,8 +515,10 @@ public: | |||
513 | addText(xpos, ypos, llformat("%d %d %d %d", color[0], color[1], color[2], color[3])); | 515 | addText(xpos, ypos, llformat("%d %d %d %d", color[0], color[1], color[2], color[3])); |
514 | ypos += y_inc; | 516 | ypos += y_inc; |
515 | } | 517 | } |
518 | static BOOL* sBeaconsEnabled = rebind_llcontrol<BOOL>("BeaconsEnabled", &gSavedSettings, true); | ||
519 | |||
516 | // only display these messages if we are actually rendering beacons at this moment | 520 | // only display these messages if we are actually rendering beacons at this moment |
517 | if (LLPipeline::getRenderBeacons(NULL) && gSavedSettings.getBOOL("BeaconsEnabled")) | 521 | if (LLPipeline::getRenderBeacons(NULL) && *sBeaconsEnabled) |
518 | { | 522 | { |
519 | if (LLPipeline::getRenderParticleBeacons(NULL)) | 523 | if (LLPipeline::getRenderParticleBeacons(NULL)) |
520 | { | 524 | { |
@@ -2048,7 +2052,9 @@ void LLViewerWindow::draw() | |||
2048 | //S32 screen_x, screen_y; | 2052 | //S32 screen_x, screen_y; |
2049 | 2053 | ||
2050 | // HACK for timecode debugging | 2054 | // HACK for timecode debugging |
2051 | if (gSavedSettings.getBOOL("DisplayTimecode")) | 2055 | static BOOL* sDisplayTimecode = rebind_llcontrol<BOOL>("DisplayTimecode", &gSavedSettings, true); |
2056 | |||
2057 | if (*sDisplayTimecode) | ||
2052 | { | 2058 | { |
2053 | // draw timecode block | 2059 | // draw timecode block |
2054 | std::string text; | 2060 | std::string text; |
@@ -2509,7 +2515,9 @@ BOOL LLViewerWindow::handlePerFrameHover() | |||
2509 | 2515 | ||
2510 | LLVector2 mouse_vel; | 2516 | LLVector2 mouse_vel; |
2511 | 2517 | ||
2512 | if (gSavedSettings.getBOOL("MouseSmooth")) | 2518 | static BOOL* sMouseSmooth = rebind_llcontrol<BOOL>("MouseSmooth", &gSavedSettings, true); |
2519 | |||
2520 | if (*sMouseSmooth) | ||
2513 | { | 2521 | { |
2514 | static F32 fdx = 0.f; | 2522 | static F32 fdx = 0.f; |
2515 | static F32 fdy = 0.f; | 2523 | static F32 fdy = 0.f; |
@@ -2664,7 +2672,9 @@ BOOL LLViewerWindow::handlePerFrameHover() | |||
2664 | // Show a new tool tip (or update one that is alrady shown) | 2672 | // Show a new tool tip (or update one that is alrady shown) |
2665 | BOOL tool_tip_handled = FALSE; | 2673 | BOOL tool_tip_handled = FALSE; |
2666 | std::string tool_tip_msg; | 2674 | std::string tool_tip_msg; |
2667 | F32 tooltip_delay = gSavedSettings.getF32( "ToolTipDelay" ); | 2675 | static F32 *sToolTipDelay = rebind_llcontrol<F32>("ToolTipDelay", &gSavedSettings, true); |
2676 | |||
2677 | F32 tooltip_delay = (*sToolTipDelay); | ||
2668 | //HACK: hack for tool-based tooltips which need to pop up more quickly | 2678 | //HACK: hack for tool-based tooltips which need to pop up more quickly |
2669 | //Also for show xui names as tooltips debug mode | 2679 | //Also for show xui names as tooltips debug mode |
2670 | if ((mouse_captor && !mouse_captor->isView()) || LLUI::sShowXUINames) | 2680 | if ((mouse_captor && !mouse_captor->isView()) || LLUI::sShowXUINames) |
@@ -2715,9 +2725,10 @@ BOOL LLViewerWindow::handlePerFrameHover() | |||
2715 | { | 2725 | { |
2716 | mToolTip->setVisible( tooltip_vis ); | 2726 | mToolTip->setVisible( tooltip_vis ); |
2717 | } | 2727 | } |
2718 | } | 2728 | } |
2729 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); | ||
2719 | 2730 | ||
2720 | if (tool && tool != gToolNull && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !gSavedSettings.getBOOL("FreezeTime")) | 2731 | if (tool && tool != gToolNull && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !(*sFreezeTime)) |
2721 | { | 2732 | { |
2722 | LLMouseHandler *captor = gFocusMgr.getMouseCapture(); | 2733 | LLMouseHandler *captor = gFocusMgr.getMouseCapture(); |
2723 | // With the null, inspect, or drag and drop tool, don't muck | 2734 | // With the null, inspect, or drag and drop tool, don't muck |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 36d60dd..7664041 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -3457,13 +3457,19 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3457 | } | 3457 | } |
3458 | 3458 | ||
3459 | const F32 time_visible = mTimeVisible.getElapsedTimeF32(); | 3459 | const F32 time_visible = mTimeVisible.getElapsedTimeF32(); |
3460 | const F32 NAME_SHOW_TIME = gSavedSettings.getF32("RenderNameShowTime"); // seconds | 3460 | |
3461 | const F32 FADE_DURATION = gSavedSettings.getF32("RenderNameFadeDuration"); // seconds | 3461 | static F32* sRenderNameShowTime = rebind_llcontrol<F32>("RenderNameShowTime", &gSavedSettings, true); |
3462 | static F32* sRenderNameFadeDuration = rebind_llcontrol<F32>("RenderNameFadeDuration", &gSavedSettings, true); | ||
3463 | |||
3464 | |||
3465 | const F32 NAME_SHOW_TIME = *sRenderNameShowTime; // seconds | ||
3466 | const F32 FADE_DURATION = *sRenderNameFadeDuration; // seconds | ||
3462 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b | 3467 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.0b |
3463 | bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); | 3468 | bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES); |
3464 | // [/RLVa:KB] | 3469 | // [/RLVa:KB] |
3465 | BOOL visible_avatar = isVisible() || mNeedsAnimUpdate; | 3470 | BOOL visible_avatar = isVisible() || mNeedsAnimUpdate; |
3466 | BOOL visible_chat = gSavedSettings.getBOOL("UseChatBubbles") && (mChats.size() || mTyping); | 3471 | static BOOL* sUseChatBubbles = rebind_llcontrol<BOOL>("UseChatBubbles", &gSavedSettings, true); |
3472 | BOOL visible_chat = *sUseChatBubbles && (mChats.size() || mTyping); | ||
3467 | BOOL render_name = visible_chat || | 3473 | BOOL render_name = visible_chat || |
3468 | (visible_avatar && | 3474 | (visible_avatar && |
3469 | // [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.0h | 3475 | // [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.0h |
@@ -3505,6 +3511,9 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3505 | mRenderGroupTitles = sRenderGroupTitles; | 3511 | mRenderGroupTitles = sRenderGroupTitles; |
3506 | new_name = TRUE; | 3512 | new_name = TRUE; |
3507 | } | 3513 | } |
3514 | |||
3515 | static LLColor4* sAvatarNameColor = rebind_llcontrol<LLColor4>("AvatarNameColor", &gColors, true); | ||
3516 | |||
3508 | std::string client; | 3517 | std::string client; |
3509 | // First Calculate Alpha | 3518 | // First Calculate Alpha |
3510 | // If alpha > 0, create mNameText if necessary, otherwise delete it | 3519 | // If alpha > 0, create mNameText if necessary, otherwise delete it |
@@ -3545,7 +3554,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3545 | new_name = TRUE; | 3554 | new_name = TRUE; |
3546 | } | 3555 | } |
3547 | 3556 | ||
3548 | LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" ); | 3557 | LLColor4 avatar_name_color = (*sAvatarNameColor); |
3549 | LLColor4 client_color = avatar_name_color; | 3558 | LLColor4 client_color = avatar_name_color; |
3550 | 3559 | ||
3551 | if(!mIsSelf) //don't know your own client ? | 3560 | if(!mIsSelf) //don't know your own client ? |
@@ -3560,11 +3569,14 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3560 | // Set your own name to the Imprudence color -- MC | 3569 | // Set your own name to the Imprudence color -- MC |
3561 | client_color = LLColor4(0.79f,0.44f,0.88f); | 3570 | client_color = LLColor4(0.79f,0.44f,0.88f); |
3562 | } | 3571 | } |
3563 | if (gSavedSettings.getBOOL("ShowClientColor")) | 3572 | |
3573 | static BOOL* sShowClientColor = rebind_llcontrol<BOOL>("ShowClientColor", &gSavedSettings, true); | ||
3574 | static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true); | ||
3575 | if (*sShowClientColor) | ||
3564 | { | 3576 | { |
3565 | avatar_name_color = client_color; | 3577 | avatar_name_color = client_color; |
3566 | } | 3578 | } |
3567 | if (!gSavedSettings.getBOOL("ShowClientNameTag")) | 3579 | if (!(*sShowClientNameTag)) |
3568 | { | 3580 | { |
3569 | client.clear(); | 3581 | client.clear(); |
3570 | } | 3582 | } |
@@ -3657,7 +3669,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3657 | 3669 | ||
3658 | BOOL need_comma = FALSE; | 3670 | BOOL need_comma = FALSE; |
3659 | 3671 | ||
3660 | bool show_client = client.length() != 0 && gSavedSettings.getBOOL("ShowClientNameTag"); | 3672 | static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true); |
3673 | bool show_client = client.length() != 0 && (*sShowClientNameTag); | ||
3661 | if (is_away || is_muted || is_busy || show_client) | 3674 | if (is_away || is_muted || is_busy || show_client) |
3662 | { | 3675 | { |
3663 | line += " ("; | 3676 | line += " ("; |
@@ -3726,7 +3739,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3726 | std::deque<LLChat>::iterator chat_iter = mChats.begin(); | 3739 | std::deque<LLChat>::iterator chat_iter = mChats.begin(); |
3727 | mNameText->clearString(); | 3740 | mNameText->clearString(); |
3728 | 3741 | ||
3729 | LLColor4 new_chat = gColors.getColor( "AvatarNameColor" ); | 3742 | LLColor4 new_chat = (*sAvatarNameColor); |
3730 | LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f); | 3743 | LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f); |
3731 | LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f); | 3744 | LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f); |
3732 | if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES) | 3745 | if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES) |
@@ -3788,7 +3801,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3788 | } | 3801 | } |
3789 | else | 3802 | else |
3790 | { | 3803 | { |
3791 | if (gSavedSettings.getBOOL("SmallAvatarNames")) | 3804 | static BOOL* sSmallAvatarNames = rebind_llcontrol<BOOL>("SmallAvatarNames", &gSavedSettings, true); |
3805 | if (*sSmallAvatarNames) | ||
3792 | { | 3806 | { |
3793 | mNameText->setFont(LLFontGL::getFontSansSerif()); | 3807 | mNameText->setFont(LLFontGL::getFontSansSerif()); |
3794 | } | 3808 | } |
@@ -7332,7 +7346,8 @@ BOOL LLVOAvatar::updateIsFullyLoaded() | |||
7332 | 7346 | ||
7333 | BOOL LLVOAvatar::isFullyLoaded() | 7347 | BOOL LLVOAvatar::isFullyLoaded() |
7334 | { | 7348 | { |
7335 | if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) | 7349 | static BOOL* sRenderUnloadedAvatar = rebind_llcontrol<BOOL>("RenderUnloadedAvatar", &gSavedSettings, true); |
7350 | if (*sRenderUnloadedAvatar) | ||
7336 | return TRUE; | 7351 | return TRUE; |
7337 | else | 7352 | else |
7338 | return mFullyLoaded; | 7353 | return mFullyLoaded; |
diff --git a/linden/indra/newview/llvoiceremotectrl.cpp b/linden/indra/newview/llvoiceremotectrl.cpp index 1681e96..d11424b 100644 --- a/linden/indra/newview/llvoiceremotectrl.cpp +++ b/linden/indra/newview/llvoiceremotectrl.cpp | |||
@@ -114,14 +114,16 @@ void LLVoiceRemoteCtrl::draw() | |||
114 | LLFloaterActiveSpeakers::getInstance()->onClose(false); | 114 | LLFloaterActiveSpeakers::getInstance()->onClose(false); |
115 | mVoiceLastActive = voice_active; | 115 | mVoiceLastActive = voice_active; |
116 | 116 | ||
117 | static BOOL *sPTTCurrentlyEnabled = rebind_llcontrol<BOOL>("PTTCurrentlyEnabled", &gSavedSettings, true); | ||
118 | |||
117 | // propagate ptt state to button display, | 119 | // propagate ptt state to button display, |
118 | if (!mTalkBtn->hasMouseCapture()) | 120 | if (!mTalkBtn->hasMouseCapture()) |
119 | { | 121 | { |
120 | // not in push to talk mode, or push to talk is active means I'm talking | 122 | // not in push to talk mode, or push to talk is active means I'm talking |
121 | mTalkBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled") || gVoiceClient->getUserPTTState()); | 123 | mTalkBtn->setToggleState(!(*sPTTCurrentlyEnabled) || gVoiceClient->getUserPTTState()); |
122 | } | 124 | } |
123 | mSpeakersBtn->setToggleState(LLFloaterActiveSpeakers::instanceVisible(LLSD())); | 125 | mSpeakersBtn->setToggleState(LLFloaterActiveSpeakers::instanceVisible(LLSD())); |
124 | mTalkLockBtn->setToggleState(!gSavedSettings.getBOOL("PTTCurrentlyEnabled")); | 126 | mTalkLockBtn->setToggleState(!(*sPTTCurrentlyEnabled)); |
125 | 127 | ||
126 | std::string talk_blip_image; | 128 | std::string talk_blip_image; |
127 | if (gVoiceClient->getIsSpeaking(gAgent.getID())) | 129 | if (gVoiceClient->getIsSpeaking(gAgent.getID())) |
diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp index d15a2dc..37fd523 100644 --- a/linden/indra/newview/llvosky.cpp +++ b/linden/indra/newview/llvosky.cpp | |||
@@ -1023,7 +1023,10 @@ void LLVOSky::calcAtmospherics(void) | |||
1023 | 1023 | ||
1024 | // Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio | 1024 | // Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio |
1025 | // between sunlight and point lights in windlight to normalize point lights. | 1025 | // between sunlight and point lights in windlight to normalize point lights. |
1026 | F32 sun_dynamic_range = llmax(gSavedSettings.getF32("RenderSunDynamicRange"), 0.0001f); | 1026 | |
1027 | static F32 *sRenderSunDynamicRange = rebind_llcontrol<F32>("RenderSunDynamicRange", &gSavedSettings, true); | ||
1028 | |||
1029 | F32 sun_dynamic_range = llmax((*sRenderSunDynamicRange), 0.0001f); | ||
1027 | LLWLParamManager::instance()->mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp); | 1030 | LLWLParamManager::instance()->mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp); |
1028 | 1031 | ||
1029 | mSunDiffuse = vary_SunlightColor; | 1032 | mSunDiffuse = vary_SunlightColor; |
diff --git a/linden/indra/newview/llvotree.cpp b/linden/indra/newview/llvotree.cpp index 0a7cc92..6a59253 100644 --- a/linden/indra/newview/llvotree.cpp +++ b/linden/indra/newview/llvotree.cpp | |||
@@ -359,8 +359,10 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) | |||
359 | { | 359 | { |
360 | return TRUE; | 360 | return TRUE; |
361 | } | 361 | } |
362 | |||
363 | static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true); | ||
362 | 364 | ||
363 | if (gSavedSettings.getBOOL("RenderAnimateTrees")) | 365 | if (*sRenderAnimateTrees) |
364 | { | 366 | { |
365 | F32 mass_inv; | 367 | F32 mass_inv; |
366 | 368 | ||
@@ -403,7 +405,7 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) | |||
403 | } | 405 | } |
404 | } | 406 | } |
405 | 407 | ||
406 | if (!gSavedSettings.getBOOL("RenderAnimateTrees")) | 408 | if (!*sRenderAnimateTrees) |
407 | { | 409 | { |
408 | if (mReferenceBuffer.isNull()) | 410 | if (mReferenceBuffer.isNull()) |
409 | { | 411 | { |
@@ -548,8 +550,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) | |||
548 | max_indices += sLODIndexCount[lod]; | 550 | max_indices += sLODIndexCount[lod]; |
549 | max_vertices += sLODVertexCount[lod]; | 551 | max_vertices += sLODVertexCount[lod]; |
550 | } | 552 | } |
551 | 553 | static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true); | |
552 | mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, gSavedSettings.getBOOL("RenderAnimateTrees") ? GL_STATIC_DRAW_ARB : 0); | 554 | mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, *sRenderAnimateTrees ? GL_STATIC_DRAW_ARB : 0); |
553 | mReferenceBuffer->allocateBuffer(max_vertices, max_indices, TRUE); | 555 | mReferenceBuffer->allocateBuffer(max_vertices, max_indices, TRUE); |
554 | 556 | ||
555 | LLStrider<LLVector3> vertices; | 557 | LLStrider<LLVector3> vertices; |
@@ -852,8 +854,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) | |||
852 | llassert(vertex_count == max_vertices); | 854 | llassert(vertex_count == max_vertices); |
853 | llassert(index_count == max_indices); | 855 | llassert(index_count == max_indices); |
854 | } | 856 | } |
855 | 857 | static BOOL* sRenderAnimateTrees = rebind_llcontrol<BOOL>("RenderAnimateTrees", &gSavedSettings, true); | |
856 | if (gSavedSettings.getBOOL("RenderAnimateTrees")) | 858 | if (*sRenderAnimateTrees) |
857 | { | 859 | { |
858 | mDrawable->getFace(0)->mVertexBuffer = mReferenceBuffer; | 860 | mDrawable->getFace(0)->mVertexBuffer = mReferenceBuffer; |
859 | } | 861 | } |
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 5f7327d..bed3e13 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -2231,8 +2231,13 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) | |||
2231 | std::vector<LLFace*> alpha_faces; | 2231 | std::vector<LLFace*> alpha_faces; |
2232 | U32 useage = group->mSpatialPartition->mBufferUsage; | 2232 | U32 useage = group->mSpatialPartition->mBufferUsage; |
2233 | 2233 | ||
2234 | U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); | 2234 | |
2235 | U32 max_total = (gSavedSettings.getS32("RenderMaxNodeSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); | 2235 | static S32* sRenderMaxVBOSize = rebind_llcontrol<S32>("RenderMaxVBOSize", &gSavedSettings, true); |
2236 | static S32* sRenderMaxNodeSize = rebind_llcontrol<S32>("RenderMaxNodeSize", &gSavedSettings, true); | ||
2237 | |||
2238 | |||
2239 | U32 max_vertices = ((*sRenderMaxVBOSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); | ||
2240 | U32 max_total = ((*sRenderMaxNodeSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); | ||
2236 | max_vertices = llmin(max_vertices, (U32) 65535); | 2241 | max_vertices = llmin(max_vertices, (U32) 65535); |
2237 | 2242 | ||
2238 | U32 cur_total = 0; | 2243 | U32 cur_total = 0; |
@@ -2505,8 +2510,9 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) | |||
2505 | 2510 | ||
2506 | void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort) | 2511 | void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort) |
2507 | { | 2512 | { |
2513 | static S32* sRenderMaxVBOSize = rebind_llcontrol<S32>("RenderMaxVBOSize", &gSavedSettings, true); | ||
2508 | //calculate maximum number of vertices to store in a single buffer | 2514 | //calculate maximum number of vertices to store in a single buffer |
2509 | U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); | 2515 | U32 max_vertices = ((*sRenderMaxVBOSize)*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); |
2510 | max_vertices = llmin(max_vertices, (U32) 65535); | 2516 | max_vertices = llmin(max_vertices, (U32) 65535); |
2511 | 2517 | ||
2512 | if (!distance_sort) | 2518 | if (!distance_sort) |
diff --git a/linden/indra/newview/llvowlsky.cpp b/linden/indra/newview/llvowlsky.cpp index abd25e6..96bd62e 100644 --- a/linden/indra/newview/llvowlsky.cpp +++ b/linden/indra/newview/llvowlsky.cpp | |||
@@ -334,7 +334,9 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | { | 336 | { |
337 | const U32 max_buffer_bytes = gSavedSettings.getS32("RenderMaxVBOSize")*1024; | 337 | static S32* sRenderMaxVBOSize = rebind_llcontrol<S32>("RenderMaxVBOSize", &gSavedSettings, true); |
338 | |||
339 | const U32 max_buffer_bytes = (*sRenderMaxVBOSize)*1024; | ||
338 | const U32 data_mask = LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK; | 340 | const U32 data_mask = LLDrawPoolWLSky::SKY_VERTEX_DATA_MASK; |
339 | const U32 max_verts = max_buffer_bytes / LLVertexBuffer::calcStride(data_mask); | 341 | const U32 max_verts = max_buffer_bytes / LLVertexBuffer::calcStride(data_mask); |
340 | 342 | ||
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 17fad2b..ca8ce2d 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp | |||
@@ -667,7 +667,8 @@ void LLWorld::updateParticles() | |||
667 | 667 | ||
668 | void LLWorld::updateClouds(const F32 dt) | 668 | void LLWorld::updateClouds(const F32 dt) |
669 | { | 669 | { |
670 | if (gSavedSettings.getBOOL("FreezeTime") || | 670 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
671 | if ((*sFreezeTime) || | ||
671 | !gSavedSettings.getBOOL("SkyUseClassicClouds")) | 672 | !gSavedSettings.getBOOL("SkyUseClassicClouds")) |
672 | { | 673 | { |
673 | // don't move clouds in snapshot mode | 674 | // don't move clouds in snapshot mode |
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index e024e4c..0ca94dc 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -1014,8 +1014,8 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) | |||
1014 | { | 1014 | { |
1015 | return 0; | 1015 | return 0; |
1016 | } | 1016 | } |
1017 | 1017 | static BOOL sRenderDelayCreation = gSavedSettings.getBOOL("RenderDelayCreation"); | |
1018 | if (gSavedSettings.getBOOL("RenderDelayCreation")) | 1018 | if (sRenderDelayCreation) |
1019 | { | 1019 | { |
1020 | mCreateQ.push_back(vobj); | 1020 | mCreateQ.push_back(vobj); |
1021 | } | 1021 | } |
@@ -1078,7 +1078,9 @@ void LLPipeline::createObject(LLViewerObject* vobj) | |||
1078 | 1078 | ||
1079 | markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE); | 1079 | markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE); |
1080 | 1080 | ||
1081 | if (drawablep->getVOVolume() && gSavedSettings.getBOOL("RenderAnimateRes")) | 1081 | static BOOL sRenderAnimateRes = gSavedSettings.getBOOL("RenderAnimateRes"); |
1082 | |||
1083 | if (drawablep->getVOVolume() && sRenderAnimateRes) | ||
1082 | { | 1084 | { |
1083 | // fun animated res | 1085 | // fun animated res |
1084 | drawablep->updateXform(TRUE); | 1086 | drawablep->updateXform(TRUE); |
@@ -1117,7 +1119,8 @@ void LLPipeline::resetFrameStats() | |||
1117 | //external functions for asynchronous updating | 1119 | //external functions for asynchronous updating |
1118 | void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) | 1120 | void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) |
1119 | { | 1121 | { |
1120 | if (gSavedSettings.getBOOL("FreezeTime")) | 1122 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
1123 | if ((*sFreezeTime)) | ||
1121 | { | 1124 | { |
1122 | return; | 1125 | return; |
1123 | } | 1126 | } |
@@ -1147,7 +1150,8 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep) | |||
1147 | 1150 | ||
1148 | void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) | 1151 | void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) |
1149 | { | 1152 | { |
1150 | if (gSavedSettings.getBOOL("FreezeTime")) | 1153 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
1154 | if ((*sFreezeTime)) | ||
1151 | { | 1155 | { |
1152 | return; | 1156 | return; |
1153 | } | 1157 | } |
@@ -1200,7 +1204,8 @@ void LLPipeline::updateMove() | |||
1200 | LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE); | 1204 | LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE); |
1201 | LLMemType mt(LLMemType::MTYPE_PIPELINE); | 1205 | LLMemType mt(LLMemType::MTYPE_PIPELINE); |
1202 | 1206 | ||
1203 | if (gSavedSettings.getBOOL("FreezeTime")) | 1207 | static BOOL* sFreezeTime = rebind_llcontrol<BOOL>("FreezeTime", &gSavedSettings, true); |
1208 | if ((*sFreezeTime)) | ||
1204 | { | 1209 | { |
1205 | return; | 1210 | return; |
1206 | } | 1211 | } |
@@ -2295,8 +2300,10 @@ void LLPipeline::postSort(LLCamera& camera) | |||
2295 | std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); | 2300 | std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); |
2296 | } | 2301 | } |
2297 | 2302 | ||
2303 | static BOOL* sBeaconsEnabled = rebind_llcontrol<BOOL>("BeaconsEnabled", &gSavedSettings, true); | ||
2304 | |||
2298 | // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus | 2305 | // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus |
2299 | if (gSavedSettings.getBOOL("BeaconsEnabled") && !sShadowRender) | 2306 | if (*sBeaconsEnabled && !sShadowRender) |
2300 | { | 2307 | { |
2301 | if (sRenderScriptedTouchBeacons) | 2308 | if (sRenderScriptedTouchBeacons) |
2302 | { | 2309 | { |