diff options
| author | navewindre <boneyaard@gmail.com> | 2025-11-28 14:41:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-28 14:41:22 +0100 |
| commit | 9c05c795d7b59c5ab94fb769f315c712b37df0cd (patch) | |
| tree | 16cccf8cbb88703de798066a06f94013f89a8a5a /src/game/player.h | |
| parent | f8b92ce3aa08b1445c9f956d8166830946562d12 (diff) | |
| parent | 3e094f20d4dda90e0356aba3f0abc4b7c7015844 (diff) | |
Merge pull request #1 from navewindre/windows-compat
Windows compat
Diffstat (limited to 'src/game/player.h')
| -rw-r--r-- | src/game/player.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game/player.h b/src/game/player.h index 71b1c02..6617f01 100644 --- a/src/game/player.h +++ b/src/game/player.h @@ -1,8 +1,16 @@ #pragma once #include "object.h" +#include "camera.h" + struct PLAYER_INPUT { - + PLAYER_CAMERA cam; + struct PLAYER* pobj; + + // for nulls + U8 fwd_held{}, bk_held{}, left_held{}, right_held{}; + + VEC2 move; }; struct PLAYER : OBJECT { @@ -11,6 +19,8 @@ struct PLAYER : OBJECT { F32 fov{72.f}; F32 eyeoffset{40.f}; + PLAYER_INPUT input; + VEC3 mins; VEC3 maxs; @@ -19,4 +29,5 @@ struct PLAYER : OBJECT { extern PLAYER* player_create( VEC3 origin, F32 yaw ); extern void player_input( struct GAME_DATA* game, PLAYER* player ); +extern void player_move( struct GAME_DATA* game, PLAYER* player ); extern VEC3 player_get_view_pos( PLAYER* player ); |
