mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- replaced vec2_t with FVector2.
This commit is contained in:
parent
7546cf3a4b
commit
016a907c20
5 changed files with 311 additions and 321 deletions
|
@ -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
|
@ -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 = {};
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -48,7 +48,7 @@ struct vec3_t
|
|||
|
||||
|
||||
#if 0
|
||||
struct vec2f_t
|
||||
struct FVector2
|
||||
{
|
||||
float x, y;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue