Files
ld58/code/game/player.h
2025-10-05 18:05:01 +01:00

31 lines
567 B
C

#if !defined(LD_GAME_PLAYER_H_)
#define LD_GAME_PLAYER_H_
#include "../core/types.h"
#include "../core/macros.h"
#include <SDL3/SDL_events.h>
#define PLAYER_SPEED 10.0f
typedef struct ControlState ControlState;
struct ControlState {
bool rightDown;
bool leftDown;
bool upDown;
bool downDown;
};
typedef struct Player Player;
struct Player
{
V2f pos;
U32 bulletsLoaded;
ControlState controls;
};
function void PlayerInput(SDL_Event *event, Player *player);
function void PlayerUpdate(F32 delta, Player *player);
#endif // LD_GAME_PLAYER_H_