- use a sepate file system filter for 'duke-like' games, i.e. Duke, NAM and WW2GI combined.

These 3 all require the same SNDINFO being loaded.
This commit is contained in:
Christoph Oelckers 2022-11-25 08:59:16 +01:00
parent 797c122363
commit 52e5e2f59a
6 changed files with 17 additions and 11 deletions

View file

@ -197,6 +197,11 @@ inline bool isShareware()
}
inline bool isDukeLike()
{
return g_gameType & (GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI | GAMEFLAG_DUKE);
}
inline bool isDukeEngine()
{
return g_gameType & (GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI | GAMEFLAG_DUKE | GAMEFLAG_RRALL);
}

View file

@ -402,7 +402,8 @@ void InitFileSystem(TArray<GrpEntry>& groups)
lfi.dotFilter = LumpFilter;
if (g_gameType & (GAMEFLAG_DUKE | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI | GAMEFLAG_RRALL)) lfi.gameTypeFilter.Push("DukeEngine");
if (isDukeEngine()) lfi.gameTypeFilter.Push("DukeEngine");
if (isDukeLike()) lfi.gameTypeFilter.Push("DukeLike");
lfi.postprocessFunc = [&]()
{

View file

@ -869,7 +869,7 @@ void MarkMap()
{
GC::Mark(sect.firstEntry);
GC::Mark(sect.lastEntry);
if (isDukeLike()) GC::Mark(sect.hitagactor);
if (isDukeEngine()) GC::Mark(sect.hitagactor);
else if (isBlood())
{
GC::Mark(sect.upperLink);

View file

@ -103,7 +103,7 @@ static void SerializeGlobals(FSerializer& arc)
static void SerializeSession(FSerializer& arc)
{
// In Duke we now have reliable sound names.
if (isDukeLike()) arc.SetUniqueSoundNames();
if (isDukeEngine()) arc.SetUniqueSoundNames();
arc.ReadObjects(false);
SerializeMap(arc);
@ -489,7 +489,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, sectortype &c, sectort
("exflags", c.exflags, def->exflags);
// Save the extensions only when playing their respective games.
if (isDukeLike())
if (isDukeEngine())
{
arc("keyinfo", c.keyinfo, def->keyinfo)
("shadedsector", c.shadedsector, def->shadedsector)

View file

@ -199,13 +199,13 @@ $conreserve BIKEJMPL 190
$conreserve BIKELAND 191
$conreserve JACKJMP1 192
$conreserve JACKJMP2 193
$conreserve FIRE_CRACKLE =194
$conreserve BONUS_SPEECH1 =195
$conreserve BONUS_SPEECH2 =196
$conreserve BONUS_SPEECH3 =197
$conreserve FIRE_CRACKLE 194
$conreserve BONUS_SPEECH1 195
$conreserve BONUS_SPEECH2 196
$conreserve BONUS_SPEECH3 197
$conreserve E2L4 198
$conreserve BONUS_SPEECH4 =199
$conreserve PLAYER_LAND_HURT =200
$conreserve BONUS_SPEECH4 199
$conreserve PLAYER_LAND_HURT 200
$conreserve JACKATK2 201
$conreserve JACKPAIN 202
$conreserve LN_BITCH 203
@ -216,7 +216,7 @@ $conreserve LN_PAIN4 207
$conreserve LN_SLOW 208
$conreserve LN_PAIN4A 209
$conreserve JUG 210
$conreserve PLAYER_LONGTERM_PAIN =211
$conreserve PLAYER_LONGTERM_PAIN 211
$conreserve MONITOR 212
$conreserve JACKATK1 213
$conreserve BIKEUP 214