#ifndef PIXELDEFENSE_WAVE_H #define PIXELDEFENSE_WAVE_H #include typedef struct WaveData { i32 numOrcs; // How many orcs to send f32 orcSendRate; // How many orcs to send per second i32 numGoblins; // How many goblins to send f32 goblinSendRate; // How many goblins to send per second f32 difficultyScale; // Scale for health and damage f32 timeBeforeStart; // Time before start sending (seconds) } WaveData; typedef struct WaveInfo { i32 number; WaveData data; i32 orcsToSend; f32 orcsElapsed; i32 goblinsToSend; f32 goblinsElapsed; f32 elapsed; bool started; } WaveInfo; #define NUM_WAVES 5 typedef struct Game Game; static WaveData predefWaves[NUM_WAVES] = { { 10, 1.0f, 20, 2.0f, 0, 5 * 60 }, { 20, 1.0f, 40, 2.0f, 0, 2 * 60 }, { 25, 1.0f, 80, 2.2f, 0, 2 * 60 }, { 50, 1.2f, 120, 3.0f, 0, 1.5f * 60 }, { 100, 2.0f, 220, 4.0f, 0, 1.0f * 60 }, }; WaveInfo getWaveInfo(i32 idx); void updateWave(WaveInfo *wave, Game *game, f32 dt); bool isWaveSendingOver(const WaveInfo *wave); bool isWaveOver(const WaveInfo *wave); #endif //PIXELDEFENSE_WAVE_H