Merge branch 'everyone-gets-a-hud' into 'master'

Whitelist HUD graphic changes from isgamemodified

Some people like the italics, some don't, some are crazy and want to do their own thing. In any case changing HUD graphics doesn't do any harm to anyone.

This allows changing the following replacements to work without tripping isgamemodified:

* The Score/Time/Rings text and numbers, colon, period, and minus sign
* The console font
* The "tiny" console font used in a couple places
* The level title font

I also removed some stupid redundant code related to the above in the process, and renamed some of the patches related to score/time/rings because they had inconsistent prefixes.

See merge request !73
This commit is contained in:
Monster Iestyn 2017-03-19 14:55:53 -04:00
commit 2d878ff7f2
3 changed files with 31 additions and 33 deletions

View file

@ -198,21 +198,6 @@ void HU_LoadGraphics(void)
tny_font[i] = (patch_t *)W_CachePatchName(buffer, PU_HUDGFX);
}
// cache the level title font for entire game execution
lt_font[0] = (patch_t *)W_CachePatchName("LTFNT039", PU_HUDGFX); /// \note fake start hack
// Number support
lt_font[9] = (patch_t *)W_CachePatchName("LTFNT048", PU_HUDGFX);
lt_font[10] = (patch_t *)W_CachePatchName("LTFNT049", PU_HUDGFX);
lt_font[11] = (patch_t *)W_CachePatchName("LTFNT050", PU_HUDGFX);
lt_font[12] = (patch_t *)W_CachePatchName("LTFNT051", PU_HUDGFX);
lt_font[13] = (patch_t *)W_CachePatchName("LTFNT052", PU_HUDGFX);
lt_font[14] = (patch_t *)W_CachePatchName("LTFNT053", PU_HUDGFX);
lt_font[15] = (patch_t *)W_CachePatchName("LTFNT054", PU_HUDGFX);
lt_font[16] = (patch_t *)W_CachePatchName("LTFNT055", PU_HUDGFX);
lt_font[17] = (patch_t *)W_CachePatchName("LTFNT056", PU_HUDGFX);
lt_font[18] = (patch_t *)W_CachePatchName("LTFNT057", PU_HUDGFX);
j = LT_FONTSTART;
for (i = 0; i < LT_FONTSIZE; i++)
{

View file

@ -67,7 +67,7 @@ static patch_t *sborings;
static patch_t *sboover;
static patch_t *timeover;
static patch_t *stlivex;
static patch_t *rrings;
static patch_t *sboredrings;
static patch_t *getall; // Special Stage HUD
static patch_t *timeup; // Special Stage HUD
static patch_t *hunthoming[6];
@ -143,7 +143,7 @@ hudinfo_t hudinfo[NUMHUDITEMS] =
{ 16, 10}, // HUD_SCORE
{ 128, 10}, // HUD_SCORENUM
{ 17, 26}, // HUD_TIME
{ 16, 26}, // HUD_TIME
{ 136, 10}, // HUD_TIMESPLIT
{ 88, 26}, // HUD_MINUTES
{ 188, 10}, // HUD_MINUTESSPLIT
@ -251,16 +251,19 @@ void ST_LoadGraphics(void)
// but load them in R_AddSkins, that gets called
// first anyway
// cache the status bar overlay icons (fullscreen mode)
sborings = W_CachePatchName("SBORINGS", PU_HUDGFX);
sboscore = W_CachePatchName("SBOSCORE", PU_HUDGFX);
// Prefix "STT" is whitelisted (doesn't trigger ISGAMEMODIFIED), btw
sborings = W_CachePatchName("STTRINGS", PU_HUDGFX);
sboredrings = W_CachePatchName("STTRRING", PU_HUDGFX);
sboscore = W_CachePatchName("STTSCORE", PU_HUDGFX);
sbotime = W_CachePatchName("STTTIME", PU_HUDGFX); // Time logo
sbocolon = W_CachePatchName("STTCOLON", PU_HUDGFX); // Colon for time
sboperiod = W_CachePatchName("STTPERIO", PU_HUDGFX); // Period for time centiseconds
sboover = W_CachePatchName("SBOOVER", PU_HUDGFX);
timeover = W_CachePatchName("TIMEOVER", PU_HUDGFX);
stlivex = W_CachePatchName("STLIVEX", PU_HUDGFX);
livesback = W_CachePatchName("STLIVEBK", PU_HUDGFX);
rrings = W_CachePatchName("RRINGS", PU_HUDGFX);
sbotime = W_CachePatchName("SBOTIME", PU_HUDGFX); // Time logo
sbocolon = W_CachePatchName("SBOCOLON", PU_HUDGFX); // Colon for time
sboperiod = W_CachePatchName("SBOPERIO", PU_HUDGFX); // Period for time centiseconds
nrec_timer = W_CachePatchName("NGRTIMER", PU_HUDGFX); // Timer for NiGHTS
getall = W_CachePatchName("GETALL", PU_HUDGFX); // Special Stage HUD
timeup = W_CachePatchName("TIMEUP", PU_HUDGFX); // Special Stage HUD
@ -681,7 +684,7 @@ static inline void ST_drawRings(void)
{
INT32 ringnum = max(stplyr->rings, 0);
ST_DrawPatchFromHudWS(HUD_RINGS, ((stplyr->rings <= 0 && leveltime/5 & 1) ? rrings : sborings));
ST_DrawPatchFromHudWS(HUD_RINGS, ((stplyr->rings <= 0 && leveltime/5 & 1) ? sboredrings : sborings));
if (objectplacing)
ringnum = op_currentdoomednum;

View file

@ -1215,15 +1215,25 @@ int W_VerifyNMUSlumps(const char *filename)
// ENDOOM text and palette lumps
lumpchecklist_t NMUSlist[] =
{
{"D_", 2},
{"O_", 2},
{"DS", 2},
{"ENDOOM", 6},
{"PLAYPAL", 7},
{"COLORMAP", 8},
{"PAL", 3},
{"CLM", 3},
{"TRANS", 5},
{"D_", 2}, // MIDI music
{"O_", 2}, // Digital music
{"DS", 2}, // Sound effects
{"ENDOOM", 6}, // ENDOOM text lump
{"PLAYPAL", 7}, // Palette changes
{"PAL", 3}, // Palette changes
{"COLORMAP", 8}, // Colormap changes
{"CLM", 3}, // Colormap changes
{"TRANS", 5}, // Translucency map changes
{"LTFNT", 5}, // Level title font changes
{"TTL", 3}, // Act number changes
{"STCFN", 5}, // Console font changes
{"TNYFN", 5}, // Tiny console font changes
{"STT", 3}, // Acceptable HUD changes (Score Time Rings)
{"YB_", 3}, // Intermission graphics, goes with the above
{NULL, 0},
};
return W_VerifyFile(filename, NMUSlist, false);