From 4d47fe7e85b9c812e5303eda30d4f89573134b24 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 16 Sep 2020 10:14:04 +1000 Subject: [PATCH] - Blood: Remove `bVanilla`. --- source/blood/src/actor.cpp | 7 +------ source/blood/src/blood.cpp | 5 ++--- source/blood/src/db.cpp | 5 ++--- source/blood/src/globals.cpp | 1 - source/blood/src/globals.h | 1 - source/blood/src/loadsave.cpp | 3 +-- source/blood/src/player.cpp | 7 +------ 7 files changed, 7 insertions(+), 22 deletions(-) diff --git a/source/blood/src/actor.cpp b/source/blood/src/actor.cpp index b7cd59b95..464072dc9 100644 --- a/source/blood/src/actor.cpp +++ b/source/blood/src/actor.cpp @@ -4728,12 +4728,7 @@ void MoveDude(spritetype *pSprite) { GetZRange(pSprite, &ceilZ, &ceilHit, &floorZ, &floorHit, wd, CLIPMASK0, PARALLAXCLIP_CEILING|PARALLAXCLIP_FLOOR); if (pPlayer) - { - if (bVanilla) - playerResetInertia(pPlayer); - else - playerCorrectInertia(pPlayer, &oldpos); - } + playerCorrectInertia(pPlayer, &oldpos); switch (nLink) { case kMarkerLowStack: if (pPlayer == gView) diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index dc618103c..58e8b1afa 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -123,7 +123,6 @@ void StartLevel(MapRecord* level) gHealthTemp[i] = xsprite[gPlayer[i].pSprite->extra].health; } } - bVanilla = false; memset(xsprite, 0, sizeof(xsprite)); memset(sprite, 0, kMaxSprites * sizeof(spritetype)); //drawLoadingScreen(); @@ -228,7 +227,7 @@ void StartLevel(MapRecord* level) PreloadCache(); InitMirrors(); trInit(); - if (!bVanilla && !gMe->packSlots[1].isActive) // if diving suit is not active, turn off reverb sound effect + if (!gMe->packSlots[1].isActive) // if diving suit is not active, turn off reverb sound effect sfxSetReverb(0); ambInit(); Net_ClearFifo(); @@ -442,7 +441,7 @@ void GameInterface::app_init() gChoke.init(518, sub_84230); UpdateDacs(0, true); - enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;//bVanilla; + enginecompatibility_mode = ENGINECOMPATIBILITY_19960925; } static void gameInit() diff --git a/source/blood/src/db.cpp b/source/blood/src/db.cpp index 4fac8c7aa..f84d21632 100644 --- a/source/blood/src/db.cpp +++ b/source/blood/src/db.cpp @@ -162,7 +162,7 @@ void qinitspritelists(void) // Replace { headspritestat[i] = -1; } - int const nMaxSprites = bVanilla ? 4096 : kMaxSprites; + int const nMaxSprites = kMaxSprites; for (short i = 0; i < nMaxSprites; i++) { sprite[i].sectnum = -1; @@ -285,8 +285,7 @@ unsigned short dbInsertXSprite(int nSprite) ThrowError("Out of free XSprites"); } memset(&xsprite[nXSprite], 0, sizeof(XSPRITE)); - if (!bVanilla) - memset(&gSpriteHit[nXSprite], 0, sizeof(SPRITEHIT)); + memset(&gSpriteHit[nXSprite], 0, sizeof(SPRITEHIT)); xsprite[nXSprite].reference = nSprite; sprite[nSprite].extra = nXSprite; return nXSprite; diff --git a/source/blood/src/globals.cpp b/source/blood/src/globals.cpp index c517b7a51..282bfa52d 100644 --- a/source/blood/src/globals.cpp +++ b/source/blood/src/globals.cpp @@ -32,7 +32,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -bool bVanilla = false; int gFrameClock; int gFrameCount; diff --git a/source/blood/src/globals.h b/source/blood/src/globals.h index 5b784e21f..03bd9a744 100644 --- a/source/blood/src/globals.h +++ b/source/blood/src/globals.h @@ -32,7 +32,6 @@ BEGIN_BLD_NS extern int gFrameClock; extern int gFrameCount; -extern bool bVanilla; #define MAXPLAYERNAME 16 diff --git a/source/blood/src/loadsave.cpp b/source/blood/src/loadsave.cpp index 56e80fb10..fd6eaae28 100644 --- a/source/blood/src/loadsave.cpp +++ b/source/blood/src/loadsave.cpp @@ -498,7 +498,7 @@ bool GameInterface::LoadGame(FSaveGameNode* node) InitSectorFX(); viewInitializePrediction(); PreloadCache(); - if (!bVanilla && !gMe->packSlots[1].isActive) // if diving suit is not active, turn off reverb sound effect + if (!gMe->packSlots[1].isActive) // if diving suit is not active, turn off reverb sound effect sfxSetReverb(0); ambInit(); for (int i = 0; i < gNetPlayers; i++) @@ -506,7 +506,6 @@ bool GameInterface::LoadGame(FSaveGameNode* node) viewSetErrorMessage(""); Net_ClearFifo(); paused = 0; - bVanilla = false; #ifdef USE_OPENGL diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index dfc3542b2..42ab50308 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -1336,12 +1336,7 @@ void ProcessInput(PLAYER *pPlayer) } pPlayer->deathTime += 4; if (!bSeqStat) - { - if (bVanilla) - pPlayer->q16horiz = IntToFixed(mulscale16(0x8000-(Cos(ClipHigh(pPlayer->deathTime*8, 1024))>>15), 120)); - else - pPlayer->q16horiz = mulscale16(0x8000-(Cos(ClipHigh(pPlayer->deathTime*8, 1024))>>15), IntToFixed(120)); - } + pPlayer->q16horiz = mulscale16(0x8000-(Cos(ClipHigh(pPlayer->deathTime<<3, 1024))>>15), IntToFixed(120)); if (pPlayer->curWeapon) pInput->setNewWeapon(pPlayer->curWeapon); if (pInput->actions & SB_OPEN)