- Draw 1 pixel of border at the edges of the status bar to prevent imprecision HOMs (only top and bottom for non-widescreen for now).
- The completeborder command is handled at the base statusbar now since it can do so more efficiently. SVN r3771 (trunk)
This commit is contained in:
parent
fdc6a03125
commit
340db9160b
3 changed files with 35 additions and 22 deletions
|
|
@ -216,6 +216,7 @@ void ST_Clear()
|
|||
|
||||
DBaseStatusBar::DBaseStatusBar (int reltop, int hres, int vres)
|
||||
{
|
||||
CompleteBorder = false;
|
||||
Centering = false;
|
||||
FixedOrigin = false;
|
||||
CrosshairSize = FRACUNIT;
|
||||
|
|
@ -1037,27 +1038,43 @@ void DBaseStatusBar::RefreshBackground () const
|
|||
{
|
||||
int x, x2, y, ratio;
|
||||
|
||||
if (SCREENWIDTH > 320)
|
||||
ratio = CheckRatio (SCREENWIDTH, SCREENHEIGHT);
|
||||
x = (!(ratio & 3) || !Scaled) ? ST_X : SCREENWIDTH*(48-BaseRatioSizes[ratio][3])/(48*2);
|
||||
y = x == ST_X && x > 0 ? ST_Y : ::ST_Y;
|
||||
|
||||
if(!CompleteBorder)
|
||||
{
|
||||
ratio = CheckRatio (SCREENWIDTH, SCREENHEIGHT);
|
||||
x = (!(ratio & 3) || !Scaled) ? ST_X : SCREENWIDTH*(48-BaseRatioSizes[ratio][3])/(48*2);
|
||||
if (x > 0)
|
||||
V_DrawBorder (x+1, y, SCREENWIDTH, y+1);
|
||||
V_DrawBorder (x+1, SCREENHEIGHT-1, SCREENWIDTH, SCREENHEIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = SCREENWIDTH;
|
||||
}
|
||||
|
||||
if (x > 0)
|
||||
{
|
||||
if(!CompleteBorder)
|
||||
{
|
||||
y = x == ST_X ? ST_Y : ::ST_Y;
|
||||
x2 = !(ratio & 3) || !Scaled ? ST_X+HorizontalResolution :
|
||||
SCREENWIDTH - (SCREENWIDTH*(48-BaseRatioSizes[ratio][3])+48*2-1)/(48*2);
|
||||
V_DrawBorder (0, y, x, SCREENHEIGHT);
|
||||
V_DrawBorder (x2, y, SCREENWIDTH, SCREENHEIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
x2 = SCREENWIDTH;
|
||||
}
|
||||
|
||||
if (setblocks >= 10)
|
||||
{
|
||||
const gameborder_t *border = gameinfo.border;
|
||||
FTexture *p;
|
||||
V_DrawBorder (0, y, x+1, SCREENHEIGHT);
|
||||
V_DrawBorder (x2-1, y, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
p = TexMan[border->b];
|
||||
screen->FlatFill(0, y, x, y + p->GetHeight(), p, true);
|
||||
screen->FlatFill(x2, y, SCREENWIDTH, y + p->GetHeight(), p, true);
|
||||
}
|
||||
if (setblocks >= 10)
|
||||
{
|
||||
const gameborder_t *border = gameinfo.border;
|
||||
FTexture *p;
|
||||
|
||||
p = TexMan[border->b];
|
||||
screen->FlatFill(0, y, x, y + p->GetHeight(), p, true);
|
||||
screen->FlatFill(x2, y, SCREENWIDTH, y + p->GetHeight(), p, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue