From b6051775a33ac81e8205ed557a746453025f2c67 Mon Sep 17 00:00:00 2001 From: Disquse Date: Tue, 7 Nov 2023 19:12:20 +0300 Subject: [PATCH] tweak(extra-natives/rdr3): add GamePrimitives --- .../include/GamePrimitives.h | 8 +-- .../include/GamePrimitives.h | 54 +++++++++++++++++++ 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 code/components/extra-natives-rdr3/include/GamePrimitives.h diff --git a/code/components/extra-natives-five/include/GamePrimitives.h b/code/components/extra-natives-five/include/GamePrimitives.h index 61b9d864d2..3c90b596f1 100644 --- a/code/components/extra-natives-five/include/GamePrimitives.h +++ b/code/components/extra-natives-five/include/GamePrimitives.h @@ -74,8 +74,8 @@ struct alignas(16) Vec4V struct spdAABB { - rage::Vec3V mins; - rage::Vec3V maxs; + Vec3V mins; + Vec3V maxs; }; struct spdSphere @@ -88,8 +88,8 @@ struct spdSphere // fake name struct spdRay { - rage::Vec3V start; - rage::Vec3V end; + Vec3V start; + Vec3V end; }; enum class eSearchVolumeType : int diff --git a/code/components/extra-natives-rdr3/include/GamePrimitives.h b/code/components/extra-natives-rdr3/include/GamePrimitives.h new file mode 100644 index 0000000000..a97bae5597 --- /dev/null +++ b/code/components/extra-natives-rdr3/include/GamePrimitives.h @@ -0,0 +1,54 @@ +#pragma once + +// SSE4 is pretty common +#define _XM_SSE4_INTRINSICS_ +#include + +namespace rage +{ +struct alignas(16) Vec3V +{ + float x; + float y; + float z; + float pad; + + Vec3V() + : x(0), y(0), z(0), pad(0) + { + } + + Vec3V(float x, float y, float z) + : x(x), y(y), z(z), pad(NAN) + { + } +}; + +struct alignas(16) Vec4V +{ + float x; + float y; + float z; + float w; +}; + +struct spdAABB +{ + Vec3V mins; + Vec3V maxs; +}; + +struct spdSphere +{ + // xyz = center + // w = radius + Vec4V sphere; +}; + +// fake name +struct spdRay +{ + Vec3V start; + Vec3V end; +}; +}