+ {
+ int tx = (u >> (16 - pfill_tex.xshift)) & pfill_tex.xmask;
+ int ty = (v >> (16 - pfill_tex.yshift)) & pfill_tex.ymask;
+ uint16_t texel = pfill_tex.pixels[(ty << pfill_tex.xshift) + tx];
+#ifdef GOURAUD
+ /* XXX this is not correct, should be /255, but it might not make a huge difference */
+ cr = (cr * UNPACK_R16(texel)) >> 8;
+ cg = (cg * UNPACK_G16(texel)) >> 8;
+ cb = (cb * UNPACK_B16(texel)) >> 8;
+#else
+ cr = UNPACK_R16(texel);
+ cg = UNPACK_G16(texel);
+ cb = UNPACK_B16(texel);
+#endif
+ }