Got rid of functions I added once but turned out to be unnecessary.

This commit is contained in:
Nevur 2017-08-11 15:46:46 +02:00
parent 8b64a6eef3
commit 4f8d53b329
3 changed files with 7 additions and 43 deletions

View File

@ -2599,7 +2599,7 @@ static boolean CanSaveLevel(INT32 mapnum)
if (G_IsSpecialStage(mapnum) // don't save in special stages
|| mapnum == lastmaploaded) // don't save if the last map loaded was this one
return false;
// Any levels that have the savegame flag can save normally.
// If the game is complete for this save slot, then any level can save!
// On the other side of the spectrum, if lastmaploaded is 0, then the save file has only just been created and needs to save ASAP!
@ -3271,7 +3271,7 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
// FindFolder("SOCs/", &socPos, &socNum);
FindFolder("Sounds/", &sfxPos, &sfxNum);
FindFolder("Music/", &musPos, &musNum);
FindFolder("Sprites/", &sprPos, &sprNum);
// FindFolder("Sprites/", &sprPos, &sprNum);
FindFolder("Textures/", &texPos, &texNum);
// FindFolder("Patches/", &patPos, &patNum);
// FindFolder("Flats/", &flaPos, &flaNum);
@ -3290,8 +3290,8 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
P_LoadSoundsRange(wadnum, sfxPos, sfxNum);
if (musNum) // Music. TODO: Useless function right now.
P_LoadMusicsRange(wadnum, musPos, musNum);
if (sprNum) // Sprites.
R_LoadSpritsRange(wadnum, sprPos, sprNum);
// if (sprNum) // Sprites.
// R_LoadSpritsRange(wadnum, sprPos, sprNum);
// if (texNum) // Textures. TODO: R_LoadTextures() does the folder positioning once again. New function maybe?
// R_LoadTextures();
// if (mapNum) // Maps. TODO: Actually implement the map WAD loading code, lulz.
@ -3330,12 +3330,6 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
digmreplaces++;
}
}
//
// search for sprite replacements
//
R_AddSpriteDefs(wadnum);
break;
}
if (!devparm && sreplaces)
@ -3359,6 +3353,9 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
ST_LoadGraphics();
ST_ReloadSkinFaceGraphics();
// Search for sprite replacements.
R_AddSpriteDefs(wadnum);
//
// look for skins
//

View File

@ -368,38 +368,6 @@ static boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef,
return true;
}
// Auxiliary function for PK3 loading - Loads sprites from a specified range.
void R_LoadSpritsRange(UINT16 wadnum, UINT16 first, UINT16 num)
{
size_t i, addsprites = 0;
char wadname[MAX_WADPATH];
//
// scan through lumps, for each sprite, find all the sprite frames
//
for (i = 0; i < numsprites; i++)
{
spritename = sprnames[i];
if (spritename[4] && wadnum >= (UINT16)spritename[4])
continue;
if (R_AddSingleSpriteDef(spritename, &sprites[i], wadnum, first, first + num + 1))
{
#ifdef HWRENDER
if (rendermode == render_opengl)
HWR_AddSpriteMD2(i);
#endif
// if a new sprite was added (not just replaced)
addsprites++;
#ifndef ZDEBUG
CONS_Debug(DBG_SETUP, "sprite %s set in pwad %d\n", spritename, wadnum);
#endif
}
}
nameonly(strcpy(wadname, wadfiles[wadnum]->filename));
CONS_Printf(M_GetText("%s added %d frames in %s sprites\n"), wadname, num, sizeu1(addsprites));
}
//
// Search for sprites replacements in a wad whose names are in namelist
//

View File

@ -50,7 +50,6 @@ void R_SortVisSprites(void);
//faB: find sprites in wadfile, replace existing, add new ones
// (only sprites from namelist are added or replaced)
void R_AddSpriteDefs(UINT16 wadnum);
void R_LoadSpritsRange(UINT16 wadnum, UINT16 first, UINT16 num);
#ifdef DELFILE