From 9c77a9fde69a18cf344922a246084c42ff6757f4 Mon Sep 17 00:00:00 2001 From: Love Billenius Date: Tue, 30 Jan 2024 10:39:28 +0100 Subject: [PATCH] faster paddles and offset --- src/VisibleObjects/PlayerPaddle.cpp | 2 +- src/VisibleObjects/PlayerPaddle.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VisibleObjects/PlayerPaddle.cpp b/src/VisibleObjects/PlayerPaddle.cpp index 89f5246..d032f2e 100644 --- a/src/VisibleObjects/PlayerPaddle.cpp +++ b/src/VisibleObjects/PlayerPaddle.cpp @@ -6,7 +6,7 @@ PlayerPaddle::PlayerPaddle(const SDL_Point *screen, const Side side) : SDL_Rect(), screen(screen) { w = 20; h = 80; - x = side == Side::LEFT ? 0 : screen->x - w; + x = side == Side::LEFT ? 20 : screen->x - w-20; y = (screen->y - h) / 2; color[0] = 255; diff --git a/src/VisibleObjects/PlayerPaddle.h b/src/VisibleObjects/PlayerPaddle.h index 9098d0d..90001b6 100644 --- a/src/VisibleObjects/PlayerPaddle.h +++ b/src/VisibleObjects/PlayerPaddle.h @@ -9,7 +9,7 @@ class PlayerPaddle : public SDL_Rect { private: - static const int MOVE_PER_TICK = 5; + static const int MOVE_PER_TICK = 7; const SDL_Point *screen; bool movingUp = false, movingDown = false; uint8_t color[4]{};