Replace shortname functions with stubs, and some trivial caller replacements
This commit is contained in:
parent
7aae6775e6
commit
2ff383a248
17 changed files with 142 additions and 202 deletions
|
|
@ -299,7 +299,8 @@ void CON_SetupBackColormapEx(INT32 color, boolean prompt)
|
|||
{
|
||||
UINT16 i, palsum;
|
||||
UINT8 j, palindex;
|
||||
UINT8 *pal = W_CacheLumpName(GetPalette(), PU_CACHE);
|
||||
lumpnum_t lump = W_GetNumForName(GetPalette());
|
||||
UINT8 *pal = W_CacheLumpNum(lump, PU_CACHE);
|
||||
INT32 shift = 6;
|
||||
|
||||
if (color == INT32_MAX)
|
||||
|
|
@ -1758,12 +1759,12 @@ static void CON_DrawBackpic(void)
|
|||
|
||||
// Get the lumpnum for CONSBACK, STARTUP (Only during game startup) or fallback into MISSING.
|
||||
if (con_startup)
|
||||
piclump = W_CheckNumForName("STARTUP");
|
||||
piclump = W_CheckNumForLongName("STARTUP");
|
||||
else
|
||||
piclump = W_CheckNumForName("KARTKREW");
|
||||
piclump = W_CheckNumForLongName("KARTKREW");
|
||||
|
||||
if (piclump == LUMPERROR)
|
||||
piclump = W_GetNumForName("MISSING");
|
||||
piclump = W_GetNumForLongName("MISSING");
|
||||
|
||||
// Cache the patch.
|
||||
con_backpic = W_CachePatchNum(piclump, PU_PATCH);
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ static void D_RenderLevel(void)
|
|||
if (r_splitscreen == 2) // Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
{
|
||||
// V_DrawPatchFill, but for the fourth screen only
|
||||
patch_t *pat = static_cast<patch_t*>(W_CachePatchName("SRB2BACK", PU_CACHE));
|
||||
patch_t *pat = static_cast<patch_t*>(W_CachePatchLongName("SRB2BACK", PU_CACHE));
|
||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
|
||||
|
||||
|
|
@ -632,7 +632,7 @@ static bool D_Display(void)
|
|||
py = 4;
|
||||
else
|
||||
py = viewwindowy + 4;
|
||||
patch = static_cast<patch_t*>(W_CachePatchName("M_PAUSE", PU_PATCH));
|
||||
patch = static_cast<patch_t*>(W_CachePatchLongName("M_PAUSE", PU_PATCH));
|
||||
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - patch->width)/2, py, 0, patch);
|
||||
}
|
||||
|
||||
|
|
@ -786,9 +786,9 @@ void D_SRB2Loop(void)
|
|||
/* Smells like a hack... Don't fade Sonic's ass into the title screen. */
|
||||
if (gamestate != GS_TITLESCREEN)
|
||||
{
|
||||
static lumpnum_t gstartuplumpnum = W_CheckNumForName("STARTUP");
|
||||
static lumpnum_t gstartuplumpnum = W_CheckNumForLongName("STARTUP");
|
||||
if (gstartuplumpnum == LUMPERROR)
|
||||
gstartuplumpnum = W_GetNumForName("MISSING");
|
||||
gstartuplumpnum = W_GetNumForLongName("MISSING");
|
||||
V_DrawScaledPatch(0, 0, 0, W_CachePatchNum(gstartuplumpnum, PU_PATCH));
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -232,8 +232,8 @@ static void F_TitleBGScroll(INT32 scrollspeed)
|
|||
patch_t *pat, *pat2;
|
||||
INT32 anim2 = 0;
|
||||
|
||||
pat = W_CachePatchName("TITLEBG1", PU_CACHE);
|
||||
pat2 = W_CachePatchName("TITLEBG2", PU_CACHE);
|
||||
pat = W_CachePatchLongName("TITLEBG1", PU_CACHE);
|
||||
pat2 = W_CachePatchLongName("TITLEBG2", PU_CACHE);
|
||||
|
||||
w = (vid.width / vid.dupx)<<FRACBITS;
|
||||
|
||||
|
|
@ -335,13 +335,13 @@ static void F_IntroDrawScene(void)
|
|||
// DRAW A FULL PIC INSTEAD OF FLAT!
|
||||
if (intro_scenenum == 0)
|
||||
{
|
||||
background = W_CachePatchName("KARTKREW", PU_CACHE);
|
||||
background = W_CachePatchLongName("KARTKREW", PU_CACHE);
|
||||
highres = true;
|
||||
}
|
||||
|
||||
if (intro_scenenum == 1)
|
||||
{
|
||||
background = W_CachePatchName("BLANKART", PU_CACHE);
|
||||
background = W_CachePatchLongName("BLANKART", PU_CACHE);
|
||||
highres = false;
|
||||
}
|
||||
|
||||
|
|
@ -751,10 +751,10 @@ void F_CreditDrawer(void)
|
|||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
// Draw background
|
||||
V_DrawSciencePatch(0, 0 - FixedMul(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE)), V_SNAPTOTOP, W_CachePatchName("CREDTILE", PU_CACHE), FRACUNIT);
|
||||
V_DrawSciencePatch(0, 0 - FixedMul(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE)), V_SNAPTOTOP, W_CachePatchLongName("CREDTILE", PU_CACHE), FRACUNIT);
|
||||
|
||||
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP, W_CachePatchName("CREDZIGZ", PU_CACHE), FRACUNIT);
|
||||
V_DrawSciencePatch(320<<FRACBITS, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP|V_FLIP, W_CachePatchName("CREDZIGZ", PU_CACHE), FRACUNIT);
|
||||
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP, W_CachePatchLongName("CREDZIGZ", PU_CACHE), FRACUNIT);
|
||||
V_DrawSciencePatch(320<<FRACBITS, 0 - FixedMul(40<<FRACBITS, FixedDiv(credbgtimer%(TICRATE/2), (TICRATE/2))), V_SNAPTOTOP|V_FLIP, W_CachePatchLongName("CREDZIGZ", PU_CACHE), FRACUNIT);
|
||||
|
||||
// Draw pictures
|
||||
for (i = 0; credits_pics[i].patch; i++)
|
||||
|
|
@ -997,7 +997,7 @@ void F_BlanCreditDrawer(void)
|
|||
fixed_t yscroll = FixedMul(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE));
|
||||
|
||||
V_DrawFill(-100,-100,vid.width, vid.height,81);
|
||||
V_DrawSciencePatch(0, 0 - yscroll, V_SNAPTOTOP, W_CachePatchName("CREDTILE", PU_CACHE), FRACUNIT);
|
||||
V_DrawSciencePatch(0, 0 - yscroll, V_SNAPTOTOP, W_CachePatchLongName("CREDTILE", PU_CACHE), FRACUNIT);
|
||||
V_DrawFillConsoleMap(-100,-100,vid.width, vid.height,0);
|
||||
|
||||
// Draw credits text on top
|
||||
|
|
@ -1256,10 +1256,10 @@ static void F_CacheTitleScreen(void)
|
|||
break;
|
||||
|
||||
case TTMODE_KART:
|
||||
ttbanner = W_CachePatchName("TTKBANNR", PU_PATCH_LOWPRIORITY);
|
||||
ttkart = W_CachePatchName("TTKART", PU_PATCH_LOWPRIORITY);
|
||||
ttcheckers = W_CachePatchName("TTCHECK", PU_PATCH_LOWPRIORITY);
|
||||
ttkflash = W_CachePatchName("TTKFLASH", PU_PATCH_LOWPRIORITY);
|
||||
ttbanner = W_CachePatchLongName("TTKBANNR", PU_PATCH_LOWPRIORITY);
|
||||
ttkart = W_CachePatchLongName("TTKART", PU_PATCH_LOWPRIORITY);
|
||||
ttcheckers = W_CachePatchLongName("TTCHECK", PU_PATCH_LOWPRIORITY);
|
||||
ttkflash = W_CachePatchLongName("TTKFLASH", PU_PATCH_LOWPRIORITY);
|
||||
break;
|
||||
|
||||
case TTMODE_USER:
|
||||
|
|
@ -1582,7 +1582,7 @@ void F_TitleScreenTicker(boolean run)
|
|||
{
|
||||
lumpnum_t l = LUMPERROR;
|
||||
numstaff = 0;
|
||||
while (numstaff < 99 && (l = W_CheckNumForName(va("TDEMO%03u", numstaff))) != LUMPERROR)
|
||||
while (numstaff < 99 && (l = W_CheckNumForLongName(va("TDEMO%03u", numstaff))) != LUMPERROR)
|
||||
numstaff++;
|
||||
|
||||
if (numstaff)
|
||||
|
|
|
|||
|
|
@ -1210,7 +1210,7 @@ void HWR_InitLight(void)
|
|||
lspr[i].dynamic_sqrradius = lspr[i].dynamic_radius*lspr[i].dynamic_radius;
|
||||
|
||||
lightmappatch.mipmap->downloaded = false;
|
||||
coronalumpnum = W_CheckNumForName("CORONA");
|
||||
coronalumpnum = W_CheckNumForLongName("CORONA");
|
||||
}
|
||||
|
||||
// -----------------+
|
||||
|
|
|
|||
|
|
@ -3181,7 +3181,7 @@ static void HWR_DrawDropShadow(mobj_t *thing, fixed_t scale)
|
|||
if (!shadowpatch || !shadowpatch->hardware)
|
||||
{
|
||||
CONS_Debug(DBG_RENDER, "remaking shadowsprite\n");
|
||||
shadowpatch = (patch_t *)W_CachePatchName("DSHADOW", PU_SPRITE);
|
||||
shadowpatch = (patch_t *)W_CachePatchLongName("DSHADOW", PU_SPRITE);
|
||||
}
|
||||
|
||||
gpatch = shadowpatch;
|
||||
|
|
@ -5986,7 +5986,7 @@ void HWR_RenderPlayerView(void)
|
|||
if (r_splitscreen == 2 && player == &players[displayplayers[2]]) // No black void please.
|
||||
{
|
||||
// V_DrawPatchFill, but for the fourth screen only
|
||||
patch_t *gpatch = W_CachePatchName("SRB2BACK", PU_CACHE);
|
||||
patch_t *gpatch = W_CachePatchLongName("SRB2BACK", PU_CACHE);
|
||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||
INT32 x, y, pw = SHORT(gpatch->width) * dupz, ph = SHORT(gpatch->height) * dupz;
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ void HU_Init(void)
|
|||
// only allocate if not present, to save us a lot of headache
|
||||
if (missingpat == NULL)
|
||||
{
|
||||
lumpnum_t missingnum = W_GetNumForName("MISSING");
|
||||
lumpnum_t missingnum = W_GetNumForLongName("MISSING");
|
||||
if (missingnum == LUMPERROR)
|
||||
I_Error("HU_LoadGraphics: \"MISSING\" patch not present in resource files.");
|
||||
|
||||
|
|
|
|||
|
|
@ -1577,7 +1577,7 @@ void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, UI
|
|||
|
||||
V_DrawRightAlignedString(workx, worky, splitflags|V_6WIDTHSPACE, targettext);
|
||||
workx -= 67;
|
||||
V_DrawSmallScaledPatch(workx + 4, worky, splitflags, W_CachePatchName("NEEDIT", PU_CACHE));
|
||||
V_DrawSmallScaledPatch(workx + 4, worky, splitflags, W_CachePatchLongName("NEEDIT", PU_CACHE));
|
||||
|
||||
break;
|
||||
|
||||
|
|
@ -2605,7 +2605,7 @@ static void K_drawKartBumpersOrKarma(void)
|
|||
{
|
||||
if (itembreaker)
|
||||
{
|
||||
patch_t *item = W_CachePatchName("RNDMA0", PU_PATCH);
|
||||
patch_t *item = W_CachePatchLongName("RNDMA0", PU_PATCH);
|
||||
UINT8 *itemcolormap = R_GetTranslationColormap(TC_BLINK, SKINCOLOR_BLACK, GTC_CACHE);
|
||||
|
||||
if (!K_UseColorHud())
|
||||
|
|
@ -4929,8 +4929,8 @@ void K_drawKartHUD(void)
|
|||
snapflags = 0;
|
||||
}
|
||||
|
||||
V_DrawTinyScaledPatch(x-54, y, snapflags|V_SLIDEIN, W_CachePatchName("TTKBANNR", PU_CACHE));
|
||||
V_DrawTinyScaledPatch(x-54, y+25, snapflags|V_SLIDEIN, W_CachePatchName("TTKART", PU_CACHE));
|
||||
V_DrawTinyScaledPatch(x-54, y, snapflags|V_SLIDEIN, W_CachePatchLongName("TTKBANNR", PU_CACHE));
|
||||
V_DrawTinyScaledPatch(x-54, y+25, snapflags|V_SLIDEIN, W_CachePatchLongName("TTKART", PU_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
116
src/m_menu.c
116
src/m_menu.c
|
|
@ -2208,7 +2208,7 @@ static void M_DrawMapEmblems(INT32 mapnum, INT32 x, INT32 y)
|
|||
V_DrawSmallMappedPatch(x, y, 0, W_CachePatchName(M_GetEmblemPatch(emblem, false), PU_CACHE),
|
||||
R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_MENUCACHE));
|
||||
else
|
||||
V_DrawSmallScaledPatch(x, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
|
||||
V_DrawSmallScaledPatch(x, y, 0, W_CachePatchLongName("NEEDIT", PU_CACHE));
|
||||
|
||||
emblem = M_GetLevelEmblems(-1);
|
||||
x -= 8;
|
||||
|
|
@ -2252,7 +2252,7 @@ static void M_DrawMenuTitle(void)
|
|||
static void M_DrawSliderCursor(INT16 x, INT16 y, INT32 vflags, consvar_t *cv, INT32 value)
|
||||
{
|
||||
fixed_t range = FixedDiv(value - cv->PossibleValue[0].value, cv->PossibleValue[1].value - cv->PossibleValue[0].value);
|
||||
V_DrawFixedPatch((x - 4)*FRACUNIT + (SLIDER_RANGE+4)*range, y*FRACUNIT, FRACUNIT, vflags, W_CachePatchName("M_SLIDEC", PU_CACHE), NULL);
|
||||
V_DrawFixedPatch((x - 4)*FRACUNIT + (SLIDER_RANGE+4)*range, y*FRACUNIT, FRACUNIT, vflags, W_CachePatchLongName("M_SLIDEC", PU_CACHE), NULL);
|
||||
}
|
||||
|
||||
static void M_DrawRightString(menuitem_t *item, INT16 x, INT16 y, INT32 vflags, boolean selected)
|
||||
|
|
@ -2297,14 +2297,14 @@ static void M_DrawRightString(menuitem_t *item, INT16 x, INT16 y, INT32 vflags,
|
|||
if (atoi(cv->defaultvalue) != cv->value)
|
||||
M_DrawSliderCursor(x, y, vflags, cv, atoi(cv->defaultvalue));
|
||||
|
||||
p = W_CachePatchName("M_SLIDEL", PU_CACHE);
|
||||
p = W_CachePatchLongName("M_SLIDEL", PU_CACHE);
|
||||
V_DrawScaledPatch(x - 8, y, vflags, p);
|
||||
|
||||
p = W_CachePatchName("M_SLIDEM", PU_CACHE);
|
||||
p = W_CachePatchLongName("M_SLIDEM", PU_CACHE);
|
||||
for (i = 0; i < SLIDER_RANGE; i += 8)
|
||||
V_DrawScaledPatch (x + i, y, vflags, p);
|
||||
|
||||
p = W_CachePatchName("M_SLIDER", PU_CACHE);
|
||||
p = W_CachePatchLongName("M_SLIDER", PU_CACHE);
|
||||
V_DrawScaledPatch(x + i, y, vflags, p);
|
||||
|
||||
M_DrawSliderCursor(x, y, vflags, cv, cv->value);
|
||||
|
|
@ -2414,7 +2414,7 @@ static void M_DrawRightString(menuitem_t *item, INT16 x, INT16 y, INT32 vflags,
|
|||
vflags &= ~(V_FLIP|V_PARAMMASK);
|
||||
const tic_t freq = TICRATE/2;
|
||||
if ((leveltime % freq) >= freq/2)
|
||||
V_DrawScaledPatch(204, y - 1, vflags, W_CachePatchName("K_REQUE2", PU_CACHE));
|
||||
V_DrawScaledPatch(204, y - 1, vflags, W_CachePatchLongName("K_REQUE2", PU_CACHE));
|
||||
}
|
||||
else if (item->patch)
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH - x, y, (selected || (item->status & ITH_MASK) == ITH_HIGHLIGHT ? highlightflags : 0)|vflags, item->patch);
|
||||
|
|
@ -2671,7 +2671,7 @@ void MD_DrawGenericMenu(void)
|
|||
|
||||
// DRAW THE SKULL CURSOR
|
||||
if (M_ItemSelectable(¤tMenu->menuitems[itemOn]))
|
||||
V_DrawScaledPatch(cursorx, cursory, 0, W_CachePatchName("M_CURSOR", PU_CACHE));
|
||||
V_DrawScaledPatch(cursorx, cursory, 0, W_CachePatchLongName("M_CURSOR", PU_CACHE));
|
||||
|
||||
x = currentMenu->x - 20 + currentMenu->cursoroffset;
|
||||
if (cliptop)
|
||||
|
|
@ -3174,23 +3174,23 @@ INT32 MR_Addons(INT32 choice)
|
|||
W_UnlockCachedPatch(addonsp[i]);
|
||||
}
|
||||
|
||||
addonsp[EXT_FOLDER] = W_CachePatchName("M_FFLDR", PU_STATIC);
|
||||
addonsp[EXT_UP] = W_CachePatchName("M_FBACK", PU_STATIC);
|
||||
addonsp[EXT_NORESULTS] = W_CachePatchName("M_FNOPE", PU_STATIC);
|
||||
addonsp[EXT_TXT] = W_CachePatchName("M_FTXT", PU_STATIC);
|
||||
addonsp[EXT_CFG] = W_CachePatchName("M_FCFG", PU_STATIC);
|
||||
addonsp[EXT_WAD] = W_CachePatchName("M_FWAD", PU_STATIC);
|
||||
addonsp[EXT_FOLDER] = W_CachePatchLongName("M_FFLDR", PU_STATIC);
|
||||
addonsp[EXT_UP] = W_CachePatchLongName("M_FBACK", PU_STATIC);
|
||||
addonsp[EXT_NORESULTS] = W_CachePatchLongName("M_FNOPE", PU_STATIC);
|
||||
addonsp[EXT_TXT] = W_CachePatchLongName("M_FTXT", PU_STATIC);
|
||||
addonsp[EXT_CFG] = W_CachePatchLongName("M_FCFG", PU_STATIC);
|
||||
addonsp[EXT_WAD] = W_CachePatchLongName("M_FWAD", PU_STATIC);
|
||||
#ifdef USE_KART
|
||||
addonsp[EXT_KART] = W_CachePatchName("M_FKART", PU_STATIC);
|
||||
addonsp[EXT_KART] = W_CachePatchLongName("M_FKART", PU_STATIC);
|
||||
#endif
|
||||
addonsp[EXT_PK3] = W_CachePatchName("M_FPK3", PU_STATIC);
|
||||
addonsp[EXT_SOC] = W_CachePatchName("M_FSOC", PU_STATIC);
|
||||
addonsp[EXT_LUA] = W_CachePatchName("M_FLUA", PU_STATIC);
|
||||
addonsp[NUM_EXT] = W_CachePatchName("M_FUNKN", PU_STATIC);
|
||||
addonsp[NUM_EXT+1] = W_CachePatchName("M_FSEL", PU_STATIC);
|
||||
addonsp[NUM_EXT+2] = W_CachePatchName("M_FLOAD", PU_STATIC);
|
||||
addonsp[NUM_EXT+3] = W_CachePatchName("M_FSRCH", PU_STATIC);
|
||||
addonsp[NUM_EXT+4] = W_CachePatchName("M_FSAVE", PU_STATIC);
|
||||
addonsp[EXT_PK3] = W_CachePatchLongName("M_FPK3", PU_STATIC);
|
||||
addonsp[EXT_SOC] = W_CachePatchLongName("M_FSOC", PU_STATIC);
|
||||
addonsp[EXT_LUA] = W_CachePatchLongName("M_FLUA", PU_STATIC);
|
||||
addonsp[NUM_EXT] = W_CachePatchLongName("M_FUNKN", PU_STATIC);
|
||||
addonsp[NUM_EXT+1] = W_CachePatchLongName("M_FSEL", PU_STATIC);
|
||||
addonsp[NUM_EXT+2] = W_CachePatchLongName("M_FLOAD", PU_STATIC);
|
||||
addonsp[NUM_EXT+3] = W_CachePatchLongName("M_FSRCH", PU_STATIC);
|
||||
addonsp[NUM_EXT+4] = W_CachePatchLongName("M_FSAVE", PU_STATIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -3885,7 +3885,7 @@ static void DrawReplayHutReplayInfo(void)
|
|||
{
|
||||
static angle_t rubyfloattime = 0;
|
||||
const fixed_t rubyheight = FINESINE(rubyfloattime>>ANGLETOFINESHIFT);
|
||||
V_DrawFixedPatch((x+(w>>2))<<FRACBITS, ((y+(h>>2))<<FRACBITS) - (rubyheight<<1), FRACUNIT, V_SNAPTOTOP, W_CachePatchName("RUBYICON", PU_CACHE), NULL);
|
||||
V_DrawFixedPatch((x+(w>>2))<<FRACBITS, ((y+(h>>2))<<FRACBITS) - (rubyheight<<1), FRACUNIT, V_SNAPTOTOP, W_CachePatchLongName("RUBYICON", PU_CACHE), NULL);
|
||||
rubyfloattime += FixedMul(ANGLE_MAX/NEWTICRATE, renderdeltatics);
|
||||
}
|
||||
}
|
||||
|
|
@ -3946,7 +3946,7 @@ static void DrawReplayHutReplayInfo(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
patch = W_CachePatchName("M_NOWANT", PU_CACHE);
|
||||
patch = W_CachePatchLongName("M_NOWANT", PU_CACHE);
|
||||
colormap = R_GetTranslationColormap(
|
||||
TC_RAINBOW,
|
||||
demolist[dir_on[menudepthleft]].standings[0].color,
|
||||
|
|
@ -4008,7 +4008,7 @@ void MD_DrawReplayHut(void)
|
|||
if (demolist[i].type == MD_SUBDIR)
|
||||
{
|
||||
localx += 8;
|
||||
V_DrawScaledPatch(x - 4, localy, V_SNAPTOTOP|V_SNAPTOLEFT, W_CachePatchName(dirmenu[i][DIR_TYPE] == EXT_UP ? "M_RBACK" : "M_RFLDR", PU_CACHE));
|
||||
V_DrawScaledPatch(x - 4, localy, V_SNAPTOTOP|V_SNAPTOLEFT, W_CachePatchLongName(dirmenu[i][DIR_TYPE] == EXT_UP ? "M_RBACK" : "M_RFLDR", PU_CACHE));
|
||||
}
|
||||
|
||||
if (i == (INT16)dir_on[menudepthleft])
|
||||
|
|
@ -4054,7 +4054,7 @@ void MD_DrawReplayHut(void)
|
|||
|
||||
// Draw the cursor
|
||||
V_DrawScaledPatch(currentMenu->x - 24, cursory, V_SNAPTOTOP|V_SNAPTOLEFT,
|
||||
W_CachePatchName("M_CURSOR", PU_CACHE));
|
||||
W_CachePatchLongName("M_CURSOR", PU_CACHE));
|
||||
|
||||
// Now draw some replay info!
|
||||
V_DrawFill(10, 10, 300, 60, V_SNAPTOTOP|159);
|
||||
|
|
@ -4105,7 +4105,7 @@ void MD_DrawReplayStartMenu(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
patch = W_CachePatchName("M_NORANK", PU_CACHE);
|
||||
patch = W_CachePatchLongName("M_NORANK", PU_CACHE);
|
||||
colormap = R_GetTranslationColormap(
|
||||
TC_RAINBOW,
|
||||
demolist[dir_on[menudepthleft]].standings[i].color,
|
||||
|
|
@ -4288,14 +4288,14 @@ void MD_DrawPlaybackMenu(void)
|
|||
else if (currentMenu->menuitems[i].patch && W_CheckNumForName(currentMenu->menuitems[i].patch) != LUMPERROR)
|
||||
icon = W_CachePatchName(currentMenu->menuitems[i].patch, PU_CACHE);
|
||||
else
|
||||
icon = W_CachePatchName("PLAYRANK", PU_CACHE); // temp
|
||||
icon = W_CachePatchLongName("PLAYRANK", PU_CACHE); // temp
|
||||
}
|
||||
else if (currentMenu->menuitems[i].status & IT_HIDDEN)
|
||||
continue;
|
||||
else if (currentMenu->menuitems[i].patch && W_CheckNumForName(currentMenu->menuitems[i].patch) != LUMPERROR)
|
||||
icon = W_CachePatchName(currentMenu->menuitems[i].patch, PU_CACHE);
|
||||
else
|
||||
icon = W_CachePatchName("PLAYRANK", PU_CACHE); // temp
|
||||
icon = W_CachePatchLongName("PLAYRANK", PU_CACHE); // temp
|
||||
|
||||
if ((i == M_GetMenuIndex(MN_PLAYBACK, "FASTFORWARD") && cv_playbackspeed.value > 1) || (i == M_GetMenuIndex(MN_PLAYBACK, "REWIND") && demo.rewinding))
|
||||
V_DrawMappedPatch(currentMenu->x + currentMenu->menuitems[i].x, currentMenu->y, transmap|V_SNAPTOTOP, icon, R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_JAWZ, GTC_MENUCACHE));
|
||||
|
|
@ -5234,7 +5234,7 @@ static void M_DrawStatsMaps(void)
|
|||
V_DrawRightAlignedString(BASEVIDWIDTH-16, 50, MENUCAPS|recommendedflags, "(complete)");
|
||||
|
||||
V_DrawString(32, 50, 0, va("x %d/%d", M_CountEmblems(), numemblems+numextraemblems));
|
||||
V_DrawSmallScaledPatch(20, 50, 0, W_CachePatchName("GOTITA", PU_STATIC));
|
||||
V_DrawSmallScaledPatch(20, 50, 0, W_CachePatchLongName("GOTITA", PU_STATIC));
|
||||
|
||||
if (location)
|
||||
V_DrawCharacter(10, y-(skullAnimCounter/5),
|
||||
|
|
@ -5308,7 +5308,7 @@ static void M_DrawStatsMaps(void)
|
|||
V_DrawSmallMappedPatch(295, y, 0, W_CachePatchName(M_GetExtraEmblemPatch(exemblem, false), PU_CACHE),
|
||||
R_GetTranslationColormap(TC_DEFAULT, M_GetExtraEmblemColor(exemblem), GTC_MENUCACHE));
|
||||
else
|
||||
V_DrawSmallScaledPatch(295, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
|
||||
V_DrawSmallScaledPatch(295, y, 0, W_CachePatchLongName("NEEDIT", PU_CACHE));
|
||||
|
||||
V_DrawString(20, y, 0, va("%s", exemblem->description));
|
||||
}
|
||||
|
|
@ -6427,7 +6427,7 @@ static void M_DrawLevelSelectOnly(INT16 y, boolean selected, boolean leftfade, b
|
|||
{
|
||||
static angle_t rubyfloattime = 0;
|
||||
const fixed_t rubyheight = FINESINE(rubyfloattime>>ANGLETOFINESHIFT);
|
||||
V_DrawFixedPatch((x+w/2)<<FRACBITS, ((y+i/2)<<FRACBITS) - (rubyheight<<1), FRACUNIT, 0, W_CachePatchName("RUBYICON", PU_CACHE), NULL);
|
||||
V_DrawFixedPatch((x+w/2)<<FRACBITS, ((y+i/2)<<FRACBITS) - (rubyheight<<1), FRACUNIT, 0, W_CachePatchLongName("RUBYICON", PU_CACHE), NULL);
|
||||
rubyfloattime += FixedMul(ANGLE_MAX/NEWTICRATE, renderdeltatics);
|
||||
}
|
||||
}
|
||||
|
|
@ -6563,7 +6563,7 @@ void MD_DrawMPMainMenu(void)
|
|||
cursorframe += renderdeltatics / 4;
|
||||
for (; cursorframe > 7 * FRACUNIT; cursorframe -= 7 * FRACUNIT) {}
|
||||
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, 0, W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE), NULL);
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, 0, W_CachePatchLongName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE), NULL);
|
||||
}
|
||||
|
||||
x += incrwidth;
|
||||
|
|
@ -6633,7 +6633,7 @@ void MD_DrawSetupMultiPlayerMenu(void)
|
|||
INT32 mx, my, st, flags = 0;
|
||||
spritedef_t *sprdef;
|
||||
spriteframe_t *sprframe;
|
||||
patch_t *statdot = W_CachePatchName("K_SDOT0", PU_CACHE);
|
||||
patch_t *statdot = W_CachePatchLongName("K_SDOT0", PU_CACHE);
|
||||
patch_t *patch;
|
||||
UINT8 frame;
|
||||
UINT8 speed;
|
||||
|
|
@ -6663,13 +6663,13 @@ void MD_DrawSetupMultiPlayerMenu(void)
|
|||
speed = skins[cv_chooseskin.value].kartspeed;
|
||||
weight = skins[cv_chooseskin.value].kartweight;
|
||||
|
||||
statdot = W_CachePatchName("K_SDOT1", PU_CACHE);
|
||||
statdot = W_CachePatchLongName("K_SDOT1", PU_CACHE);
|
||||
if (skullAnimCounter < 4) // SRB2Kart: we draw this dot later so that it's not covered if there's multiple skins with the same stats
|
||||
V_DrawFixedPatch(((BASEVIDWIDTH - mx - 80) + ((speed-1)*8))<<FRACBITS, ((my+76) + ((weight-1)*8))<<FRACBITS, FRACUNIT, 0, statdot, flashcol);
|
||||
else
|
||||
V_DrawFixedPatch(((BASEVIDWIDTH - mx - 80) + ((speed-1)*8))<<FRACBITS, ((my+76) + ((weight-1)*8))<<FRACBITS, FRACUNIT, 0, statdot, NULL);
|
||||
|
||||
statdot = W_CachePatchName("K_SDOT2", PU_CACHE); // coloured center
|
||||
statdot = W_CachePatchLongName("K_SDOT2", PU_CACHE); // coloured center
|
||||
V_DrawFixedPatch(((BASEVIDWIDTH - mx - 80) + ((speed-1)*8))<<FRACBITS, ((my+76) + ((weight-1)*8))<<FRACBITS, FRACUNIT, 0, statdot, R_GetTranslationColormap(0, cv_dummycolor.value, GTC_MENUCACHE));
|
||||
|
||||
// 2.2 color bar backported with permission
|
||||
|
|
@ -6734,7 +6734,7 @@ void MD_DrawSetupMultiPlayerMenu(void)
|
|||
cursorframe += renderdeltatics / 4;
|
||||
for (; cursorframe > 7 * FRACUNIT; cursorframe -= 7 * FRACUNIT) {}
|
||||
|
||||
cursor = W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE);
|
||||
cursor = W_CachePatchLongName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE);
|
||||
|
||||
if (col < 0)
|
||||
col += numskins;
|
||||
|
|
@ -7617,7 +7617,7 @@ void MD_DrawVideoMode(void)
|
|||
j = menudefs[MN_OP_VIDEOMODE].y + 14 + ((vidm_selected % vidm_column_size)*8);
|
||||
|
||||
V_DrawScaledPatch(i - 8, j, 0,
|
||||
W_CachePatchName("M_CURSOR", PU_CACHE));
|
||||
W_CachePatchLongName("M_CURSOR", PU_CACHE));
|
||||
}
|
||||
|
||||
// special menuitem key handler for video mode list
|
||||
|
|
@ -7760,14 +7760,14 @@ void MD_DrawMonitorToggles(void)
|
|||
#ifdef ITEMTOGGLEBOTTOMRIGHT
|
||||
if (currentMenu->menuitems[thisitem].argument == 255)
|
||||
{
|
||||
V_DrawScaledPatch(x, y, V_TRANSLUCENT, W_CachePatchName("K_ISBG", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, V_TRANSLUCENT, W_CachePatchLongName("K_ISBG", PU_CACHE));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (currentMenu->menuitems[thisitem].argument == 0)
|
||||
{
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISTOGL", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchLongName("K_ISBG", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchLongName("K_ISTOGL", PU_CACHE));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -7797,13 +7797,13 @@ void MD_DrawMonitorToggles(void)
|
|||
}
|
||||
|
||||
if (cv->value)
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchLongName("K_ISBG", PU_CACHE));
|
||||
else
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBGD", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchLongName("K_ISBGD", PU_CACHE));
|
||||
|
||||
if (drawnum != 0)
|
||||
{
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISMUL", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, 0, W_CachePatchLongName("K_ISMUL", PU_CACHE));
|
||||
V_DrawScaledPatch(x, y, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].argument, true), PU_CACHE));
|
||||
V_DrawString(x+24, y+31, V_ALLOWLOWERCASE|translucent, va("x%d", drawnum));
|
||||
}
|
||||
|
|
@ -7821,7 +7821,7 @@ void MD_DrawMonitorToggles(void)
|
|||
#ifdef ITEMTOGGLEBOTTOMRIGHT
|
||||
if (currentMenu->menuitems[itemOn].argument == 255)
|
||||
{
|
||||
V_DrawScaledPatch(onx-1, ony-2, V_TRANSLUCENT, W_CachePatchName("K_ITBG", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, V_TRANSLUCENT, W_CachePatchLongName("K_ITBG", PU_CACHE));
|
||||
if (shitsfree)
|
||||
{
|
||||
INT32 trans = V_TRANSLUCENT;
|
||||
|
|
@ -7829,15 +7829,15 @@ void MD_DrawMonitorToggles(void)
|
|||
trans = ((10-TICRATE)+shitsfree-1)<<V_ALPHASHIFT;
|
||||
else if (shitsfree < 5)
|
||||
trans = (10-shitsfree)<<V_ALPHASHIFT;
|
||||
V_DrawScaledPatch(onx-1, ony-2, trans, W_CachePatchName("K_ITFREE", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, trans, W_CachePatchLongName("K_ITFREE", PU_CACHE));
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (currentMenu->menuitems[itemOn].argument == 0)
|
||||
{
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBG", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITTOGL", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchLongName("K_ITBG", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchLongName("K_ITTOGL", PU_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -7855,15 +7855,15 @@ void MD_DrawMonitorToggles(void)
|
|||
}
|
||||
|
||||
if (cv->value)
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBG", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchLongName("K_ITBG", PU_CACHE));
|
||||
else
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBGD", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchLongName("K_ITBGD", PU_CACHE));
|
||||
|
||||
if (drawnum != 0)
|
||||
{
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITMUL", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchLongName("K_ITMUL", PU_CACHE));
|
||||
V_DrawScaledPatch(onx-1, ony-2, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[itemOn].argument, false), PU_CACHE));
|
||||
V_DrawScaledPatch(onx+27, ony+39, translucent, W_CachePatchName("K_ITX", PU_CACHE));
|
||||
V_DrawScaledPatch(onx+27, ony+39, translucent, W_CachePatchLongName("K_ITX", PU_CACHE));
|
||||
V_DrawKartString(onx+37, ony+34, translucent, va("%d", drawnum));
|
||||
}
|
||||
else
|
||||
|
|
@ -8353,7 +8353,7 @@ void M_QuitResponse(INT32 ch)
|
|||
while (ptime > I_GetTime())
|
||||
{
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
V_DrawSmallScaledPatch(0, 0, 0, W_CachePatchName("GAMEQUIT", PU_CACHE)); // Demo 3 Quit Screen Tails 06-16-2001
|
||||
V_DrawSmallScaledPatch(0, 0, 0, W_CachePatchLongName("GAMEQUIT", PU_CACHE)); // Demo 3 Quit Screen Tails 06-16-2001
|
||||
I_FinishUpdate(); // Update the screen with the image Tails 06-19-2001
|
||||
I_Sleep(cv_sleep.value);
|
||||
I_UpdateTime(cv_timescale.value);
|
||||
|
|
@ -8428,12 +8428,12 @@ static void M_DrawSticker(INT32 x, INT32 y, INT32 width, INT32 flags, boolean is
|
|||
|
||||
if (isSmall == true)
|
||||
{
|
||||
stickerEnd = W_CachePatchName("K_STIKE2", PU_CACHE);
|
||||
stickerEnd = W_CachePatchLongName("K_STIKE2", PU_CACHE);
|
||||
height = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
stickerEnd = W_CachePatchName("K_STIKEN", PU_CACHE);
|
||||
stickerEnd = W_CachePatchLongName("K_STIKEN", PU_CACHE);
|
||||
height = 11;
|
||||
}
|
||||
|
||||
|
|
@ -8460,12 +8460,12 @@ void MD_DrawDiscordRequests(void)
|
|||
if (confirmAccept == true)
|
||||
{
|
||||
colormap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_GREEN, GTC_MENUCACHE);
|
||||
hand = W_CachePatchName("K_LAPH02", PU_CACHE);
|
||||
hand = W_CachePatchLongName("K_LAPH02", PU_CACHE);
|
||||
}
|
||||
else
|
||||
{
|
||||
colormap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_RED, GTC_MENUCACHE);
|
||||
hand = W_CachePatchName("K_LAPH03", PU_CACHE);
|
||||
hand = W_CachePatchLongName("K_LAPH03", PU_CACHE);
|
||||
}
|
||||
|
||||
slide = confirmLength - confirmDelay;
|
||||
|
|
@ -8480,7 +8480,7 @@ void MD_DrawDiscordRequests(void)
|
|||
colormap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_GREY, GTC_MENUCACHE);
|
||||
}
|
||||
|
||||
V_DrawFixedPatch(56*FRACUNIT, 150*FRACUNIT, FRACUNIT, 0, W_CachePatchName("K_LAPE01", PU_CACHE), colormap);
|
||||
V_DrawFixedPatch(56*FRACUNIT, 150*FRACUNIT, FRACUNIT, 0, W_CachePatchLongName("K_LAPE01", PU_CACHE), colormap);
|
||||
|
||||
if (hand != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ void R_InitColormaps(void)
|
|||
lumpnum_t lump;
|
||||
|
||||
// Load in the light tables
|
||||
lump = W_GetNumForName("COLORMAP");
|
||||
lump = W_GetNumForLongName("COLORMAP");
|
||||
len = W_LumpLength(lump);
|
||||
if (len < COLORMAP_SIZE*2) // accomodate encore mode later
|
||||
len = COLORMAP_SIZE*2;
|
||||
|
|
@ -295,13 +295,13 @@ void R_ReInitColormaps(UINT16 num, void *newencoremap, size_t encoremapsize, boo
|
|||
{
|
||||
char colormap[9] = "COLORMAP";
|
||||
lumpnum_t lump;
|
||||
const lumpnum_t basecolormaplump = W_GetNumForName(colormap);
|
||||
const lumpnum_t basecolormaplump = W_GetNumForLongName(colormap);
|
||||
boolean remap = false;
|
||||
if (num > 0 && num <= 10000)
|
||||
snprintf(colormap, 8, "CLM%04u", num-1);
|
||||
|
||||
// Load in the light tables, now 64k aligned for smokie...
|
||||
lump = W_GetNumForName(colormap);
|
||||
lump = W_GetNumForLongName(colormap);
|
||||
if (lump == LUMPERROR)
|
||||
lump = basecolormaplump;
|
||||
else
|
||||
|
|
@ -1204,7 +1204,8 @@ static void R_Init8to16(void)
|
|||
UINT8 *palette;
|
||||
int i;
|
||||
|
||||
palette = W_CacheLumpName("PLAYPAL",PU_CACHE);
|
||||
lumpnum_t lump = W_GetNumForLongName("PLAYPAL");
|
||||
palette = W_CacheLumpNum(lump, PU_CACHE);
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -237,15 +237,15 @@ void R_InitTranslucencyTables(void)
|
|||
// optimised code (in other words, transtables pointer low word is 0)
|
||||
transtables = static_cast<UINT8 *>(Z_MallocAlign(NUMTRANSTABLES*0x10000, PU_STATIC, NULL, 16));
|
||||
|
||||
W_ReadLump(W_GetNumForName("TRANS10"), transtables);
|
||||
W_ReadLump(W_GetNumForName("TRANS20"), transtables+0x10000);
|
||||
W_ReadLump(W_GetNumForName("TRANS30"), transtables+0x20000);
|
||||
W_ReadLump(W_GetNumForName("TRANS40"), transtables+0x30000);
|
||||
W_ReadLump(W_GetNumForName("TRANS50"), transtables+0x40000);
|
||||
W_ReadLump(W_GetNumForName("TRANS60"), transtables+0x50000);
|
||||
W_ReadLump(W_GetNumForName("TRANS70"), transtables+0x60000);
|
||||
W_ReadLump(W_GetNumForName("TRANS80"), transtables+0x70000);
|
||||
W_ReadLump(W_GetNumForName("TRANS90"), transtables+0x80000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS10"), transtables);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS20"), transtables+0x10000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS30"), transtables+0x20000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS40"), transtables+0x30000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS50"), transtables+0x40000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS60"), transtables+0x50000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS70"), transtables+0x60000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS80"), transtables+0x70000);
|
||||
W_ReadLump(W_GetNumForLongName("TRANS90"), transtables+0x80000);
|
||||
|
||||
R_AllocateBlendTables();
|
||||
R_GenerateBlendTables();
|
||||
|
|
@ -345,8 +345,8 @@ void R_InitPaletteRemap(void)
|
|||
{
|
||||
palremap = static_cast<UINT8 *>(Z_Malloc(256, PU_STATIC, NULL));
|
||||
invremap = static_cast<UINT8 *>(Z_Malloc(256, PU_STATIC, NULL));
|
||||
W_ReadLump(W_GetNumForName("PALREMAP"), palremap);
|
||||
W_ReadLump(W_GetNumForName("INVREMAP"), invremap);
|
||||
W_ReadLump(W_GetNumForLongName("PALREMAP"), palremap);
|
||||
W_ReadLump(W_GetNumForLongName("INVREMAP"), invremap);
|
||||
}
|
||||
|
||||
UINT8 R_GetPaletteRemap(UINT8 color)
|
||||
|
|
@ -512,14 +512,14 @@ lumpnum_t viewborderlump[8];
|
|||
|
||||
void R_InitViewBorder(void)
|
||||
{
|
||||
viewborderlump[BRDR_T] = W_GetNumForName("brdr_t");
|
||||
viewborderlump[BRDR_B] = W_GetNumForName("brdr_b");
|
||||
viewborderlump[BRDR_L] = W_GetNumForName("brdr_l");
|
||||
viewborderlump[BRDR_R] = W_GetNumForName("brdr_r");
|
||||
viewborderlump[BRDR_TL] = W_GetNumForName("brdr_tl");
|
||||
viewborderlump[BRDR_BL] = W_GetNumForName("brdr_bl");
|
||||
viewborderlump[BRDR_TR] = W_GetNumForName("brdr_tr");
|
||||
viewborderlump[BRDR_BR] = W_GetNumForName("brdr_br");
|
||||
viewborderlump[BRDR_T] = W_GetNumForLongName("brdr_t");
|
||||
viewborderlump[BRDR_B] = W_GetNumForLongName("brdr_b");
|
||||
viewborderlump[BRDR_L] = W_GetNumForLongName("brdr_l");
|
||||
viewborderlump[BRDR_R] = W_GetNumForLongName("brdr_r");
|
||||
viewborderlump[BRDR_TL] = W_GetNumForLongName("brdr_tl");
|
||||
viewborderlump[BRDR_BL] = W_GetNumForLongName("brdr_bl");
|
||||
viewborderlump[BRDR_TR] = W_GetNumForLongName("brdr_tr");
|
||||
viewborderlump[BRDR_BR] = W_GetNumForLongName("brdr_br");
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ void ShowEndTxt(void)
|
|||
#endif
|
||||
UINT16 *ptext;
|
||||
void *data;
|
||||
lumpnum_t endoomnum = W_GetNumForName("ENDOOM");
|
||||
lumpnum_t endoomnum = W_GetNumForLongName("ENDOOM");
|
||||
//char *col;
|
||||
|
||||
/* if the xterm has more then 80 columns we need to add nl's */
|
||||
|
|
|
|||
|
|
@ -1919,7 +1919,7 @@ void I_Quit(void)
|
|||
I_ShutdownSystem();
|
||||
SDL_Quit();
|
||||
/* if option -noendtxt is set, don't print the text */
|
||||
if (!M_CheckParm("-noendtxt") && W_CheckNumForName("ENDOOM") != LUMPERROR)
|
||||
if (!M_CheckParm("-noendtxt") && W_CheckNumForLongName("ENDOOM") != LUMPERROR)
|
||||
{
|
||||
printf("\r");
|
||||
ShowEndTxt();
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ void ST_LoadFaceGraphics(INT32 skinnum)
|
|||
}
|
||||
if (i < FACE_MAX)
|
||||
{
|
||||
patch_t *missing = W_CachePatchName("MISSING", PU_HUDGFX);
|
||||
patch_t *missing = W_CachePatchLongName("MISSING", PU_HUDGFX);
|
||||
while (i < FACE_MAX)
|
||||
{
|
||||
faceprefix[skinnum][i] = missing;
|
||||
|
|
|
|||
|
|
@ -994,7 +994,7 @@ void V_DrawContinueIcon(INT32 x, INT32 y, INT32 flags, INT32 skinnum, UINT16 ski
|
|||
{
|
||||
(void)skinnum;
|
||||
(void)skincolor;
|
||||
V_DrawScaledPatch(x - 10, y - 14, flags, W_CachePatchName("CONTINS", PU_PATCH));
|
||||
V_DrawScaledPatch(x - 10, y - 14, flags, W_CachePatchLongName("CONTINS", PU_PATCH));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
71
src/w_wad.c
71
src/w_wad.c
|
|
@ -1210,25 +1210,6 @@ UINT16 W_CheckNumForMapPwad(const char *name, UINT32 hash, UINT16 wad, UINT16 st
|
|||
return LUMPERROR;
|
||||
}
|
||||
|
||||
//
|
||||
// Same as the original, but checks in one pwad only.
|
||||
// wadid is a wad number
|
||||
// (Used for sprites loading)
|
||||
//
|
||||
// 'startlump' is the lump number to start the search
|
||||
//
|
||||
// NOTE: only exists for compatibility with code requiring the 8-char truncation.
|
||||
// use W_CheckNumForLongNamePwad in new code!
|
||||
// if the old code passes a string literal, you can switch without issues
|
||||
//
|
||||
UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump)
|
||||
{
|
||||
char shortname[8+1];
|
||||
strncpy(shortname, name, 8);
|
||||
shortname[8] = '\0';
|
||||
return W_CheckNumForLongNamePwad(shortname, wad, startlump);
|
||||
}
|
||||
|
||||
//
|
||||
// Like W_CheckNumForNamePwad, but can find entries with long names
|
||||
//
|
||||
|
|
@ -1355,22 +1336,6 @@ UINT16 W_CheckNumForFullNamePK3(const char *name, UINT16 wad, UINT16 startlump)
|
|||
return LUMPERROR;
|
||||
}
|
||||
|
||||
//
|
||||
// W_CheckNumForName
|
||||
// Returns LUMPERROR if name not found.
|
||||
//
|
||||
// NOTE: only exists for compatibility with code requiring the 8-char truncation.
|
||||
// use W_CheckNumForLongName in new code!
|
||||
// if the old code passes a string literal, you can switch without issues
|
||||
//
|
||||
lumpnum_t W_CheckNumForName(const char *name)
|
||||
{
|
||||
char shortname[8+1];
|
||||
strncpy(shortname, name, 8);
|
||||
shortname[8] = '\0';
|
||||
return W_CheckNumForLongName(shortname);
|
||||
}
|
||||
|
||||
//
|
||||
// Like W_CheckNumForName, but can find entries with long names
|
||||
//
|
||||
|
|
@ -1482,23 +1447,6 @@ lumpnum_t W_CheckNumForMap(const char *name)
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// W_GetNumForName
|
||||
//
|
||||
// Calls W_CheckNumForName, but bombs out if not found.
|
||||
//
|
||||
lumpnum_t W_GetNumForName(const char *name)
|
||||
{
|
||||
lumpnum_t i;
|
||||
|
||||
i = W_CheckNumForName(name);
|
||||
|
||||
if (i == LUMPERROR)
|
||||
I_Error("W_GetNumForName: %s not found!\n", name);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
//
|
||||
// Like W_GetNumForName, but can find entries with long names
|
||||
//
|
||||
|
|
@ -1958,14 +1906,6 @@ boolean W_IsPatchCached(lumpnum_t lumpnum, void *ptr)
|
|||
return W_IsPatchCachedPWAD(WADFILENUM(lumpnum),LUMPNUM(lumpnum), ptr);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// W_CacheLumpName
|
||||
// ==========================================================================
|
||||
void *W_CacheLumpName(const char *name, INT32 tag)
|
||||
{
|
||||
return W_CacheLumpNum(W_GetNumForName(name), tag);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// CACHING OF GRAPHIC PATCH RESOURCES
|
||||
// ==========================================================================
|
||||
|
|
@ -2075,17 +2015,6 @@ void W_UnlockCachedPatch(void *patch)
|
|||
Z_Unlock(patch);
|
||||
}
|
||||
|
||||
void *W_CachePatchName(const char *name, INT32 tag)
|
||||
{
|
||||
lumpnum_t num;
|
||||
|
||||
num = W_CheckNumForName(name);
|
||||
|
||||
if (num == LUMPERROR)
|
||||
return missingpat;
|
||||
return W_CachePatchNum(num, tag);
|
||||
}
|
||||
|
||||
void *W_CachePatchLongName(const char *name, INT32 tag)
|
||||
{
|
||||
lumpnum_t num;
|
||||
|
|
|
|||
19
src/w_wad.h
19
src/w_wad.h
|
|
@ -133,8 +133,18 @@ const char *W_CheckFullNameForNum(lumpnum_t lumpnum);
|
|||
|
||||
UINT16 W_FindNextEmptyInPwad(UINT16 wad, UINT16 startlump); // checks only in one pwad
|
||||
|
||||
// helper for old functions that use 8-char names
|
||||
// careful, you might be dealing with a non-terminated string!
|
||||
static inline const char *W_ShortName(const char *name)
|
||||
{
|
||||
static char shortname[8+1];
|
||||
strncpy(shortname, name, 8);
|
||||
shortname[8] = '\0';
|
||||
return shortname;
|
||||
}
|
||||
|
||||
UINT16 W_CheckNumForMapPwad(const char *name, UINT32 hash, UINT16 wad, UINT16 startlump);
|
||||
UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump); // checks only in one pwad
|
||||
#define W_CheckNumForNamePwad(name, wad, start) W_CheckNumForLongNamePwad(W_ShortName(name), wad, start)
|
||||
UINT16 W_CheckNumForLongNamePwad(const char *name, UINT16 wad, UINT16 startlump);
|
||||
UINT16 W_CheckNumForNamePrefixPwad(const char *name, size_t namelen, UINT16 wad, UINT16 startlump);
|
||||
UINT16 W_CheckNumForNameMultiPrefixPwad(const lumpprefixes_t *prefixes, size_t numprefixes, UINT16 wad, UINT16 startlump);
|
||||
|
|
@ -144,9 +154,9 @@ UINT16 W_CheckNumForFolderStartPK3(const char *name, UINT16 wad, UINT16 startlum
|
|||
UINT16 W_CheckNumForFolderEndPK3(const char *name, UINT16 wad, UINT16 startlump);
|
||||
|
||||
lumpnum_t W_CheckNumForMap(const char *name);
|
||||
lumpnum_t W_CheckNumForName(const char *name);
|
||||
#define W_CheckNumForName(name) W_CheckNumForLongName(W_ShortName(name))
|
||||
lumpnum_t W_CheckNumForLongName(const char *name);
|
||||
lumpnum_t W_GetNumForName(const char *name); // like W_CheckNumForName but I_Error on LUMPERROR
|
||||
#define W_GetNumForName(name) W_GetNumForLongName(W_ShortName(name))
|
||||
lumpnum_t W_GetNumForLongName(const char *name);
|
||||
lumpnum_t W_CheckNumForNameInFolder(const char *lump, const char *folder);
|
||||
UINT8 W_LumpExists(const char *name); // Lua uses this.
|
||||
|
|
@ -175,8 +185,7 @@ boolean W_IsPatchCached(lumpnum_t lump, void *ptr);
|
|||
boolean W_NeedPaletteRemapPwad(UINT16 wad, UINT16 lump, boolean ignorecache);
|
||||
boolean W_NeedPaletteRemap(lumpnum_t lump, boolean ignorecache);
|
||||
|
||||
void *W_CacheLumpName(const char *name, INT32 tag);
|
||||
void *W_CachePatchName(const char *name, INT32 tag);
|
||||
#define W_CachePatchName(name, tag) W_CachePatchLongName(W_ShortName(name), tag)
|
||||
void *W_CachePatchLongName(const char *name, INT32 tag);
|
||||
|
||||
// Returns either a Software patch, or an OpenGL patch.
|
||||
|
|
|
|||
|
|
@ -511,7 +511,7 @@ void Y_IntermissionDrawer(void)
|
|||
{
|
||||
// no y_buffer
|
||||
if (y_buffer == NULL)
|
||||
V_DrawPatchFill(W_CachePatchName("SRB2BACK", PU_CACHE));
|
||||
V_DrawPatchFill(W_CachePatchLongName("SRB2BACK", PU_CACHE));
|
||||
else
|
||||
{
|
||||
// Maybe the resolution changed?
|
||||
|
|
@ -654,13 +654,13 @@ void Y_IntermissionDrawer(void)
|
|||
if (data.num[i] == whiteplayer)
|
||||
{
|
||||
UINT8 cursorframe = (intertic / 4) % 8;
|
||||
V_DrawScaledPatch(x+16, y-4, 0, W_CachePatchName(va("K_CHILI%d", cursorframe+1), PU_CACHE));
|
||||
V_DrawScaledPatch(x+16, y-4, 0, W_CachePatchLongName(va("K_CHILI%d", cursorframe+1), PU_CACHE));
|
||||
}
|
||||
|
||||
if ((players[data.num[i]].pflags & PF_NOCONTEST) && players[data.num[i]].bot)
|
||||
{
|
||||
// RETIRED!!
|
||||
V_DrawScaledPatch(x+12, y-7, 0, W_CachePatchName("K_NOBLNS", PU_CACHE));
|
||||
V_DrawScaledPatch(x+12, y-7, 0, W_CachePatchLongName("K_NOBLNS", PU_CACHE));
|
||||
}
|
||||
|
||||
STRBUFCPY(strtime, data.name[i]);
|
||||
|
|
@ -1509,7 +1509,7 @@ void Y_VoteDrawer(void)
|
|||
if (!splitscreen && i == consoleplayer)
|
||||
{
|
||||
UINT8 cursorframe = (votetic / 4) % 8;
|
||||
V_DrawScaledPatch(x+24, y+9, V_SNAPTOLEFT, W_CachePatchName(va("K_CHILI%d", cursorframe+1), PU_CACHE));
|
||||
V_DrawScaledPatch(x+24, y+9, V_SNAPTOLEFT, W_CachePatchLongName(va("K_CHILI%d", cursorframe+1), PU_CACHE));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1851,14 +1851,14 @@ void Y_StartVote(void)
|
|||
|
||||
Y_AnimatedVoteScreenCheck();
|
||||
|
||||
widebgpatch = W_CachePatchName((battlemode ? "BATTLSCW" : "INTERSCW"), PU_STATIC);
|
||||
bgpatch = W_CachePatchName((battlemode ? "BATTLSCR" : "INTERSCR"), PU_STATIC);
|
||||
cursor = W_CachePatchName("M_CURSOR", PU_STATIC);
|
||||
cursor1 = W_CachePatchName("P1CURSOR", PU_STATIC);
|
||||
cursor2 = W_CachePatchName("P2CURSOR", PU_STATIC);
|
||||
cursor3 = W_CachePatchName("P3CURSOR", PU_STATIC);
|
||||
cursor4 = W_CachePatchName("P4CURSOR", PU_STATIC);
|
||||
rubyicon = W_CachePatchName("RUBYICON", PU_STATIC);
|
||||
widebgpatch = W_CachePatchLongName((battlemode ? "BATTLSCW" : "INTERSCW"), PU_STATIC);
|
||||
bgpatch = W_CachePatchLongName((battlemode ? "BATTLSCR" : "INTERSCR"), PU_STATIC);
|
||||
cursor = W_CachePatchLongName("M_CURSOR", PU_STATIC);
|
||||
cursor1 = W_CachePatchLongName("P1CURSOR", PU_STATIC);
|
||||
cursor2 = W_CachePatchLongName("P2CURSOR", PU_STATIC);
|
||||
cursor3 = W_CachePatchLongName("P3CURSOR", PU_STATIC);
|
||||
cursor4 = W_CachePatchLongName("P4CURSOR", PU_STATIC);
|
||||
rubyicon = W_CachePatchLongName("RUBYICON", PU_STATIC);
|
||||
|
||||
timer = cv_votetime.value*TICRATE;
|
||||
pickedvote = -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue