migrat hiscore_table a delta_time de manera correcta

corregida deformació subpixel de la textura en instructions i hiscore_table
This commit is contained in:
2025-10-24 08:49:09 +02:00
parent 1acbe1d097
commit 1c3d59d678
4 changed files with 9 additions and 7 deletions

View File

@@ -343,8 +343,9 @@ void Instructions::renderLines(SDL_Renderer* renderer, SDL_Texture* texture, con
void Instructions::updateBackbuffer(float delta_time) {
// Establece la ventana del backbuffer usando velocidad en pixels por segundo
// El scroll comienza desde (param.game.height + 100) y desciende a 0
// IMPORTANTE: Se redondea a entero para evitar deformaciones de textura causadas por sub-pixel rendering
float scroll_offset = elapsed_time_ * SCROLL_SPEED_PPS;
view_.y = std::max(0.0F, (param.game.height + 100.0F) - scroll_offset);
view_.y = std::round(std::max(0.0F, (param.game.height + 100.0F) - scroll_offset));
// Verifica si view_.y == 0 y gestiona el temporizador
if (view_.y == 0.0F) {