add basic types and fix cmake
This commit is contained in:
48
src/lib/config/WorldConfig.h
Normal file
48
src/lib/config/WorldConfig.h
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user