mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Various cleanup of status bar drawing code, remove some old commented out code.
git-svn-id: https://svn.eduke32.com/eduke32@3400 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a98ea13f1e
commit
e9bd1b7582
4 changed files with 29 additions and 50 deletions
|
@ -2227,7 +2227,7 @@ static int32_t swall[MAXXDIM], lwall[MAXXDIM+4];
|
|||
int32_t xdimen = -1, xdimenrecip, halfxdimen, xdimenscale, xdimscale;
|
||||
int32_t ydimen;
|
||||
static int32_t wx1, wy1, wx2, wy2;
|
||||
intptr_t /*viewoffset,*/ frameoffset;
|
||||
intptr_t frameoffset;
|
||||
|
||||
static int32_t nrx1[8], nry1[8], nrx2[8], nry2[8]; // JBF 20031206: Thanks Ken
|
||||
|
||||
|
@ -8606,7 +8606,6 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
|
|||
draw_rainbow_background();
|
||||
#endif
|
||||
|
||||
//frameoffset = frameplace + viewoffset;
|
||||
frameoffset = frameplace + windowy1*bytesperline + windowx1;
|
||||
|
||||
//if (smostwallcnt < 0)
|
||||
|
@ -13555,12 +13554,6 @@ void setview(int32_t x1, int32_t y1, int32_t x2, int32_t y2)
|
|||
for (i=windowx1; i<=windowx2; i++)
|
||||
{ startumost[i] = windowy1, startdmost[i] = windowy2+1; }
|
||||
for (i=windowx2+1; i<xdim; i++) { startumost[i] = 1, startdmost[i] = 0; }
|
||||
|
||||
/*
|
||||
begindrawing(); //{{{
|
||||
viewoffset = windowy1*bytesperline + windowx1;
|
||||
enddrawing(); //}}}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -795,13 +795,6 @@ nextdemo_nomenu:
|
|||
if (framewaiting)
|
||||
{
|
||||
framewaiting--;
|
||||
#if 0
|
||||
if (ud.statusbarmode == 1 && (ud.statusbarscale == 100 || getrendermode() == REND_CLASSIC))
|
||||
{
|
||||
ud.statusbarmode = 0;
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
#endif
|
||||
nextpage();
|
||||
}
|
||||
|
||||
|
|
|
@ -3171,18 +3171,6 @@ void G_DrawBackground(void)
|
|||
// draw in the bits to the left and right of the non-fullsize status bar
|
||||
if (ud.screen_size >= 8 && ud.statusbarmode == 0)
|
||||
{
|
||||
/*
|
||||
y1 = y2;
|
||||
x2 = (xdim - scale(xdim,ud.statusbarscale,100)) >> 1;
|
||||
x1 = xdim-x2;
|
||||
x1 -= x1%tilesizx[dapicnum];
|
||||
for (y=y1-y1%tilesizy[dapicnum]; y<y2; y+=tilesizy[dapicnum])
|
||||
for (x=0;x<x2 || x1+x<xdim; x+=tilesizx[dapicnum])
|
||||
{
|
||||
rotatesprite(x<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,0,y1,x2-1,ydim-1);
|
||||
rotatesprite((x+x1)<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,xdim-x2,y1,xdim-1,ydim-1);
|
||||
}
|
||||
*/
|
||||
// when not rendering a game, fullscreen wipe
|
||||
x2 = (xdim - sbarsc((int32_t)(ydim*1.333333333333333333f))) >> 1;
|
||||
for (y=y2-y2%tilesizy[dapicnum]; y<ydim; y+=tilesizy[dapicnum])
|
||||
|
@ -7559,10 +7547,12 @@ void G_HandleLocalKeys(void)
|
|||
if (BUTTON(gamefunc_Enlarge_Screen))
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_Enlarge_Screen);
|
||||
|
||||
if (!SHIFTS_IS_PRESSED)
|
||||
{
|
||||
if (ud.screen_size > 0)
|
||||
S_PlaySound(THUD);
|
||||
|
||||
if (getrendermode() >= REND_POLYMOST && ud.screen_size == 8 && ud.statusbarmode == 0)
|
||||
ud.statusbarmode = 1;
|
||||
else ud.screen_size -= 4;
|
||||
|
@ -7575,29 +7565,30 @@ void G_HandleLocalKeys(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
ud.statusbarscale += 4;
|
||||
G_SetStatusBarScale(ud.statusbarscale);
|
||||
G_SetStatusBarScale(ud.statusbarscale+4);
|
||||
}
|
||||
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
|
||||
if (BUTTON(gamefunc_Shrink_Screen))
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_Shrink_Screen);
|
||||
|
||||
if (!SHIFTS_IS_PRESSED)
|
||||
{
|
||||
if (ud.screen_size < 64) S_PlaySound(THUD);
|
||||
if (ud.screen_size < 64)
|
||||
S_PlaySound(THUD);
|
||||
|
||||
if (getrendermode() >= REND_POLYMOST && ud.screen_size == 8 && ud.statusbarmode == 1)
|
||||
ud.statusbarmode = 0;
|
||||
else ud.screen_size += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
ud.statusbarscale -= 4;
|
||||
if (ud.statusbarscale < 37)
|
||||
ud.statusbarscale = 37;
|
||||
G_SetStatusBarScale(ud.statusbarscale);
|
||||
G_SetStatusBarScale(max(ud.statusbarscale-4, 37));
|
||||
}
|
||||
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2986,21 +2986,26 @@ cheat_for_port_credits2:
|
|||
break;
|
||||
case 3:
|
||||
{
|
||||
int32_t i;
|
||||
i = ud.screen_size;
|
||||
const int32_t ossize = ud.screen_size;
|
||||
|
||||
barsm(d+8,yy+7, &ud.screen_size,-4,x==io,MENUHIGHLIGHT(io),0);
|
||||
if (getrendermode() >= REND_POLYMOST && i < ud.screen_size && i == 8 && ud.statusbarmode == 1)
|
||||
|
||||
// ud.screen_size 8 is the largest classic HUD
|
||||
if (getrendermode() >= REND_POLYMOST && ossize == 8)
|
||||
{
|
||||
ud.statusbarmode = 0;
|
||||
if (ud.statusbarscale != 100)
|
||||
ud.screen_size = i;
|
||||
}
|
||||
else if (getrendermode() >= REND_POLYMOST && i > ud.screen_size && i == 8 && ud.statusbarmode == 0)
|
||||
{
|
||||
if (ud.statusbarscale != 100)
|
||||
if (ud.screen_size > ossize && ud.statusbarmode == 1)
|
||||
{
|
||||
ud.statusbarmode = 1;
|
||||
ud.screen_size = i;
|
||||
ud.statusbarmode = 0;
|
||||
if (ud.statusbarscale != 100)
|
||||
ud.screen_size = ossize;
|
||||
}
|
||||
else if (ud.screen_size < ossize && ud.statusbarmode == 0)
|
||||
{
|
||||
if (ud.statusbarscale != 100)
|
||||
{
|
||||
ud.statusbarmode = 1;
|
||||
ud.screen_size = ossize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3011,10 +3016,7 @@ cheat_for_port_credits2:
|
|||
sbs = sbsl = ud.statusbarscale-37;
|
||||
barsm(d+8,yy+7, &sbs,4,x==io,MENUHIGHLIGHT(io),0);
|
||||
if (x == io && sbs != sbsl)
|
||||
{
|
||||
sbs += 37;
|
||||
G_SetStatusBarScale(sbs);
|
||||
}
|
||||
G_SetStatusBarScale(sbs+37);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
|
|
Loading…
Reference in a new issue