supercasiobros/include/box.h

27 lines
323 B
C
Raw Normal View History

2020-01-29 14:34:47 +01:00
// v0.3
2019-11-21 19:30:54 +01:00
#ifndef BOX_H
#define BOX_H
2020-01-29 14:34:47 +01:00
// Box type
// Used to simulate gravity and collides
2019-11-21 19:30:54 +01:00
typedef struct
{
int x :16;
int y :16;
2019-11-21 19:30:54 +01:00
unsigned w :8;
unsigned h :8;
2019-11-21 19:30:54 +01:00
int vx :8;
int vy :8;
int last_vy :8;
2020-01-29 14:34:47 +01:00
int gravity :8;
//int is_mario;
2019-11-21 19:30:54 +01:00
} box_t;
2020-01-29 14:34:47 +01:00
void box_move(box_t * b);
void box_jump(box_t * b, int height);
2019-11-21 19:30:54 +01:00
#endif