33 inline void LeRasterizer::fillFlatTexZC(
int y,
int x1,
int x2,
int w1,
int w2,
int u1,
int u2,
int v1,
int v2)
35 uint8_t * sc = (uint8_t *) &curTriangle->
solidColor;
40 int au = (u2 - u1) / d;
41 int av = (v2 - v1) / d;
42 int aw = (w2 - w1) / d;
45 uint8_t * p = (uint8_t *) (x1 + y *
frame.
tx + pixels);
47 for (
int x = x1; x < x2; x++) {
48 int32_t z = (1 << 30) / (w1 >> 8);
49 uint32_t tu = (((int64_t) u1 * z) >> 24) & texMaskU;
50 uint32_t tv = (((int64_t) v1 * z) >> 24) & texMaskV;
51 uint8_t * t = (uint8_t *) &texDiffusePixels[tu + (tv << texSizeU)];
53 p[0] = (t[0] * sc[0]) >> 8;
54 p[1] = (t[1] * sc[1]) >> 8;
55 p[2] = (t[2] * sc[2]) >> 8;
LeColor solidColor
Definition: trilist.h:83
int tx
Definition: bitmap.h:81
LeBitmap frame
Definition: rasterizer_float.h:61