2019-11-21 19:30:54 +01:00
|
|
|
#ifndef BOX_H
|
|
|
|
#define BOX_H
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2019-12-11 16:31:18 +01:00
|
|
|
int x :16;
|
|
|
|
int y :16;
|
2019-11-21 19:30:54 +01:00
|
|
|
|
2019-12-11 16:31:18 +01:00
|
|
|
unsigned w :8;
|
|
|
|
unsigned h :8;
|
2019-11-21 19:30:54 +01:00
|
|
|
|
2019-12-11 16:31:18 +01:00
|
|
|
int vx :8;
|
|
|
|
int vy :8;
|
|
|
|
int last_vy :8;
|
|
|
|
int gravity :2;
|
2019-11-30 13:57:18 +01:00
|
|
|
//int is_mario;
|
2019-11-21 19:30:54 +01:00
|
|
|
} box_t;
|
|
|
|
|
2019-12-08 16:34:32 +01:00
|
|
|
int box_move(box_t * b);
|
2019-11-21 19:30:54 +01:00
|
|
|
int box_jump(box_t * b, int height); // hauteur du saut
|
|
|
|
|
|
|
|
#endif
|