Sync llcommon with Alchemy a bit.

llmath::llround->ll_round
LL_ICC->LL_INTELC
Add llpredicate
Add LL_CPP11 macro
Remove llhash
Update llinitparam, llsd and all relatives of it.
This commit is contained in:
Inusaito Sayori
2015-03-20 22:04:04 -04:00
parent 16a2b28c1b
commit 72080e79e9
135 changed files with 1940 additions and 1282 deletions

View File

@@ -158,8 +158,8 @@ void LLUI::cleanupClass()
void LLUI::setMousePositionScreen(S32 x, S32 y)
{
S32 screen_x, screen_y;
screen_x = llmath::llround((F32)x * getScaleFactor().mV[VX]);
screen_y = llmath::llround((F32)y * getScaleFactor().mV[VY]);
screen_x = ll_round((F32)x * getScaleFactor().mV[VX]);
screen_y = ll_round((F32)y * getScaleFactor().mV[VY]);
LLView::getWindow()->setCursorPosition(LLCoordGL(screen_x, screen_y).convert());
}
@@ -170,8 +170,8 @@ void LLUI::getMousePositionScreen(S32 *x, S32 *y)
LLCoordWindow cursor_pos_window;
getWindow()->getCursorPosition(&cursor_pos_window);
LLCoordGL cursor_pos_gl(cursor_pos_window.convert());
*x = llmath::llround((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]);
*y = llmath::llround((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]);
*x = ll_round((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]);
*y = ll_round((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]);
}
//static
@@ -262,15 +262,15 @@ LLVector2 LLUI::getWindowSize()
//static
void LLUI::screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y)
{
*gl_x = llmath::llround((F32)screen_x * getScaleFactor().mV[VX]);
*gl_y = llmath::llround((F32)screen_y * getScaleFactor().mV[VY]);
*gl_x = ll_round((F32)screen_x * getScaleFactor().mV[VX]);
*gl_y = ll_round((F32)screen_y * getScaleFactor().mV[VY]);
}
//static
void LLUI::glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y)
{
*screen_x = llmath::llround((F32)gl_x / getScaleFactor().mV[VX]);
*screen_y = llmath::llround((F32)gl_y / getScaleFactor().mV[VY]);
*screen_x = ll_round((F32)gl_x / getScaleFactor().mV[VX]);
*screen_y = ll_round((F32)gl_y / getScaleFactor().mV[VY]);
}
//static