- renamed some members of Blood's EPISODEINFO struct.

This commit is contained in:
Christoph Oelckers 2020-08-02 23:47:21 +02:00
parent e434df5328
commit 38616d90a3
4 changed files with 15 additions and 16 deletions

View file

@ -370,7 +370,7 @@ void StartLevel(GAMEOPTIONS *gameOptions)
if (!(gGameOptions.uGameFlags&1))
levelSetupOptions(gGameOptions.nEpisode, gGameOptions.nLevel);
if (gEpisodeInfo[gGameOptions.nEpisode].cutALevel == gGameOptions.nLevel
&& gEpisodeInfo[gGameOptions.nEpisode].at8f08)
&& gEpisodeInfo[gGameOptions.nEpisode].cutsceneAName)
gGameOptions.uGameFlags |= 4;
///////

View file

@ -128,7 +128,7 @@ void levelPlayIntroScene(int nEpisode, CompletionFunc completion)
ambKillAll();
seqKillAll();
EPISODEINFO *pEpisode = &gEpisodeInfo[nEpisode];
playSmk(pEpisode->at8f08, pEpisode->at9030, pEpisode->at9028, completion);
playSmk(pEpisode->cutsceneAName, pEpisode->cutsceneASound, pEpisode->at9028, completion);
}
void levelPlayEndScene(int nEpisode, CompletionFunc completion)
@ -140,7 +140,7 @@ void levelPlayEndScene(int nEpisode, CompletionFunc completion)
ambKillAll();
seqKillAll();
EPISODEINFO *pEpisode = &gEpisodeInfo[nEpisode];
playSmk(pEpisode->at8f98, pEpisode->at90c0, pEpisode->at902c, completion);
playSmk(pEpisode->cutsceneBName, pEpisode->cutsceneBSound, pEpisode->at902c, completion);
}

View file

@ -206,18 +206,18 @@ void levelLoadDefaults(void)
EPISODEINFO *pEpisodeInfo = &gEpisodeInfo[i];
auto ep_str = BloodINI->GetKeyString(buffer, "Title", buffer);
gVolumeNames[i] = ep_str; // only keep one table for the names. Todo: Consolidate this across games.
strncpy(pEpisodeInfo->at8f08, BloodINI->GetKeyString(buffer, "CutSceneA", ""), BMAX_PATH);
strncpy(pEpisodeInfo->cutsceneAName, BloodINI->GetKeyString(buffer, "CutSceneA", ""), BMAX_PATH);
pEpisodeInfo->at9028 = BloodINI->GetKeyInt(buffer, "CutWavA", -1);
if (pEpisodeInfo->at9028 == 0)
strncpy(pEpisodeInfo->at9030, BloodINI->GetKeyString(buffer, "CutWavA", ""), BMAX_PATH);
strncpy(pEpisodeInfo->cutsceneASound, BloodINI->GetKeyString(buffer, "CutWavA", ""), BMAX_PATH);
else
pEpisodeInfo->at9030[0] = 0;
strncpy(pEpisodeInfo->at8f98, BloodINI->GetKeyString(buffer, "CutSceneB", ""), BMAX_PATH);
pEpisodeInfo->cutsceneASound[0] = 0;
strncpy(pEpisodeInfo->cutsceneBName, BloodINI->GetKeyString(buffer, "CutSceneB", ""), BMAX_PATH);
pEpisodeInfo->at902c = BloodINI->GetKeyInt(buffer, "CutWavB", -1);
if (pEpisodeInfo->at902c == 0)
strncpy(pEpisodeInfo->at90c0, BloodINI->GetKeyString(buffer, "CutWavB", ""), BMAX_PATH);
strncpy(pEpisodeInfo->cutsceneBSound, BloodINI->GetKeyString(buffer, "CutWavB", ""), BMAX_PATH);
else
pEpisodeInfo->at90c0[0] = 0;
pEpisodeInfo->cutsceneBSound[0] = 0;
pEpisodeInfo->bloodbath = BloodINI->GetKeyInt(buffer, "BloodBathOnly", 0);
pEpisodeInfo->cutALevel = BloodINI->GetKeyInt(buffer, "CutSceneALevel", 0);
@ -296,7 +296,7 @@ void levelEndLevel(int arg)
case 0:
if (nEndingA == -1)
{
if (pEpisodeInfo->at8f98[0])
if (pEpisodeInfo->cutsceneBName[0])
gGameOptions.uGameFlags |= 8;
gGameOptions.nLevel = 0;
gGameOptions.uGameFlags |= 2;
@ -309,7 +309,7 @@ void levelEndLevel(int arg)
{
if (gGameOptions.nEpisode + 1 < gEpisodeCount)
{
if (pEpisodeInfo->at8f98[0])
if (pEpisodeInfo->cutsceneBName[0])
gGameOptions.uGameFlags |= 8;
gGameOptions.nLevel = 0;
gGameOptions.uGameFlags |= 2;

View file

@ -72,17 +72,16 @@ enum {
struct EPISODEINFO
{
//char at0[32]; removed, so that the global episode name table can be used for consistency
int nLevels;
unsigned int bloodbath : 1;
unsigned int cutALevel : 4;
MapRecord* levels; // points into the global table.
char at8f08[BMAX_PATH];
char at8f98[BMAX_PATH];
char cutsceneAName[BMAX_PATH];
char cutsceneBName[BMAX_PATH];
int at9028;
int at902c;
char at9030[BMAX_PATH];
char at90c0[BMAX_PATH];
char cutsceneASound[BMAX_PATH];
char cutsceneBSound[BMAX_PATH];
};
extern EPISODEINFO gEpisodeInfo[];