Merge branch 'FMODStudio'

Conflicts:
	indra/cmake/PNG.cmake
	indra/newview/llnetmap.cpp
	indra/newview/llviewermessage.cpp



PARAMETERS: CLEAN
This commit is contained in:
Shyotl
2015-01-26 17:15:46 -06:00
224 changed files with 4964 additions and 4731 deletions

View File

@@ -846,8 +846,8 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
BOOL handled = FALSE;
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
x = llmath::llround((F32)x / mDisplayScale.mV[VX]);
y = llmath::llround((F32)y / mDisplayScale.mV[VY]);
if (down)
{
@@ -1021,8 +1021,8 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
{
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
x = llmath::llround((F32)x / mDisplayScale.mV[VX]);
y = llmath::llround((F32)y / mDisplayScale.mV[VY]);
LLView::sMouseHandlerMessage.clear();
@@ -1220,8 +1220,8 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
x = llmath::llround((F32)x / mDisplayScale.mV[VX]);
y = llmath::llround((F32)y / mDisplayScale.mV[VY]);
mMouseInWindow = TRUE;
@@ -1716,7 +1716,7 @@ LLViewerWindow::LLViewerWindow(
LLCoordWindow size;
mWindow->getSize(&size);
mWindowRectRaw.set(0, size.mY, size.mX, 0);
mWindowRectScaled.set(0, llround((F32)size.mY / mDisplayScale.mV[VY]), llround((F32)size.mX / mDisplayScale.mV[VX]), 0);
mWindowRectScaled.set(0, llmath::llround((F32)size.mY / mDisplayScale.mV[VY]), llmath::llround((F32)size.mX / mDisplayScale.mV[VX]), 0);
}
LLFontManager::initClass();
@@ -2398,8 +2398,8 @@ void LLViewerWindow::reshape(S32 width, S32 height)
LLUI::setScaleFactor(mDisplayScale);
// update our window rectangle
mWindowRectScaled.mRight = mWindowRectScaled.mLeft + llround((F32)width / mDisplayScale.mV[VX]);
mWindowRectScaled.mTop = mWindowRectScaled.mBottom + llround((F32)height / mDisplayScale.mV[VY]);
mWindowRectScaled.mRight = mWindowRectScaled.mLeft + llmath::llround((F32)width / mDisplayScale.mV[VX]);
mWindowRectScaled.mTop = mWindowRectScaled.mBottom + llmath::llround((F32)height / mDisplayScale.mV[VY]);
setup2DViewport();
@@ -2560,8 +2560,8 @@ void LLViewerWindow::draw()
microsecondsToTimecodeString(gFrameTime,text);
const LLFontGL* font = LLFontGL::getFontSansSerif();
font->renderUTF8(text, 0,
llround((getWindowWidthScaled()/2)-100.f),
llround((getWindowHeightScaled()-60.f)),
llmath::llround((getWindowWidthScaled()/2)-100.f),
llmath::llround((getWindowHeightScaled()-60.f)),
LLColor4( 1.f, 1.f, 1.f, 1.f ),
LLFontGL::LEFT, LLFontGL::TOP);
}
@@ -2661,7 +2661,7 @@ void LLViewerWindow::draw()
const S32 DIST_FROM_TOP = 20;
LLFontGL::getFontSansSerifBig()->renderUTF8(
mOverlayTitle, 0,
llround( getWindowWidthScaled() * 0.5f),
llmath::llround( getWindowWidthScaled() * 0.5f),
getWindowHeightScaled() - DIST_FROM_TOP,
LLColor4(1, 1, 1, 0.4f),
LLFontGL::HCENTER, LLFontGL::TOP);
@@ -3514,7 +3514,7 @@ void LLViewerWindow::updateMouseDelta()
fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds*amount,1.f);
fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds*amount,1.f);
mCurrentMouseDelta.set(llround(fdx), llround(fdy));
mCurrentMouseDelta.set(llmath::llround(fdx), llmath::llround(fdy));
mouse_vel.setVec(fdx,fdy);
}
else
@@ -4804,10 +4804,10 @@ bool LLViewerWindow::rawRawSnapshot(LLImageRaw *raw,
// However, if the buffer turns out to be too large, then clamp it to max_size.
scale_factor = llmin(max_size / snapshot_width, max_size / snapshot_height)) // Clamp
{
image_buffer_x = llround(unscaled_image_buffer_x * scale_factor);
image_buffer_y = llround(unscaled_image_buffer_y * scale_factor);
S32 image_size_x = llround(snapshot_width * scale_factor);
S32 image_size_y = llround(snapshot_width * scale_factor);
image_buffer_x = llmath::llround(unscaled_image_buffer_x * scale_factor);
image_buffer_y = llmath::llround(unscaled_image_buffer_y * scale_factor);
S32 image_size_x = llmath::llround(snapshot_width * scale_factor);
S32 image_size_y = llmath::llround(snapshot_width * scale_factor);
if (llmax(image_size_x, image_size_y) > max_size && // Boundary check to avoid memory overflow.
internal_scale <= 1.f && !reset_deferred) // SHY_MOD: If supersampling... Don't care about max_size.
{
@@ -5075,7 +5075,7 @@ void LLViewerWindow::drawMouselookInstructions()
INSTRUCTIONS_PAD,
getWindowHeight() - INSTRUCTIONS_PAD,
font->getWidth( instructions ) + 2 * INSTRUCTIONS_PAD,
llround(font->getLineHeight() + 2 * INSTRUCTIONS_PAD));
llmath::llround(font->getLineHeight() + 2 * INSTRUCTIONS_PAD));
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -5685,8 +5685,8 @@ void LLViewerWindow::calcDisplayScale()
if (mWindow->getFullscreen())
{
display_scale.mV[0] = llround(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth());
display_scale.mV[1] = llround(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight());
display_scale.mV[0] = llmath::llround(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth());
display_scale.mV[1] = llmath::llround(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight());
}
if (display_scale != mDisplayScale)
@@ -5970,8 +5970,8 @@ void LLPickInfo::updateXYCoords()
LLPointer<LLViewerTexture> imagep = LLViewerTextureManager::getFetchedTexture(tep->getID());
if(mUVCoords.mV[VX] >= 0.f && mUVCoords.mV[VY] >= 0.f && imagep.notNull())
{
mXYCoords.mX = llround(mUVCoords.mV[VX] * (F32)imagep->getWidth());
mXYCoords.mY = llround((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight());
mXYCoords.mX = llmath::llround(mUVCoords.mV[VX] * (F32)imagep->getWidth());
mXYCoords.mY = llmath::llround((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight());
}
}
}
@@ -6000,7 +6000,7 @@ void LLPickInfo::getSurfaceInfo()
if (objectp)
{
if (gViewerWindow->cursorIntersect(llround((F32)mMousePt.mX), llround((F32)mMousePt.mY), 1024.f,
if (gViewerWindow->cursorIntersect(llmath::llround((F32)mMousePt.mX), llmath::llround((F32)mMousePt.mY), 1024.f,
objectp, -1, mPickTransparent,
&mObjectFace,
&intersection,
@@ -6058,8 +6058,8 @@ LLVector2 LLPickInfo::pickUV()
objectp->mDrawable.notNull() && objectp->getPCode() == LL_PCODE_VOLUME &&
mObjectFace < objectp->mDrawable->getNumFaces())
{
S32 scaled_x = llround((F32)mPickPt.mX * gViewerWindow->getDisplayScale().mV[VX]);
S32 scaled_y = llround((F32)mPickPt.mY * gViewerWindow->getDisplayScale().mV[VY]);
S32 scaled_x = llmath::llround((F32)mPickPt.mX * gViewerWindow->getDisplayScale().mV[VX]);
S32 scaled_y = llmath::llround((F32)mPickPt.mY * gViewerWindow->getDisplayScale().mV[VY]);
const S32 UV_PICK_WIDTH = 5;
const S32 UV_PICK_HALF_WIDTH = (UV_PICK_WIDTH - 1) / 2;
U8 uv_pick_buffer[UV_PICK_WIDTH * UV_PICK_WIDTH * 4];