From 68bf97462a5c006a07d7e5af8ab0e3de7998473f Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 1 Apr 2020 22:55:36 +1100 Subject: [PATCH] Blood: Remove constexpr on player horizon values. --- source/blood/src/controls.cpp | 8 ++++---- source/blood/src/nnexts.cpp | 6 +++--- source/blood/src/player.cpp | 8 ++++---- source/blood/src/view.cpp | 12 ++++++------ 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/blood/src/controls.cpp b/source/blood/src/controls.cpp index 395e3e662..c0bac7786 100644 --- a/source/blood/src/controls.cpp +++ b/source/blood/src/controls.cpp @@ -387,10 +387,10 @@ void ctrlGetInput(void) gInput.q16mlook = fix16_clamp(fix16_sadd(gInput.q16mlook, input.q16mlook), fix16_from_int(-127)>>2, fix16_from_int(127)>>2); if (gMe && gMe->pXSprite->health != 0 && !gPaused) { - constexpr int upAngle = 289; - constexpr int downAngle = -347; - constexpr double lookStepUp = 4.0*upAngle/60.0; - constexpr double lookStepDown = -4.0*downAngle/60.0; + int upAngle = 289; + int downAngle = -347; + double lookStepUp = 4.0*upAngle/60.0; + double lookStepDown = -4.0*downAngle/60.0; gViewAngle = (gViewAngle + input.q16turn + fix16_from_float(scaleAdjustmentToInterval(gViewAngleAdjust))) & 0x7ffffff; if (gViewLookRecenter) { diff --git a/source/blood/src/nnexts.cpp b/source/blood/src/nnexts.cpp index 68207c9d8..4a375d1fd 100644 --- a/source/blood/src/nnexts.cpp +++ b/source/blood/src/nnexts.cpp @@ -1204,9 +1204,9 @@ void trPlayerCtrlSetScreenEffect(XSPRITE* pXSource, PLAYER* pPlayer) { void trPlayerCtrlSetLookAngle(XSPRITE* pXSource, PLAYER* pPlayer) { - constexpr int upAngle = 289; constexpr int downAngle = -347; - constexpr double lookStepUp = 4.0 * upAngle / 60.0; - constexpr double lookStepDown = -4.0 * downAngle / 60.0; + int upAngle = 289; int downAngle = -347; + double lookStepUp = 4.0 * upAngle / 60.0; + double lookStepDown = -4.0 * downAngle / 60.0; int look = pXSource->data2 << 5; if (look > 0) pPlayer->q16look = fix16_min(mulscale8(fix16_from_dbl(lookStepUp), look), fix16_from_int(upAngle)); diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index 936a942d6..a5e36fbb4 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -1574,10 +1574,10 @@ void ProcessInput(PLAYER *pPlayer) } else { - constexpr int upAngle = 289; - constexpr int downAngle = -347; - constexpr double lookStepUp = 4.0*upAngle/60.0; - constexpr double lookStepDown = -4.0*downAngle/60.0; + int upAngle = 289; + int downAngle = -347; + double lookStepUp = 4.0*upAngle/60.0; + double lookStepDown = -4.0*downAngle/60.0; if (pInput->keyFlags.lookCenter && !pInput->buttonFlags.lookUp && !pInput->buttonFlags.lookDown) { if (pPlayer->q16look < 0) diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index f4c9e2c7d..1c11cafaa 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -456,10 +456,10 @@ void fakeProcessInput(PLAYER *pPlayer, GINPUT *pInput) else predict.at24 = 0; #endif - constexpr int upAngle = 289; - constexpr int downAngle = -347; - constexpr double lookStepUp = 4.0*upAngle/60.0; - constexpr double lookStepDown = -4.0*downAngle/60.0; + int upAngle = 289; + int downAngle = -347; + double lookStepUp = 4.0*upAngle/60.0; + double lookStepDown = -4.0*downAngle/60.0; if (predict.at6e && !pInput->buttonFlags.lookUp && !pInput->buttonFlags.lookDown) { if (predict.at20 < 0) @@ -3189,8 +3189,8 @@ void viewDrawScreen(bool sceneonly) } if (gView == gMe && (numplayers <= 1 || gPrediction) && gView->pXSprite->health != 0 && !VanillaMode()) { - constexpr int upAngle = 289; - constexpr int downAngle = -347; + int upAngle = 289; + int downAngle = -347; fix16_t q16look; cA = gViewAngle; q16look = gViewLook;