diff options
Diffstat (limited to 'player.h')
-rw-r--r-- | player.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/player.h b/player.h new file mode 100644 index 0000000..b250d0f --- /dev/null +++ b/player.h @@ -0,0 +1,26 @@ +#ifndef PLAYER_H_ +#define PLAYER_H_ + +#include <SDL2/SDL.h> + +struct Player { + float pos_x, pos_y; + double vel_x, vel_y; + int accel_x, accel_y; + int max_vel_x, max_vel_y; + int hp; + SDL_Vertex *geometry; + int geometry_len; +}; + +enum Direction { + UP, + DOWN, + LEFT, + RIGHT, +}; + +void player_accelerate(struct Player *player, int x, int y, float delta); +void player_move(struct Player *player, enum Direction direction, float delta); + +#endif // PLAYER_H_ |