- expanded names for view border elements. Also fixed the horribly bad implementation of custom borders which modified the DoomBorder elements without ever checking the game being used.

This commit is contained in:
Christoph Oelckers 2014-05-13 13:40:02 +02:00
commit a22670626c
4 changed files with 57 additions and 31 deletions

View file

@ -1407,7 +1407,7 @@ void V_SetBorderNeedRefresh()
void V_DrawFrame (int left, int top, int width, int height)
{
FTexture *p;
const gameborder_t *border = gameinfo.border;
const gameborder_t *border = &gameinfo.Border;
// Sanity check for incomplete gameinfo
if (border == NULL)
return;
@ -1513,28 +1513,28 @@ static void V_DrawTopBorder ()
if (viewwidth == SCREENWIDTH)
return;
offset = gameinfo.border->offset;
offset = gameinfo.Border.offset;
if (viewwindowy < 34)
{
V_DrawBorder (0, 0, viewwindowx, 34);
V_DrawBorder (viewwindowx, 0, viewwindowx + viewwidth, viewwindowy);
V_DrawBorder (viewwindowx + viewwidth, 0, SCREENWIDTH, 34);
p = TexMan(gameinfo.border->t);
p = TexMan(gameinfo.Border.t);
screen->FlatFill(viewwindowx, viewwindowy - p->GetHeight(),
viewwindowx + viewwidth, viewwindowy, p, true);
p = TexMan(gameinfo.border->l);
p = TexMan(gameinfo.Border.l);
screen->FlatFill(viewwindowx - p->GetWidth(), viewwindowy,
viewwindowx, 35, p, true);
p = TexMan(gameinfo.border->r);
p = TexMan(gameinfo.Border.r);
screen->FlatFill(viewwindowx + viewwidth, viewwindowy,
viewwindowx + viewwidth + p->GetWidth(), 35, p, true);
p = TexMan(gameinfo.border->tl);
p = TexMan(gameinfo.Border.tl);
screen->DrawTexture (p, viewwindowx - offset, viewwindowy - offset, TAG_DONE);
p = TexMan(gameinfo.border->tr);
p = TexMan(gameinfo.Border.tr);
screen->DrawTexture (p, viewwindowx + viewwidth, viewwindowy - offset, TAG_DONE);
}
else