28 lines
537 B
C
28 lines
537 B
C
#ifndef ASTEROIDS_H
|
|
#define ASTEROIDS_H
|
|
|
|
#include "physics.h"
|
|
|
|
typedef void (*asteroids_cb_t)();
|
|
|
|
typedef enum {
|
|
ASTEROID_SMALL,
|
|
ASTEROID_MEDIUM,
|
|
ASTEROID_LARGE,
|
|
ASTEROID_HUGE,
|
|
} asteroid_size_t;
|
|
|
|
typedef struct {
|
|
float probability;
|
|
asteroid_size_t size;
|
|
} asteroid_size_dist_entry_t;
|
|
|
|
void asteroids_clear();
|
|
void asteroids_on_clear(asteroids_cb_t cb);
|
|
|
|
void asteroids_add(const asteroid_size_dist_entry_t *dist);
|
|
void asteroids_hit(unsigned shot, unsigned asteroid, physics_sep_t sep);
|
|
bool asteroids_check(unsigned id);
|
|
|
|
#endif
|