add basic types and fix cmake

This commit is contained in:
2026-04-19 15:35:21 +02:00
parent ebf6cea353
commit 41fd2a83ee
30 changed files with 1562 additions and 5 deletions

View File

@@ -0,0 +1,48 @@
#pragma once
#include "Formula.h"
// Region widths are in tiles (REQ-GW-REGIONS).
struct WorldRegions
{
int asteroidWidth;
int playerBufferWidth;
int contestZoneWidth;
int enemyBufferWidth;
};
// Asteroid expansion (REQ-EXP-UNLOCK, REQ-EXP-COST).
struct WorldExpansion
{
int columnsPerExpansion;
int costBuildingBlocks;
};
// Push scaling (REQ-PSH-*).
struct WorldPush
{
int pushExpandColumns;
double scalingFactor;
};
// Wave scheduling (REQ-WAV-*).
struct WorldWaves
{
Formula threatRateFormula; // threat/s as a function of elapsed game-time seconds
Formula shipLevelFormula; // enemy ship level as a function of elapsed game-time seconds
double gapMinSeconds;
double gapMaxSeconds;
double spawnDurationSeconds;
};
struct WorldConfig
{
int heightTiles; // REQ-GW-HEIGHT
int refundPercentage; // REQ-BLD-DEMOLISH
double scrapDespawnSeconds; // REQ-RES-SCRAP-DROP
WorldRegions regions;
WorldExpansion expansion;
WorldPush push;
WorldWaves waves;
};