mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
Make the temperature gauge for added WADs start at zero, not however much the mainwads provided.
Also, mainwads now accounts for music_new, and that's added via DEVELOP instead of something we might forget to remove later.
This commit is contained in:
parent
c7c88b7d99
commit
ba04e982b2
4 changed files with 16 additions and 5 deletions
|
@ -74,7 +74,7 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
|||
#include "m_cond.h" // condition initialization
|
||||
#include "fastcmp.h"
|
||||
#include "keys.h"
|
||||
#include "filesrch.h" // refreshdirmenu
|
||||
#include "filesrch.h" // mainwadstally
|
||||
|
||||
#ifdef CMAKECONFIG
|
||||
#include "config.h"
|
||||
|
@ -876,7 +876,7 @@ static void IdentifyVersion(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if 1 // This section can be deleted when music_new is merged with music.dta
|
||||
#ifdef DEVELOP // This section can be deleted when music_new is merged with music.dta
|
||||
{
|
||||
const char *musicfile = "music_new.dta";
|
||||
const char *musicpath = va(pandf,srb2waddir,musicfile);
|
||||
|
@ -1174,6 +1174,11 @@ void D_SRB2Main(void)
|
|||
#ifdef USE_PATCH_DTA
|
||||
++mainwads; // patch.dta adds one more
|
||||
#endif
|
||||
#ifdef DEVELOP
|
||||
++mainwads; // music_new, too
|
||||
#endif
|
||||
|
||||
mainwadstally = packetsizetally;
|
||||
|
||||
cht_Init();
|
||||
|
||||
|
|
|
@ -319,6 +319,7 @@ size_t dir_on[menudepth];
|
|||
UINT8 refreshdirmenu = 0;
|
||||
|
||||
size_t packetsizetally = 0;
|
||||
size_t mainwadstally = 0;
|
||||
|
||||
#if defined (_XBOX) && defined (_MSC_VER)
|
||||
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum,
|
||||
|
|
|
@ -37,6 +37,7 @@ extern size_t dir_on[menudepth];
|
|||
extern UINT8 refreshdirmenu;
|
||||
|
||||
extern size_t packetsizetally;
|
||||
extern size_t mainwadstally;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
10
src/m_menu.c
10
src/m_menu.c
|
@ -4599,10 +4599,14 @@ static void M_DrawAddons(void)
|
|||
if (refreshdirmenu & M_AddonsRefresh())
|
||||
return M_DrawMessageMenu();
|
||||
|
||||
x = FixedDiv((packetsizetally<<FRACBITS), ((MAXFILENEEDED*sizeof(UINT8)-(5+22))<<FRACBITS)); // 5+22 = (a.ext + checksum length) is minimum addition to packet size tally
|
||||
if ((x > FRACUNIT) // happens because of how we're shrinkin' it a little
|
||||
|| (numwadfiles >= MAX_WADFILES)) // difficult to happen with current limits, but still worth thinking of
|
||||
if (numwadfiles >= MAX_WADFILES) // difficult to happen with current limits, but still worth thinking of
|
||||
x = FRACUNIT;
|
||||
else
|
||||
{
|
||||
x = FixedDiv(((packetsizetally-mainwadstally)<<FRACBITS), (((MAXFILENEEDED*sizeof(UINT8)-mainwadstally)-(5+22))<<FRACBITS)); // 5+22 = (a.ext + checksum length) is minimum addition to packet size tally
|
||||
if (x > FRACUNIT) // happens because of how we're shrinkin' it a little
|
||||
x = FRACUNIT;
|
||||
}
|
||||
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH, BASEVIDHEIGHT-8, V_TRANSLUCENT, va("%d%%", (100*x)>>FRACBITS));
|
||||
M_DrawTemperature(BASEVIDWIDTH - 12, x);
|
||||
|
|
Loading…
Reference in a new issue