- replaced vec2_t with FVector2.

This commit is contained in:
Christoph Oelckers 2021-12-14 10:07:06 +01:00
parent 7546cf3a4b
commit 016a907c20
5 changed files with 311 additions and 321 deletions

View file

@ -59,19 +59,9 @@ typedef intptr_t bssize_t;
#define BMAX_PATH 256
////////// Metaprogramming structs //////////
using native_t = intptr_t;
struct vec2f_t {
float x, y;
};
static_assert(sizeof(FVector3) == sizeof(float) * 3);
#include "basics.h"
////////// Bitfield manipulation //////////
#endif // compat_h_

File diff suppressed because it is too large Load diff

View file

@ -64,10 +64,10 @@ CVAR(Float, m_side, 1.f, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
void InputState::GetMouseDelta(ControlInfo * hidInput)
{
hidInput->mouseturnx = g_mousePos.x * m_yaw * (1.f / 18.f);
hidInput->mouseturny = g_mousePos.y * m_pitch * (1.f / 14.f);
hidInput->mousemovex = g_mousePos.x * m_side;
hidInput->mousemovey = g_mousePos.y * m_forward;
hidInput->mouseturnx = g_mousePos.X * m_yaw * (1.f / 18.f);
hidInput->mouseturny = g_mousePos.Y * m_pitch * (1.f / 14.f);
hidInput->mousemovex = g_mousePos.X * m_side;
hidInput->mousemovey = g_mousePos.Y * m_forward;
g_mousePos = {};
}

View file

@ -33,7 +33,7 @@ class InputState
{
uint8_t KeyStatus[NUM_KEYS];
bool AnyKeyStatus;
vec2f_t g_mousePos;
FVector2 g_mousePos;
public:
@ -46,8 +46,8 @@ public:
void MouseAddToPos(float x, float y)
{
g_mousePos.x += x;
g_mousePos.y += y;
g_mousePos.X += x;
g_mousePos.Y += y;
}
void GetMouseDelta(ControlInfo* hidInput);

View file

@ -48,7 +48,7 @@ struct vec3_t
#if 0
struct vec2f_t
struct FVector2
{
float x, y;
};