character select

This commit is contained in:
Jaime Passos 2019-10-02 21:57:04 -03:00
parent bc81f03db2
commit 7f0032b9b1

View file

@ -8098,7 +8098,9 @@ static void M_DrawSetupChoosePlayerMenu(void)
patch_t *charfg = W_CachePatchName("CHARFG", PU_CACHE); patch_t *charfg = W_CachePatchName("CHARFG", PU_CACHE);
INT16 bgheight = SHORT(charbg->height); INT16 bgheight = SHORT(charbg->height);
INT16 fgheight = SHORT(charfg->height); INT16 fgheight = SHORT(charfg->height);
INT32 i; INT16 bgwidth = SHORT(charbg->width);
INT16 fgwidth = SHORT(charfg->width);
INT32 y;
if (abs(char_scroll) > FRACUNIT) if (abs(char_scroll) > FRACUNIT)
char_scroll -= (char_scroll>>2); char_scroll -= (char_scroll>>2);
@ -8131,31 +8133,22 @@ static void M_DrawSetupChoosePlayerMenu(void)
charseltimer++; charseltimer++;
// Background and borders // Background and borders
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, colormap[101]); V_DrawFill(0, 0, bgwidth, vid.height, V_SNAPTOTOP|colormap[101]);
{ {
INT32 sw = (BASEVIDWIDTH * vid.dupx); INT32 sw = (BASEVIDWIDTH * vid.dupx);
INT32 bw = (vid.width - sw) / 2; INT32 bw = (vid.width - sw) / 2;
col = colormap[106]; col = colormap[106];
if (bw) if (bw)
{
V_DrawFill(0, 0, bw, vid.height, V_NOSCALESTART|col); V_DrawFill(0, 0, bw, vid.height, V_NOSCALESTART|col);
V_DrawFill(bw+sw, 0, bw, vid.height, V_NOSCALESTART|col);
}
} }
// Foreground y = (charseltimer%32);
for (i = -12; i < (BASEVIDHEIGHT/bgheight) + 12; i++) V_DrawMappedPatch(0, y-bgheight, V_SNAPTOTOP, charbg, colormap);
{ V_DrawMappedPatch(0, y, V_SNAPTOTOP, charbg, colormap);
INT32 oy = (i*bgheight), y; V_DrawMappedPatch(0, y+bgheight, V_SNAPTOTOP, charbg, colormap);
y = oy - (bgheight - (charseltimer%bgheight)); V_DrawMappedPatch(0, -y, V_SNAPTOTOP, charfg, colormap);
V_DrawFixedPatch(0, y<<FRACBITS, FRACUNIT, 0, charbg, colormap); V_DrawMappedPatch(0, -y+fgheight, V_SNAPTOTOP, charfg, colormap);
} V_DrawFill(fgwidth, 0, vid.width, vid.height, V_SNAPTOTOP|colormap[106]);
for (i = -12; i < (BASEVIDHEIGHT/fgheight) + 12; i++)
{
INT32 oy = (i*fgheight), y;
y = oy - (fgheight + (charseltimer%fgheight));
V_DrawFixedPatch(0, y<<FRACBITS, FRACUNIT, 0, charfg, colormap);
}
// Character pictures // Character pictures
{ {