Commit 142c909b authored by engineer_apple's avatar engineer_apple

for cutealien, clean unused code

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3338 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 976b62fc
......@@ -132,10 +132,7 @@ void CTRGouraud2::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[0];
#endif
#ifdef IPOL_T1
sVec2 slopeT[1];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -134,10 +134,7 @@ void CTRGouraudAlphaNoZ2::scanline_bilinear ()
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[0];
#endif
#ifdef IPOL_T1
sVec2 slopeT[1];
sVec2 slopeT[BURNING_MATERIAL_MAX_TEXTURES];
#endif
// apply top-left fill-convention, left
......
......@@ -374,196 +374,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min ()
}
#if 0
/*!
*/
REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear ()
{
tVideoSample *dst;
#ifdef USE_ZBUFFER
fp24 *z;
#endif
s32 xStart;
s32 xEnd;
s32 dx;
#ifdef SUBTEXEL
f32 subPixel;
#endif
#ifdef IPOL_Z
f32 slopeZ;
#endif
#ifdef IPOL_W
fp24 slopeW;
#endif
#ifdef IPOL_C0
sVec4 slopeC;
#endif
#ifdef IPOL_T0
sVec2 slopeT[0];
#endif
#ifdef IPOL_T1
sVec2 slopeT[1];
#endif
// apply top-left fill-convention, left
xStart = core::ceil32( line.x[0] );
xEnd = core::ceil32( line.x[1] ) - 1;
dx = xEnd - xStart;
if ( dx < 0 )
return;
// slopes
const f32 invDeltaX = core::reciprocal_approxim ( line.x[1] - line.x[0] );
#ifdef IPOL_Z
slopeZ = (line.z[1] - line.z[0]) * invDeltaX;
#endif
#ifdef IPOL_W
slopeW = (line.w[1] - line.w[0]) * invDeltaX;
#endif
#ifdef IPOL_C0
slopeC = (line.c[1] - line.c[0]) * invDeltaX;
#endif
#ifdef IPOL_T0
slopeT[0] = (line.t[0][1] - line.t[0][0]) * invDeltaX;
#endif
#ifdef IPOL_T1
slopeT[1] = (line.t[1][1] - line.t[1][0]) * invDeltaX;
#endif
#ifdef SUBTEXEL
subPixel = ( (f32) xStart ) - line.x[0];
#ifdef IPOL_Z
line.z[0] += slopeZ * subPixel;
#endif
#ifdef IPOL_W
line.w[0] += slopeW * subPixel;
#endif
#ifdef IPOL_C0
line.c[0] += slopeC * subPixel;
#endif
#ifdef IPOL_T0
line.t[0][0] += slopeT[0] * subPixel;
#endif
#ifdef IPOL_T1
line.t[1][0] += slopeT[1] * subPixel;
#endif
#endif
dst = (tVideoSample*)RenderTarget->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart;
#ifdef USE_ZBUFFER
z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart;
#endif
#ifdef INVERSE_W
f32 inversew;
#endif
tFixPointu tx0, tx1;
tFixPointu ty0, ty1;
tFixPoint r0, g0, b0;
tFixPoint r1, g1, b1;
tFixPoint r2, g2, b2;
#ifdef IPOL_C0
tFixPoint r3, g3, b3;
#endif
for ( s32 i = 0; i <= dx; i++ )
{
#ifdef CMP_Z
if ( line.z[0] < z[i] )
#endif
#ifdef CMP_W
if ( line.w[0] >= z[i] )
#endif
{
#ifdef INVERSE_W
inversew = fix_inverse32 ( line.w[0] );
tx0 = tofix ( line.t[0][0].x,inversew);
ty0 = tofix ( line.t[0][0].y,inversew);
tx1 = tofix ( line.t[1][0].x,inversew);
ty1 = tofix ( line.t[1][0].y,inversew);
#ifdef IPOL_C0
r3 = tofix ( line.c[0].y ,inversew );
g3 = tofix ( line.c[0].z ,inversew );
b3 = tofix ( line.c[0].w ,inversew );
#endif
#else
tx0 = tofix ( line.t[0][0].x );
ty0 = tofix ( line.t[0][0].y );
tx1 = tofix ( line.t[1][0].x );
ty1 = tofix ( line.t[1][0].y );
#endif
getSample_texture ( r0, g0, b0, &IT[0], tx0, ty0 );
getSample_texture ( r1, g1, b1, &IT[1], tx1, ty1 );
#ifdef IPOL_C0
r2 = imulFix ( r0, r3 );
g2 = imulFix ( g0, g3 );
b2 = imulFix ( b0, b3 );
r2 = clampfix_maxcolor ( imulFix_tex4 ( r2, r1 ) );
g2 = clampfix_maxcolor ( imulFix_tex4 ( g2, g1 ) );
b2 = clampfix_maxcolor ( imulFix_tex4 ( b2, b1 ) );
/*
r2 = r3 << 8;
g2 = g3 << 8;
b2 = b3 << 8;
*/
#else
r2 = clampfix_maxcolor ( imulFix_tex4 ( r0, r1 ) );
g2 = clampfix_maxcolor ( imulFix_tex4 ( g0, g1 ) );
b2 = clampfix_maxcolor ( imulFix_tex4 ( b0, b1 ) );
#endif
dst[i] = fix_to_color ( r2, g2, b2 );
#ifdef WRITE_Z
z[i] = line.z[0];
#endif
#ifdef WRITE_W
z[i] = line.w[0];
#endif
}
#ifdef IPOL_Z
line.z[0] += slopeZ;
#endif
#ifdef IPOL_W
line.w[0] += slopeW;
#endif
#ifdef IPOL_C0
line.c[0] += slopeC;
#endif
#ifdef IPOL_T0
line.t[0][0] += slopeT[0];
#endif
#ifdef IPOL_T1
line.t[1][0] += slopeT[1];
#endif
}
}
#endif
//#ifdef BURNINGVIDEO_RENDERER_FAST
#if 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment