blob: 3bb06819a872570bbedd8683e4e3c46099421eb1 (
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
|
#ifndef PACMAN_H_
#define PACMAN_H_
#include <SDL2/SDL.h>
#include "animation.h"
#include "demo.h"
#include "map.h"
enum facing {
FACING_RIGHT,
FACING_DOWN,
FACING_LEFT,
FACING_UP
};
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 handle_pacman_input(SDL_Event* e, struct pacman* pacman);
void update_pacman(struct pacman* pacman, float dt, struct map* map);
void draw_pacman(struct demo* demo, const struct pacman* pacman);
#endif // PACMAN_H_
|