#ifndef wave_h #define wave_h #include "config.h" /* TODO: Different enemies. */ typedef struct Waver Waver; typedef void (*Wave_Finish)(Waver* waver, int last); typedef struct { int x, y; } Wave_Spawn; typedef struct { int frame; int count; Wave_Spawn spawns[wave_max_spawns]; } Subwave; typedef struct { Subwave subwaves[wave_max_subwaves]; int subwave_count; int kill_requirement; } Wave; struct Waver { int idx, sidx; int timer; }; void init_waver(Waver* waver); void start_wave(struct World* world); int wave_enemy_count(const Waver* waver); void next_wave(Waver* waver); void update_waver(Waver* waver, struct World* world); int get_wave_count(); #endif