diff --git a/src/r_draw_column.cpp b/src/r_draw_column.cpp index cdda6d40f..e070500cf 100644 --- a/src/r_draw_column.cpp +++ b/src/r_draw_column.cpp @@ -225,7 +225,21 @@ static void R_DrawColumnTemplate(drawcolumndata_t *dc) npow2min = -1; npow2max = dc->sourcelength; - if (dc->sourcelength & heightmask) // not a power of 2 -- killough + if (heightmask == -1) + { + if (frac < 0) + // adjust in case we underread + frac += FRACUNIT; + + // texture has no height, so just go + while (--count > 0) + { + INT32 n = frac >> FRACBITS; + dest += vid.width; + *dest = R_DrawColumnPixel(dc, dest, n); + } + } + else if (dc->texheight & heightmask) // not a power of 2 -- killough { heightmask = dc->texheight << FRACBITS; diff --git a/src/r_draw_span.cpp b/src/r_draw_span.cpp index 0fe27b3ce..70e62c487 100644 --- a/src/r_draw_span.cpp +++ b/src/r_draw_span.cpp @@ -255,7 +255,7 @@ static void R_DrawTiltedSpanTemplate(drawspandata_t* ds) { // x1, x2 = ds_x1, ds_x2 int width = ds->x2 - ds->x1; - double iz, uz, vz; + float iz, uz, vz; UINT32 u, v; int i; @@ -263,9 +263,9 @@ static void R_DrawTiltedSpanTemplate(drawspandata_t* ds) UINT8 *dest; UINT8 *dsrc; - double startz, startu, startv; - double izstep, uzstep, vzstep; - double endz, endu, endv; + float startz, startu, startv; + float izstep, uzstep, vzstep; + float endz, endu, endv; UINT32 stepu, stepv; UINT32 bit; INT32 tiltlighting[MAXVIDWIDTH]; @@ -390,7 +390,7 @@ static void R_DrawTiltedSpanTemplate(drawspandata_t* ds) } else { - double left = width; + float left = width; iz += ds->szp.x * left; uz += ds->sup.x * left; vz += ds->svp.x * left; @@ -514,7 +514,7 @@ static void R_DrawTiltedNPO2SpanTemplate(drawspandata_t* ds) { // x1, x2 = ds_x1, ds_x2 int width = ds->x2 - ds->x1; - double iz, uz, vz; + float iz, uz, vz; UINT32 u, v; int i; @@ -522,9 +522,9 @@ static void R_DrawTiltedNPO2SpanTemplate(drawspandata_t* ds) UINT8 *dest; UINT8 *dsrc; - double startz, startu, startv; - double izstep, uzstep, vzstep; - double endz, endu, endv; + float startz, startu, startv; + float izstep, uzstep, vzstep; + float endz, endu, endv; UINT32 stepu, stepv; INT32 tiltlighting[MAXVIDWIDTH]; @@ -689,7 +689,7 @@ static void R_DrawTiltedNPO2SpanTemplate(drawspandata_t* ds) } else { - double left = width; + float left = width; iz += ds->szp.x * left; uz += ds->sup.x * left; vz += ds->svp.x * left;