Finish main menu screen

This commit is contained in:
2024-02-12 17:18:37 +01:00
parent 10c6d74e90
commit abaa778aab
9 changed files with 759 additions and 491 deletions

View File

@@ -23,19 +23,18 @@ typedef struct WaveInfo {
bool started;
} WaveInfo;
#define NUM_WAVES 5
typedef struct EnemyWaves {
i32 numWaves;
const WaveData *waves;
} EnemyWaves;
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 },
};
EnemyWaves getDefaultWaves();
EnemyWaves getMainMenuWaves();
WaveInfo getWaveInfo(i32 idx);
WaveInfo getWaveInfo(const EnemyWaves *waves, i32 idx);
void updateWave(WaveInfo *wave, Game *game, f32 dt);