paletes
This commit is contained in:
@@ -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}},
|
||||
|
||||
@@ -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},
|
||||
|
||||
@@ -11,6 +11,7 @@ enum class InputAction : int { // Acciones de entrada posibles en el juego
|
||||
LEFT,
|
||||
RIGHT,
|
||||
JUMP,
|
||||
DOWN,
|
||||
|
||||
// Inputs de control
|
||||
PAUSE,
|
||||
|
||||
Reference in New Issue
Block a user