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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user