2020-09-11 12:01:24 +02:00
|
|
|
#ifndef _DEF_PLAYER
|
|
|
|
#define _DEF_PLAYER
|
|
|
|
|
|
|
|
#include "vec.h"
|
2020-09-11 18:07:53 +02:00
|
|
|
#include "camera.h"
|
2020-09-17 14:30:46 +02:00
|
|
|
#include "input.h"
|
2020-09-11 12:01:24 +02:00
|
|
|
|
|
|
|
typedef struct Player
|
|
|
|
{
|
2020-09-14 14:37:46 +02:00
|
|
|
Vec pos;
|
2020-09-16 11:18:55 +02:00
|
|
|
Vec hbox; /* the bottom right corner of the player's hitbox */
|
|
|
|
Vec origin; /* the origin of the player (offset) */
|
2020-09-11 12:01:24 +02:00
|
|
|
} Player;
|
|
|
|
|
2020-09-17 14:30:46 +02:00
|
|
|
void player_step(Player *player, Input *input);
|
2020-09-11 18:07:53 +02:00
|
|
|
void player_draw(Player *player, Camera *camera);
|
2020-09-18 11:12:34 +02:00
|
|
|
void player_draw_debug(Player *player);
|
2020-09-11 12:01:24 +02:00
|
|
|
|
2020-09-11 18:07:53 +02:00
|
|
|
#endif /* _DEF_PLAYER */
|