- Fixed: Thing_SetTranslation still used a 16-bit word to hold the translation.
- Bumped the maximum resolution up to 2560x1600. - Fixed: DCanvas::DrawTexture() only expanded virtual screen sizes for widescreen resolutions but left 5:4 modes alone. This fix neccessitated the addition of DTA_Bottom320x200 for the status bar to use so that it could be flush with the bottom of the screen rather than sitting slightly above it. - Fixed: FConfigFile::ReadConfig()'s definition of whitespace was too broad. - Fixed: Defining custom translation ranges in descending order and/or with gaps made for crashes. SVN r676 (trunk)
This commit is contained in:
parent
ed242b32df
commit
016ac67376
17 changed files with 130 additions and 66 deletions
|
|
@ -265,12 +265,15 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l
|
|||
INTBOOL boolval;
|
||||
int intval;
|
||||
bool translationset = false;
|
||||
bool virtBottom;
|
||||
|
||||
if (img == NULL || img->UseType == FTexture::TEX_Null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtBottom = false;
|
||||
|
||||
parms->texwidth = img->GetScaledWidth();
|
||||
parms->texheight = img->GetScaledHeight();
|
||||
|
||||
|
|
@ -363,6 +366,16 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l
|
|||
}
|
||||
break;
|
||||
|
||||
case DTA_Bottom320x200:
|
||||
boolval = va_arg (tags, INTBOOL);
|
||||
if (boolval)
|
||||
{
|
||||
parms->virtWidth = 320;
|
||||
parms->virtHeight = 200;
|
||||
}
|
||||
virtBottom = true;
|
||||
break;
|
||||
|
||||
case DTA_HUDRules:
|
||||
{
|
||||
bool xright = parms->x < 0;
|
||||
|
|
@ -538,9 +551,9 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l
|
|||
int bottom = parms->y + parms->destheight;
|
||||
|
||||
if (myratio != 0 && myratio != 4 && !parms->keepratio)
|
||||
{ // The target surface is not 4:3, so expand the specified
|
||||
// virtual size to avoid undesired stretching of the image.
|
||||
// Does not handle non-4:3 virtual sizes. I'll worry about
|
||||
{ // The target surface is either 16:9 or 16:10, so expand the
|
||||
// specified virtual size to avoid undesired stretching of the
|
||||
// image. Does not handle non-4:3 virtual sizes. I'll worry about
|
||||
// those if somebody expresses a desire to use them.
|
||||
parms->x = Scale(parms->x - parms->virtWidth*FRACUNIT/2,
|
||||
Width*960,
|
||||
|
|
@ -556,8 +569,26 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l
|
|||
parms->x = Scale (parms->x, Width, parms->virtWidth);
|
||||
parms->destwidth = Scale (right, Width, parms->virtWidth) - parms->x;
|
||||
}
|
||||
parms->y = Scale (parms->y, Height, parms->virtHeight);
|
||||
parms->destheight = Scale (bottom, Height, parms->virtHeight) - parms->y;
|
||||
if (myratio != 0 && myratio == 4 && !parms->keepratio)
|
||||
{ // The target surface is 5:4
|
||||
parms->y = Scale(parms->y - parms->virtHeight*FRACUNIT/2,
|
||||
Height*600,
|
||||
parms->virtHeight*BaseRatioSizes[myratio][1])
|
||||
+ Height*FRACUNIT/2;
|
||||
parms->destheight = Scale(bottom - parms->virtHeight*FRACUNIT/2,
|
||||
Height*600,
|
||||
parms->virtHeight*BaseRatioSizes[myratio][1])
|
||||
+ Height*FRACUNIT/2 - parms->y;
|
||||
if (virtBottom)
|
||||
{
|
||||
parms->y += (Height - Height * BaseRatioSizes[myratio][3] / 48) << (FRACBITS - 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
parms->y = Scale (parms->y, Height, parms->virtHeight);
|
||||
parms->destheight = Scale (bottom, Height, parms->virtHeight) - parms->y;
|
||||
}
|
||||
}
|
||||
|
||||
if (parms->destwidth <= 0 || parms->destheight <= 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue