jtmm2/include/player.h

25 lines
685 B
C
Raw Normal View History

#ifndef _DEF_PLAYER
#define _DEF_PLAYER
#include "vec.h"
2020-12-21 12:18:55 +01:00
typedef struct Player {
Vec pos;
Vec spd; /* velocity */
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 */
Vec origin; /* the origin of the player (offset) */
2020-12-23 23:22:02 +01:00
uint grace; /* coyot jump */
} Player;
#include "level.h"
#include "camera.h"
#include "input.h"
void player_move(Player *player, const Level *level);
void player_step(Player *player, Input *input, const Level *level);
2020-09-11 18:07:53 +02:00
void player_draw(Player *player, Camera *camera);
void player_draw_debug(Player *player, uint step, const Level *level, uint layer_id);
2020-09-11 18:07:53 +02:00
#endif /* _DEF_PLAYER */