From fa4a2b992424a232cfc58a7c690f58bdfa3b0787 Mon Sep 17 00:00:00 2001 From: DcruBro Date: Wed, 18 Mar 2026 08:49:19 +0100 Subject: [PATCH] background --- src/game/agame/background.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/game/agame/background.cpp b/src/game/agame/background.cpp index e84a59e..a8dc957 100644 --- a/src/game/agame/background.cpp +++ b/src/game/agame/background.cpp @@ -9,8 +9,8 @@ namespace Game::AGame { int w, h; SDL_GetWindowSizeInPixels(Window::Window::getSDLWindowBackend(), &w, &h); - mTransform.scaleX *= 5.f; - mTransform.scaleY *= 5.f; + mTransform.scaleX *= 10.f; + mTransform.scaleY *= 10.f; mTransform.x -= mTex->getWidth() * mTransform.adjustedScaleX() / 2.f; mTransform.y -= mTex->getHeight() * mTransform.adjustedScaleY() / 2.f; @@ -18,10 +18,8 @@ namespace Game::AGame { LOG("W: " << w << " H: " << h); mTransform.x = w / 2.f - (w / 3.f); - mTransform.y = 0.f; + mTransform.y = -h; - mTransform.scaleX = 1.f; - mTransform.scaleY = 1.f; mSound.~Sound(); } @@ -47,6 +45,6 @@ namespace Game::AGame { void Background::onWindowResized(int newWidth, int newHeight) { // Re-center the background on window resize mTransform.x = newWidth / 2.f - (newWidth / 3.f); - mTransform.y = 0.f; + mTransform.y = -newHeight; } } \ No newline at end of file