mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
Make Freedoom its own mission pack and add "freedoom-all" autoloads. (#2184)
* Make the Freedoom IWADs their own mission pack and add support for the freedoom-all autoload directory. * Add freedoom1-all and freedoom2-all directories. * Space after comma.
This commit is contained in:
parent
f91cec4e26
commit
1a8b2adbc0
@ -88,6 +88,12 @@ static const char *rekkr_skills[] =
|
||||
"Scrapper", "Brawler", "Fighter", "Wrecker", "BERSERKER"
|
||||
};
|
||||
|
||||
static const char *freedoom_skills[] =
|
||||
{
|
||||
"Please don't kill me!", "Will this hurt?", "Bring on the pain.",
|
||||
"Extreme carnage.", "MAYHEM!",
|
||||
};
|
||||
|
||||
static const char *gamemodes[] = { "Co-operative", "Deathmatch",
|
||||
"Deathmatch 2.0", "Deathmatch 3.0" };
|
||||
|
||||
@ -292,6 +298,9 @@ static void UpdateSkillButton(void)
|
||||
case pack_rekkr:
|
||||
skillbutton->values = rekkr_skills;
|
||||
break;
|
||||
case pack_freedoom:
|
||||
skillbutton->values = freedoom_skills;
|
||||
break;
|
||||
default:
|
||||
skillbutton->values = doom_skills;
|
||||
break;
|
||||
|
@ -39,9 +39,9 @@ static const iwad_t iwads[] = {
|
||||
{"doomu.wad", doom, retail, "The Ultimate DOOM" },
|
||||
{"doom1.wad", doom, shareware, "DOOM Shareware" },
|
||||
{"doom2f.wad", doom2, commercial, "DOOM II: L'Enfer sur Terre" },
|
||||
{"freedoom2.wad", doom2, commercial, "Freedoom: Phase 2" },
|
||||
{"freedoom1.wad", doom, retail, "Freedoom: Phase 1" },
|
||||
{"freedm.wad", doom2, commercial, "FreeDM" },
|
||||
{"freedoom2.wad", pack_freedoom, commercial, "Freedoom: Phase 2" },
|
||||
{"freedoom1.wad", pack_freedoom, retail, "Freedoom: Phase 1" },
|
||||
{"freedm.wad", pack_freedoom, commercial, "FreeDM" },
|
||||
{"chex.wad", pack_chex, retail, "Chex Quest" },
|
||||
{"chex3v.wad", pack_chex3v, retail, "Chex Quest 3: Vanilla Edition" },
|
||||
{"chex3d2.wad", pack_chex3v, commercial, "Chex Quest 3: Modding Edition" },
|
||||
|
40
src/d_main.c
40
src/d_main.c
@ -1344,8 +1344,9 @@ static void AutoLoadWADs(const char *path)
|
||||
|
||||
static void LoadIWadBase(void)
|
||||
{
|
||||
GameMission_t local_gamemission =
|
||||
D_GetGameMissionByIWADName(M_BaseName(wadfiles[0]));
|
||||
GameMode_t local_gamemode;
|
||||
GameMission_t local_gamemission;
|
||||
D_GetModeAndMissionByIWADName(M_BaseName(wadfiles[0]), &local_gamemode, &local_gamemission);
|
||||
|
||||
if (local_gamemission < pack_chex)
|
||||
{
|
||||
@ -1360,13 +1361,26 @@ static void LoadIWadBase(void)
|
||||
{
|
||||
W_AddBaseDir("doom2-all");
|
||||
}
|
||||
else if (local_gamemission == pack_freedoom)
|
||||
{
|
||||
W_AddBaseDir("freedoom-all");
|
||||
if (local_gamemode == commercial)
|
||||
{
|
||||
W_AddBaseDir("freedoom2-all");
|
||||
}
|
||||
else
|
||||
{
|
||||
W_AddBaseDir("freedoom1-all");
|
||||
}
|
||||
}
|
||||
W_AddBaseDir(M_BaseName(wadfiles[0]));
|
||||
}
|
||||
|
||||
static void AutoloadIWadDir(void (*AutoLoadFunc)(const char *path))
|
||||
{
|
||||
GameMission_t local_gamemission =
|
||||
D_GetGameMissionByIWADName(M_BaseName(wadfiles[0]));
|
||||
GameMode_t local_gamemode;
|
||||
GameMission_t local_gamemission;
|
||||
D_GetModeAndMissionByIWADName(M_BaseName(wadfiles[0]), &local_gamemode, &local_gamemission);
|
||||
|
||||
for (int i = 0; i < array_size(autoload_paths); ++i)
|
||||
{
|
||||
@ -1397,6 +1411,24 @@ static void AutoloadIWadDir(void (*AutoLoadFunc)(const char *path))
|
||||
AutoLoadFunc(dir);
|
||||
free(dir);
|
||||
}
|
||||
else if (local_gamemission == pack_freedoom)
|
||||
{
|
||||
dir = GetAutoloadDir(autoload_paths[i], "freedoom-all", true);
|
||||
AutoLoadFunc(dir);
|
||||
free(dir);
|
||||
if (local_gamemode == commercial)
|
||||
{
|
||||
dir = GetAutoloadDir(autoload_paths[i], "freedoom2-all", true);
|
||||
AutoLoadFunc(dir);
|
||||
free(dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
dir = GetAutoloadDir(autoload_paths[i], "freedoom1-all", true);
|
||||
AutoLoadFunc(dir);
|
||||
free(dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// auto-loaded files per IWAD
|
||||
|
@ -41,6 +41,7 @@ typedef enum {
|
||||
pack_hacx, // Hacx
|
||||
pack_rekkr, // Rekkr
|
||||
pack_chex3v, // Chex Quest 3: Vanilla Edition
|
||||
pack_freedoom, // Freedoom
|
||||
none
|
||||
} GameMission_t;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user