Go to the source code of this file.
◆ D_DrawSpans16()
Definition at line 222 of file scan.c.
224 int count, spancount;
225 byte *pbase, *pdest, *ptex;
226 fixed16_t s, t, snext, tnext, sstep, tstep;
227 float sdivz, tdivz, zi, z, du, dv, spancountminus1;
228 float sdivz16stepu, tdivz16stepu, zi16stepu;
242 count = pspan->
count;
245 du = (float)pspan->
u;
246 dv = (
float)pspan->
v;
251 z = (float)0x10000 / zi;
274 if (q_likely(count)) {
277 sdivz += sdivz16stepu;
278 tdivz += tdivz16stepu;
280 z = (float)0x10000 / zi;
296 sstep = (snext - s) >> 4;
297 tstep = (tnext - t) >> 4;
303 spancountminus1 = (float)(spancount - 1);
307 z = (float)0x10000 / zi;
324 sstep = (snext - s) / (spancount - 1);
325 tstep = (tnext - t) / (spancount - 1);
337 }
while (--spancount > 0);
344 }
while ((pspan = pspan->
pnext) != NULL);
Referenced by D_SkySurf(), and D_SolidSurf().
◆ D_DrawTurbulent16()
Definition at line 83 of file scan.c.
86 byte *pbase, *pdest, *ptex;
87 fixed16_t s, t, snext, tnext, sstep, tstep;
88 float sdivz, tdivz, zi, z, du, dv, spancountminus1;
89 float sdivz16stepu, tdivz16stepu, zi16stepu;
107 count = pspan->
count;
110 du = (float)pspan->
u;
111 dv = (
float)pspan->
v;
116 z = (float)0x10000 / zi;
139 if (q_likely(count)) {
142 sdivz += sdivz16stepu;
143 tdivz += tdivz16stepu;
145 z = (float)0x10000 / zi;
161 sstep = (snext - s) >> 4;
162 tstep = (tnext - t) >> 4;
168 spancountminus1 = (float)(spancount - 1);
172 z = (float)0x10000 / zi;
189 sstep = (snext - s) / (spancount - 1);
190 tstep = (tnext - t) / (spancount - 1);
194 s = s & ((
CYCLE << 16) - 1);
195 t = t & ((
CYCLE << 16) - 1);
207 }
while (--spancount > 0);
214 }
while ((pspan = pspan->
pnext) != NULL);
Referenced by D_TurbulentSurf().
◆ D_DrawZSpans()
Definition at line 352 of file scan.c.
354 int count, doublecount, izistep;
368 count = pspan->
count;
371 du = (float)pspan->
u;
372 dv = (
float)pspan->
v;
376 izi = (
int)(zi * 0x8000 * 0x10000);
378 if ((uintptr_t)pdest & 0x02) {
379 *pdest++ = (short)(izi >> 16);
384 if ((doublecount = count >> 1) > 0) {
388 ltemp |= izi & 0xFFFF0000;
390 *(uint32_t *)pdest = ltemp;
392 }
while (--doublecount > 0);
396 *pdest = (short)(izi >> 16);
398 }
while ((pspan = pspan->
pnext) != NULL);
Referenced by D_BackgroundSurf(), D_DrawflatSurfaces(), D_DrawZSurfaces(), D_SkySurf(), D_SolidSurf(), and D_TurbulentSurf().
◆ D_WarpScreen()
Definition at line 32 of file scan.c.
41 static int cached_width, cached_height;
50 if (w != cached_width || h != cached_height) {
53 for (v = 0; v < h +
AMP2 * 2; v++) {
58 for (u = 0; u < w +
AMP2 * 2; u++) {
68 col = &column[turb[v & (
CYCLE - 1)]];
70 for (u = 0; u < w; u++) {
Referenced by R_RenderFrame().