nova clase renderInfo

afegit control de offset a les notificacions
This commit is contained in:
2026-03-28 12:49:38 +01:00
parent f15658a767
commit 065f66d40e
12 changed files with 189 additions and 82 deletions

View File

@@ -55,11 +55,8 @@ namespace Resource {
// Carga todos los recursos
void Cache::load() {
// Oculta el overlay de debug durante la carga inicial; al restaurarlo
// SDL ya estará estabilizado y toggleFPS recalculará zoom_factor_ correctamente
const bool WAS_FPS_VISIBLE = Screen::get()->isFPSVisible();
if (WAS_FPS_VISIBLE) { Screen::get()->toggleFPS(); }
// Nota: el overlay de debug (RenderInfo) se inicializa después de esta carga,
// por lo que updateZoomFactor() se llamará correctamente en RenderInfo::init().
calculateTotal();
Screen::get()->setBorderColor(static_cast<Uint8>(PaletteColor::BLACK));
std::cout << "\n** LOADING RESOURCES" << '\n';
@@ -72,8 +69,6 @@ namespace Resource {
loadRooms();
createText();
std::cout << "\n** RESOURCES LOADED" << '\n';
if (WAS_FPS_VISIBLE) { Screen::get()->toggleFPS(); }
}
// Recarga todos los recursos