mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-17 18:21:10 +00:00
Minimum fill for temperature gauge if you have any wads loaded at all.
This commit is contained in:
parent
c2705b4662
commit
e2f6366292
1 changed files with 19 additions and 14 deletions
33
src/m_menu.c
33
src/m_menu.c
|
@ -4753,7 +4753,8 @@ static void M_DrawTemperature(INT32 x, fixed_t t)
|
||||||
t = 0;*/
|
t = 0;*/
|
||||||
|
|
||||||
// scale
|
// scale
|
||||||
t = (FixedMul(h<<FRACBITS, FRACUNIT - t)>>FRACBITS);
|
if (t > 1)
|
||||||
|
t = (FixedMul(h<<FRACBITS, t)>>FRACBITS);
|
||||||
|
|
||||||
// border
|
// border
|
||||||
V_DrawFill(x - 1, vpadding, 1, h, 3);
|
V_DrawFill(x - 1, vpadding, 1, h, 3);
|
||||||
|
@ -4762,17 +4763,19 @@ static void M_DrawTemperature(INT32 x, fixed_t t)
|
||||||
V_DrawFill(x - 1, vpadding+h, width+2, 1, 3);
|
V_DrawFill(x - 1, vpadding+h, width+2, 1, 3);
|
||||||
|
|
||||||
// bar itself
|
// bar itself
|
||||||
for (y = h; y > 0; y--)
|
y = h;
|
||||||
{
|
if (t)
|
||||||
UINT8 colours[NUMCOLOURS] = {42, 40, 58, 222, 65, 90, 97, 98};
|
for (t = h - t; y > 0; y--)
|
||||||
UINT8 c;
|
{
|
||||||
if (y <= t) break;
|
UINT8 colours[NUMCOLOURS] = {42, 40, 58, 222, 65, 90, 97, 98};
|
||||||
if (y+vpadding >= BASEVIDHEIGHT/2)
|
UINT8 c;
|
||||||
c = 113;
|
if (y <= t) break;
|
||||||
else
|
if (y+vpadding >= BASEVIDHEIGHT/2)
|
||||||
c = colours[(NUMCOLOURS*(y-1))/(h/2)];
|
c = 113;
|
||||||
V_DrawFill(x, y-1 + vpadding, width, 1, c);
|
else
|
||||||
}
|
c = colours[(NUMCOLOURS*(y-1))/(h/2)];
|
||||||
|
V_DrawFill(x, y-1 + vpadding, width, 1, c);
|
||||||
|
}
|
||||||
|
|
||||||
// fill the rest of the backing
|
// fill the rest of the backing
|
||||||
if (y)
|
if (y)
|
||||||
|
@ -4865,11 +4868,13 @@ static void M_DrawAddons(void)
|
||||||
? "\x85""Adding files mid-game may cause problems."
|
? "\x85""Adding files mid-game may cause problems."
|
||||||
: LOCATIONSTRING));
|
: LOCATIONSTRING));
|
||||||
|
|
||||||
if (numwadfiles >= MAX_WADFILES) // difficult to happen with current limits, but still worth thinking of
|
if (!numwadfiles)
|
||||||
|
y = 0;
|
||||||
|
else if (numwadfiles >= MAX_WADFILES) // difficult to happen with current limits, but still worth thinking of
|
||||||
y = FRACUNIT;
|
y = FRACUNIT;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
y = FixedDiv(((packetsizetally-mainwadstally)<<FRACBITS), (((MAXFILENEEDED*sizeof(UINT8)-mainwadstally)-(5+22))<<FRACBITS)); // 5+22 = (a.ext + checksum length) is minimum addition to packet size tally
|
y = FixedDiv(((packetsizetally-mainwadstally)<<FRACBITS), (((MAXFILENEEDED*sizeof(UINT8)-mainwadstally)-(5+22))<<FRACBITS)) + 1; // 5+22 = (a.ext + checksum length) is minimum addition to packet size tally
|
||||||
if (y > FRACUNIT) // happens because of how we're shrinkin' it a little
|
if (y > FRACUNIT) // happens because of how we're shrinkin' it a little
|
||||||
y = FRACUNIT;
|
y = FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue