This repository has been archived on 2022-01-13. You can view files and clone it, but cannot push or open issues or pull requests.
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-21 14:52:28 +02:00
|
|
|
Vec hbox; /* the bottom left corner of the player's hitbox */
|
|
|
|
Vec vbox; /* the bottom left corner of the player's visual box */
|
2020-09-16 11:18:55 +02:00
|
|
|
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-19 14:00:46 +02:00
|
|
|
void player_draw_debug(Player *player, uint step);
|
2020-09-11 12:01:24 +02:00
|
|
|
|
2020-09-11 18:07:53 +02:00
|
|
|
#endif /* _DEF_PLAYER */
|