summaryrefslogtreecommitdiff
path: root/src/w_wad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w_wad.c')
-rw-r--r--src/w_wad.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/src/w_wad.c b/src/w_wad.c
index e93147e3..4f944fee 100644
--- a/src/w_wad.c
+++ b/src/w_wad.c
@@ -32,7 +32,6 @@
#include <stdlib.h>
#include <string.h>
-#include "doomdef.h"
#include "doomtype.h"
#include "i_swap.h"
@@ -72,43 +71,6 @@ unsigned int numlumps = 0;
static lumpinfo_t **lumphash;
-static void ExtractFileBase(char *path, char *dest)
-{
- char *src;
- char *filename;
- int length;
-
- src = path + strlen(path) - 1;
-
- // back up until a \ or the start
- while (src != path && *(src - 1) != DIR_SEPARATOR)
- {
- src--;
- }
-
- filename = src;
-
- // Copy up to eight characters
- // Note: Vanilla Doom exits with an error if a filename is specified
- // with a base of more than eight characters. To remove the 8.3
- // filename limit, instead we simply truncate the name.
-
- length = 0;
- memset(dest, 0, 8);
-
- while (*src != '\0' && *src != '.')
- {
- if (length >= 8)
- {
- printf("Warning: Truncated '%s' lump name to '%.8s'.\n",
- filename, dest);
- break;
- }
-
- dest[length++] = toupper((int)*src++);
- }
-}
-
// Hash function used for lump names.
unsigned int W_LumpNameHash(const char *s)
@@ -179,7 +141,7 @@ wad_file_t *W_AddFile (char *filename)
// Name the lump after the base of the filename (without the
// extension).
- ExtractFileBase (filename, fileinfo->name);
+ M_ExtractFileBase (filename, fileinfo->name);
numlumps++;
}
else