mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Fix V_SNAPTOx code to consider dupx/dupy the same way as Software mode
This commit is contained in:
parent
c7e58b7cd5
commit
0d38061db8
1 changed files with 6 additions and 6 deletions
|
@ -227,14 +227,14 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
||||||
Z_Free(realpatch);
|
Z_Free(realpatch);
|
||||||
}
|
}
|
||||||
// centre screen
|
// centre screen
|
||||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
if ((float)vid.width != (float)BASEVIDWIDTH * dupx)
|
||||||
{
|
{
|
||||||
if (option & V_SNAPTORIGHT)
|
if (option & V_SNAPTORIGHT)
|
||||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||||
else if (!(option & V_SNAPTOLEFT))
|
else if (!(option & V_SNAPTOLEFT))
|
||||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2;
|
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * vid.dupy)
|
if ((float)vid.height != (float)BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM))
|
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM))
|
||||||
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
|
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
|
||||||
|
@ -375,14 +375,14 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
Z_Free(realpatch);
|
Z_Free(realpatch);
|
||||||
}
|
}
|
||||||
// centre screen
|
// centre screen
|
||||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
if ((float)vid.width != (float)BASEVIDWIDTH * dupx)
|
||||||
{
|
{
|
||||||
if (option & V_SNAPTORIGHT)
|
if (option & V_SNAPTORIGHT)
|
||||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||||
else if (!(option & V_SNAPTOLEFT))
|
else if (!(option & V_SNAPTOLEFT))
|
||||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2;
|
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * vid.dupy)
|
if ((float)vid.height != (float)BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM))
|
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM))
|
||||||
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
|
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
|
||||||
|
@ -846,14 +846,14 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
||||||
fw *= dupx;
|
fw *= dupx;
|
||||||
fh *= dupy;
|
fh *= dupy;
|
||||||
|
|
||||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
if ((float)vid.width != (float)BASEVIDWIDTH * dupx)
|
||||||
{
|
{
|
||||||
if (color & V_SNAPTORIGHT)
|
if (color & V_SNAPTORIGHT)
|
||||||
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||||
else if (!(color & V_SNAPTOLEFT))
|
else if (!(color & V_SNAPTOLEFT))
|
||||||
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2;
|
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
if ((float)vid.height != (float)BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
// same thing here
|
// same thing here
|
||||||
if (color & V_SNAPTOBOTTOM)
|
if (color & V_SNAPTOBOTTOM)
|
||||||
|
|
Loading…
Reference in a new issue