From e4ae7260155bdb597b9a459a9d4508279ba82e51 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 27 Sep 2022 09:50:24 +1000 Subject: [PATCH] - Rename `fixedhoriz::aspitch()` to `Degrees()` to match `DAngle` objects. --- source/core/fixedhorizon.h | 2 +- source/core/gameinput.cpp | 2 +- source/core/rendering/hw_entrypoint.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/fixedhorizon.h b/source/core/fixedhorizon.h index 4d531b3c3..2788ee17f 100644 --- a/source/core/fixedhorizon.h +++ b/source/core/fixedhorizon.h @@ -84,7 +84,7 @@ public: constexpr short asbuild() const { return FixedToInt(value); } constexpr double asbuildf() const { return FixedToFloat(value); } constexpr fixed_t asq16() const { return value; } - double aspitch() const { return HorizToPitch(value); } + double Degrees() const { return HorizToPitch(value); } bool operator< (fixedhoriz other) const { diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index 76a70b094..107fc6d39 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -228,7 +228,7 @@ void PlayerHorizon::applyinput(float const horz, ESyncBits* actions, double cons if (horz || *actions & (SB_AIM_UP | SB_AIM_DOWN | SB_LOOK_UP | SB_LOOK_DOWN)) { // Store current horizon as true pitch. - double pitch = horiz.aspitch(); + double pitch = horiz.Degrees(); // Process mouse input. if (horz) diff --git a/source/core/rendering/hw_entrypoint.cpp b/source/core/rendering/hw_entrypoint.cpp index e1deba7c4..0a86e8473 100644 --- a/source/core/rendering/hw_entrypoint.cpp +++ b/source/core/rendering/hw_entrypoint.cpp @@ -200,7 +200,7 @@ FRenderViewpoint SetupViewpoint(DCoreActor* cam, const DVector3& position, int s r_viewpoint.SectCount = sectnum; r_viewpoint.Pos = { position.X, -position.Y, -position.Z }; r_viewpoint.HWAngles.Yaw = FAngle::fromDeg(-90.f + (float)angle.Degrees()); - r_viewpoint.HWAngles.Pitch = FAngle::fromDeg(-horizon.aspitch()); + r_viewpoint.HWAngles.Pitch = FAngle::fromDeg(-horizon.Degrees()); r_viewpoint.HWAngles.Roll = FAngle::fromDeg(-(float)rollang.Degrees()); r_viewpoint.FieldOfView = FAngle::fromDeg(fov > 0? fov : (float)r_fov); r_viewpoint.RotAngle = angle.BAMs();