Add floor32, ceil32, round32 compatibility functions for burnings renderer.

To avoid changing burnings now those functions have no IRRLICHT_FAST_MATH anymore, 
there's a new header irrMathFastCompat.h which has ..._fast functions doing the old behavior.
With the troubles they have documented.
I changed burnings to use those functions throughout.
Or as much as possible... Burnings probably also uses classes like SColor which also have functions 
using those, but I don't plan  to adapt them.
Maybe IRRLICHT_FAST_MATH should be a flag exlusive to burnings in the future, I don't think it makes 
much sense otherwise anymore (it often expects 32-bit asm).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6012 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2019-12-16 16:15:04 +00:00
parent 3acf725ae3
commit 3280b3319e
25 changed files with 289 additions and 161 deletions

View File

@ -690,8 +690,8 @@ REALINLINE void CBurningShader_Raster_Reference::depthWrite ()
REALINLINE void CBurningShader_Raster_Reference::scanline2()
{
// apply top-left fill-convention, left
pShader.xStart = core::ceil32( line.x[0] );
pShader.xEnd = core::ceil32( line.x[1] ) - 1;
pShader.xStart = core::ceil32_fast( line.x[0] );
pShader.xEnd = core::ceil32_fast( line.x[1] ) - 1;
pShader.dx = pShader.xEnd - pShader.xStart;
if ( pShader.dx < 0 )
@ -755,8 +755,8 @@ REALINLINE void CBurningShader_Raster_Reference::scanline ()
u32 i;
// apply top-left fill-convention, left
pShader.xStart = core::ceil32( line.x[0] );
pShader.xEnd = core::ceil32( line.x[1] ) - 1;
pShader.xStart = core::ceil32_fast( line.x[0] );
pShader.xEnd = core::ceil32_fast( line.x[1] ) - 1;
pShader.dx = pShader.xEnd - pShader.xStart;
if ( pShader.dx < 0 )
@ -929,8 +929,8 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
}
// apply top-left fill convention, top part
yStart = core::ceil32( a->Pos.y );
yEnd = core::ceil32( b->Pos.y ) - 1;
yStart = core::ceil32_fast( a->Pos.y );
yEnd = core::ceil32_fast( b->Pos.y ) - 1;
subPixel = ( (f32) yStart ) - a->Pos.y;
@ -1043,8 +1043,8 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
}
// apply top-left fill convention, top part
yStart = core::ceil32( b->Pos.y );
yEnd = core::ceil32( c->Pos.y ) - 1;
yStart = core::ceil32_fast( b->Pos.y );
yEnd = core::ceil32_fast( c->Pos.y ) - 1;
subPixel = ( (f32) yStart ) - b->Pos.y;