Afegida tecla per a canviar el escalat sencer
This commit is contained in:
@@ -36,9 +36,11 @@ El joc permet tant l'ús del teclat com d'un comandament. Les tecles per a jugar
|
||||
- **Tecla F1**: Disminueix la mida de la finestra.
|
||||
- **Tecla F2**: Augmenta la mida de la finestra.
|
||||
- **Tecla F3**: Alterna entre el mode de pantalla completa i el mode finestra.
|
||||
- **Tecla F4**: Activa o desactiva els shaders
|
||||
- **Tecla F5**: Canvia la paleta de colors del joc.
|
||||
- **Tecla B**: Activa o desactiva el marge de colors en mode finestra.
|
||||
- **Tecla F4**: Activa o desactiva els shaders.
|
||||
- **Tecla F5**: Estableix la següent paleta de colors.
|
||||
- **Tecla F6**: Estableix la paleta de colors prèvia.
|
||||
- **Tecla F7**: Activa o desactiva el escalat exacte.
|
||||
- **Tecla B**: Activa o desactiva el marge de colors.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ Director::Director(int argc, const char *argv[])
|
||||
|
||||
// Crea los objetos
|
||||
Screen::init(window_, renderer_);
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
Resource::init();
|
||||
Notifier::init("", "8bithud");
|
||||
Screen::get()->setNotificationsEnabled(true);
|
||||
@@ -84,7 +85,6 @@ Director::Director(int argc, const char *argv[])
|
||||
initInput();
|
||||
Debug::init();
|
||||
Cheevos::init(Asset::get()->get("cheevos.bin"));
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
}
|
||||
|
||||
Director::~Director()
|
||||
@@ -247,6 +247,7 @@ void Director::initInput()
|
||||
Input::get()->bindKey(InputAction::TOGGLE_SHADERS, SDL_SCANCODE_F4);
|
||||
Input::get()->bindKey(InputAction::NEXT_PALETTE, SDL_SCANCODE_F5);
|
||||
Input::get()->bindKey(InputAction::PREVIOUS_PALETTE, SDL_SCANCODE_F6);
|
||||
Input::get()->bindKey(InputAction::TOGGLE_INTEGER_SCALE, SDL_SCANCODE_F7);
|
||||
Input::get()->bindKey(InputAction::TOGGLE_MUSIC, SDL_SCANCODE_M);
|
||||
Input::get()->bindKey(InputAction::TOGGLE_BORDER, SDL_SCANCODE_B);
|
||||
|
||||
|
||||
@@ -266,15 +266,15 @@ void Game::checkDebugEvents(const SDL_Event &event)
|
||||
changeRoom(room_->getRoom(BORDER_RIGHT));
|
||||
break;
|
||||
|
||||
case SDL_SCANCODE_F7:
|
||||
Notifier::get()->show({"ACHIEVEMENT UNLOCKED!", "I LIKE MY MULTICOLOURED FRIENDS"}, NotificationText::LEFT, 3, false, "F7");
|
||||
case SDL_SCANCODE_7:
|
||||
Notifier::get()->show({"ACHIEVEMENT UNLOCKED!", "I LIKE MY MULTICOLOURED FRIENDS"}, NotificationText::CENTER, -1, false, "F7");
|
||||
break;
|
||||
|
||||
case SDL_SCANCODE_F8:
|
||||
case SDL_SCANCODE_8:
|
||||
Notifier::get()->show({"JAILDESIGNER", "IS LOGGED IN"}, NotificationText::LEFT, 4, false);
|
||||
break;
|
||||
|
||||
case SDL_SCANCODE_F9:
|
||||
case SDL_SCANCODE_9:
|
||||
Notifier::get()->show({"JAILDESIGNER", "IS LOGGED IN"}, NotificationText::LEFT, 5, false);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -104,5 +104,13 @@ namespace globalInputs
|
||||
Screen::get()->previousPalette();
|
||||
Notifier::get()->show({"PALETTE " + options.video.palette}, NotificationText::CENTER);
|
||||
}
|
||||
|
||||
else if (Input::get()->checkInput(InputAction::TOGGLE_INTEGER_SCALE, REPEAT_FALSE))
|
||||
{
|
||||
options.video.integer_scale = !options.video.integer_scale;
|
||||
SDL_RenderSetIntegerScale(Screen::get()->getRenderer(), options.video.integer_scale ? SDL_TRUE : SDL_FALSE);
|
||||
Screen::get()->setVideoMode(options.video.mode);
|
||||
Notifier::get()->show({"INTEGER SCALE " + std::string(options.video.integer_scale ? "ENABLED" : "DISABLED")}, NotificationText::CENTER);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ enum class InputAction
|
||||
WINDOW_INC_ZOOM,
|
||||
WINDOW_DEC_ZOOM,
|
||||
TOGGLE_VIDEOMODE,
|
||||
TOGGLE_INTEGER_SCALE,
|
||||
TOGGLE_BORDER,
|
||||
TOGGLE_MUSIC,
|
||||
NEXT_PALETTE,
|
||||
|
||||
Reference in New Issue
Block a user