Tabe: afegit a Param

This commit is contained in:
2025-08-16 09:54:34 +02:00
parent a3cd404545
commit 0c10898bdc
5 changed files with 25 additions and 4 deletions

View File

@@ -89,6 +89,10 @@ void initParam() {
param.intro.card_color = Color::fromHex("CBDBFC");
param.intro.shadow_color = Color::fromHex("00000080");
param.intro.text_distance_from_bottom = 48;
// TABE
param.tabe.min_spawn_time = 2.0F;
param.tabe.max_spawn_time = 3.0F;
}
// Carga los parámetros desde un archivo
@@ -197,7 +201,9 @@ auto setParams(const std::string& var, const std::string& value) -> bool {
{"balloon.settings[2].vel", [](const std::string& v) { param.balloon.settings.at(2).vel = std::stof(v); }},
{"balloon.settings[2].grav", [](const std::string& v) { param.balloon.settings.at(2).grav = std::stof(v); }},
{"balloon.settings[3].vel", [](const std::string& v) { param.balloon.settings.at(3).vel = std::stof(v); }},
{"balloon.settings[3].grav", [](const std::string& v) { param.balloon.settings.at(3).grav = std::stof(v); }}};
{"balloon.settings[3].grav", [](const std::string& v) { param.balloon.settings.at(3).grav = std::stof(v); }},
{"tabe.min_spawn_time", [](const std::string& v) { param.tabe.min_spawn_time = std::stof(v); }},
{"tabe.max_spawn_time", [](const std::string& v) { param.tabe.max_spawn_time = std::stof(v); }}};
static const std::unordered_map<std::string, std::function<void(const std::string&)>> STRING_PARAMS = {
{"balloon.color[0]", [](const std::string& v) { param.balloon.color.at(0) = v; }},