Add 1 pixel tall and wide texture support to the renderer
- These require manual detection and overriding of the scaling factors to 0, because a right shift of (32-0) bits wraps around to 0 and results in no shift at all rather than leaving the register zeroed out.
This commit is contained in:
parent
8d7e400f8e
commit
9388597443
4 changed files with 59 additions and 12 deletions
|
|
@ -1104,6 +1104,12 @@ void wallscan (int x1, int x2, short *uwal, short *dwal, float *swal, fixed_t *l
|
|||
|
||||
rw_pic->GetHeight(); // Make sure texture size is loaded
|
||||
fracbits = 32 - rw_pic->HeightBits;
|
||||
if (fracbits == 32)
|
||||
{ // Hack for one pixel tall textures
|
||||
fracbits = 0;
|
||||
yrepeat = 0;
|
||||
dc_texturemid = 0;
|
||||
}
|
||||
setupvline(fracbits);
|
||||
xoffset = rw_offset;
|
||||
basecolormapdata = basecolormap->Maps;
|
||||
|
|
@ -1456,6 +1462,12 @@ void maskwallscan (int x1, int x2, short *uwal, short *dwal, float *swal, fixed_
|
|||
|
||||
rw_pic->GetHeight(); // Make sure texture size is loaded
|
||||
fracbits = 32- rw_pic->HeightBits;
|
||||
if (fracbits == 32)
|
||||
{ // Hack for one pixel tall textures
|
||||
fracbits = 0;
|
||||
yrepeat = 0;
|
||||
dc_texturemid = 0;
|
||||
}
|
||||
setupmvline(fracbits);
|
||||
xoffset = rw_offset;
|
||||
basecolormapdata = basecolormap->Maps;
|
||||
|
|
@ -1631,6 +1643,12 @@ void transmaskwallscan (int x1, int x2, short *uwal, short *dwal, float *swal, f
|
|||
|
||||
rw_pic->GetHeight(); // Make sure texture size is loaded
|
||||
fracbits = 32 - rw_pic->HeightBits;
|
||||
if (fracbits == 32)
|
||||
{ // Hack for one pixel tall textures
|
||||
fracbits = 0;
|
||||
yrepeat = 0;
|
||||
dc_texturemid = 0;
|
||||
}
|
||||
setuptmvline(fracbits);
|
||||
xoffset = rw_offset;
|
||||
basecolormapdata = basecolormap->Maps;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue