]> git.lizzy.rs Git - nothing.git/blob - src/player.h
(#110) Implement player_checkpoint
[nothing.git] / src / player.h
1 #ifndef PLAYER_H_
2 #define PLAYER_H_
3
4 #include <SDL2/SDL.h>
5 #include "./goals.h"
6 #include "./lava.h"
7 #include "./camera.h"
8 #include "./sound_medium.h"
9 #include "./player.h"
10 #include "./platforms.h"
11
12 typedef struct player_t player_t;
13
14 player_t *create_player(float x, float y, color_t color);
15 player_t *create_player_from_stream(FILE *stream);
16 void destroy_player(player_t * player);
17
18 int player_render(const player_t * player,
19                   SDL_Renderer *renderer,
20                   const camera_t *camera);
21 void player_update(player_t * player,
22                    const platforms_t *platforms,
23                    float delta_time);
24
25 void player_checkpoint(player_t *player,
26                        vec_t checkpoint);
27
28 void player_move_left(player_t *player);
29 void player_move_right(player_t *player);
30 void player_stop(player_t *player);
31 void player_jump(player_t *player);
32 void player_die(player_t *player);
33
34 void player_focus_camera(player_t *player,
35                          camera_t *camera);
36 void player_hide_goals(const player_t *player,
37                        goals_t *goal);
38 void player_die_from_lava(player_t *player,
39                           const lava_t *lava);
40
41 #endif  // PLAYER_H_