1
1
//
2
2
// Copyright(C) 2005-2014 Simon Howard
3
+ // Copyright(C) 2025 Wojciech Graj
3
4
//
4
5
// This program is free software; you can redistribute it and/or
5
6
// modify it under the terms of the GNU General Public License
@@ -38,7 +39,7 @@ static const iwad_t iwads[] =
38
39
{ "plutonia.wad" , pack_plut , commercial , "Final Doom: Plutonia Experiment" },
39
40
{ "tnt.wad" , pack_tnt , commercial , "Final Doom: TNT: Evilution" },
40
41
{ "doom.wad" , doom , retail , "Doom" },
41
- { "DOOM1 .WAD" , doom , shareware , "Doom Shareware" },
42
+ { "doom1 .WAD" , doom , shareware , "Doom Shareware" },
42
43
{ "chex.wad" , pack_chex , shareware , "Chex Quest" },
43
44
{ "hacx.wad" , pack_hacx , commercial , "Hacx" },
44
45
{ "freedm.wad" , doom2 , commercial , "FreeDM" },
@@ -80,7 +81,7 @@ static void AddIWADDir(char *dir)
80
81
#define WIN32_LEAN_AND_MEAN
81
82
#include <windows.h>
82
83
83
- typedef struct
84
+ typedef struct
84
85
{
85
86
HKEY root ;
86
87
char * path ;
@@ -89,7 +90,7 @@ typedef struct
89
90
90
91
#define UNINSTALLER_STRING "\\uninstl.exe /S "
91
92
92
- // Keys installed by the various CD editions. These are actually the
93
+ // Keys installed by the various CD editions. These are actually the
93
94
// commands to invoke the uninstaller and look like this:
94
95
//
95
96
// C:\Program Files\Path\uninstl.exe /S C:\Program Files\Path
@@ -154,7 +155,7 @@ static registry_value_t collectors_edition_value =
154
155
155
156
// Subdirectories of the above install path, where IWADs are installed.
156
157
157
- static char * collectors_edition_subdirs [] =
158
+ static char * collectors_edition_subdirs [] =
158
159
{
159
160
"Doom2" ,
160
161
"Final Doom" ,
@@ -407,7 +408,7 @@ static bool DirIsFile(char *path, char *filename)
407
408
408
409
static char * CheckDirectoryHasIWAD (char * dir , char * iwadname )
409
410
{
410
- char * filename ;
411
+ char * filename ;
411
412
412
413
// As a special case, the "directory" may refer directly to an
413
414
// IWAD file if the path comes from DOOMWADDIR or DOOMWADPATH.
@@ -449,7 +450,7 @@ static char *SearchDirectoryForIWAD(char *dir, int mask, GameMission_t *mission)
449
450
char * filename ;
450
451
size_t i ;
451
452
452
- for (i = 0 ; i < arrlen (iwads ); ++ i )
453
+ for (i = 0 ; i < arrlen (iwads ); ++ i )
453
454
{
454
455
if (((1 << iwads [i ].mission ) & mask ) == 0 )
455
456
{
@@ -545,7 +546,7 @@ static void AddDoomWadPath(void)
545
546
{
546
547
// Break at the separator and store the right hand side
547
548
// as another iwad dir
548
-
549
+
549
550
* p = '\0' ;
550
551
p += 1 ;
551
552
@@ -585,7 +586,7 @@ static void BuildIWADDirList(void)
585
586
if (doomwaddir != NULL )
586
587
{
587
588
AddIWADDir (doomwaddir );
588
- }
589
+ }
589
590
590
591
// Add dirs from DOOMWADPATH
591
592
@@ -623,13 +624,13 @@ static void BuildIWADDirList(void)
623
624
624
625
//
625
626
// Searches WAD search paths for an WAD with a specific filename.
626
- //
627
+ //
627
628
628
629
char * D_FindWADByName (char * name )
629
630
{
630
631
char * path ;
631
632
int i ;
632
-
633
+
633
634
// Absolute path?
634
635
635
636
if (M_FileExists (name ))
@@ -728,7 +729,7 @@ char *D_FindIWAD(int mask, GameMission_t *mission)
728
729
{
729
730
I_Error ("IWAD file '%s' not found!" , iwadfile );
730
731
}
731
-
732
+
732
733
* mission = IdentifyIWADByName (result , mask );
733
734
}
734
735
else
@@ -740,7 +741,7 @@ char *D_FindIWAD(int mask, GameMission_t *mission)
740
741
result = NULL ;
741
742
742
743
BuildIWADDirList ();
743
-
744
+
744
745
for (i = 0 ; result == NULL && i < num_iwad_dirs ; ++ i )
745
746
{
746
747
result = SearchDirectoryForIWAD (iwad_dirs [i ], mask , mission );
@@ -845,4 +846,3 @@ char *D_SuggestGameName(GameMission_t mission, GameMode_t mode)
845
846
846
847
return "Unknown game?" ;
847
848
}
848
-
0 commit comments