input, changes

This commit is contained in:
2026-03-16 08:21:04 +01:00
parent d522881358
commit f6a1e59ebb
12 changed files with 109 additions and 44 deletions

View File

@@ -9,8 +9,8 @@ namespace Game::AGame {
int w, h;
SDL_GetWindowSizeInPixels(Window::Window::getSDLWindowBackend(), &w, &h);
mTransform.scaleX *= 10.f;
mTransform.scaleY *= 10.f;
mTransform.scaleX *= 5.f;
mTransform.scaleY *= 5.f;
mTransform.x -= mTex->getWidth() * mTransform.adjustedScaleX() / 2.f;
mTransform.y -= mTex->getHeight() * mTransform.adjustedScaleY() / 2.f;
@@ -22,6 +22,16 @@ namespace Game::AGame {
void Background::update(float deltaTime) {
if (!mIsActive) return;
/*const bool* state = SDL_GetKeyboardState(nullptr);
if (state[SDL_SCANCODE_P]) {
mTransform.scaleX *= 2.f;
mTransform.scaleY *= 2.f;
}
if (state[SDL_SCANCODE_L]) {
mTransform.scaleX *= 0.5f;
mTransform.scaleY *= 0.5f;
}*/
//mTransform.rotation += 1.f; // Rotate clockwise for testing
//mTransform.scaleX = 1.f + 1.f * std::sin(RUNNING_TIME() / 0.5f); // Pulsate scale for testing
//mTransform.scaleY = 1.f + 0.5f * std::cos(RUNNING_TIME() / 0.5f); // Pulsate scale for testing