mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 05:00:46 +00:00
Fix the V_DrawCroppedPatch bleeding on the current charsel screen.
This commit is contained in:
parent
4c39225c3e
commit
5640aa955a
1 changed files with 8 additions and 2 deletions
|
@ -1045,9 +1045,15 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
|||
prevdelta = topdelta;
|
||||
source = (const UINT8 *)(column) + 3;
|
||||
dest = desttop;
|
||||
dest += FixedInt(FixedMul(topdelta<<FRACBITS,fdup))*vid.width;
|
||||
if (topdelta-sy > 0)
|
||||
{
|
||||
dest += FixedInt(FixedMul((topdelta-sy)<<FRACBITS,fdup))*vid.width;
|
||||
ofs = 0;
|
||||
}
|
||||
else
|
||||
ofs = (sy-topdelta)<<FRACBITS;
|
||||
|
||||
for (ofs = sy<<FRACBITS; dest < deststop && (ofs>>FRACBITS) < column->length && (((ofs>>FRACBITS) - sy) + topdelta) < h; ofs += rowfrac)
|
||||
for (; dest < deststop && (ofs>>FRACBITS) < column->length && (((ofs>>FRACBITS) - sy) + topdelta) < h; ofs += rowfrac)
|
||||
{
|
||||
if (dest >= screens[scrn&V_PARAMMASK]) // don't draw off the top of the screen (CRASH PREVENTION)
|
||||
*dest = patchdrawfunc(dest, source, ofs);
|
||||
|
|
Loading…
Reference in a new issue