mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- Make naming of multiplayer episode exclusion stuff from d0e6a7ea29
more generic and exclude invalid episodes from "Duke It Out in DC", "Duke Nuclear Winter" and "Duke Caribbean".
This commit is contained in:
parent
b969a9aee3
commit
4ac1376b9f
7 changed files with 33 additions and 20 deletions
|
@ -949,11 +949,11 @@ int RunGame()
|
|||
colorset = true;
|
||||
}
|
||||
}
|
||||
if (grp.FileInfo.mpepisodes.Size())
|
||||
if (grp.FileInfo.exclepisodes.Size())
|
||||
{
|
||||
for (auto& mpepisode : grp.FileInfo.mpepisodes)
|
||||
for (auto& episode : grp.FileInfo.exclepisodes)
|
||||
{
|
||||
gi->AddMultiplayerEpisode(mpepisode);
|
||||
gi->AddExcludedEpisode(episode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ struct GrpInfo
|
|||
TArray<FString> tobedeleted;
|
||||
TArray<FString> loadfiles;
|
||||
TArray<FString> loadart;
|
||||
TArray<FString> mpepisodes;
|
||||
TArray<FString> exclepisodes;
|
||||
uint32_t FgColor = 0, BgColor = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ struct GameInterface
|
|||
virtual void LeavePortal(spritetype* viewer, int type) {}
|
||||
virtual bool GetGeoEffect(GeoEffect* eff, int viewsector) { return false; }
|
||||
virtual int Voxelize(int sprnum) { return -1; }
|
||||
virtual void AddMultiplayerEpisode(FString name) {}
|
||||
virtual void AddExcludedEpisode(FString episode) {}
|
||||
|
||||
virtual FString statFPS()
|
||||
{
|
||||
|
|
|
@ -588,12 +588,12 @@ static TArray<GrpInfo> ParseGrpInfo(const char *fn, FileReader &fr, TMap<FString
|
|||
}
|
||||
while (sc.CheckToken(','));
|
||||
}
|
||||
else if (sc.Compare("mpepisodes"))
|
||||
else if (sc.Compare("exclepisodes"))
|
||||
{
|
||||
do
|
||||
{
|
||||
sc.MustGetToken(TK_StringConst);
|
||||
grp.mpepisodes.Push(sc.String);
|
||||
grp.exclepisodes.Push(sc.String);
|
||||
}
|
||||
while (sc.CheckToken(','));
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ struct GameInterface : public ::GameInterface
|
|||
void EnterPortal(spritetype* viewer, int type) override;
|
||||
void LeavePortal(spritetype* viewer, int type) override;
|
||||
bool GetGeoEffect(GeoEffect* eff, int viewsector) override;
|
||||
void AddMultiplayerEpisode(FString name) override;
|
||||
void AddExcludedEpisode(FString episode) override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -60,11 +60,11 @@ enum { VERSIONCHECK = 41 };
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static TArray<FString> mpEpisodes;
|
||||
static TArray<FString> exclEpisodes;
|
||||
|
||||
void GameInterface::AddMultiplayerEpisode(FString name)
|
||||
void GameInterface::AddExcludedEpisode(FString episode)
|
||||
{
|
||||
mpEpisodes.Push(FStringTable::MakeMacro(name.GetChars()));
|
||||
exclEpisodes.Push(FStringTable::MakeMacro(episode.GetChars()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1681,11 +1681,11 @@ int ConCompiler::parsecommand()
|
|||
auto clust = MustFindCluster(j + 1);
|
||||
vol->name = clust->name = FStringTable::MakeMacro(parsebuffer.Data(), i);
|
||||
if (j > 0) vol->flags |= VF_SHAREWARELOCK;
|
||||
if (mpEpisodes.Size())
|
||||
if (exclEpisodes.Size())
|
||||
{
|
||||
for (auto& mpEpisode : mpEpisodes)
|
||||
for (auto& episode : exclEpisodes)
|
||||
{
|
||||
if (vol->name == mpEpisode)
|
||||
if (vol->name == episode)
|
||||
{
|
||||
vol->flags |= VF_HIDEFROMSP;
|
||||
}
|
||||
|
|
|
@ -203,6 +203,7 @@ grpinfo
|
|||
dependency DUKE13_CRC
|
||||
gamefilter "Duke.DukeDC.13"
|
||||
GameID "DukeDC13"
|
||||
exclepisodes "L.A. MELTDOWN", "LUNAR APOCALYPSE", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -214,6 +215,7 @@ grpinfo
|
|||
dependency DUKE15_CRC
|
||||
gamefilter "Duke.DukeDC.13"
|
||||
GameID "DukeDC"
|
||||
exclepisodes "L.A. MELTDOWN", "LUNAR APOCALYPSE", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -225,6 +227,7 @@ grpinfo
|
|||
dependency DUKE15_CRC
|
||||
gamefilter "Duke.DukeDC.15"
|
||||
GameID "DukeDC"
|
||||
exclepisodes "L.A. MELTDOWN", "LUNAR APOCALYPSE", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -237,6 +240,7 @@ grpinfo
|
|||
dependency DUKE15_CRC
|
||||
gamefilter "Duke.DukeDC.15"
|
||||
GameID "DukeDC"
|
||||
exclepisodes "L.A. MELTDOWN", "LUNAR APOCALYPSE", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -249,6 +253,7 @@ grpinfo
|
|||
dependency DUKE15_CRC
|
||||
gamefilter "Duke.DukeDC.15"
|
||||
GameID "DukeDC"
|
||||
exclepisodes "L.A. MELTDOWN", "LUNAR APOCALYPSE", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -262,6 +267,7 @@ grpinfo
|
|||
FgColor 0x00004f
|
||||
BkColor 0x8f8fff
|
||||
GameID "DukeVacation13"
|
||||
exclepisodes "L.A. MELTDOWN", "VACATION DUKEMATCH", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -275,6 +281,7 @@ grpinfo
|
|||
FgColor 0x00004f
|
||||
BkColor 0x8f8fff
|
||||
GameID "DukeVacation"
|
||||
exclepisodes "L.A. MELTDOWN", "VACATION DUKEMATCH", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -288,6 +295,7 @@ grpinfo
|
|||
FgColor 0x00004f
|
||||
BkColor 0x8f8fff
|
||||
GameID "DukeVacation"
|
||||
exclepisodes "L.A. MELTDOWN", "VACATION DUKEMATCH", "THE BIRTH"
|
||||
}
|
||||
|
||||
|
||||
|
@ -302,6 +310,7 @@ grpinfo
|
|||
FgColor 0x00004f
|
||||
BkColor 0x8f8fff
|
||||
GameID "DukeVacation"
|
||||
exclepisodes "L.A. MELTDOWN", "VACATION DUKEMATCH", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -316,6 +325,7 @@ grpinfo
|
|||
FgColor 0x00004f
|
||||
BkColor 0x8f8fff
|
||||
GameID "DukeVacation"
|
||||
exclepisodes "L.A. MELTDOWN", "VACATION DUKEMATCH", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -330,6 +340,7 @@ grpinfo
|
|||
FgColor 0x00004f
|
||||
BkColor 0x8f8fff
|
||||
GameID "DukeVacation"
|
||||
exclepisodes "L.A. MELTDOWN", "VACATION DUKEMATCH", "THE BIRTH"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -344,6 +355,7 @@ grpinfo
|
|||
FgColor 0
|
||||
BkColor 0x8f8f8f
|
||||
GameID "NuclearWinter"
|
||||
exclepisodes "L.A. MELTDOWN"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -357,6 +369,7 @@ grpinfo
|
|||
gamefilter "Duke.NWinter"
|
||||
FgColor 0
|
||||
BkColor 0x8f8f8f
|
||||
exclepisodes "L.A. MELTDOWN"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -717,7 +730,7 @@ grpinfo
|
|||
FgColor 0xbc9e89
|
||||
BkColor 0x7f3300
|
||||
GameID "Redneck"
|
||||
mpepisodes "PISSIN' CONTEST"
|
||||
exclepisodes "PISSIN' CONTEST"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -732,7 +745,7 @@ grpinfo
|
|||
FgColor 0xbc9e89
|
||||
BkColor 0x7f3300
|
||||
GameID "RedneckRides"
|
||||
mpepisodes "PISSIN' CONTEST"
|
||||
exclepisodes "PISSIN' CONTEST"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -774,7 +787,7 @@ grpinfo
|
|||
FgColor 0
|
||||
BkColor 0x78720d
|
||||
GameID "Nam"
|
||||
mpepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
exclepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -788,7 +801,7 @@ grpinfo
|
|||
FgColor 0
|
||||
BkColor 0x78720d
|
||||
GameID "Nam"
|
||||
mpepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
exclepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -802,7 +815,7 @@ grpinfo
|
|||
FgColor 0
|
||||
BkColor 0x78720d
|
||||
GameID "WW2GI"
|
||||
mpepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
exclepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
@ -815,7 +828,7 @@ grpinfo
|
|||
dependency WW2GI_CRC
|
||||
gamefilter "WW2GI.Platoon"
|
||||
GameID "PlatoonLeader"
|
||||
mpepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
exclepisodes "MULTIPLAYER I", "MULTIPLAYER II"
|
||||
}
|
||||
|
||||
grpinfo
|
||||
|
|
Loading…
Reference in a new issue