mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 20:41:25 +00:00
fix HWR_DrawPatchInCache()
This commit is contained in:
parent
122b1c7091
commit
3bee12cb10
1 changed files with 7 additions and 8 deletions
|
@ -279,7 +279,6 @@ static void HWR_DrawPatchInCache(GLMipmap_t *mipmap,
|
||||||
INT32 ncols;
|
INT32 ncols;
|
||||||
fixed_t xfrac, xfracstep;
|
fixed_t xfrac, xfracstep;
|
||||||
fixed_t yfracstep, scale_y;
|
fixed_t yfracstep, scale_y;
|
||||||
const column_t *patchcol;
|
|
||||||
UINT8 *block = mipmap->data;
|
UINT8 *block = mipmap->data;
|
||||||
INT32 bpp;
|
INT32 bpp;
|
||||||
INT32 blockmodulo;
|
INT32 blockmodulo;
|
||||||
|
@ -293,20 +292,20 @@ static void HWR_DrawPatchInCache(GLMipmap_t *mipmap,
|
||||||
ncols = pwidth;
|
ncols = pwidth;
|
||||||
|
|
||||||
// source advance
|
// source advance
|
||||||
fixed_t xfrac = 0;
|
xfrac = 0;
|
||||||
fixed_t xfracstep = FRACUNIT;
|
xfracstep = FRACUNIT;
|
||||||
fixed_t yfracstep = FRACUNIT;
|
yfracstep = FRACUNIT;
|
||||||
fixed_t scale_y = FRACUNIT;
|
scale_y = FRACUNIT;
|
||||||
|
|
||||||
INT32 bpp = format2bpp(mipmap->format);
|
bpp = format2bpp(mipmap->format);
|
||||||
if (bpp < 1 || bpp > 4)
|
if (bpp < 1 || bpp > 4)
|
||||||
I_Error("HWR_DrawPatchInCache: no drawer defined for this bpp (%d)\n",bpp);
|
I_Error("HWR_DrawPatchInCache: no drawer defined for this bpp (%d)\n",bpp);
|
||||||
|
|
||||||
// NOTE: should this actually be pblockwidth*bpp?
|
// NOTE: should this actually be pblockwidth*bpp?
|
||||||
INT32 blockmodulo = pblockwidth*bpp;
|
blockmodulo = pblockwidth*bpp;
|
||||||
|
|
||||||
// Draw each column to the block cache
|
// Draw each column to the block cache
|
||||||
UINT8 *block = mipmap->data;
|
*block = mipmap->data;
|
||||||
|
|
||||||
for (int x = 0; x < pwidth; x++, block += bpp, xfrac += xfracstep)
|
for (int x = 0; x < pwidth; x++, block += bpp, xfrac += xfracstep)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue