mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 04:20:45 +00:00
parent
feffc7c5c2
commit
b120bade95
4 changed files with 14 additions and 6 deletions
|
@ -340,6 +340,14 @@ static void CalcFullscreenScale(F2DDrawer* drawer, DrawParms *parms, double srcw
|
||||||
auto GetWidth = [=]() { return parms->viewport.width; };
|
auto GetWidth = [=]() { return parms->viewport.width; };
|
||||||
auto GetHeight = [=]() {return parms->viewport.height; };
|
auto GetHeight = [=]() {return parms->viewport.height; };
|
||||||
|
|
||||||
|
if (autoaspect == 4)
|
||||||
|
{
|
||||||
|
rect.left = rect.top = 0;
|
||||||
|
rect.width = GetWidth();
|
||||||
|
rect.height = GetHeight();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
double aspect;
|
double aspect;
|
||||||
if (srcheight == 200) aspect = srcwidth / 240.;
|
if (srcheight == 200) aspect = srcwidth / 240.;
|
||||||
else if (srcheight == 400) aspect = srcwidth / 480;
|
else if (srcheight == 400) aspect = srcwidth / 480;
|
||||||
|
@ -763,7 +771,7 @@ bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture *img, double x, double
|
||||||
|
|
||||||
case DTA_FullscreenScale:
|
case DTA_FullscreenScale:
|
||||||
intval = ListGetInt(tags);
|
intval = ListGetInt(tags);
|
||||||
if (intval >= 0 && intval <= 3)
|
if (intval >= 0 && intval <= 4)
|
||||||
{
|
{
|
||||||
parms->fsscalemode = (uint8_t)intval;
|
parms->fsscalemode = (uint8_t)intval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,12 +198,12 @@ void displaymasks_d(int snum)
|
||||||
if (hud_size < 9)
|
if (hud_size < 9)
|
||||||
{
|
{
|
||||||
hud_drawsprite(44, (200 - 8 - tilesiz[SCUBAMASK].y), 65536, 0, SCUBAMASK, 0, p, 2 + 16);
|
hud_drawsprite(44, (200 - 8 - tilesiz[SCUBAMASK].y), 65536, 0, SCUBAMASK, 0, p, 2 + 16);
|
||||||
hud_drawsprite((320 - 43), (200 - 8 - tilesiz[SCUBAMASK].y), 65536, 1024, SCUBAMASK, 0, p, 2 + 4 + 16);
|
hud_drawsprite((320 - 43), (200 - 8 - tilesiz[SCUBAMASK].y), 65536, 0, SCUBAMASK, 0, p, 2 + 4 + 16);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hud_drawsprite(44, (200 - tilesiz[SCUBAMASK].y), 65536, 0, SCUBAMASK, 0, p, 2 + 16);
|
hud_drawsprite(44, (200 - tilesiz[SCUBAMASK].y), 65536, 0, SCUBAMASK, 0, p, 2 + 16);
|
||||||
hud_drawsprite((320 - 43), (200 - tilesiz[SCUBAMASK].y), 65536, 1024, SCUBAMASK, 0, p, 2 + 4 + 16);
|
hud_drawsprite((320 - 43), (200 - tilesiz[SCUBAMASK].y), 65536, 0, SCUBAMASK, 0, p, 2 + 4 + 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ void displaymasks_r(int snum)
|
||||||
if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_STRETCH;
|
if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_STRETCH;
|
||||||
hud_drawsprite((320 - (tilesiz[SCUBAMASK].x >> 1) - 15), (200 - (tilesiz[SCUBAMASK].y >> 1) + (sintable[(int)totalclock & 2047] >> 10)), 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin);
|
hud_drawsprite((320 - (tilesiz[SCUBAMASK].x >> 1) - 15), (200 - (tilesiz[SCUBAMASK].y >> 1) + (sintable[(int)totalclock & 2047] >> 10)), 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin);
|
||||||
hud_drawsprite((320 - tilesiz[SCUBAMASK + 4].x), (200 - tilesiz[SCUBAMASK + 4].y), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 16 + pin);
|
hud_drawsprite((320 - tilesiz[SCUBAMASK + 4].x), (200 - tilesiz[SCUBAMASK + 4].y), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 16 + pin);
|
||||||
hud_drawsprite(tilesiz[SCUBAMASK + 4].x, (200 - tilesiz[SCUBAMASK + 4].y), 65536, 1024, SCUBAMASK + 4, 0, p, 2 + 4 + 16 + pin);
|
hud_drawsprite(tilesiz[SCUBAMASK + 4].x, (200 - tilesiz[SCUBAMASK + 4].y), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 4 + 16 + pin);
|
||||||
hud_drawsprite(35, (-1), 65536, 0, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
|
hud_drawsprite(35, (-1), 65536, 0, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
|
||||||
hud_drawsprite(285, 200, 65536, 1024, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
|
hud_drawsprite(285, 200, 65536, 1024, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -544,14 +544,14 @@ void hud_drawsprite(double sx, double sy, int z, int a, int picnum, int dashade,
|
||||||
DTA_TranslationIndex, TRANSLATION(Translation_Remap + curbasepal, dapalnum),
|
DTA_TranslationIndex, TRANSLATION(Translation_Remap + curbasepal, dapalnum),
|
||||||
DTA_ViewportX, windowxy1.x, DTA_ViewportY, windowxy1.y,
|
DTA_ViewportX, windowxy1.x, DTA_ViewportY, windowxy1.y,
|
||||||
DTA_ViewportWidth, windowxy2.x - windowxy1.x + 1, DTA_ViewportHeight, windowxy2.y - windowxy1.y + 1,
|
DTA_ViewportWidth, windowxy2.x - windowxy1.x + 1, DTA_ViewportHeight, windowxy2.y - windowxy1.y + 1,
|
||||||
DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200,
|
DTA_FullscreenScale, (dastat & RS_STRETCH)? 4: 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200,
|
||||||
DTA_CenterOffsetRel, !(dastat & (RS_TOPLEFT | RS_CENTER)),
|
DTA_CenterOffsetRel, !(dastat & (RS_TOPLEFT | RS_CENTER)),
|
||||||
DTA_TopLeft, !!(dastat & RS_TOPLEFT),
|
DTA_TopLeft, !!(dastat & RS_TOPLEFT),
|
||||||
DTA_CenterOffset, !!(dastat & RS_CENTER),
|
DTA_CenterOffset, !!(dastat & RS_CENTER),
|
||||||
DTA_FlipX, !!(dastat & RS_YFLIP), // the weapon drawer uses y-flip+180° rotation for x-flip but no other transformation.
|
DTA_FlipX, !!(dastat & RS_YFLIP), // the weapon drawer uses y-flip+180° rotation for x-flip but no other transformation.
|
||||||
DTA_Pin, (dastat & RS_ALIGN_R) ? 1 : (dastat & RS_ALIGN_L) ? -1 : 0,
|
DTA_Pin, (dastat & RS_ALIGN_R) ? 1 : (dastat & RS_ALIGN_L) ? -1 : 0,
|
||||||
DTA_Rotate, a * (-360./2048),
|
DTA_Rotate, a * (-360./2048),
|
||||||
DTA_FlipOffsets, !(dastat & (RS_TOPLEFT | RS_CENTER)),
|
DTA_FlipOffsets, !(dastat & (/*RS_TOPLEFT |*/ RS_CENTER)),
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue