blob: 07096a852d55914a65ec2ea5c1c150370679ded5 (
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
27
28
29
30
31
32
33
34
|
#ifndef PACMAN_H_
#define PACMAN_H_
#include <SDL2/SDL.h>
#include "animation.h"
#include "demo.h"
#include "map.h"
#include "facing.h"
struct pacman_init {
float initial_xpos;
float initial_ypos;
enum facing initial_facing;
};
struct pacman {
/*
* Coolest bug I have ever seen in my life
*/
float xpos;
float ypos;
enum facing facing;
/* One for each face */
struct animation animations[4];
};
void init_pacman(struct pacman* pacman, struct pacman_init* init);
void handle_pacman_input(struct pacman* pacman, struct map* map);
void update_pacman(struct pacman* pacman, float dt, struct map* map);
void draw_pacman(struct demo* demo, const struct pacman* pacman);
#endif // PACMAN_H_
|