Skip to content

Commit

Permalink
Blood: Moved VanillaModeDemo() to gDemo.VanillaDemo()
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir authored and Hendricks266 committed May 13, 2024
1 parent 8658502 commit 0c4bba7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 1 addition & 5 deletions source/blood/src/blood.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2782,14 +2782,10 @@ void LoadExtraArts(void)
}
}

bool VanillaModeDemo(void) {
return gDemo.m_bLegacy && gDemo.at1;
}

static bool bVanilla = 0;

void VanillaModeUpdate(void) {
bVanilla = VanillaModeDemo() || (gVanilla && !gDemo.at0 && gGameOptions.nGameType == kGameTypeSinglePlayer && numplayers == 1);
bVanilla = gDemo.VanillaDemo() || (gVanilla && !gDemo.at0 && gGameOptions.nGameType == kGameTypeSinglePlayer && numplayers == 1);
}

bool VanillaMode(void) {
Expand Down
1 change: 0 additions & 1 deletion source/blood/src/blood.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ void ProcessFrame(void);
void ScanINIFiles(void);
bool LoadArtFile(const char *pzFile);
void LoadExtraArts(void);
bool VanillaModeDemo(void);
void VanillaModeUpdate(void);
bool VanillaMode(void);
bool fileExistsRFF(int id, const char* ext);
Expand Down
5 changes: 5 additions & 0 deletions source/blood/src/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,11 @@ void CDemo::LoadDemoInfo(void)
pCurrentDemo = pFirstDemo;
}

bool CDemo::VanillaDemo(void)
{
return at1 && m_bLegacy;
}

void CDemo::NextDemo(void)
{
pCurrentDemo = pCurrentDemo->pNext ? pCurrentDemo->pNext : pFirstDemo;
Expand Down
1 change: 1 addition & 0 deletions source/blood/src/demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class CDemo {
void Playback(void);
void StopPlayback(void);
void LoadDemoInfo(void);
bool VanillaDemo(void);
void NextDemo(void);
void FlushInput(int nCount);
void ReadInput(int nCount);
Expand Down
2 changes: 1 addition & 1 deletion source/blood/src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ void ProcessInput(PLAYER *pPlayer)
}
pInput->keyFlags.action = 0;
}
if (VanillaModeDemo())
if (gDemo.VanillaDemo())
{
if (pInput->keyFlags.lookCenter && !pInput->buttonFlags.lookUp && !pInput->buttonFlags.lookDown)
{
Expand Down

0 comments on commit 0c4bba7

Please sign in to comment.