fix: const a punters i refs (13 troballes)
This commit is contained in:
@@ -50,7 +50,7 @@ void Credits::handleInput() {
|
||||
|
||||
// Inicializa los textos
|
||||
void Credits::iniTexts() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
auto* loc = Locale::get();
|
||||
const auto* loc = Locale::get();
|
||||
|
||||
texts_.clear();
|
||||
texts_.push_back({.label = "", .color = static_cast<Uint8>(PaletteColor::WHITE)});
|
||||
|
||||
@@ -172,7 +172,7 @@ void Ending::updateState(float delta_time) {
|
||||
void Ending::iniTexts() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
// Vector con los textos (traducidos según el idioma activo)
|
||||
std::vector<TextAndPosition> texts;
|
||||
auto* loc = Locale::get();
|
||||
const auto* loc = Locale::get();
|
||||
|
||||
// Escena #0
|
||||
texts.push_back({.caption = loc->get("ending.t0"), .pos = 32});
|
||||
|
||||
@@ -68,7 +68,7 @@ void GameOver::render() {
|
||||
auto text = Resource::Cache::get()->getText("smb2");
|
||||
|
||||
// Escribe el texto de GAME OVER
|
||||
auto* loc = Locale::get();
|
||||
const auto* loc = Locale::get();
|
||||
text->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG, GameCanvas::CENTER_X, TEXT_Y, loc->get("game_over.title"), 1, color_); // NOLINT(readability-static-accessed-through-instance)
|
||||
|
||||
// Dibuja los sprites (ya posicionados en el constructor, solo ajustamos Y)
|
||||
|
||||
@@ -544,7 +544,7 @@ void Title::renderMainMenu() {
|
||||
const int TOTAL_HEIGHT = 3 * SPACING; // 3 espacios entre 4 items
|
||||
const int START_Y = MENU_CENTER_Y - (TOTAL_HEIGHT / 2);
|
||||
|
||||
auto* loc = Locale::get();
|
||||
const auto* loc = Locale::get();
|
||||
menu_text_->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG, PlayArea::CENTER_X, START_Y, loc->get("title.menu.play"), 1, COLOR);
|
||||
menu_text_->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG, PlayArea::CENTER_X, START_Y + SPACING, loc->get("title.menu.keyboard"), 1, COLOR);
|
||||
menu_text_->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG, PlayArea::CENTER_X, START_Y + (2 * SPACING), loc->get("title.menu.joystick"), 1, COLOR);
|
||||
@@ -683,7 +683,7 @@ void Title::renderKeyboardRemap() const {
|
||||
const int START_Y = MENU_CENTER_Y - (2 * TEXT_SIZE); // Centrado aproximado
|
||||
|
||||
// Mensaje principal: "PRESS KEY FOR [ACTION]" o "KEYS DEFINED" si completado
|
||||
auto* loc = Locale::get();
|
||||
const auto* loc = Locale::get();
|
||||
if (remap_step_ >= 3) {
|
||||
menu_text_->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG, PlayArea::CENTER_X, START_Y, loc->get("title.keys.defined"), 1, COLOR);
|
||||
} else {
|
||||
@@ -731,7 +731,7 @@ void Title::renderJoystickRemap() const {
|
||||
const int START_Y = MENU_CENTER_Y - (2 * TEXT_SIZE); // Centrado aproximado
|
||||
|
||||
// Mensaje principal: "PRESS BUTTON FOR [ACTION]" o "BUTTONS DEFINED" si completado
|
||||
auto* loc = Locale::get();
|
||||
const auto* loc = Locale::get();
|
||||
if (remap_step_ >= 3) {
|
||||
menu_text_->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG, PlayArea::CENTER_X, START_Y, loc->get("title.buttons.defined"), 1, COLOR);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user