Reestructurant la classe Options

This commit is contained in:
2025-02-23 18:12:02 +01:00
parent 3ba4293e8a
commit 2ee0c70319
48 changed files with 898 additions and 984 deletions

View File

@@ -47,17 +47,17 @@ Logo::Logo()
}
// Inicializa variables
options.section.name = SECTION_LOGO;
options.section.section = Section::LOGO;
// Inicializa el vector de colores
const std::vector<std::string> vColors = {"black", "blue", "red", "magenta", "green", "cyan", "yellow", "bright_white"};
for (auto v : vColors)
{
color_.push_back(stringToColor(options.palette, v));
color_.push_back(stringToColor(options.video.palette, v));
}
// Cambia el color del borde
screen_->setBorderColor(stringToColor(options.palette, "black"));
screen_->setBorderColor(stringToColor(options.video.palette, "black"));
}
// Destructor
@@ -265,7 +265,7 @@ void Logo::run()
// Detiene la música
JA_StopMusic();
while (options.section.name == SECTION_LOGO)
while (options.section.section == Section::LOGO)
{
update();
checkEvents();
@@ -276,13 +276,13 @@ void Logo::run()
// Termina la sección
void Logo::endSection()
{
if (options.section.subsection == SUBSECTION_LOGO_TO_TITLE)
if (options.section.subsection == Subsection::LOGO_TO_TITLE)
{
options.section.name = SECTION_TITLE;
options.section.section = Section::TITLE;
}
else if (options.section.subsection == SUBSECTION_LOGO_TO_INTRO)
else if (options.section.subsection == Subsection::LOGO_TO_INTRO)
{
options.section.name = SECTION_LOADING_SCREEN;
options.section.section = Section::LOADING_SCREEN;
}
}