diff --git a/data/config/balloon_formations.txt b/data/config/balloon_formations.txt index cdf0078..6b2dd03 100644 --- a/data/config/balloon_formations.txt +++ b/data/config/balloon_formations.txt @@ -20,15 +20,15 @@ formation: 2 # Cuatro enemigos BALLOON2 uno detrás del otro. A la izquierda y hacia el centro X2_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 300 X2_0 + BALLOON_SIZE_1 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 290 -X2_0 + (BALLOON_SIZE_1 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 280 -X2_0 + (BALLOON_SIZE_1 + 1) * 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 270 +X2_0 + BALLOON_SIZE_1 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 280 +X2_0 + BALLOON_SIZE_1 * 3 + 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 270 formation: 3 # Cuatro enemigos BALLOON2 uno detrás del otro. A la derecha y hacia el centro X2_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 300 X2_100 - BALLOON_SIZE_1 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 290 -X2_100 - (BALLOON_SIZE_1 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 280 -X2_100 - (BALLOON_SIZE_1 + 1) * 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 270 +X2_100 - BALLOON_SIZE_1 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 280 +X2_100 - BALLOON_SIZE_1 * 3 - 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 270 formation: 4 # Tres enemigos BALLOON3. 0, 25, 50. Hacia la derecha @@ -46,61 +46,61 @@ formation: 6 # Tres enemigos BALLOON3. 0, 0, 0. Hacia la derecha X3_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 300 X3_0 + BALLOON_SIZE_2 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 290 -X3_0 + (BALLOON_SIZE_2 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 280 +X3_0 + BALLOON_SIZE_2 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 280 formation: 7 # Tres enemigos BALLOON3. 100, 100, 100. Hacia la izquierda X3_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 300 X3_100 - BALLOON_SIZE_2 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 290 -X3_100 - (BALLOON_SIZE_2 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 280 +X3_100 - BALLOON_SIZE_2 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 280 formation: 8 # Seis enemigos BALLOON1. 0, 0, 0, 0, 0, 0. Hacia la derecha X1_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 300 X1_0 + BALLOON_SIZE_0 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 290 -X1_0 + (BALLOON_SIZE_0 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 280 -X1_0 + (BALLOON_SIZE_0 + 1) * 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 270 -X1_0 + (BALLOON_SIZE_0 + 1) * 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 260 -X1_0 + (BALLOON_SIZE_0 + 1) * 5, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 250 +X1_0 + BALLOON_SIZE_0 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 280 +X1_0 + BALLOON_SIZE_0 * 3 + 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 270 +X1_0 + BALLOON_SIZE_0 * 4 + 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 260 +X1_0 + BALLOON_SIZE_0 * 5 + 5, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 250 formation: 9 # Seis enemigos BALLOON1. 100, 100, 100, 100, 100, 100. Hacia la izquierda X1_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 300 X1_100 - BALLOON_SIZE_0 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 290 -X1_100 - (BALLOON_SIZE_0 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 280 -X1_100 - (BALLOON_SIZE_0 + 1) * 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 270 -X1_100 - (BALLOON_SIZE_0 + 1) * 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 260 -X1_100 - (BALLOON_SIZE_0 + 1) * 5, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 250 +X1_100 - BALLOON_SIZE_0 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 280 +X1_100 - BALLOON_SIZE_0 * 3 - 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 270 +X1_100 - BALLOON_SIZE_0 * 4 - 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 260 +X1_100 - BALLOON_SIZE_0 * 5 - 5, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 250 formation: 10 # Tres enemigos BALLOON4 seguidos desde la izquierda. Hacia la derecha X4_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE4, 300 X4_0 + BALLOON_SIZE_3 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE4, 285 -X4_0 + (BALLOON_SIZE_3 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE4, 270 +X4_0 + BALLOON_SIZE_3 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE4, 270 formation: 11 # Tres enemigos BALLOON4 seguidos desde la derecha. Hacia la izquierda X4_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE4, 300 X4_100 - BALLOON_SIZE_3 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE4, 285 -X4_100 - (BALLOON_SIZE_3 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE4, 270 +X4_100 - BALLOON_SIZE_3 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE4, 270 formation: 12 # Seis enemigos BALLOON2 uno detrás del otro. A la izquierda y hacia el centro X2_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 300 X2_0 + BALLOON_SIZE_1 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 290 -X2_0 + (BALLOON_SIZE_1 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 280 -X2_0 + (BALLOON_SIZE_1 + 1) * 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 270 -X2_0 + (BALLOON_SIZE_1 + 1) * 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 260 -X2_0 + (BALLOON_SIZE_1 + 1) * 5, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 250 +X2_0 + BALLOON_SIZE_1 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 280 +X2_0 + BALLOON_SIZE_1 * 3 + 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 270 +X2_0 + BALLOON_SIZE_1 * 4 + 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 260 +X2_0 + BALLOON_SIZE_1 * 5 + 5, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 250 formation: 13 # Seis enemigos BALLOON2 uno detrás del otro. A la derecha y hacia el centro X2_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 300 X2_100 - BALLOON_SIZE_1 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 290 -X2_100 - (BALLOON_SIZE_1 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 280 -X2_100 - (BALLOON_SIZE_1 + 1) * 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 270 -X2_100 - (BALLOON_SIZE_1 + 1) * 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 260 -X2_100 - (BALLOON_SIZE_1 + 1) * 5, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 250 +X2_100 - BALLOON_SIZE_1 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 280 +X2_100 - BALLOON_SIZE_1 * 3 - 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 270 +X2_100 - BALLOON_SIZE_1 * 4 - 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 260 +X2_100 - BALLOON_SIZE_1 * 5 - 5, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 250 formation: 14 # Cinco enemigos BALLOON3. Hacia la derecha. Separados @@ -122,47 +122,47 @@ formation: 16 # Cinco enemigos BALLOON3. Hacia la derecha. Juntos X3_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 300 X3_0 + BALLOON_SIZE_2 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 290 -X3_0 + (BALLOON_SIZE_2 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 280 -X3_0 + (BALLOON_SIZE_2 + 1) * 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 270 -X3_0 + (BALLOON_SIZE_2 + 1) * 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 260 +X3_0 + BALLOON_SIZE_2 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 280 +X3_0 + BALLOON_SIZE_2 * 3 + 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 270 +X3_0 + BALLOON_SIZE_2 * 4 + 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 260 formation: 17 # Cinco enemigos BALLOON3. Hacia la izquierda. Juntos X3_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 300 X3_100 - BALLOON_SIZE_2 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 290 -X3_100 - (BALLOON_SIZE_2 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 280 -X3_100 - (BALLOON_SIZE_2 + 1) * 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 270 -X3_100 - (BALLOON_SIZE_2 + 1) * 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 260 +X3_100 - BALLOON_SIZE_2 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 280 +X3_100 - BALLOON_SIZE_2 * 3 - 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 270 +X3_100 - BALLOON_SIZE_2 * 4 - 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 260 formation: 18 # Doce enemigos BALLOON1. Hacia la derecha. Juntos X1_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 300 X1_0 + BALLOON_SIZE_0 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 290 -X1_0 + (BALLOON_SIZE_0 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 280 -X1_0 + (BALLOON_SIZE_0 + 1) * 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 270 -X1_0 + (BALLOON_SIZE_0 + 1) * 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 260 -X1_0 + (BALLOON_SIZE_0 + 1) * 5, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 250 -X1_0 + (BALLOON_SIZE_0 + 1) * 6, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 240 -X1_0 + (BALLOON_SIZE_0 + 1) * 7, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 230 -X1_0 + (BALLOON_SIZE_0 + 1) * 8, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 220 -X1_0 + (BALLOON_SIZE_0 + 1) * 9, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 210 -X1_0 + (BALLOON_SIZE_0 + 1) * 10, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 200 -X1_0 + (BALLOON_SIZE_0 + 1) * 11, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 190 +X1_0 + BALLOON_SIZE_0 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 280 +X1_0 + BALLOON_SIZE_0 * 3 + 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 270 +X1_0 + BALLOON_SIZE_0 * 4 + 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 260 +X1_0 + BALLOON_SIZE_0 * 5 + 5, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 250 +X1_0 + BALLOON_SIZE_0 * 6 + 6, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 240 +X1_0 + BALLOON_SIZE_0 * 7 + 7, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 230 +X1_0 + BALLOON_SIZE_0 * 8 + 8, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 220 +X1_0 + BALLOON_SIZE_0 * 9 + 9, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 210 +X1_0 + BALLOON_SIZE_0 * 10 + 10, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 200 +X1_0 + BALLOON_SIZE_0 * 11 + 11, Y_BASE, VEL_POSITIVE, BALLOON, SIZE1, 190 formation: 19 # Doce enemigos BALLOON1. Hacia la izquierda. Juntos X1_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 300 X1_100 - BALLOON_SIZE_0 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 290 -X1_100 - (BALLOON_SIZE_0 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 280 -X1_100 - (BALLOON_SIZE_0 + 1) * 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 270 -X1_100 - (BALLOON_SIZE_0 + 1) * 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 260 -X1_100 - (BALLOON_SIZE_0 + 1) * 5, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 250 -X1_100 - (BALLOON_SIZE_0 + 1) * 6, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 240 -X1_100 - (BALLOON_SIZE_0 + 1) * 7, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 230 -X1_100 - (BALLOON_SIZE_0 + 1) * 8, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 220 -X1_100 - (BALLOON_SIZE_0 + 1) * 9, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 210 -X1_100 - (BALLOON_SIZE_0 + 1) * 10, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 200 -X1_100 - (BALLOON_SIZE_0 + 1) * 11, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 190 +X1_100 - BALLOON_SIZE_0 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 280 +X1_100 - BALLOON_SIZE_0 * 3 - 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 270 +X1_100 - BALLOON_SIZE_0 * 4 - 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 260 +X1_100 - BALLOON_SIZE_0 * 5 - 5, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 250 +X1_100 - BALLOON_SIZE_0 * 6 - 6, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 240 +X1_100 - BALLOON_SIZE_0 * 7 - 7, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 230 +X1_100 - BALLOON_SIZE_0 * 8 - 8, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 220 +X1_100 - BALLOON_SIZE_0 * 9 - 9, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 210 +X1_100 - BALLOON_SIZE_0 * 10 - 10, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 200 +X1_100 - BALLOON_SIZE_0 * 11 - 11, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE1, 190 formation: 20 # Cuatro enemigos BALLOON4 seguidos desde la izquierda/derecha. Simétricos @@ -175,14 +175,14 @@ formation: 21 # Diez enemigos BALLOON2 uno detrás del otro. Izquierda/derecha. Simétricos X2_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 300 X2_0 + BALLOON_SIZE_1 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 297 -X2_0 + (BALLOON_SIZE_1 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 294 -X2_0 + (BALLOON_SIZE_1 + 1) * 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 291 -X2_0 + (BALLOON_SIZE_1 + 1) * 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 288 +X2_0 + BALLOON_SIZE_1 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 294 +X2_0 + BALLOON_SIZE_1 * 3 + 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 291 +X2_0 + BALLOON_SIZE_1 * 4 + 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE2, 288 X2_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 300 X2_100 - BALLOON_SIZE_1 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 297 -X2_100 - (BALLOON_SIZE_1 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 294 -X2_100 - (BALLOON_SIZE_1 + 1) * 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 291 -X2_100 - (BALLOON_SIZE_1 + 1) * 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 288 +X2_100 - BALLOON_SIZE_1 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 294 +X2_100 - BALLOON_SIZE_1 * 3 - 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 291 +X2_100 - BALLOON_SIZE_1 * 4 - 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE2, 288 formation: 22 # Diez enemigos BALLOON3. Hacia la derecha/izquierda. Separados. Simétricos @@ -201,14 +201,14 @@ formation: 23 # Diez enemigos BALLOON3. Hacia la derecha. Juntos. Simétricos X3_0, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 300 X3_0 + BALLOON_SIZE_2 + 1, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 290 -X3_0 + (BALLOON_SIZE_2 + 1) * 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 280 -X3_0 + (BALLOON_SIZE_2 + 1) * 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 270 -X3_0 + (BALLOON_SIZE_2 + 1) * 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 260 +X3_0 + BALLOON_SIZE_2 * 2 + 2, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 280 +X3_0 + BALLOON_SIZE_2 * 3 + 3, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 270 +X3_0 + BALLOON_SIZE_2 * 4 + 4, Y_BASE, VEL_POSITIVE, BALLOON, SIZE3, 260 X3_100, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 300 X3_100 - BALLOON_SIZE_2 - 1, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 290 -X3_100 - (BALLOON_SIZE_2 + 1) * 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 280 -X3_100 - (BALLOON_SIZE_2 + 1) * 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 270 -X3_100 - (BALLOON_SIZE_2 + 1) * 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 260 +X3_100 - BALLOON_SIZE_2 * 2 - 2, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 280 +X3_100 - BALLOON_SIZE_2 * 3 - 3, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 270 +X3_100 - BALLOON_SIZE_2 * 4 - 4, Y_BASE, VEL_NEGATIVE, BALLOON, SIZE3, 260 formation: 24 # Treinta enemigos BALLOON1. Del centro hacia los extremos. Juntos. Simétricos diff --git a/source/balloon_formations.cpp b/source/balloon_formations.cpp index 3808953..16a850a 100644 --- a/source/balloon_formations.cpp +++ b/source/balloon_formations.cpp @@ -11,7 +11,7 @@ void BalloonFormations::initBalloonFormations() { // Calcular posiciones base - constexpr int Y_BASE = -BLOCK; + const int Y_BASE = 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]; @@ -28,7 +28,7 @@ void BalloonFormations::initBalloonFormations() { const int QUARTER3_X4 = param.game.play_area.third_quarter_x - (BALLOON_SIZE[3] / 2); // Mapa de variables para reemplazar en el archivo - std::map variables = { + std::map variables = { {"X1_0", X1_0}, {"X1_50", X1_50}, {"X1_100", X1_100}, @@ -56,7 +56,7 @@ void BalloonFormations::initBalloonFormations() { } } -auto BalloonFormations::loadFormationsFromFile(const std::string& filename, const std::map& variables) -> bool { +auto BalloonFormations::loadFormationsFromFile(const std::string& filename, const std::map& variables) -> bool { std::ifstream file(filename); if (!file.is_open()) { return false; @@ -112,7 +112,7 @@ auto BalloonFormations::loadFormationsFromFile(const std::string& filename, cons return true; } -auto BalloonFormations::parseBalloonLine(const std::string& line, const std::map& variables) -> std::optional { +auto BalloonFormations::parseBalloonLine(const std::string& line, const std::map& variables) -> std::optional { std::istringstream iss(line); std::string token; std::vector tokens; @@ -127,9 +127,9 @@ auto BalloonFormations::parseBalloonLine(const std::string& line, const std::map } try { - int x = evaluateExpression(tokens[0], variables); - int y = evaluateExpression(tokens[1], variables); - int vel_x = evaluateExpression(tokens[2], variables); + float x = evaluateExpression(tokens[0], variables); + float y = evaluateExpression(tokens[1], variables); + float vel_x = evaluateExpression(tokens[2], variables); BalloonType type = (tokens[3] == "BALLOON") ? BalloonType::BALLOON : BalloonType::FLOATER; @@ -154,7 +154,7 @@ auto BalloonFormations::parseBalloonLine(const std::string& line, const std::map } } -auto BalloonFormations::evaluateExpression(const std::string& expr, const std::map& variables) -> int { +auto BalloonFormations::evaluateExpression(const std::string& expr, const std::map& variables) -> float { std::string trimmed_expr = trim(expr); // Si es un número directo @@ -171,7 +171,7 @@ auto BalloonFormations::evaluateExpression(const std::string& expr, const std::m return evaluateSimpleExpression(trimmed_expr, variables); } -auto BalloonFormations::evaluateSimpleExpression(const std::string& expr, const std::map& variables) -> int { +auto BalloonFormations::evaluateSimpleExpression(const std::string& expr, const std::map& variables) -> float { // Buscar operadores (+, -, *, /) for (size_t i = 1; i < expr.length(); ++i) { char op = expr[i]; @@ -241,7 +241,7 @@ void BalloonFormations::loadDefaultFormations() { // Código de fallback con algunas formaciones básicas hardcodeadas // para que el juego funcione aunque falle la carga del archivo - const int Y_BASE = -BLOCK; + const int Y_BASE = 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; @@ -260,16 +260,16 @@ void BalloonFormations::initBalloonFormationPools() { // Set #0 balloon_formation_pool_.at(0) = { - &balloon_formation_.at(0), - &balloon_formation_.at(1), &balloon_formation_.at(2), - &balloon_formation_.at(3), - &balloon_formation_.at(4), - &balloon_formation_.at(5), - &balloon_formation_.at(6), - &balloon_formation_.at(7), - &balloon_formation_.at(8), - &balloon_formation_.at(9)}; + &balloon_formation_.at(2), + &balloon_formation_.at(2), + &balloon_formation_.at(2), + &balloon_formation_.at(2), + &balloon_formation_.at(2), + &balloon_formation_.at(2), + &balloon_formation_.at(2), + &balloon_formation_.at(2), + &balloon_formation_.at(2)}; // Set #1 balloon_formation_pool_.at(1) = { diff --git a/source/balloon_formations.h b/source/balloon_formations.h index 04eec56..a2a4eca 100644 --- a/source/balloon_formations.h +++ b/source/balloon_formations.h @@ -61,19 +61,22 @@ class BalloonFormations { [[nodiscard]] auto getSet(int set) const -> const BalloonFormationUnit& { return balloon_formation_.at(set); } private: + // --- Constantes --- + static constexpr int BALLOON_SPAWN_HEIGHT = 208; // Altura desde el suelo en la que aparecen los globos + // --- Datos --- std::vector balloon_formation_; // Vector con todas las formaciones enemigas std::vector balloon_formation_pool_; // Conjuntos de formaciones enemigas // --- Métodos internos de inicialización --- - void initBalloonFormations(); // Inicializa la lista principal de formaciones de globos disponibles - void initBalloonFormationPools(); // Prepara las estructuras de agrupamiento o reutilización de formaciones (pools) - auto loadFormationsFromFile(const std::string& filename, const std::map& variables) -> bool; // Carga las formaciones desde un archivo, evaluando variables dinámicas - auto parseBalloonLine(const std::string& line, const std::map& variables) -> std::optional; // Parsea una línea individual del archivo y genera parámetros de formación - auto evaluateExpression(const std::string& expr, const std::map& variables) -> int; // Evalúa expresiones matemáticas con variables definidas (complejas) - auto evaluateSimpleExpression(const std::string& expr, const std::map& variables) -> int; // Evalúa expresiones más sencillas (sin paréntesis o operadores avanzados) - static auto trim(const std::string& str) -> std::string; // Elimina espacios en blanco al inicio y fin de una cadena - void createFloaterVariants(); // Genera variantes de globos flotantes según configuración o aleatoriedad - void addTestFormation(); // Añade una formación de prueba para debug o validación en tiempo de desarrollo - void loadDefaultFormations(); // Carga las formaciones por defecto incluidas en el juego si no hay archivo externo + void initBalloonFormations(); // Inicializa la lista principal de formaciones de globos disponibles + void initBalloonFormationPools(); // Prepara las estructuras de agrupamiento o reutilización de formaciones (pools) + auto loadFormationsFromFile(const std::string& filename, const std::map& variables) -> bool; // Carga las formaciones desde un archivo, evaluando variables dinámicas + auto parseBalloonLine(const std::string& line, const std::map& variables) -> std::optional; // Parsea una línea individual del archivo y genera parámetros de formación + auto evaluateExpression(const std::string& expr, const std::map& variables) -> float; // Evalúa expresiones matemáticas con variables definidas (complejas) + auto evaluateSimpleExpression(const std::string& expr, const std::map& variables) -> float; // Evalúa expresiones más sencillas (sin paréntesis o operadores avanzados) + static auto trim(const std::string& str) -> std::string; // Elimina espacios en blanco al inicio y fin de una cadena + void createFloaterVariants(); // Genera variantes de globos flotantes según configuración o aleatoriedad + void addTestFormation(); // Añade una formación de prueba para debug o validación en tiempo de desarrollo + void loadDefaultFormations(); // Carga las formaciones por defecto incluidas en el juego si no hay archivo externo };