mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- added workaround for DukeDC's ending cutscene which was abusing undefined behavior in the original code.
This commit is contained in:
parent
514c029e47
commit
3e8ff96e6b
4 changed files with 23 additions and 9 deletions
|
@ -110,7 +110,7 @@ enum
|
|||
GAMEFLAG_EXHUMED = 0x00004000,
|
||||
GAMEFLAG_PSEXHUMED = GAMEFLAG_POWERSLAVE | GAMEFLAG_EXHUMED, // the two games really are the same, except for the name and the publisher.
|
||||
GAMEFLAG_WORLDTOUR = 0x00008000,
|
||||
GAMEFLAG_STANDALONE = 0x00010000,
|
||||
GAMEFLAG_DUKEDC = 0x00010000,
|
||||
GAMEFLAGMASK = 0x0000FFFF, // flags allowed from grpinfo
|
||||
|
||||
// We still need these for the parsers.
|
||||
|
|
|
@ -399,6 +399,7 @@ static TArray<GrpInfo> ParseGrpInfo(const char *fn, FileReader &fr, TMap<FString
|
|||
FlagMap.Insert("GAMEFLAG_SW", GAMEFLAG_SW);
|
||||
FlagMap.Insert("GAMEFLAG_POWERSLAVE", GAMEFLAG_POWERSLAVE);
|
||||
FlagMap.Insert("GAMEFLAG_EXHUMED", GAMEFLAG_EXHUMED);
|
||||
FlagMap.Insert("GAMEFLAG_DUKEDC", GAMEFLAG_DUKEDC);
|
||||
|
||||
FScanner sc;
|
||||
auto mem = fr.Read();
|
||||
|
|
|
@ -548,6 +548,12 @@ static void bonussequence_d(int num, JobDesc *jobs, int &job)
|
|||
{ -1,-1 }
|
||||
};
|
||||
|
||||
static const AnimSound dukedcsound[] =
|
||||
{
|
||||
{ 144, ENDSEQVOL3SND3 + 1 },
|
||||
{ -1,-1 }
|
||||
};
|
||||
|
||||
static const AnimSound vol4e1[] =
|
||||
{
|
||||
{ 3, DUKE_UNDERWATER+1 },
|
||||
|
@ -591,10 +597,17 @@ static void bonussequence_d(int num, JobDesc *jobs, int &job)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
jobs[job++] = { PlayVideo("cineov3.anm", cineov3sound, framespeed_10), nullptr };
|
||||
jobs[job++] = { Create<DBlackScreen>(200), []() { FX_StopAllSounds(); } };
|
||||
jobs[job++] = { Create<DEpisode3End>(), []() { if (!PLUTOPAK) S_PlaySound(ENDSEQVOL3SND4, CHAN_AUTO, CHANF_UI); } };
|
||||
if (!PLUTOPAK) jobs[job++] = { Create<DImageScreen>(TexMan.GetGameTextureByName("DUKETEAM.ANM", false, FTextureManager::TEXMAN_ForceLookup)), []() { FX_StopAllSounds(); } };
|
||||
if (g_gameType & GAMEFLAG_DUKEDC)
|
||||
{
|
||||
jobs[job++] = { PlayVideo("radlogo.anm", dukedcsound, framespeed_10), nullptr };
|
||||
}
|
||||
else
|
||||
{
|
||||
jobs[job++] = { PlayVideo("cineov3.anm", cineov3sound, framespeed_10), nullptr };
|
||||
jobs[job++] = { Create<DBlackScreen>(200), []() { FX_StopAllSounds(); } };
|
||||
jobs[job++] = { Create<DEpisode3End>(), []() { if (!PLUTOPAK) S_PlaySound(ENDSEQVOL3SND4, CHAN_AUTO, CHANF_UI); } };
|
||||
if (!PLUTOPAK) jobs[job++] = { Create<DImageScreen>(TexMan.GetGameTextureByName("DUKETEAM.ANM", false, FTextureManager::TEXMAN_ForceLookup)), []() { FX_StopAllSounds(); } };
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
|
|
@ -159,7 +159,7 @@ grpinfo
|
|||
name "Duke it out in D.C. (1.3D)"
|
||||
size 7926624
|
||||
crc DUKEDC13_CRC
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON|GAMEFLAG_DUKEDC
|
||||
dependency DUKE13_CRC
|
||||
gamefilter "Duke.DukeDC"
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ grpinfo
|
|||
name "Duke it out in D.C."
|
||||
size 8225517
|
||||
crc DUKEDCPP_CRC
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON|GAMEFLAG_DUKEDC
|
||||
dependency DUKE15_CRC
|
||||
gamefilter "Duke.DukeDC"
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ grpinfo
|
|||
name "Duke it out in D.C."
|
||||
size 8410183
|
||||
crc DUKEDC_CRC
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON|GAMEFLAG_DUKEDC
|
||||
dependency DUKE15_CRC
|
||||
gamefilter "Duke.DukeDC"
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ grpinfo
|
|||
scriptname "DUKEDC.CON"
|
||||
size 8410187
|
||||
crc 0x39A692BF
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
|
||||
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON|GAMEFLAG_DUKEDC
|
||||
dependency DUKE15_CRC
|
||||
gamefilter "Duke.DukeDC"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue