Merge with develop
This commit is contained in:
commit
354e52aac1
2 changed files with 9 additions and 3 deletions
|
@ -103,7 +103,7 @@ public:
|
||||||
{
|
{
|
||||||
releaseError();
|
releaseError();
|
||||||
|
|
||||||
m_ErrorLog = nlfopen(errorLog, "wt");
|
m_ErrorLog = NLMISC::nlfopen(errorLog, "wt");
|
||||||
fwrite(s_ErrorHeader.c_str(), 1, s_ErrorHeader.length(), m_ErrorLog);
|
fwrite(s_ErrorHeader.c_str(), 1, s_ErrorHeader.length(), m_ErrorLog);
|
||||||
fwrite("\n", 1, 1, m_ErrorLog);
|
fwrite("\n", 1, 1, m_ErrorLog);
|
||||||
fflush(m_ErrorLog);
|
fflush(m_ErrorLog);
|
||||||
|
@ -114,7 +114,7 @@ public:
|
||||||
{
|
{
|
||||||
releaseDepend();
|
releaseDepend();
|
||||||
|
|
||||||
m_DependLog = nlfopen(dependLog, "wt");
|
m_DependLog = NLMISC::nlfopen(dependLog, "wt");
|
||||||
fwrite(s_DependHeader.c_str(), 1, s_DependHeader.length(), m_DependLog);
|
fwrite(s_DependHeader.c_str(), 1, s_DependHeader.length(), m_DependLog);
|
||||||
fwrite("\n", 1, 1, m_DependLog);
|
fwrite("\n", 1, 1, m_DependLog);
|
||||||
// fflush(m_DependLog);
|
// fflush(m_DependLog);
|
||||||
|
|
|
@ -3106,11 +3106,17 @@ bool CBitmap::blit(const CBitmap *src, sint32 x, sint32 y)
|
||||||
// Private :
|
// Private :
|
||||||
float CBitmap::getColorInterp (float x, float y, float colorInXY00, float colorInXY10, float colorInXY01, float colorInXY11) const
|
float CBitmap::getColorInterp (float x, float y, float colorInXY00, float colorInXY10, float colorInXY01, float colorInXY11) const
|
||||||
{
|
{
|
||||||
|
if (colorInXY00 == colorInXY10
|
||||||
|
&& colorInXY00 == colorInXY01
|
||||||
|
&& colorInXY00 == colorInXY11)
|
||||||
|
return colorInXY00; // Fix rounding error for alpha 255...
|
||||||
|
|
||||||
float res = colorInXY00*(1.0f-x)*(1.0f-y) +
|
float res = colorInXY00*(1.0f-x)*(1.0f-y) +
|
||||||
colorInXY10*( x)*(1.0f-y) +
|
colorInXY10*( x)*(1.0f-y) +
|
||||||
colorInXY01*(1.0f-x)*( y) +
|
colorInXY01*(1.0f-x)*( y) +
|
||||||
colorInXY11*( x)*( y);
|
colorInXY11*( x)*( y);
|
||||||
clamp(res, 0.0f, 255.0f);
|
clamp(res, 0.0f, 255.0f);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue