1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
// This file is included by SWTri.cpp and should not be built directly by the project.
int64_t subTex = x0 - lx;
unsigned int u, v, r, g, b, a;
#if defined(MOD_ARGB)
a = la + static_cast<int>((da * subTex)>>16);
r = lr + static_cast<int>((dr * subTex)>>16);
g = lg + static_cast<int>((dg * subTex)>>16);
b = lb + static_cast<int>((db * subTex)>>16);
#endif
#if defined(TEXTURED)
u = lu + static_cast<int>((du * subTex)>>16);
v = lv + static_cast<int>((dv * subTex)>>16);
#endif
PTYPE * pix = fb + (x0>>16);
int width = ((x1-x0)>>16);
while(width-- > 0)
{
#include PIXEL_INCLUDE
// if (bit_format == 0x888) PIXEL888()
// if (bit_format == 0x565) PIXEL565()
// if (bit_format == 0x555) PIXEL555()
// if (bit_format == 0x8888) PIXEL8888()
++pix;
#if defined(MOD_ARGB)
a += da;
r += dr;
g += dg;
b += db;
#endif
#if defined(TEXTURED)
u += du;
v += dv;
#endif
}
lx += ldx;
sx += sdx;
fb += pitch;
#if defined (MOD_ARGB)
la += lda;
lr += ldr;
lg += ldg;
lb += ldb;
#endif
#if defined (TEXTURED)
lu += ldu;
lv += ldv;
#endif
|