blob: b250d0ff125877626c238bea12c8fdb1d8fcf458 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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_
|