presets en yaml

This commit is contained in:
2026-04-17 19:56:43 +02:00
parent 7f703390f9
commit 5889df2a47
13 changed files with 519 additions and 161 deletions

View File

@@ -6,8 +6,9 @@
#include <iostream> // for char_traits, basic_ostream, operator<<
#include <string> // for basic_string
#include "core/audio/jail_audio.hpp" // for JA_StopMusic
#include "core/input/input.h" // for Input, REPEAT_FALSE, inputs_e
#include "core/audio/jail_audio.hpp" // for JA_StopMusic
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
#include "core/input/input.h" // for Input, REPEAT_FALSE, inputs_e
#include "core/locale/lang.h" // for Lang
#include "core/rendering/screen.h" // for Screen
#include "core/rendering/sprite.h" // for Sprite
@@ -218,33 +219,12 @@ void Instructions::checkInput() {
if (input->checkInput(input_exit, REPEAT_FALSE)) {
quitRequested = true;
finished = true;
} else
return;
}
#endif
if (input->checkInput(input_window_fullscreen, REPEAT_FALSE)) {
screen->toggleVideoMode();
}
if (GlobalInputs::handle(screen, input)) { return; }
else if (input->checkInput(input_window_dec_size, REPEAT_FALSE)) {
screen->decWindowZoom();
}
else if (input->checkInput(input_window_inc_size, REPEAT_FALSE)) {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
if (mode == m_auto) {
finished = true;
} else {

View File

@@ -4,8 +4,9 @@
#include <string> // for basic_string
#include "core/audio/jail_audio.hpp" // for JA_StopMusic, JA_DeleteMusic, JA_LoadMusic
#include "core/input/input.h" // for Input, REPEAT_FALSE, inputs_e
#include "core/audio/jail_audio.hpp" // for JA_StopMusic, JA_DeleteMusic, JA_LoadMusic
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
#include "core/input/input.h" // for Input, REPEAT_FALSE, inputs_e
#include "core/locale/lang.h" // for Lang
#include "core/rendering/screen.h" // for Screen
#include "core/rendering/smartsprite.h" // for SmartSprite
@@ -194,33 +195,12 @@ void Intro::checkInput() {
#ifndef __EMSCRIPTEN__
if (input->checkInput(input_exit, REPEAT_FALSE)) {
section->name = SECTION_PROG_QUIT;
} else
return;
}
#endif
if (input->checkInput(input_window_fullscreen, REPEAT_FALSE)) {
screen->toggleVideoMode();
}
if (GlobalInputs::handle(screen, input)) { return; }
else if (input->checkInput(input_window_dec_size, REPEAT_FALSE)) {
screen->decWindowZoom();
}
else if (input->checkInput(input_window_inc_size, REPEAT_FALSE)) {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
JA_StopMusic();
section->name = SECTION_PROG_TITLE;
section->subsection = SUBSECTION_TITLE_1;

View File

@@ -5,9 +5,10 @@
#include <algorithm> // for min
#include <string> // for basic_string
#include "core/audio/jail_audio.hpp" // for JA_StopMusic
#include "core/input/input.h" // for Input, REPEAT_FALSE, inputs_e
#include "core/rendering/screen.h" // for Screen
#include "core/audio/jail_audio.hpp" // for JA_StopMusic
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
#include "core/input/input.h" // for Input, REPEAT_FALSE, inputs_e
#include "core/rendering/screen.h" // for Screen
#include "core/rendering/sprite.h" // for Sprite
#include "core/rendering/texture.h" // for Texture
#include "core/resources/asset.h" // for Asset
@@ -77,33 +78,12 @@ void Logo::checkInput() {
#ifndef __EMSCRIPTEN__
if (input->checkInput(input_exit, REPEAT_FALSE)) {
section->name = SECTION_PROG_QUIT;
} else
return;
}
#endif
if (input->checkInput(input_window_fullscreen, REPEAT_FALSE)) {
screen->toggleVideoMode();
}
if (GlobalInputs::handle(screen, input)) { return; }
else if (input->checkInput(input_window_dec_size, REPEAT_FALSE)) {
screen->decWindowZoom();
}
else if (input->checkInput(input_window_inc_size, REPEAT_FALSE)) {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
section->name = SECTION_PROG_TITLE;
section->subsection = SUBSECTION_TITLE_1;
}

View File

@@ -7,6 +7,7 @@
#include <string> // for basic_string, operator+, char_traits
#include "core/audio/jail_audio.hpp" // for JA_StopMusic, JA_GetMusicState, JA_Play...
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
#include "core/input/input.h" // for Input, INPUT_USE_GAMECONTROLLER, INPUT_...
#include "core/locale/lang.h" // for Lang, ba_BA, en_UK, es_ES
#include "core/rendering/animatedsprite.h" // for AnimatedSprite
@@ -643,31 +644,10 @@ void Title::checkInput() {
#ifndef __EMSCRIPTEN__
if (input->checkInput(input_exit, REPEAT_FALSE)) {
section->name = SECTION_PROG_QUIT;
} else
return;
}
#endif
if (input->checkInput(input_window_fullscreen, REPEAT_FALSE)) {
screen->toggleVideoMode();
}
else if (input->checkInput(input_window_dec_size, REPEAT_FALSE)) {
screen->decWindowZoom();
}
else if (input->checkInput(input_window_inc_size, REPEAT_FALSE)) {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
GlobalInputs::handle(screen, input);
}
// Actualiza el tileado de fondo