mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-27 23:22:06 -04:00
add some common search directories to FindIWADFile()
This commit is contained in:
parent
f97f622c99
commit
37111c9c66
@ -722,6 +722,15 @@ boolean WadFileStatus(char *filename,boolean *isdir)
|
|||||||
// killough 11/98: simplified, removed error-prone cut-n-pasted code
|
// killough 11/98: simplified, removed error-prone cut-n-pasted code
|
||||||
//
|
//
|
||||||
|
|
||||||
|
const char *dirs[] = {
|
||||||
|
".",
|
||||||
|
NULL, // D_DoomExeDir()
|
||||||
|
"/usr/local/share/games/doom",
|
||||||
|
"/usr/share/games/doom",
|
||||||
|
"/usr/local/share/doom",
|
||||||
|
"/usr/share/doom",
|
||||||
|
};
|
||||||
|
|
||||||
char *FindIWADFile(void)
|
char *FindIWADFile(void)
|
||||||
{
|
{
|
||||||
static const char *envvars[] = {"DOOMWADDIR", "HOME"};
|
static const char *envvars[] = {"DOOMWADDIR", "HOME"};
|
||||||
@ -754,9 +763,10 @@ char *FindIWADFile(void)
|
|||||||
AddDefaultExtension(strcat(strcpy(customiwad, "/"), iwad), ".wad");
|
AddDefaultExtension(strcat(strcpy(customiwad, "/"), iwad), ".wad");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j=0; j<2; j++)
|
dirs[1] = D_DoomExeDir();
|
||||||
|
for (j=0; j<arrlen(dirs); j++)
|
||||||
{
|
{
|
||||||
strcpy(iwad, j ? D_DoomExeDir() : ".");
|
strcpy(iwad, dirs[j]);
|
||||||
NormalizeSlashes(iwad);
|
NormalizeSlashes(iwad);
|
||||||
printf("Looking in %s\n",iwad); // killough 8/8/98
|
printf("Looking in %s\n",iwad); // killough 8/8/98
|
||||||
if (*customiwad)
|
if (*customiwad)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user