mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-23 21:03:02 +00:00
Software Cropped Patches
Fixed the stupid error I made that was causing software to not draw cropped patches.
This commit is contained in:
parent
2b80874646
commit
7aa960d6d5
2 changed files with 13 additions and 2 deletions
13
src/screen.c
13
src/screen.c
|
@ -227,7 +227,11 @@ void SCR_Startup(void)
|
||||||
vid.dupx = vid.dupy = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
vid.dupx = vid.dupy = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||||
vid.fdupx = FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT);
|
vid.fdupx = FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT);
|
||||||
vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT);
|
vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT);
|
||||||
//vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); // This was just placing it incorrectly at non aspect correct resolutions
|
|
||||||
|
#ifdef HWRENDER
|
||||||
|
if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions, not sure if it does anything in software
|
||||||
|
#endif
|
||||||
|
vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy);
|
||||||
|
|
||||||
vid.meddupx = (UINT8)(vid.dupx >> 1) + 1;
|
vid.meddupx = (UINT8)(vid.dupx >> 1) + 1;
|
||||||
vid.meddupy = (UINT8)(vid.dupy >> 1) + 1;
|
vid.meddupy = (UINT8)(vid.dupy >> 1) + 1;
|
||||||
|
@ -269,7 +273,12 @@ void SCR_Recalc(void)
|
||||||
vid.dupx = vid.dupy = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
vid.dupx = vid.dupy = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||||
vid.fdupx = FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT);
|
vid.fdupx = FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT);
|
||||||
vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT);
|
vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT);
|
||||||
//vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); // This was just placing it incorrectly at non aspect correct resolutions
|
|
||||||
|
#ifdef HWRENDER
|
||||||
|
if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions, not sure if it does anything in software
|
||||||
|
#endif
|
||||||
|
vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy);
|
||||||
|
|
||||||
//vid.baseratio = FixedDiv(vid.height << FRACBITS, BASEVIDHEIGHT << FRACBITS);
|
//vid.baseratio = FixedDiv(vid.height << FRACBITS, BASEVIDHEIGHT << FRACBITS);
|
||||||
vid.baseratio = FRACUNIT;
|
vid.baseratio = FRACUNIT;
|
||||||
|
|
||||||
|
|
|
@ -1042,8 +1042,10 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, INT32 scrn, patch_t *patch, fixed_
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
// Done
|
// Done
|
||||||
if (rendermode != render_soft && rendermode != render_none)
|
if (rendermode != render_soft && rendermode != render_none)
|
||||||
|
{
|
||||||
HWR_DrawCroppedPatch((GLPatch_t *)patch, x, y, scrn, science, sx, sy, w, h);
|
HWR_DrawCroppedPatch((GLPatch_t *)patch, x, y, scrn, science, sx, sy, w, h);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// only use one dup, to avoid stretching (har har)
|
// only use one dup, to avoid stretching (har har)
|
||||||
|
|
Loading…
Reference in a new issue