mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Merge branch 'croppedpatchbleed' into 'master'
Fix the V_DrawCroppedPatch bleeding on the current charsel screen. See merge request STJr/SRB2Internal!311
This commit is contained in:
commit
4e1791bbf4
1 changed files with 8 additions and 2 deletions
|
@ -1046,9 +1046,15 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||||
prevdelta = topdelta;
|
prevdelta = topdelta;
|
||||||
source = (const UINT8 *)(column) + 3;
|
source = (const UINT8 *)(column) + 3;
|
||||||
dest = desttop;
|
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)
|
if (dest >= screens[scrn&V_PARAMMASK]) // don't draw off the top of the screen (CRASH PREVENTION)
|
||||||
*dest = patchdrawfunc(dest, source, ofs);
|
*dest = patchdrawfunc(dest, source, ofs);
|
||||||
|
|
Loading…
Reference in a new issue