- Added Gez's patch for IWAD detection of Blasphemer and Action Doom 2.

SVN r1946 (trunk)
This commit is contained in:
Randy Heit 2009-10-29 05:51:20 +00:00
parent 059be338b4
commit d082266365
3 changed files with 25 additions and 2 deletions

View file

@ -1,4 +1,5 @@
October 28, 2009 October 28, 2009
- Added Gez's patch for IWAD detection of Blasphemer and Action Doom 2.
- Fixed: 0 damage projectiles did not call P_DamageMobj. - Fixed: 0 damage projectiles did not call P_DamageMobj.
- Fixed: Do not exit P_DamageMobj early if damage is 0, so we can still get - Fixed: Do not exit P_DamageMobj early if damage is 0, so we can still get
the side effects from it. PainThreshold also needs to be inclusive, as the side effects from it. PainThreshold also needs to be inclusive, as

View file

@ -77,8 +77,10 @@ const IWADInfo IWADInfos[NUM_IWAD_TYPES] =
{ "Ultimate Freedoom", "Freedoom1",MAKERGB(50,84,67), MAKERGB(198,220,209), GAME_Doom, "mapinfo/doom1.txt" }, { "Ultimate Freedoom", "Freedoom1",MAKERGB(50,84,67), MAKERGB(198,220,209), GAME_Doom, "mapinfo/doom1.txt" },
{ "Freedoom \"Demo\"", NULL, MAKERGB(50,84,67), MAKERGB(198,220,209), GAME_Doom, "mapinfo/doom1.txt" }, { "Freedoom \"Demo\"", NULL, MAKERGB(50,84,67), MAKERGB(198,220,209), GAME_Doom, "mapinfo/doom1.txt" },
{ "FreeDM", "FreeDM", MAKERGB(50,84,67), MAKERGB(198,220,209), GAME_Doom, "mapinfo/doom2.txt", GI_MAPxx }, { "FreeDM", "FreeDM", MAKERGB(50,84,67), MAKERGB(198,220,209), GAME_Doom, "mapinfo/doom2.txt", GI_MAPxx },
{ "Blasphemer", "Blasphemer",MAKERGB(115,0,0), MAKERGB(0,0,0), GAME_Heretic, "mapinfo/heretic.txt" },
{ "Chex(R) Quest", "Chex1", MAKERGB(255,255,0), MAKERGB(0,192,0), GAME_Chex, "mapinfo/chex.txt" }, { "Chex(R) Quest", "Chex1", MAKERGB(255,255,0), MAKERGB(0,192,0), GAME_Chex, "mapinfo/chex.txt" },
{ "Chex(R) Quest 3", "Chex3", MAKERGB(255,255,0), MAKERGB(0,192,0), GAME_Chex, "mapinfo/chex3.txt" }, { "Chex(R) Quest 3", "Chex3", MAKERGB(255,255,0), MAKERGB(0,192,0), GAME_Chex, "mapinfo/chex3.txt" },
{ "Action Doom 2: Urban Brawl", "UrbanBrawl",MAKERGB(168,168,0), MAKERGB(168,0,0), GAME_Doom, "mapinfo/doom2.txt" },
//{ "ZDoom Engine", NULL, MAKERGB(168,0,0), MAKERGB(168,168,168) }, //{ "ZDoom Engine", NULL, MAKERGB(168,0,0), MAKERGB(168,168,168) },
}; };
@ -104,8 +106,11 @@ static const char *IWADNames[] =
"freedoom1.wad", "freedoom1.wad",
"freedoomu.wad", "freedoomu.wad",
"freedm.wad", "freedm.wad",
"blasphem.wad",
"blasphemer.wad",
"chex.wad", "chex.wad",
"chex3.wad", "chex3.wad",
"action2.wad",
#ifdef unix #ifdef unix
"DOOM2.WAD", // Also look for all-uppercase names "DOOM2.WAD", // Also look for all-uppercase names
"PLUTONIA.WAD", "PLUTONIA.WAD",
@ -124,8 +129,11 @@ static const char *IWADNames[] =
"FREEDOOM1.WAD", "FREEDOOM1.WAD",
"FREEDOOMU.WAD", "FREEDOOMU.WAD",
"FREEDM.WAD", "FREEDM.WAD",
"BLASPHEM.WAD",
"BLASPHEMER.WAD",
"CHEX.WAD", "CHEX.WAD",
"CHEX3.WAD", "CHEX3.WAD",
"ACTION2.WAD",
#endif #endif
NULL NULL
}; };
@ -141,6 +149,7 @@ static EIWADType ScanIWAD (const char *iwad)
{ {
static const char checklumps[][8] = static const char checklumps[][8] =
{ {
"AD2LIB",
"E1M1", "E1M1",
"E4M2", "E4M2",
"MAP01", "MAP01",
@ -154,6 +163,7 @@ static EIWADType ScanIWAD (const char *iwad)
"MAP33", "MAP33",
"INVCURS", "INVCURS",
{ 'F','R','E','E','D','O','O','M' }, { 'F','R','E','E','D','O','O','M' },
{ 'B','L','A','S','P','H','E','M' },
"W94_1", "W94_1",
{ 'P','O','S','S','H','0','M','0' }, { 'P','O','S','S','H','0','M','0' },
"CYCLA1", "CYCLA1",
@ -169,6 +179,7 @@ static EIWADType ScanIWAD (const char *iwad)
#define NUM_CHECKLUMPS (sizeof(checklumps)/8) #define NUM_CHECKLUMPS (sizeof(checklumps)/8)
enum enum
{ {
Check_ad2lib,
Check_e1m1, Check_e1m1,
Check_e4m1, Check_e4m1,
Check_map01, Check_map01,
@ -182,6 +193,7 @@ static EIWADType ScanIWAD (const char *iwad)
Check_map33, Check_map33,
Check_invcurs, Check_invcurs,
Check_FreeDoom, Check_FreeDoom,
Check_Blasphem,
Check_W94_1, Check_W94_1,
Check_POSSH0M0, Check_POSSH0M0,
Check_Cycla1, Check_Cycla1,
@ -237,7 +249,11 @@ static EIWADType ScanIWAD (const char *iwad)
} }
else if (lumpsfound[Check_map01]) else if (lumpsfound[Check_map01])
{ {
if (lumpsfound[Check_FreeDoom]) if (lumpsfound[Check_ad2lib])
{
return IWAD_ActionDoom2;
}
else if (lumpsfound[Check_FreeDoom])
{ {
// Is there a 100% reliable way to tell FreeDoom and FreeDM // Is there a 100% reliable way to tell FreeDoom and FreeDM
// apart based solely on the lump names? // apart based solely on the lump names?
@ -287,7 +303,11 @@ static EIWADType ScanIWAD (const char *iwad)
} }
else else
{ {
if (lumpsfound[Check_Extended]) if (lumpsfound[Check_Blasphem])
{
return IWAD_Blasphemer;
}
else if (lumpsfound[Check_Extended])
{ {
return IWAD_HereticExtended; return IWAD_HereticExtended;
} }

View file

@ -77,8 +77,10 @@ enum EIWADType
IWAD_FreeDoomU, IWAD_FreeDoomU,
IWAD_FreeDoom1, IWAD_FreeDoom1,
IWAD_FreeDM, IWAD_FreeDM,
IWAD_Blasphemer,
IWAD_ChexQuest, IWAD_ChexQuest,
IWAD_ChexQuest3, IWAD_ChexQuest3,
IWAD_ActionDoom2,
IWAD_Custom, IWAD_Custom,
NUM_IWAD_TYPES NUM_IWAD_TYPES