migrant a SDL3

This commit is contained in:
2025-03-25 20:26:45 +01:00
parent f1b0303474
commit a9c869baf6
49 changed files with 374 additions and 416 deletions

View File

@@ -86,7 +86,7 @@ void Instructions::iniSprites()
// Actualiza los sprites
void Instructions::updateSprites()
{
SDL_Rect src_rect = {0, 0, param.game.item_size, param.game.item_size};
SDL_FRect src_rect = {0, 0, param.game.item_size, param.game.item_size};
// Disquito
src_rect.y = param.game.item_size * (((counter_ + 12) / 36) % 2);
@@ -338,8 +338,8 @@ void Instructions::renderLines(SDL_Renderer *renderer, SDL_Texture *texture, con
{
for (const auto &line : lines)
{
SDL_Rect srcRect = {0, line.y, 320, 1};
SDL_Rect dstRect = {static_cast<int>(line.x), line.y, 320, 1};
SDL_FRect srcRect = {0, line.y, 320, 1};
SDL_FRect dstRect = {static_cast<int>(line.x), line.y, 320, 1};
SDL_RenderTexture(renderer, texture, &srcRect, &dstRect);
}
}