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

@@ -9,23 +9,23 @@ namespace globalInputs
// Cambia la paleta
void switchPalette()
{
options.palette = options.palette == p_zxspectrum ? p_zxarne : p_zxspectrum;
options.video.palette = options.video.palette == Palette::ZXSPECTRUM ? Palette::ZXARNE : Palette::ZXSPECTRUM;
}
// Cambia de seccion
void skip_section()
{
switch (options.section.name)
switch (options.section.section)
{
case SECTION_LOGO:
case SECTION_LOADING_SCREEN:
case SECTION_CREDITS:
case SECTION_DEMO:
case SECTION_GAME_OVER:
case SECTION_ENDING:
case SECTION_ENDING2:
options.section.name = SECTION_TITLE;
options.section.subsection = 0;
case Section::LOGO:
case Section::LOADING_SCREEN:
case Section::CREDITS:
case Section::DEMO:
case Section::GAME_OVER:
case Section::ENDING:
case Section::ENDING2:
options.section.section = Section::TITLE;
options.section.subsection = Subsection::NONE;
break;
default:
@@ -38,7 +38,7 @@ namespace globalInputs
{
if (Input::get()->checkInput(input_exit, REPEAT_FALSE))
{
options.section.name = SECTION_QUIT;
options.section.section = Section::QUIT;
}
else if (Input::get()->checkInput(input_accept, REPEAT_FALSE))
@@ -58,12 +58,12 @@ namespace globalInputs
else if (Input::get()->checkInput(input_window_dec_size, REPEAT_FALSE))
{
Screen::get()->decWindowSize();
Screen::get()->decWindowZoom();
}
else if (Input::get()->checkInput(input_window_inc_size, REPEAT_FALSE))
{
Screen::get()->incWindowSize();
Screen::get()->incWindowZoom();
}
else if (Input::get()->checkInput(input_toggle_shaders, REPEAT_FALSE))