mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-17 17:41:57 +00:00
Remove calls to Patch_GetColumn, remove ylookup checks
This commit is contained in:
parent
073a90a6ce
commit
0ecbdf6831
1 changed files with 11 additions and 26 deletions
|
@ -675,15 +675,7 @@ void R_DrawMaskedColumn(column_t *column)
|
|||
dc_texturemid = basetexturemid - (post->topdelta<<FRACBITS);
|
||||
|
||||
// Drawn by R_DrawColumn.
|
||||
// This stuff is a likely cause of the splitscreen water crash bug.
|
||||
// FIXTHIS: Figure out what "something more proper" is and do it.
|
||||
// quick fix... something more proper should be done!!!
|
||||
if (ylookup[dc_yl])
|
||||
colfunc();
|
||||
#ifdef PARANOIA
|
||||
else
|
||||
I_Error("R_DrawMaskedColumn: Invalid ylookup for dc_yl %d", dc_yl);
|
||||
#endif
|
||||
colfunc();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -735,12 +727,8 @@ void R_DrawFlippedMaskedColumn(column_t *column)
|
|||
dc_texturemid = basetexturemid - (topdelta<<FRACBITS);
|
||||
|
||||
// Still drawn by R_DrawColumn.
|
||||
if (ylookup[dc_yl])
|
||||
colfunc();
|
||||
#ifdef PARANOIA
|
||||
else
|
||||
I_Error("R_DrawMaskedColumn: Invalid ylookup for dc_yl %d", dc_yl);
|
||||
#endif
|
||||
colfunc();
|
||||
|
||||
Z_Free(dc_source);
|
||||
}
|
||||
}
|
||||
|
@ -805,7 +793,6 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
{
|
||||
column_t *column;
|
||||
void (*localcolfunc)(column_t *);
|
||||
INT32 texturecolumn;
|
||||
INT32 pwidth;
|
||||
fixed_t frac;
|
||||
patch_t *patch = vis->patch;
|
||||
|
@ -932,7 +919,7 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
for (dc_x = vis->x1; dc_x <= vis->x2; dc_x++, spryscale += scalestep)
|
||||
{
|
||||
angle_t angle = ((vis->centerangle + xtoviewangle[dc_x]) >> ANGLETOFINESHIFT) & 0xFFF;
|
||||
texturecolumn = (vis->paperoffset - FixedMul(FINETANGENT(angle), vis->paperdistance)) / horzscale;
|
||||
INT32 texturecolumn = (vis->paperoffset - FixedMul(FINETANGENT(angle), vis->paperdistance)) / horzscale;
|
||||
|
||||
if (texturecolumn < 0 || texturecolumn >= pwidth)
|
||||
continue;
|
||||
|
@ -943,9 +930,9 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
sprtopscreen = (centeryfrac - FixedMul(dc_texturemid, spryscale));
|
||||
dc_iscale = (0xffffffffu / (unsigned)spryscale);
|
||||
|
||||
column = Patch_GetColumn(patch, texturecolumn);
|
||||
column = &patch->columns[texturecolumn];
|
||||
|
||||
localcolfunc (column);
|
||||
localcolfunc(column);
|
||||
}
|
||||
}
|
||||
else if (vis->cut & SC_SHEAR)
|
||||
|
@ -957,10 +944,9 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
// Vertically sheared sprite
|
||||
for (dc_x = vis->x1; dc_x <= vis->x2; dc_x++, frac += vis->xiscale, dc_texturemid -= vis->shear.tan)
|
||||
{
|
||||
texturecolumn = frac>>FRACBITS;
|
||||
column = Patch_GetColumn(patch, texturecolumn);
|
||||
column = &patch->columns[frac>>FRACBITS];
|
||||
sprtopscreen = (centeryfrac - FixedMul(dc_texturemid, spryscale));
|
||||
localcolfunc (column);
|
||||
localcolfunc(column);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -972,9 +958,8 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
// Non-paper drawing loop
|
||||
for (dc_x = vis->x1; dc_x <= vis->x2; dc_x++, frac += vis->xiscale, sprtopscreen += vis->shear.tan)
|
||||
{
|
||||
texturecolumn = frac>>FRACBITS;
|
||||
column = Patch_GetColumn(patch, texturecolumn);
|
||||
localcolfunc (column);
|
||||
column = &patch->columns[frac>>FRACBITS];
|
||||
localcolfunc(column);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1020,7 +1005,7 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis)
|
|||
|
||||
fixed_t frac = vis->startfrac;
|
||||
for (dc_x = vis->x1; dc_x <= vis->x2; dc_x++, frac += vis->xiscale)
|
||||
R_DrawMaskedColumn(Patch_GetColumn(patch, frac>>FRACBITS));
|
||||
R_DrawMaskedColumn(&patch->columns[frac>>FRACBITS]);
|
||||
|
||||
colfunc = colfuncs[BASEDRAWFUNC];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue