From a97a2ec133933914fb390b387600c797cf0ae476 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Apr 2022 00:26:50 +0200 Subject: [PATCH] - backend sync with Raze MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing really useful here… --- src/common/rendering/v_video.h | 1 - src/common/scripting/vm/vm.h | 7 +++++++ src/common/thirdparty/math/cmath.h | 12 ++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/common/rendering/v_video.h b/src/common/rendering/v_video.h index 31e7389d0..4322165bf 100644 --- a/src/common/rendering/v_video.h +++ b/src/common/rendering/v_video.h @@ -44,7 +44,6 @@ #include "intrect.h" #include "hw_shadowmap.h" #include "buffers.h" -#include "g_levellocals.h" struct FPortalSceneState; diff --git a/src/common/scripting/vm/vm.h b/src/common/scripting/vm/vm.h index d0a34a975..4bd342a49 100644 --- a/src/common/scripting/vm/vm.h +++ b/src/common/scripting/vm/vm.h @@ -708,6 +708,13 @@ struct AFuncDesc extern FieldDesc const *const VMGlobal_##name##_HookPtr; \ MSVC_FSEG FieldDesc const *const VMGlobal_##name##_HookPtr GCC_FSEG = &VMGlobal_##name; +#define DEFINE_GLOBAL_UNSIZED(name) \ + static const FieldDesc VMGlobal_##name = { "", #name, (size_t)&name, ~0u, 0 }; \ + extern FieldDesc const *const VMGlobal_##name##_HookPtr; \ + MSVC_FSEG FieldDesc const *const VMGlobal_##name##_HookPtr GCC_FSEG = &VMGlobal_##name; + + + class AActor; diff --git a/src/common/thirdparty/math/cmath.h b/src/common/thirdparty/math/cmath.h index 5c02c4e87..7059e5e57 100644 --- a/src/common/thirdparty/math/cmath.h +++ b/src/common/thirdparty/math/cmath.h @@ -54,6 +54,16 @@ extern FFastTrig fasttrig; #define RAD2BAM(f) ((unsigned)xs_CRoundToInt((f) * (0x80000000/3.14159265358979323846))) +inline double fastcosbam(double v) +{ + return fasttrig.cos(v); +} + +inline double fastsinbam(double v) +{ + return fasttrig.sin(v); +} + inline double fastcosdeg(double v) { return fasttrig.cos(DEG2BAM(v)); @@ -129,6 +139,8 @@ inline double cosdeg(double v) #else #define g_sindeg fastsindeg #define g_cosdeg fastcosdeg +#define g_sinbam fastsinbam +#define g_cosbam fastcosbam #define g_sin fastsin #define g_cos fastcos #endif