blob: 9a331b7159091976881a5186f4f8853c5fea177a (
plain) (
blame)
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
|
#ifndef obj_h
#define obj_h
#include "rect.h"
struct App;
struct Renderer;
struct Map;
typedef enum {
face_left,
face_right
} Face;
typedef struct {
int x, y, vx, vy;
int frame;
int anim;
int grounded, headbutted, on_ramp, jumping;
Face face;
Rect rect;
} Player;
void init_player(Player* p);
void update_player(
Player* p,
struct App* app,
const struct Map* map
);
void ren_player(Player* p, struct Renderer* r);
#endif
|