- Added hexendemo.wad and hexdemo.wad as aliases for the demo Hexen IWAD.

- Added IWAD checks for freedoom1.wad and freedm.wad.


SVN r1198 (trunk)
This commit is contained in:
Randy Heit 2008-09-06 03:39:36 +00:00
parent b77836d4cf
commit ee6c208917
3 changed files with 48 additions and 4 deletions

View file

@ -1,4 +1,6 @@
September 5, 2008
- Added hexendemo.wad and hexdemo.wad as aliases for the demo Hexen IWAD.
- Added IWAD checks for freedoom1.wad and freedm.wad.
- The garbage collector now has an opportunity to step each time individual
thinkers tick, not just once every game tick. This more closely follows
the original Lua behavior. This change was made because, in cases of

View file

@ -219,6 +219,7 @@ const IWADInfo IWADInfos[NUM_IWAD_TYPES] =
{ "Final Doom: Plutonia Experiment", "Plutonia", MAKERGB(168,0,0), MAKERGB(168,168,168) },
{ "Hexen: Beyond Heretic", NULL, MAKERGB(240,240,240), MAKERGB(107,44,24) },
{ "Hexen: Deathkings of the Dark Citadel", "HexenDK", MAKERGB(240,240,240), MAKERGB(139,68,9) },
{ "Hexen: Demo Version", "HexenDemo",MAKERGB(240,240,240), MAKERGB(107,44,24) },
{ "DOOM 2: Hell on Earth", "Doom2", MAKERGB(168,0,0), MAKERGB(168,168,168) },
{ "Heretic Shareware", NULL, MAKERGB(252,252,0), MAKERGB(168,0,0) },
{ "Heretic: Shadow of the Serpent Riders", NULL, MAKERGB(252,252,0), MAKERGB(168,0,0) },
@ -230,6 +231,8 @@ const IWADInfo IWADInfos[NUM_IWAD_TYPES] =
{ "Strife: Teaser (Old Version)", NULL, MAKERGB(224,173,153), MAKERGB(0,107,101) },
{ "Strife: Teaser (New Version)", NULL, MAKERGB(224,173,153), MAKERGB(0,107,101) },
{ "Freedoom", "Freedoom", MAKERGB(50,84,67), MAKERGB(198,220,209) },
{ "Freedoom \"Demo\"", "Freedoom1",MAKERGB(50,84,67), MAKERGB(198,220,209) },
{ "FreeDM", "FreeDM", MAKERGB(50,84,67), MAKERGB(198,220,209) },
{ "Chex(R) Quest", "Chex", MAKERGB(255,255,0), MAKERGB(0,192,0) },
};
@ -252,9 +255,13 @@ static const char *IWADNames[] =
"heretic1.wad",
"hexen.wad",
"hexdd.wad",
"hexendemo.wad",
"hexdemo.wad",
"strife1.wad",
"strife0.wad",
"freedoom.wad", // Freedoom.wad is distributed as Doom2.wad, but this allows to have both in the same directory.
"freedoom1.wad",
"freedm.wad",
"chex.wad",
#ifdef unix
"DOOM2.WAD", // Also look for all-uppercase names
@ -266,9 +273,13 @@ static const char *IWADNames[] =
"HERETIC1.WAD",
"HEXEN.WAD",
"HEXDD.WAD",
"HEXENDEMO.WAD",
"HEXDEMO.WAD",
"STRIFE1.WAD",
"STRIFE0.WAD",
"FREEDOOM.WAD",
"FREEDOOM1.WAD",
"FREEDM.WAD",
"CHEX.WAD",
#endif
NULL
@ -1334,6 +1345,7 @@ static void SetIWAD (const char *iwadpath, EIWADType type)
{ commercial, &PlutoniaGameInfo, pack_plut }, // Doom2Plutonia
{ commercial, &HexenGameInfo, doom2 }, // Hexen
{ commercial, &HexenDKGameInfo, doom2 }, // HexenDK
{ commercial, &HexenGameInfo, doom2 }, // Hexen Demo
{ commercial, &CommercialGameInfo, doom2 }, // Doom2
{ shareware, &HereticSWGameInfo, doom }, // HereticShareware
{ retail, &HereticGameInfo, doom }, // HereticExtended
@ -1345,6 +1357,8 @@ static void SetIWAD (const char *iwadpath, EIWADType type)
{ commercial, &StrifeTeaserGameInfo, doom2 }, // StrifeTeaser
{ commercial, &StrifeTeaser2GameInfo, doom2 }, // StrifeTeaser2
{ commercial, &CommercialGameInfo, doom2 }, // FreeDoom
{ shareware, &SharewareGameInfo, doom }, // FreeDoom1
{ commercial, &CommercialGameInfo, doom2 }, // FreeDM
{ registered, &ChexGameInfo, doom }, // Chex Quest
};
@ -1378,8 +1392,9 @@ static EIWADType ScanIWAD (const char *iwad)
static const char checklumps[][8] =
{
"E1M1",
"E4M1",
"E4M2",
"MAP01",
"MAP40",
"MAP60",
"TITLE",
"REDTNT2",
@ -1403,6 +1418,7 @@ static EIWADType ScanIWAD (const char *iwad)
Check_e1m1,
Check_e4m1,
Check_map01,
Check_map40,
Check_map60,
Check_title,
Check_redtnt2,
@ -1479,11 +1495,27 @@ static EIWADType ScanIWAD (const char *iwad)
{
if (lumpsfound[Check_title])
{
return IWAD_Hexen;
if (lumpsfound[Check_map40])
{
return IWAD_Hexen;
}
else
{
return IWAD_HexenDemo;
}
}
else if (lumpsfound[Check_FreeDoom])
{
return IWAD_FreeDoom;
// Is there a 100% reliable way to tell FreeDoom and FreeDM
// apart based solely on the lump names?
if (strstr(iwad, "freedm.wad") || strstr(iwad, "FREEDM.WAD"))
{
return IWAD_FreeDM;
}
else
{
return IWAD_FreeDoom;
}
}
else
{
@ -1517,7 +1549,14 @@ static EIWADType ScanIWAD (const char *iwad)
{
if (!lumpsfound[i])
{
return IWAD_DoomShareware;
if (lumpsfound[Check_FreeDoom])
{
return IWAD_FreeDoom1;
}
else
{
return IWAD_DoomShareware;
}
}
}
if (i == NUM_CHECKLUMPS)

View file

@ -60,6 +60,7 @@ enum EIWADType
IWAD_Doom2Plutonia,
IWAD_Hexen,
IWAD_HexenDK,
IWAD_HexenDemo,
IWAD_Doom2,
IWAD_HereticShareware,
IWAD_HereticExtended,
@ -71,6 +72,8 @@ enum EIWADType
IWAD_StrifeTeaser,
IWAD_StrifeTeaser2,
IWAD_FreeDoom,
IWAD_FreeDoom1,
IWAD_FreeDM,
IWAD_ChexQuest,
NUM_IWAD_TYPES