canvi de pc

This commit is contained in:
2025-08-01 09:20:22 +02:00
parent fe818d6a10
commit 6385e413da
4 changed files with 281 additions and 238 deletions
+53
View File
@@ -0,0 +1,53 @@
#pragma once
#include <SDL3/SDL.h>
#include <string>
#include <unordered_map>
// Acciones de entrada posibles en el juego
enum class InputAction : int {
// Inputs de movimiento
UP,
DOWN,
LEFT,
RIGHT,
// Inputs personalizados
FIRE_LEFT,
FIRE_CENTER,
FIRE_RIGHT,
START,
// Service Menu
SM_SELECT,
SM_BACK,
// Inputs de control
BACK,
EXIT,
PAUSE,
SERVICE,
WINDOW_FULLSCREEN,
WINDOW_INC_SIZE,
WINDOW_DEC_SIZE,
TOGGLE_VIDEO_SHADERS,
TOGGLE_VIDEO_INTEGER_SCALE,
TOGGLE_VIDEO_VSYNC,
RESET,
TOGGLE_AUDIO,
CHANGE_LANG,
SHOW_INFO,
CONFIG,
SWAP_CONTROLLERS,
TOGGLE_AUTO_FIRE,
// Input obligatorio
NONE,
SIZE,
};
// Mapas para convertir entre enums y strings
extern const std::unordered_map<InputAction, std::string> actionToString;
extern const std::unordered_map<std::string, InputAction> stringToAction;
extern const std::unordered_map<SDL_GamepadButton, std::string> buttonToString;
extern const std::unordered_map<std::string, SDL_GamepadButton> stringToButton;