acabat amb balloon_formations.txt

This commit is contained in:
2025-07-21 00:56:17 +02:00
parent 2e606bf160
commit dbab3de3df
3 changed files with 200 additions and 200 deletions

View File

@@ -151,7 +151,7 @@ auto BalloonFormations::parseBalloonLine(const std::string& line, const std::map
return std::nullopt;
}
int creation_time = evaluateExpression(tokens[6], variables);
int creation_time = CREATION_TIME + evaluateExpression(tokens[6], variables);
return BalloonFormationParams(x + desp, y, vel_x, type, size, creation_time);
} catch (const std::exception&) {
@@ -249,7 +249,6 @@ void BalloonFormations::loadDefaultFormations() {
const int DEFAULT_POS_Y = param.game.play_area.rect.h - BALLOON_SPAWN_HEIGHT;
const int X4_0 = param.game.play_area.rect.x;
const int X4_100 = param.game.play_area.rect.w - BALLOON_SIZE[3];
constexpr int CREATION_TIME = 300;
// Formación básica #00
std::vector<BalloonFormationParams> basic_formation = {

View File

@@ -9,10 +9,6 @@
#include <vector>
// --- Constantes de configuración ---
constexpr int NUMBER_OF_BALLOON_FORMATIONS = 100;
constexpr int MAX_NUMBER_OF_BALLOONS_IN_A_FORMATION = 50;
constexpr int NUMBER_OF_SETS_PER_POOL = 10;
constexpr int NUMBER_OF_STAGES = 10;
// --- Estructuras de datos ---
struct BalloonFormationParams {
@@ -62,7 +58,12 @@ class BalloonFormations {
private:
// --- Constantes ---
static constexpr int BALLOON_SPAWN_HEIGHT = 208; // Altura desde el suelo en la que aparecen los globos
static constexpr int BALLOON_SPAWN_HEIGHT = 208; // Altura desde el suelo en la que aparecen los globos
static constexpr int CREATION_TIME = 300; // Tiempo base de creación de los globos para las formaciones
static constexpr int NUMBER_OF_BALLOON_FORMATIONS = 100;
static constexpr int MAX_NUMBER_OF_BALLOONS_IN_A_FORMATION = 50;
static constexpr int NUMBER_OF_SETS_PER_POOL = 10;
static constexpr int NUMBER_OF_STAGES = 10;
// --- Datos ---
std::vector<BalloonFormationUnit> balloon_formation_; // Vector con todas las formaciones enemigas