Skip to content

Commit

Permalink
Merge pull request #810 from tmyqlfpir/master
Browse files Browse the repository at this point in the history
Blood: Inline VanillaMode()
  • Loading branch information
Hendricks266 authored May 19, 2024
2 parents 71fc98c + 0337959 commit 6c3f8e7
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 6c3f8e7

Please sign in to comment.