From 69dff8658f8bb149425fadb0d82134fe04b45371 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 28 Aug 2022 13:42:46 +1000 Subject: [PATCH] - Move `getincangle()` from `gameinput.h` to `gamefuncs.h`. * Should be eliminated fairly soon, anyway. --- source/core/gamefuncs.h | 12 ++++++++++++ source/core/gameinput.h | 5 ----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/source/core/gamefuncs.h b/source/core/gamefuncs.h index 0edd989b9..aededa76a 100644 --- a/source/core/gamefuncs.h +++ b/source/core/gamefuncs.h @@ -239,6 +239,18 @@ inline int getangle(const vec2_t& vec) } +//--------------------------------------------------------------------------- +// +// Returns an angle delta for Build angles. +// +//--------------------------------------------------------------------------- + +inline constexpr int getincangle(int a, int na) +{ + return int(unsigned(na << 21) - unsigned(a << 21)) >> 21; +} + + extern int cameradist, cameraclock; void loaddefinitionsfile(const char* fn, bool cumulative = false, bool maingrp = false); diff --git a/source/core/gameinput.h b/source/core/gameinput.h index f1e7c0b76..46bc75dca 100644 --- a/source/core/gameinput.h +++ b/source/core/gameinput.h @@ -7,11 +7,6 @@ #include "gamestruct.h" #include "packet.h" -inline constexpr int getincangle(int a, int na) -{ - return int(unsigned(na << 21) - unsigned(a << 21)) >> 21; -} - struct PlayerHorizon { fixedhoriz horiz, ohoriz, horizoff, ohorizoff;