mirror of https://git.sr.ht/~kikoodx/crystal-tower
21 lines
394 B
C
21 lines
394 B
C
#pragma once
|
|
#include "vec.h"
|
|
|
|
struct Player {
|
|
struct Vec pos;
|
|
struct VecF spd;
|
|
struct VecF rem;
|
|
int jump_grace;
|
|
int jump_buffer;
|
|
int lock_direction;
|
|
int last_direction;
|
|
};
|
|
|
|
void player_init(struct Vec pos);
|
|
void player_update(void);
|
|
void player_draw(void);
|
|
/* return truncated speed */
|
|
struct Vec player_update_rem(void);
|
|
void player_move(struct Vec spd);
|
|
struct Vec *player_pos(void);
|