From 03379595c78fa520f44c129f3728ae642aacfeaa Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Sat, 18 May 2024 13:54:38 +1000 Subject: [PATCH] Blood: Inline VanillaMode() --- source/blood/src/blood.cpp | 8 ++------ source/blood/src/blood.h | 4 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index e0d6392365..c7215b2e11 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -127,6 +127,8 @@ bool gSaveGameActive; int gCacheMiss; int gMenuPicnum = 2518; // default menu picnum +bool bVanilla = 0; + enum gametokens { T_INCLUDE = 0, @@ -2782,16 +2784,10 @@ void LoadExtraArts(void) } } -static bool bVanilla = 0; - void VanillaModeUpdate(void) { bVanilla = gDemo.VanillaDemo() || (gVanilla && !gDemo.at0 && gGameOptions.nGameType == kGameTypeSinglePlayer && numplayers == 1); } -bool VanillaMode(void) { - return bVanilla; -} - bool fileExistsRFF(int id, const char *ext) { return gSysRes.Lookup(id, ext); } diff --git a/source/blood/src/blood.h b/source/blood/src/blood.h index b88ad8456e..ccc6499890 100644 --- a/source/blood/src/blood.h +++ b/source/blood/src/blood.h @@ -72,6 +72,8 @@ extern int gCacheMiss; extern int gDoQuickSave; extern int gMenuPicnum; +extern bool bVanilla; + void QuitGame(void); void PreloadCache(void); void StartLevel(GAMEOPTIONS *gameOptions); @@ -80,7 +82,7 @@ void ScanINIFiles(void); bool LoadArtFile(const char *pzFile); void LoadExtraArts(void); void VanillaModeUpdate(void); -bool VanillaMode(void); +inline bool VanillaMode(void) {return bVanilla;} bool fileExistsRFF(int id, const char* ext); int sndTryPlaySpecialMusic(int nMusic); void sndPlaySpecialMusicOrNothing(int nMusic); \ No newline at end of file