ref: 78886030b9a08a39f46e0e53b64194b59813f21c
parent: 05c3023d2b891c2d4361822b439c59e5828eee79
author: Fabian Greffrath <[email protected]>
date: Mon Jan 7 09:20:59 EST 2019
save a WAD file's filename in struct wad_file
--- a/src/w_file.h
+++ b/src/w_file.h
@@ -53,6 +53,9 @@
// File's location on disk.
const char *path;
+
+ // [crispy] name of this file
+ const char *basename;
};
// Open the specified file. Returns a pointer to a new wad_file_t
--- a/src/w_wad.c
+++ b/src/w_wad.c
@@ -140,6 +140,9 @@
return NULL;
}
+ // [crispy] save the file name
+ wad_file->basename = M_BaseName(wad_file->path);
+
if (strcasecmp(filename+strlen(filename)-3 , "wad" ) )
{
// single lump file