La zona de juego se dibuja en su propia textura

This commit is contained in:
2024-06-04 13:05:03 +02:00
parent baa2f3effd
commit e4c14b275f
4 changed files with 36 additions and 16 deletions

View File

@@ -16,7 +16,8 @@ Background::Background(SDL_Renderer *renderer, Screen *screen, Asset *asset)
counter = 0;
rect = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT};
srcRect = {0, rect.h - playArea.h, playArea.w, playArea.h};
dstRect = playArea;
srcRect = {playArea.x, rect.h - playArea.h, playArea.w, playArea.h};
dstRect = {0, 0, playArea.w, playArea.h};
base = rect.h;
gradientRect[0] = {0, 0, rect.w, rect.h};