From b949c61fe099e496cc0a57f1a95fcbf186905cb4 Mon Sep 17 00:00:00 2001 From: Nev3r Date: Fri, 13 Dec 2019 12:48:39 +0100 Subject: [PATCH] Remove unused map recognition code. --- src/doomdata.h | 23 ----------------------- src/p_setup.c | 37 ------------------------------------- 2 files changed, 60 deletions(-) diff --git a/src/doomdata.h b/src/doomdata.h index f6e7cb584..2414f2156 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -23,29 +23,6 @@ // Some global defines, that configure the game. #include "doomdef.h" -// -// Map level types. -// The following data structures define the persistent format -// used in the lumps of the WAD files. -// - -// Lump order in a map WAD: each map needs a couple of lumps -// to provide a complete scene geometry description. -enum -{ - ML_LABEL, // A separator, name, MAPxx - ML_THINGS, // Enemies, rings, monitors, scenery, etc. - ML_LINEDEFS, // Linedefs, from editing - ML_SIDEDEFS, // Sidedefs, from editing - ML_VERTEXES, // Vertices, edited and BSP splits generated - ML_SEGS, // Linesegs, from linedefs split by BSP - ML_SSECTORS, // Subsectors, list of linesegs - ML_NODES, // BSP nodes - ML_SECTORS, // Sectors, from editing - ML_REJECT, // LUT, sector-sector visibility - ML_BLOCKMAP, // LUT, motion clipping, walls/grid element -}; - // Extra flag for objects. #define MTF_EXTRA 1 diff --git a/src/p_setup.c b/src/p_setup.c index 12093286c..caad3de72 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2891,43 +2891,6 @@ static boolean LoadMapData (const virtres_t* virt) return true; } -#if 0 -static char *levellumps[] = -{ - "label", // ML_LABEL, A separator, name, MAPxx - "THINGS", // ML_THINGS, Enemies, items.. - "LINEDEFS", // ML_LINEDEFS, Linedefs, from editing - "SIDEDEFS", // ML_SIDEDEFS, Sidedefs, from editing - "VERTEXES", // ML_VERTEXES, Vertices, edited and BSP splits generated - "SEGS", // ML_SEGS, Linesegs, from linedefs split by BSP - "SSECTORS", // ML_SSECTORS, Subsectors, list of linesegs - "NODES", // ML_NODES, BSP nodes - "SECTORS", // ML_SECTORS, Sectors, from editing - "REJECT", // ML_REJECT, LUT, sector-sector visibility -}; - -/** Checks a lump and returns whether it is a valid start-of-level marker. - * - * \param lumpnum Lump number to check. - * \return True if the lump is a valid level marker, false if not. - */ -static inline boolean P_CheckLevel(lumpnum_t lumpnum) -{ - UINT16 file, lump; - size_t i; - - for (i = ML_THINGS; i <= ML_REJECT; i++) - { - file = WADFILENUM(lumpnum); - lump = LUMPNUM(lumpnum+1); - if (file > numwadfiles || lump < LUMPNUM(lumpnum) || lump > wadfiles[file]->numlumps || - memcmp(wadfiles[file]->lumpinfo[lump].name, levellumps[i], 8) != 0) - return false; - } - return true; // all right -} -#endif - /** Sets up a sky texture to use for the level. * The sky texture is used instead of F_SKY1. */