1
0

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

@@ -136,8 +136,8 @@ void CTRGouraud2::scanline_bilinear ()
#endif
// apply top-left fill-convention, left
xStart = core::ceil32( line.x[0] );
xEnd = core::ceil32( line.x[1] ) - 1;
xStart = core::ceil32_fast( line.x[0] );
xEnd = core::ceil32_fast( line.x[1] ) - 1;
dx = xEnd - xStart;
@@ -351,8 +351,8 @@ void CTRGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4D
#endif
// 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;
#ifdef SUBTEXEL
subPixel = ( (f32) yStart ) - a->Pos.y;
@@ -510,8 +510,8 @@ void CTRGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4D
#endif
// 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;
#ifdef SUBTEXEL