diff --git a/setup/multiplayer.c b/setup/multiplayer.c index c856d3de..22818ac3 100644 --- a/setup/multiplayer.c +++ b/setup/multiplayer.c @@ -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; diff --git a/src/d_iwad.c b/src/d_iwad.c index 781ad667..1b2a8d40 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -28,26 +28,26 @@ #include "m_misc.h" static const iwad_t iwads[] = { - {"doom2.wad", doom2, commercial, "DOOM II: Hell on Earth" }, - {"plutonia.wad", pack_plut, commercial, "Final DOOM: Plutonia Experiment"}, - {"tnt.wad", pack_tnt, commercial, "Final DOOM: TNT - Evilution" }, + {"doom2.wad", doom2, commercial, "DOOM II: Hell on Earth" }, + {"plutonia.wad", pack_plut, commercial, "Final DOOM: Plutonia Experiment"}, + {"tnt.wad", pack_tnt, commercial, "Final DOOM: TNT - Evilution" }, // "doom.wad" may be retail or registered - {"doom.wad", doom, indetermined, "DOOM" }, - {"doom.wad", doom, registered, "DOOM Registered" }, - {"doom.wad", doom, retail, "The Ultimate DOOM" }, + {"doom.wad", doom, indetermined, "DOOM" }, + {"doom.wad", doom, registered, "DOOM Registered" }, + {"doom.wad", doom, retail, "The Ultimate DOOM" }, // "doomu.wad" alias to allow retail wad to coexist with registered in the same folder - {"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" }, - {"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" }, - {"hacx.wad", pack_hacx, commercial, "HACX: Twitch n' Kill" }, - {"rekkrsa.wad", pack_rekkr, retail, "REKKR" }, - {"rekkrsl.wad", pack_rekkr, retail, "REKKR: Sunken Land" }, + {"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", 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" }, + {"hacx.wad", pack_hacx, commercial, "HACX: Twitch n' Kill" }, + {"rekkrsa.wad", pack_rekkr, retail, "REKKR" }, + {"rekkrsl.wad", pack_rekkr, retail, "REKKR: Sunken Land" }, }; static const char *const gamemode_str[] = { diff --git a/src/d_main.c b/src/d_main.c index 8dac278b..a8fcb1d6 100644 --- a/src/d_main.c +++ b/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 diff --git a/src/doomdef.h b/src/doomdef.h index d8cb17b9..016f0892 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -33,14 +33,15 @@ typedef enum { // Mission packs - might be useful for TC stuff? typedef enum { - doom, // DOOM 1 - doom2, // DOOM 2 - pack_tnt, // TNT mission pack - pack_plut, // Plutonia pack - pack_chex, // Chex Quest - pack_hacx, // Hacx - pack_rekkr, // Rekkr - pack_chex3v, // Chex Quest 3: Vanilla Edition + doom, // DOOM 1 + doom2, // DOOM 2 + pack_tnt, // TNT mission pack + pack_plut, // Plutonia pack + pack_chex, // Chex Quest + pack_hacx, // Hacx + pack_rekkr, // Rekkr + pack_chex3v, // Chex Quest 3: Vanilla Edition + pack_freedoom, // Freedoom none } GameMission_t;