Skip to content

Commit

Permalink
Blood: Inline VanillaMode()
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir authored May 18, 2024
1 parent 71fc98c commit 0337959
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 2 additions & 6 deletions source/blood/src/blood.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ bool gSaveGameActive;
int gCacheMiss;
int gMenuPicnum = 2518; // default menu picnum

bool bVanilla = 0;

enum gametokens
{
T_INCLUDE = 0,
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 3 additions & 1 deletion source/blood/src/blood.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

0 comments on commit 0337959

Please sign in to comment.