This commit is contained in:
2026-04-05 23:47:54 +02:00
parent 25ecc74251
commit c4a26ffa0f
96 changed files with 457 additions and 307 deletions

View File

@@ -33,6 +33,7 @@ Input::Input(std::string game_controller_db_path)
{Action::LEFT, KeyState{.scancode = SDL_SCANCODE_LEFT}},
{Action::RIGHT, KeyState{.scancode = SDL_SCANCODE_RIGHT}},
{Action::JUMP, KeyState{.scancode = SDL_SCANCODE_UP}},
{Action::DOWN, KeyState{.scancode = SDL_SCANCODE_DOWN}},
// Inputs de control
{Action::ACCEPT, KeyState{.scancode = SDL_SCANCODE_RETURN}},

View File

@@ -7,6 +7,7 @@ const std::unordered_map<InputAction, std::string> ACTION_TO_STRING = {
{InputAction::LEFT, "LEFT"},
{InputAction::RIGHT, "RIGHT"},
{InputAction::JUMP, "JUMP"},
{InputAction::DOWN, "DOWN"},
{InputAction::PAUSE, "PAUSE"},
{InputAction::EXIT, "EXIT"},
{InputAction::ACCEPT, "ACCEPT"},
@@ -30,6 +31,7 @@ const std::unordered_map<std::string, InputAction> STRING_TO_ACTION = {
{"LEFT", InputAction::LEFT},
{"RIGHT", InputAction::RIGHT},
{"JUMP", InputAction::JUMP},
{"DOWN", InputAction::DOWN},
{"PAUSE", InputAction::PAUSE},
{"EXIT", InputAction::EXIT},
{"ACCEPT", InputAction::ACCEPT},

View File

@@ -11,6 +11,7 @@ enum class InputAction : int { // Acciones de entrada posibles en el juego
LEFT,
RIGHT,
JUMP,
DOWN,
// Inputs de control
PAUSE,