marcador provisional

This commit is contained in:
2026-04-06 14:53:58 +02:00
parent 67bf6b2017
commit 4c5e1e5470
12 changed files with 180 additions and 181 deletions

View File

@@ -106,8 +106,7 @@ void RenderInfo::render() const {
// Todo en lowercase
std::ranges::transform(line, line.begin(), [](unsigned char c) { return std::tolower(c); });
// Constantes visuales (igual que Console)
static constexpr Uint8 BG_COLOR = 0; // PaletteColor::BLACK
// Constantes visuales
static constexpr Uint8 MSG_COLOR = 9; // PaletteColor::BRIGHT_GREEN
static constexpr int TEXT_SIZE = 6;
static constexpr int PADDING_V = (TEXT_SIZE / 2) - 1;
@@ -119,16 +118,6 @@ void RenderInfo::render() const {
const int CONSOLE_Y = (Console::get() != nullptr) ? Console::get()->getVisibleHeight() : 0;
const int Y = CONSOLE_Y + static_cast<int>(y_);
// Rectángulo de fondo: ancho completo, alto ajustado al texto
const SDL_FRect RECT = {
.x = 0.0F,
.y = static_cast<float>(Y),
.w = Options::game.width,
.h = static_cast<float>(TEXT_SIZE + (PADDING_V * 2))};
auto game_surface = Screen::get()->getGameSurface();
game_surface->fillRect(&RECT, BG_COLOR);
// game_surface->drawRectBorder(&RECT, BORDER_COLOR);
text_obj->writeDX(Text::CENTER_FLAG | Text::COLOR_FLAG,
static_cast<int>(Options::game.width / 2),
Y + PADDING_V,