summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp478
1 files changed, 239 insertions, 239 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5f89fc1311..36b7fbdc8c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -225,18 +225,18 @@ void render_ui(F32 zoom_factor = 1.f, int subfield = 0);
void swap();
extern bool gDebugClicks;
-extern BOOL gDisplaySwapBuffers;
-extern BOOL gDepthDirty;
-extern BOOL gResizeScreenTexture;
-extern BOOL gCubeSnapshot;
-extern BOOL gSnapshotNoPost;
+extern bool gDisplaySwapBuffers;
+extern bool gDepthDirty;
+extern bool gResizeScreenTexture;
+extern bool gCubeSnapshot;
+extern bool gSnapshotNoPost;
LLViewerWindow *gViewerWindow = NULL;
LLFrameTimer gAwayTimer;
LLFrameTimer gAwayTriggerTimer;
-BOOL gShowOverlayTitle = FALSE;
+bool gShowOverlayTitle = false;
LLViewerObject* gDebugRaycastObject = NULL;
LLVOPartGroup* gDebugRaycastParticle = NULL;
@@ -250,13 +250,13 @@ LLVector4a gDebugRaycastStart;
LLVector4a gDebugRaycastEnd;
// HUD display lines in lower right
-BOOL gDisplayWindInfo = FALSE;
-BOOL gDisplayCameraPos = FALSE;
-BOOL gDisplayFOV = FALSE;
-BOOL gDisplayBadge = FALSE;
+bool gDisplayWindInfo = false;
+bool gDisplayCameraPos = false;
+bool gDisplayFOV = false;
+bool gDisplayBadge = false;
static const U8 NO_FACE = 255;
-BOOL gQuietSnapshot = FALSE;
+bool gQuietSnapshot = false;
// Minimum value for UIScaleFactor, also defined in preferences, ui_scale_slider
static const F32 MIN_UI_SCALE = 0.75f;
@@ -291,7 +291,7 @@ public:
// chat.mText = message;
// chat.mSourceType = CHAT_SOURCE_SYSTEM;
- // chat_floater->addChat(chat, FALSE, FALSE);
+ // chat_floater->addChat(chat, false, false);
//}
//}
}
@@ -956,7 +956,7 @@ public:
const Line& line = *iter;
LLFontGL::getFontMonospace()->renderUTF8(line.text, 0, (F32)line.x, (F32)line.y, mTextColor,
LLFontGL::LEFT, LLFontGL::TOP,
- LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE);
+ LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false);
}
}
@@ -997,7 +997,7 @@ void LLViewerWindow::handlePieMenu(S32 x, S32 y, MASK mask)
}
}
-BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool& is_toolmgr_action)
+bool LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down, bool& is_toolmgr_action)
{
const char* buttonname = "";
const char* buttonstatestr = "";
@@ -1089,7 +1089,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << LL_ENDL;
}
- BOOL r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down);
+ bool r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down);
if (r) {
LL_DEBUGS() << "LLViewerWindow::handleAnyMouseClick viewer with mousecaptor calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << LL_ENDL;
@@ -1101,7 +1101,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
else if (down && clicktype == CLICK_RIGHT)
{
handlePieMenu(x, y, mask);
- r = TRUE;
+ r = true;
}
return r;
}
@@ -1109,11 +1109,11 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
// Mark the click as handled and return if we aren't within the root view to avoid spurious bugs
if( !mRootView->pointInView(x, y) )
{
- return TRUE;
+ return true;
}
// Give the UI views a chance to process the click
- BOOL r= mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ;
+ bool r= mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ;
if (r)
{
@@ -1135,7 +1135,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
{
LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " " << LLViewerEventRecorder::instance().get_xui() << LL_ENDL;
}
- return TRUE;
+ return true;
} else if (LLView::sDebugMouseHandling)
{
LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " not handled by view" << LL_ENDL;
@@ -1147,18 +1147,18 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
{
LLViewerEventRecorder::instance().clear_xui();
is_toolmgr_action = true;
- return TRUE;
+ return true;
}
if (down && clicktype == CLICK_RIGHT)
{
handlePieMenu(x, y, mask);
- return TRUE;
+ return true;
}
// If we got this far on a down-click, it wasn't handled.
// Up-clicks, though, are always handled as far as the OS is concerned.
- BOOL default_rtn = !down;
+ bool default_rtn = !down;
return default_rtn;
}
@@ -1255,8 +1255,8 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (prim_media_dnd_enabled)
{
LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY,
- TRUE /* pick_transparent */,
- FALSE /* pick_rigged */);
+ true /* pick_transparent */,
+ false /* pick_rigged */);
S32 object_face = pick_info.mObjectFace;
std::string url = data;
@@ -1374,7 +1374,7 @@ bool LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK
return true;
}
-BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down)
+bool LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down)
{
switch (button)
{
@@ -1389,7 +1389,7 @@ BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask
}
// Always handled as far as the OS is concerned.
- return TRUE;
+ return true;
}
bool LLViewerWindow::handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button)
@@ -1411,7 +1411,7 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
x = ll_round((F32)x / mDisplayScale.mV[VX]);
y = ll_round((F32)y / mDisplayScale.mV[VY]);
- mMouseInWindow = TRUE;
+ mMouseInWindow = true;
// Save mouse point for access during idle() and display()
@@ -1439,7 +1439,7 @@ void LLViewerWindow::handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK m
{
if (mMouseDownTimer.getElapsedTimeF32() > 0.1)
{
- mAllowMouseDragging = TRUE;
+ mAllowMouseDragging = true;
mMouseDownTimer.stop();
}
}
@@ -1453,7 +1453,7 @@ void LLViewerWindow::handleMouseLeave(LLWindow *window)
{
// Note: we won't get this if we have captured the mouse.
llassert( gFocusMgr.getMouseCapture() == NULL );
- mMouseInWindow = FALSE;
+ mMouseInWindow = false;
LLToolTipMgr::instance().blockToolTips();
}
@@ -1488,7 +1488,7 @@ void LLViewerWindow::handleResize(LLWindow *window, S32 width, S32 height)
// The top-level window has gained focus (e.g. via ALT-TAB)
void LLViewerWindow::handleFocus(LLWindow *window)
{
- gFocusMgr.setAppHasFocus(TRUE);
+ gFocusMgr.setAppHasFocus(true);
LLModalDialog::onAppFocusGained();
gAgent.onAppFocusGained();
@@ -1508,7 +1508,7 @@ void LLViewerWindow::handleFocus(LLWindow *window)
// The top-level window has lost focus (e.g. via ALT-TAB)
void LLViewerWindow::handleFocusLost(LLWindow *window)
{
- gFocusMgr.setAppHasFocus(FALSE);
+ gFocusMgr.setAppHasFocus(false);
//LLModalDialog::onAppFocusLost();
LLToolMgr::getInstance()->onAppFocusLost();
gFocusMgr.setMouseCapture( NULL );
@@ -1521,7 +1521,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window)
// restore mouse cursor
showCursor();
- getWindow()->setMouseClipping(FALSE);
+ getWindow()->setMouseClipping(false);
// If losing focus while keys are down, handle them as
// an 'up' to correctly release states, then reset states
@@ -1816,17 +1816,17 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mWindowRectRaw(0, p.height, p.width, 0),
mWindowRectScaled(0, p.height, p.width, 0),
mWorldViewRectRaw(0, p.height, p.width, 0),
- mLeftMouseDown(FALSE),
- mMiddleMouseDown(FALSE),
- mRightMouseDown(FALSE),
- mMouseInWindow( FALSE ),
- mAllowMouseDragging(TRUE),
+ mLeftMouseDown(false),
+ mMiddleMouseDown(false),
+ mRightMouseDown(false),
+ mMouseInWindow( false ),
+ mAllowMouseDragging(true),
mMouseDownTimer(),
mLastMask( MASK_NONE ),
mToolStored( NULL ),
- mHideCursorPermanent( FALSE ),
- mCursorHidden(FALSE),
- mIgnoreActivate( FALSE ),
+ mHideCursorPermanent( false ),
+ mCursorHidden(false),
+ mIgnoreActivate( false ),
mResDirty(false),
mStatesDirty(false),
mCurrResolutionIndex(0),
@@ -1855,10 +1855,10 @@ LLViewerWindow::LLViewerWindow(const Params& p)
/*
LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, U32 flags,
- BOOL fullscreen,
- BOOL clearBg,
- BOOL disable_vsync,
- BOOL ignore_pixel_depth,
+ bool fullscreen,
+ bool clearBg,
+ bool disable_vsync,
+ bool ignore_pixel_depth,
U32 fsaa_samples)
*/
// create window
@@ -1908,7 +1908,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
else if (!LLViewerShaderMgr::sInitialized)
{
//immediately initialize shaders
- LLViewerShaderMgr::sInitialized = TRUE;
+ LLViewerShaderMgr::sInitialized = true;
LLViewerShaderMgr::instance()->setShaders();
}
@@ -2086,7 +2086,7 @@ void LLViewerWindow::initBase()
}
gToolBarView->setShape(panel_holder->getLocalRect());
// Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
- gToolBarView->setVisible(FALSE);
+ gToolBarView->setVisible(false);
// Constrain floaters to inside the menu and status bar regions.
gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
@@ -2133,8 +2133,8 @@ void LLViewerWindow::initBase()
// Add the progress bar view (startup view), which overrides everything
mProgressView = getRootView()->findChild<LLProgressView>("progress_view");
- setShowProgress(FALSE);
- setProgressCancelButtonVisible(FALSE);
+ setShowProgress(false);
+ setProgressCancelButtonVisible(false);
gMenuHolder = getRootView()->getChild<LLViewerMenuHolderGL>("Menu Holder");
LLMenuGL::sMenuContainer = gMenuHolder;
@@ -2146,7 +2146,7 @@ void LLViewerWindow::initWorldUI()
{
gIMMgr = LLIMMgr::getInstance();
LLNavigationBar::getInstance();
- gFloaterView->pushVisibleAll(FALSE);
+ gFloaterView->pushVisibleAll(false);
return;
}
@@ -2167,7 +2167,7 @@ void LLViewerWindow::initWorldUI()
chiclet_bar->setShape(chiclet_container->getLocalRect());
chiclet_bar->setFollowsAll();
chiclet_container->addChild(chiclet_bar);
- chiclet_container->setVisible(TRUE);
+ chiclet_container->setVisible(true);
}
LLRect morph_view_rect = full_window;
@@ -2200,7 +2200,7 @@ void LLViewerWindow::initWorldUI()
gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
// add InBack so that gStatusBar won't be drawn over menu
status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
- status_bar_container->setVisible(TRUE);
+ status_bar_container->setVisible(true);
// Navigation bar
LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
@@ -2208,19 +2208,19 @@ void LLViewerWindow::initWorldUI()
navbar->setShape(nav_bar_container->getLocalRect());
navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
nav_bar_container->addChild(navbar);
- nav_bar_container->setVisible(TRUE);
+ nav_bar_container->setVisible(true);
}
else
{
LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
- status_bar_container->setVisible(TRUE);
- nav_bar_container->setVisible(TRUE);
+ status_bar_container->setVisible(true);
+ nav_bar_container->setVisible(true);
}
if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
{
- navbar->setVisible(FALSE);
+ navbar->setVisible(false);
}
else
{
@@ -2235,11 +2235,11 @@ void LLViewerWindow::initWorldUI()
topinfo_bar->setShape(topinfo_bar_container->getLocalRect());
topinfo_bar_container->addChild(topinfo_bar);
- topinfo_bar_container->setVisible(TRUE);
+ topinfo_bar_container->setVisible(true);
if (!gSavedSettings.getBOOL("ShowMiniLocationPanel"))
{
- topinfo_bar->setVisible(FALSE);
+ topinfo_bar->setVisible(false);
}
if ( gHUDView == NULL )
@@ -2263,7 +2263,7 @@ void LLViewerWindow::initWorldUI()
LLPanelHideBeacon* panel_hide_beacon = LLPanelHideBeacon::getInstance();
panel_ssf_container->addChild(panel_hide_beacon);
- panel_ssf_container->setVisible(TRUE);
+ panel_ssf_container->setVisible(true);
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
@@ -2272,7 +2272,7 @@ void LLViewerWindow::initWorldUI()
if (gToolBarView)
{
gToolBarView->loadToolbars();
- gToolBarView->setVisible(TRUE);
+ gToolBarView->setVisible(true);
}
if (!gNonInteractive)
@@ -2309,7 +2309,7 @@ void LLViewerWindow::shutdownViews()
gFocusMgr.setTopCtrl(NULL);
if (mWindow)
{
- mWindow->allowLanguageTextInput(NULL, FALSE);
+ mWindow->allowLanguageTextInput(NULL, false);
}
delete mDebugText;
@@ -2320,7 +2320,7 @@ void LLViewerWindow::shutdownViews()
// Cleanup global views
if (gMorphView)
{
- gMorphView->setVisible(FALSE);
+ gMorphView->setVisible(false);
}
LL_INFOS() << "Global views cleaned." << LL_ENDL ;
@@ -2405,7 +2405,7 @@ void LLViewerWindow::shutdownGL()
LLSelectMgr::getInstance()->cleanup();
LL_INFOS() << "Stopping GL during shutdown" << LL_ENDL;
- stopGL(FALSE);
+ stopGL(false);
stop_glerror();
gGL.shutdown();
@@ -2427,7 +2427,7 @@ LLViewerWindow::~LLViewerWindow()
if (LLViewerShaderMgr::sInitialized)
{
LLViewerShaderMgr::releaseInstance();
- LLViewerShaderMgr::sInitialized = FALSE;
+ LLViewerShaderMgr::sInitialized = false;
}
mMaxVRAMControlConnection.disconnect();
@@ -2443,7 +2443,7 @@ void LLViewerWindow::showCursor()
{
mWindow->showCursor();
- mCursorHidden = FALSE;
+ mCursorHidden = false;
}
void LLViewerWindow::hideCursor()
@@ -2451,7 +2451,7 @@ void LLViewerWindow::hideCursor()
// And hide the cursor
mWindow->hideCursor();
- mCursorHidden = TRUE;
+ mCursorHidden = true;
}
void LLViewerWindow::sendShapeToSim()
@@ -2482,7 +2482,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// may have been destructed.
if (!LLApp::isExiting())
{
- gWindowResized = TRUE;
+ gWindowResized = true;
// update our window rectangle
mWindowRectRaw.mRight = mWindowRectRaw.mLeft + width;
@@ -2499,7 +2499,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
calcDisplayScale();
- BOOL display_scale_changed = mDisplayScale != LLUI::getScaleFactor();
+ bool display_scale_changed = mDisplayScale != LLUI::getScaleFactor();
LLUI::setScaleFactor(mDisplayScale);
// update our window rectangle
@@ -2517,7 +2517,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// Needs only a 'scale change' update, everything else gets handled by LLLayoutStack::updateClass()
LLPanelLogin::reshapePanel();
}
- LLView::sForceReshape = FALSE;
+ LLView::sForceReshape = false;
// clear font width caches
if (display_scale_changed)
@@ -2528,7 +2528,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
sendShapeToSim();
// store new settings for the mode we are in, regardless
- BOOL maximized = mWindow->getMaximized();
+ bool maximized = mWindow->getMaximized();
gSavedSettings.setBOOL("WindowMaximized", maximized);
if (!maximized)
@@ -2556,7 +2556,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// Hide normal UI when a logon fails
-void LLViewerWindow::setNormalControlsVisible( BOOL visible )
+void LLViewerWindow::setNormalControlsVisible( bool visible )
{
if(LLChicletBar::instanceExists())
{
@@ -2668,7 +2668,7 @@ void LLViewerWindow::draw()
{
//#if LL_DEBUG
- LLView::sIsDrawing = TRUE;
+ LLView::sIsDrawing = true;
//#endif
stop_glerror();
@@ -2786,17 +2786,17 @@ void LLViewerWindow::draw()
gUIProgram.unbind();
- LLView::sIsDrawing = FALSE;
+ LLView::sIsDrawing = false;
}
// Takes a single keyup event, usually when UI is visible
-BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
+bool LLViewerWindow::handleKeyUp(KEY key, MASK mask)
{
- if (LLSetKeyBindDialog::recordKey(key, mask, FALSE))
+ if (LLSetKeyBindDialog::recordKey(key, mask, false))
{
LL_DEBUGS() << "KeyUp handled by LLSetKeyBindDialog" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
@@ -2808,7 +2808,7 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
// We have keyboard focus, and it's not an accelerator
if (keyboard_focus && keyboard_focus->wantsKeyUpKeyDown())
{
- return keyboard_focus->handleKeyUp(key, mask, FALSE);
+ return keyboard_focus->handleKeyUp(key, mask, false);
}
else if (key < 0x80)
{
@@ -2819,14 +2819,14 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
if (keyboard_focus)
{
- if (keyboard_focus->handleKeyUp(key, mask, FALSE))
+ if (keyboard_focus->handleKeyUp(key, mask, false))
{
LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned true" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
else {
- LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned FALSE" << LL_ENDL;
+ LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned false" << LL_ENDL;
}
}
@@ -2837,18 +2837,18 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask)
}
// Takes a single keydown event, usually when UI is visible
-BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
+bool LLViewerWindow::handleKey(KEY key, MASK mask)
{
// hide tooltips on keypress
LLToolTipMgr::instance().blockToolTips();
// Menus get handled on key down instead of key up
// so keybindings have to be recorded before that
- if (LLSetKeyBindDialog::recordKey(key, mask, TRUE))
+ if (LLSetKeyBindDialog::recordKey(key, mask, true))
{
LL_DEBUGS() << "Key handled by LLSetKeyBindDialog" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
@@ -2860,7 +2860,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
//don't switch to mouselook if any floater has focus
if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT)))
{
- return TRUE;
+ return true;
}
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(keyboard_focus);
@@ -2903,7 +2903,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if (res == 1 && chars[0] >= 0x20)
{
// Let it fall through to character handler and get a WM_CHAR.
- return TRUE;
+ return true;
}
}
}
@@ -2914,25 +2914,25 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// We have keyboard focus, and it's not an accelerator
if (keyboard_focus && keyboard_focus->wantsKeyUpKeyDown())
{
- return keyboard_focus->handleKey(key, mask, FALSE);
+ return keyboard_focus->handleKey(key, mask, false);
}
else if (key < 0x80)
{
// Not a special key, so likely (we hope) to generate a character. Let it fall through to character handler first.
- return TRUE;
+ return true;
}
}
}
}
// let menus handle navigation keys for navigation
- if ((gMenuBarView && gMenuBarView->handleKey(key, mask, TRUE))
- ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE))
- ||(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE)))
+ if ((gMenuBarView && gMenuBarView->handleKey(key, mask, true))
+ ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, true))
+ ||(gMenuHolder && gMenuHolder->handleKey(key, mask, true)))
{
LL_DEBUGS() << "LLviewerWindow::handleKey handle nav keys for nav" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
@@ -2943,10 +2943,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// Check the current floater's menu first, if it has one.
if (gFocusMgr.keyboardFocusHasAccelerators()
&& keyboard_focus
- && keyboard_focus->handleKey(key,mask,FALSE))
+ && keyboard_focus->handleKey(key,mask,false))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
if (gAgent.isInitialized()
@@ -2955,13 +2955,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
&& gMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
}
@@ -2986,13 +2986,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
mRootView->focusNextRoot();
}
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// hidden edit menu for cut/copy/paste
if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
LLFloater* focused_floaterp = gFloaterView->getFocusedFloater();
@@ -3021,7 +3021,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
case KEY_HOME:
// when chatbar is empty or ArrowKeysAlwaysMove set,
// pass arrow keys on to avatar...
- return FALSE;
+ return false;
default:
break;
}
@@ -3029,14 +3029,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
}
- if (keyboard_focus->handleKey(key, mask, FALSE))
+ if (keyboard_focus->handleKey(key, mask, false))
{
LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
} else {
- LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned FALSE" << LL_ENDL;
+ LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned false" << LL_ENDL;
}
}
@@ -3044,7 +3044,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
LL_DEBUGS() << "LLviewerWindow::handleKey toolbar handling?" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// Try for a new-format gesture
@@ -3052,7 +3052,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
LL_DEBUGS() << "LLviewerWindow::handleKey new gesture feature" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// See if this is a gesture trigger. If so, eat the key and
@@ -3061,7 +3061,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
LL_DEBUGS() << "LLviewerWindow::handleKey check gesture trigger" << LL_ENDL;
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
- return TRUE;
+ return true;
}
// If "Pressing letter keys starts local chat" option is selected, we are not in mouselook,
@@ -3084,7 +3084,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
// passing NULL here, character will be added later when it is handled by character handler.
nearby_chat->startChat(NULL);
- return TRUE;
+ return true;
}
}
@@ -3095,12 +3095,12 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
&& gMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
- return TRUE;
+ return true;
}
if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
- return TRUE;
+ return true;
}
// don't pass keys on to world when something in ui has focus
@@ -3359,12 +3359,12 @@ void LLViewerWindow::updateUI()
S32 x = mCurrentMousePoint.mX;
S32 y = mCurrentMousePoint.mY;
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
{
gDebugRaycastFaceHit = -1;
- gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, FALSE,
+ gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, false, false, true, false,
&gDebugRaycastFaceHit,
&gDebugRaycastIntersection,
&gDebugRaycastTexCoord,
@@ -3379,7 +3379,7 @@ void LLViewerWindow::updateUI()
updateMouseDelta();
updateKeyboardFocus();
- BOOL handled = FALSE;
+ bool handled = false;
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
@@ -3631,7 +3631,7 @@ void LLViewerWindow::updateUI()
last_handle_msg = LLView::sMouseHandlerMessage;
LL_INFOS() << "Hover" << LLView::sMouseHandlerMessage << LL_ENDL;
}
- handled = TRUE;
+ handled = true;
}
else if (LLView::sDebugMouseHandling)
{
@@ -3655,7 +3655,7 @@ void LLViewerWindow::updateUI()
}
// Show a new tool tip (or update one that is already shown)
- BOOL tool_tip_handled = FALSE;
+ bool tool_tip_handled = false;
std::string tool_tip_msg;
if( handled
&& !mWindow->isCursorHidden())
@@ -3807,12 +3807,12 @@ void LLViewerWindow::updateLayout()
}
// Update the location of the blue box tool popup
LLCoordGL select_center_screen;
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
gFloaterTools->updatePopup( select_center_screen, mask );
}
else
{
- gFloaterTools->setVisible(FALSE);
+ gFloaterTools->setVisible(false);
}
//gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible());
}
@@ -3846,11 +3846,11 @@ void LLViewerWindow::updateMouseDelta()
mouse_pos.mX > mWindowRectRaw.getWidth() ||
mouse_pos.mY > mWindowRectRaw.getHeight())
{
- mMouseInWindow = FALSE;
+ mMouseInWindow = false;
}
else
{
- mMouseInWindow = TRUE;
+ mMouseInWindow = true;
}
LLVector2 mouse_vel;
@@ -3906,7 +3906,7 @@ void LLViewerWindow::updateKeyboardFocus()
{
if (!parent->focusFirstItem())
{
- parent->setFocus(TRUE);
+ parent->setFocus(true);
}
new_focus_found = true;
break;
@@ -3919,7 +3919,7 @@ void LLViewerWindow::updateKeyboardFocus()
// are only moving focus higher in the hierarchy
if (!new_focus_found)
{
- cur_focus->setFocus(FALSE);
+ cur_focus->setFocus(false);
}
}
else if (cur_focus->isFocusRoot())
@@ -3941,11 +3941,11 @@ void LLViewerWindow::updateKeyboardFocus()
// sync all floaters with their focus state
gFloaterView->highlightFocusedFloater();
gSnapshotFloaterView->highlightFocusedFloater();
- MASK mask = gKeyboard->currentMask(TRUE);
+ MASK mask = gKeyboard->currentMask(true);
if ((mask & MASK_CONTROL) == 0)
{
// control key no longer held down, finish cycle mode
- gFloaterView->setCycleMode(FALSE);
+ gFloaterView->setCycleMode(false);
gFloaterView->syncFloaterTabOrder();
}
@@ -3988,7 +3988,7 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
if (mWorldViewRectRaw != new_world_rect)
{
mWorldViewRectRaw = new_world_rect;
- gResizeScreenTexture = TRUE;
+ gResizeScreenTexture = true;
LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
@@ -4036,9 +4036,9 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point)
// Draws the selection outlines for the currently selected objects
// Must be called after displayObjects is called, which sets the mGLName parameter
// NOTE: This function gets called 3 times:
-// render_ui_3d: FALSE, FALSE, TRUE
-// render_hud_elements: FALSE, FALSE, FALSE
-void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud )
+// render_ui_3d: false, false, true
+// render_hud_elements: false, false, false
+void LLViewerWindow::renderSelections( bool for_gl_pick, bool pick_parcel_walls, bool for_hud )
{
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
@@ -4157,21 +4157,21 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls,
// make whole viewer benefit.
LLSelectMgr::getInstance()->selectGetEditMoveLinksetPermissions(all_selected_objects_move, all_selected_objects_modify);
- BOOL draw_handles = TRUE;
+ bool draw_handles = true;
if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected())
{
- draw_handles = FALSE;
+ draw_handles = false;
}
if (tool == LLToolCompRotate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected())
{
- draw_handles = FALSE;
+ draw_handles = false;
}
if ( !all_selected_objects_modify && tool == LLToolCompScale::getInstance() )
{
- draw_handles = FALSE;
+ draw_handles = false;
}
if( draw_handles )
@@ -4215,9 +4215,9 @@ LLVector3d LLViewerWindow::clickPointInWorldGlobal(S32 x, S32 y_from_bot, LLView
}
-BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const
+bool LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const
{
- BOOL intersect = FALSE;
+ bool intersect = false;
// U8 shape = objectp->mPrimitiveCode & LL_PCODE_BASE_MASK;
if (!intersect)
@@ -4237,20 +4237,20 @@ void LLViewerWindow::pickAsync( S32 x,
S32 y_from_bot,
MASK mask,
void (*callback)(const LLPickInfo& info),
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probes)
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probes)
{
// "Show Debug Alpha" means no object actually transparent
- BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
+ bool in_build_mode = LLFloaterReg::instanceVisible("build");
if (LLDrawPoolAlpha::sShowDebugAlpha
|| (in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")))
{
- pick_transparent = TRUE;
+ pick_transparent = true;
}
- LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, pick_reflection_probes, pick_unselectable, TRUE, callback);
+ LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, false, pick_reflection_probes, pick_unselectable, true, callback);
schedulePick(pick_info);
}
@@ -4306,19 +4306,19 @@ void LLViewerWindow::returnEmptyPicks()
}
// Performs the GL object/land pick.
-LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle, BOOL pick_unselectable, BOOL pick_reflection_probe)
+LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, bool pick_transparent, bool pick_rigged, bool pick_particle, bool pick_unselectable, bool pick_reflection_probe)
{
- BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
+ bool in_build_mode = LLFloaterReg::instanceVisible("build");
if ((in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")) || LLDrawPoolAlpha::sShowDebugAlpha)
{
// build mode allows interaction with all transparent objects
// "Show Debug Alpha" means no object actually transparent
- pick_transparent = TRUE;
+ pick_transparent = true;
}
// shortcut queueing in mPicks and just update mLastPick in place
- MASK key_mask = gKeyboard->currentMask(TRUE);
- mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, TRUE, FALSE, NULL);
+ MASK key_mask = gKeyboard->currentMask(true);
+ mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, true, false, NULL);
mLastPick.fetchResults();
return mLastPick;
@@ -4353,10 +4353,10 @@ LLHUDIcon* LLViewerWindow::cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 dep
LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 depth,
LLViewerObject *this_object,
S32 this_face,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_unselectable,
- BOOL pick_reflection_probe,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_unselectable,
+ bool pick_reflection_probe,
S32* face_hit,
LLVector4a *intersection,
LLVector2 *uv,
@@ -4540,7 +4540,7 @@ LLVector3 LLViewerWindow::mouseDirectionCamera(const S32 x, const S32 y) const
-BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y,
+bool LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y,
const LLVector3d &plane_point_global,
const LLVector3 &plane_normal_global)
{
@@ -4571,11 +4571,11 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con
// Returns global position
-BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, BOOL ignore_distance)
+bool LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, bool ignore_distance)
{
LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y);
F32 mouse_dir_scale;
- BOOL hit_land = FALSE;
+ bool hit_land = false;
LLViewerRegion *regionp;
F32 land_z;
const F32 FIRST_PASS_STEP = 1.0f; // meters
@@ -4621,7 +4621,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
// cout << "under land at " << probe_point << " scale " << mouse_vec_scale << endl;
- hit_land = TRUE;
+ hit_land = true;
break;
}
}
@@ -4669,16 +4669,16 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
// ...just went under land again
*land_position_global = probe_point_global;
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
// Saves an image to the harddrive as "SnapshotX" where X >= 1.
-void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb)
+void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb)
{
if (!image)
{
@@ -4777,7 +4777,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
}
// Look for an unused file name
- BOOL is_snapshot_name_loc_set = isSnapshotLocSet();
+ bool is_snapshot_name_loc_set = isSnapshotLocSet();
std::string filepath;
S32 i = 1;
S32 err = 0;
@@ -4831,12 +4831,12 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
}
}
-BOOL LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format)
+bool LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, bool show_ui, bool show_hud, bool do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format)
{
LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL;
LLPointer<LLImageRaw> raw = new LLImageRaw;
- BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, show_hud, do_rebuild);
+ bool success = rawSnapshot(raw, image_width, image_height, true, false, show_ui, show_hud, do_rebuild);
if (success)
{
@@ -4884,7 +4884,7 @@ void LLViewerWindow::playSnapshotAnimAndSound()
send_sound_trigger(LLUUID(gSavedSettings.getString("UISndSnapshot")), 1.0f);
}
-BOOL LLViewerWindow::isSnapshotLocSet() const
+bool LLViewerWindow::isSnapshotLocSet() const
{
std::string snapshot_dir = sSnapshotDir;
return !snapshot_dir.empty();
@@ -4895,20 +4895,20 @@ void LLViewerWindow::resetSnapshotLoc() const
gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string());
}
-BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type)
+bool LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type)
{
- return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, show_hud, do_rebuild, no_post, type);
+ return rawSnapshot(raw, preview_width, preview_height, false, false, show_ui, show_hud, do_rebuild, no_post, type);
}
// Saves the image from the screen to a raw image
// Since the required size might be bigger than the available screen, this method rerenders the scene in parts (called subimages) and copy
// the results over to the final raw image.
-BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height,
- BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size)
+bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height,
+ bool keep_window_aspect, bool is_texture, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size)
{
if (!raw)
{
- return FALSE;
+ return false;
}
//check if there is enough memory for the snapshot image
@@ -4917,29 +4917,29 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3))
{
LL_WARNS() << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << LL_ENDL ;
- return FALSE ; //there is no enough memory for taking this snapshot.
+ return false ; //there is no enough memory for taking this snapshot.
}
}
// PRE SNAPSHOT
gSnapshotNoPost = no_post;
- gDisplaySwapBuffers = FALSE;
+ gDisplaySwapBuffers = false;
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT);
setCursor(UI_CURSOR_WAIT);
// Hide all the UI widgets first and draw a frame
- BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE;
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
if ( prev_draw_ui != show_ui)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
- BOOL hide_hud = !show_hud && LLPipeline::sShowHUDAttachments;
+ bool hide_hud = !show_hud && LLPipeline::sShowHUDAttachments;
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = FALSE;
+ LLPipeline::sShowHUDAttachments = false;
}
// if not showing ui, use full window to render world view
@@ -5039,14 +5039,14 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
}
else
{
- return FALSE ;
+ return false ;
}
if (raw->isBufferInvalid())
{
- return FALSE ;
+ return false ;
}
- BOOL high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher
+ bool high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher
if (high_res && show_ui)
{
// Note: we should never get there...
@@ -5074,8 +5074,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
S32 output_buffer_offset_x = 0;
for (int subimage_x = 0; subimage_x < scale_factor; ++subimage_x)
{
- gDisplaySwapBuffers = FALSE;
- gDepthDirty = TRUE;
+ gDisplaySwapBuffers = false;
+ gDepthDirty = true;
S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width);
// handle fractional rows
@@ -5086,12 +5086,12 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (read_width && read_height)
{
const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor));
- display(do_rebuild, scale_factor, subfield, TRUE);
+ display(do_rebuild, scale_factor, subfield, true);
if (!LLPipeline::sRenderDeferred)
{
// Required for showing the GUI in snapshots and performing bloom composite overlay
- // Call even if show_ui is FALSE
+ // Call even if show_ui is false
render_ui(scale_factor, subfield);
swap();
}
@@ -5155,9 +5155,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
output_buffer_offset_y += subimage_y_offset;
}
- gDisplaySwapBuffers = FALSE;
- gSnapshotNoPost = FALSE;
- gDepthDirty = TRUE;
+ gDisplaySwapBuffers = false;
+ gSnapshotNoPost = false;
+ gDepthDirty = true;
// POST SNAPSHOT
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
@@ -5167,7 +5167,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = TRUE;
+ LLPipeline::sShowHUDAttachments = true;
}
/*if (high_res)
@@ -5180,7 +5180,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// Note: this formula depends on the number of components being 3. Not obvious, but it's correct.
image_width += (image_width * 3) % 4;
- BOOL ret = TRUE ;
+ bool ret = true ;
// Resize image
if(llabs(image_width - image_buffer_x) > 4 || llabs(image_height - image_buffer_y) > 4)
{
@@ -5188,7 +5188,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
}
else if(image_width != image_buffer_x || image_height != image_buffer_y)
{
- ret = raw->scale( image_width, image_height, FALSE );
+ ret = raw->scale( image_width, image_height, false );
}
@@ -5223,24 +5223,24 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
return ret;
}
-BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes)
+bool LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
- gDisplaySwapBuffers = FALSE;
+ gDisplaySwapBuffers = false;
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT);
setCursor(UI_CURSOR_WAIT);
- BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE;
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
if (prev_draw_ui != false)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
- BOOL hide_hud = LLPipeline::sShowHUDAttachments;
+ bool hide_hud = LLPipeline::sShowHUDAttachments;
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = FALSE;
+ LLPipeline::sShowHUDAttachments = false;
}
LLRect window_rect = getWorldViewRectRaw();
@@ -5281,14 +5281,14 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
// the black flash in between captures when the number
// of render passes is more than 1. We need to also
// set it here because code in LLViewerDisplay resets
- // it to TRUE each time.
- gDisplaySwapBuffers = FALSE;
+ // it to true each time.
+ gDisplaySwapBuffers = false;
// actually render the scene
const U32 subfield = 0;
const bool do_rebuild = true;
const F32 zoom = 1.0;
- const bool for_snapshot = TRUE;
+ const bool for_snapshot = true;
display(do_rebuild, zoom, subfield, for_snapshot);
}
@@ -5303,8 +5303,8 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
);
stop_glerror();
- gDisplaySwapBuffers = FALSE;
- gDepthDirty = TRUE;
+ gDisplaySwapBuffers = false;
+ gDepthDirty = true;
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@@ -5316,7 +5316,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = TRUE;
+ LLPipeline::sShowHUDAttachments = true;
}
setCursor(UI_CURSOR_ARROW);
@@ -5332,7 +5332,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
void display_cube_face();
-BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip, bool dynamic_render)
+bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip, bool dynamic_render)
{
// NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
@@ -5386,16 +5386,16 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
}
}
- BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE;
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
if (prev_draw_ui != false)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
- BOOL hide_hud = LLPipeline::sShowHUDAttachments;
+ bool hide_hud = LLPipeline::sShowHUDAttachments;
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = FALSE;
+ LLPipeline::sShowHUDAttachments = false;
}
LLRect window_rect = getWorldViewRectRaw();
@@ -5432,16 +5432,16 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
// the black flash in between captures when the number
// of render passes is more than 1. We need to also
// set it here because code in LLViewerDisplay resets
- // it to TRUE each time.
- gDisplaySwapBuffers = FALSE;
+ // it to true each time.
+ gDisplaySwapBuffers = false;
// actually render the scene
- gCubeSnapshot = TRUE;
+ gCubeSnapshot = true;
display_cube_face();
- gCubeSnapshot = FALSE;
+ gCubeSnapshot = false;
}
- gDisplaySwapBuffers = TRUE;
+ gDisplaySwapBuffers = true;
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@@ -5464,7 +5464,7 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
if (hide_hud)
{
- LLPipeline::sShowHUDAttachments = TRUE;
+ LLPipeline::sShowHUDAttachments = true;
}
gPipeline.resetDrawOrders();
@@ -5595,7 +5595,7 @@ void LLViewerWindow::setup2DViewport(S32 x_offset, S32 y_offset)
void LLViewerWindow::setup3DRender()
{
// setup perspective camera
- LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRectRaw.mLeft, mWorldViewRectRaw.mBottom, mWorldViewRectRaw.getWidth(), mWorldViewRectRaw.getHeight(), FALSE, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f);
+ LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRectRaw.mLeft, mWorldViewRectRaw.mBottom, mWorldViewRectRaw.getWidth(), mWorldViewRectRaw.getHeight(), false, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f);
setup3DViewport();
}
@@ -5625,7 +5625,7 @@ void LLViewerWindow::initTextures(S32 location_id)
}
}
-void LLViewerWindow::setShowProgress(const BOOL show)
+void LLViewerWindow::setShowProgress(const bool show)
{
if (mProgressView)
{
@@ -5641,7 +5641,7 @@ void LLViewerWindow::setStartupComplete()
}
}
-BOOL LLViewerWindow::getShowProgress() const
+bool LLViewerWindow::getShowProgress() const
{
return (mProgressView && mProgressView->getVisible());
}
@@ -5670,7 +5670,7 @@ void LLViewerWindow::setProgressPercent(const F32 percent)
}
}
-void LLViewerWindow::setProgressCancelButtonVisible( BOOL b, const std::string& label )
+void LLViewerWindow::setProgressCancelButtonVisible( bool b, const std::string& label )
{
if (mProgressView)
{
@@ -5691,7 +5691,7 @@ void LLViewerWindow::dumpState()
<< LL_ENDL;
}
-void LLViewerWindow::stopGL(BOOL save_state)
+void LLViewerWindow::stopGL(bool save_state)
{
//Note: --bao
//if not necessary, do not change the order of the function calls in this function.
@@ -5740,7 +5740,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
gTextureList.destroyGL(save_state);
stop_glerror();
- gGLManager.mIsDisabled = TRUE;
+ gGLManager.mIsDisabled = true;
stop_glerror();
//unload shader's
@@ -5761,7 +5761,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
if (gGLManager.mIsDisabled)
{
LL_INFOS() << "Restoring GL..." << LL_ENDL;
- gGLManager.mIsDisabled = FALSE;
+ gGLManager.mIsDisabled = false;
initGLDefaults();
LLGLState::restoreGL();
@@ -5781,8 +5781,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
LLVOAvatar::restoreGL();
LLVOPartGroup::restoreGL();
- gResizeScreenTexture = TRUE;
- gWindowResized = TRUE;
+ gResizeScreenTexture = true;
+ gWindowResized = true;
if (isAgentAvatarValid() && gAgentAvatarp->isEditingAppearance())
{
@@ -5792,8 +5792,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
if (!progress_message.empty())
{
gRestoreGLTimer.reset();
- gRestoreGL = TRUE;
- setShowProgress(TRUE);
+ gRestoreGL = true;
+ setShowProgress(true);
setProgressString(progress_message);
}
LL_INFOS() << "...Restoring GL done" << LL_ENDL;
@@ -5843,7 +5843,7 @@ void LLViewerWindow::checkSettings()
}
}
-void LLViewerWindow::restartDisplay(BOOL show_progress_bar)
+void LLViewerWindow::restartDisplay(bool show_progress_bar)
{
LL_INFOS() << "Restaring GL" << LL_ENDL;
stopGL();
@@ -5857,11 +5857,11 @@ void LLViewerWindow::restartDisplay(BOOL show_progress_bar)
}
}
-BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync, BOOL show_progress_bar)
+bool LLViewerWindow::changeDisplaySettings(LLCoordScreen size, bool enable_vsync, bool show_progress_bar)
{
- //BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized");
+ //bool was_maximized = gSavedSettings.getBOOL("WindowMaximized");
- //gResizeScreenTexture = TRUE;
+ //gResizeScreenTexture = true;
//U32 fsaa = gSavedSettings.getU32("RenderFSAASamples");
@@ -5875,7 +5875,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
//if (fsaa == old_fsaa)
{
- return TRUE;
+ return true;
}
/*
@@ -5883,14 +5883,14 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
// Close floaters that don't handle settings change
LLFloaterReg::hideInstance("snapshot");
- BOOL result_first_try = FALSE;
- BOOL result_second_try = FALSE;
+ bool result_first_try = false;
+ bool result_second_try = false;
LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
send_agent_pause();
LL_INFOS() << "Stopping GL during changeDisplaySettings" << LL_ENDL;
stopGL();
- mIgnoreActivate = TRUE;
+ mIgnoreActivate = true;
LLCoordScreen old_size;
LLCoordScreen old_pos;
mWindow->getSize(&old_size);
@@ -5908,8 +5908,8 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
{
// we are stuck...try once again with a minimal resolution?
send_agent_resume();
- mIgnoreActivate = FALSE;
- return FALSE;
+ mIgnoreActivate = false;
+ return false;
}
}
send_agent_resume();
@@ -5933,7 +5933,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
size = old_size; // for reshape below
}
- BOOL success = result_first_try || result_second_try;
+ bool success = result_first_try || result_second_try;
if (success)
{
@@ -5951,7 +5951,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync
}
}
- mIgnoreActivate = FALSE;
+ mIgnoreActivate = false;
gFocusMgr.setKeyboardFocus(keyboard_focus);
return success;
@@ -6024,7 +6024,7 @@ LLRect LLViewerWindow::getChatConsoleRect()
console_rect.mLeft += CONSOLE_PADDING_LEFT;
- static const BOOL CHAT_FULL_WIDTH = gSavedSettings.getBOOL("ChatFullWidth");
+ static const bool CHAT_FULL_WIDTH = gSavedSettings.getBOOL("ChatFullWidth");
if (CHAT_FULL_WIDTH)
{
@@ -6058,7 +6058,7 @@ void LLViewerWindow::reshapeStatusBarContainer()
// collapse status_bar_container
new_height -= nav_bar_container->getRect().getHeight();
}
- status_bar_container->reshape(new_width, new_height, TRUE);
+ status_bar_container->reshape(new_width, new_height, true);
}
void LLViewerWindow::resetStatusBarContainer()
@@ -6072,7 +6072,7 @@ void LLViewerWindow::resetStatusBarContainer()
S32 new_height = status_bar_container->getRect().getHeight();
S32 new_width = status_bar_container->getRect().getWidth();
new_height -= nav_bar_container->getRect().getHeight();
- status_bar_container->reshape(new_width, new_height, TRUE);
+ status_bar_container->reshape(new_width, new_height, true);
}
}
//----------------------------------------------------------------------------
@@ -6084,7 +6084,7 @@ void LLViewerWindow::setUIVisibility(bool visible)
if (!visible)
{
- gAgentCamera.changeCameraToThirdPerson(FALSE);
+ gAgentCamera.changeCameraToThirdPerson(false);
gFloaterView->hideAllFloaters();
}
else
@@ -6097,8 +6097,8 @@ void LLViewerWindow::setUIVisibility(bool visible)
gToolBarView->setToolBarsVisible(visible);
}
- LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : FALSE);
- LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : FALSE);
+ LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : false);
+ LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : false);
mRootView->getChildView("status_bar_container")->setVisible(visible);
}
@@ -6115,7 +6115,7 @@ LLPickInfo::LLPickInfo()
: mKeyMask(MASK_NONE),
mPickCallback(NULL),
mPickType(PICK_INVALID),
- mWantSurfaceInfo(FALSE),
+ mWantSurfaceInfo(false),
mObjectFace(-1),
mUVCoords(-1.f, -1.f),
mSTCoords(-1.f, -1.f),
@@ -6125,20 +6125,20 @@ LLPickInfo::LLPickInfo()
mTangent(),
mBinormal(),
mHUDIcon(NULL),
- mPickTransparent(FALSE),
- mPickRigged(FALSE),
- mPickParticle(FALSE)
+ mPickTransparent(false),
+ mPickRigged(false),
+ mPickParticle(false)
{
}
LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
- BOOL pick_transparent,
- BOOL pick_rigged,
- BOOL pick_particle,
- BOOL pick_reflection_probe,
- BOOL pick_uv_coords,
- BOOL pick_unselectable,
+ bool pick_transparent,
+ bool pick_rigged,
+ bool pick_particle,
+ bool pick_reflection_probe,
+ bool pick_uv_coords,
+ bool pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info))
: mMousePt(mouse_pos),
mKeyMask(keyboard_mask),