make shit run with proper resolution now ; grid is now 40 cause before it was too fucking tiny ; res is 1080P cause why fucking not.

This commit is contained in:
ZockerKatze
2025-05-19 07:27:02 +02:00
parent 8c08a0a4b7
commit 5ddcae7cce
2 changed files with 7 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ project(cppsnek)
set(CMAKE_CXX_STANDARD 17)
find_package(SFML 2.5 COMPONENTS graphics window system REQUIRED)
find_package(SFML 2.6.2 COMPONENTS graphics window system REQUIRED)
add_executable(cppsnek main.cpp)

View File

@@ -13,9 +13,12 @@ using namespace sf;
using namespace std;
// Init window / sprite variables ( constant and will never change )
constexpr int WIDTH = 640;
constexpr int HEIGHT = 480;
constexpr int GRID_SIZE = 20;
// Fuckass Resolution
constexpr int WIDTH = 1920;
constexpr int HEIGHT = 1080;
// Grid ( essentialy the fucking scaling of the whole damn thing )
constexpr int GRID_SIZE = 40;
constexpr int GRID_WIDTH = WIDTH / GRID_SIZE;
constexpr int GRID_HEIGHT = HEIGHT / GRID_SIZE;
constexpr int SPRITE_SIZE = GRID_SIZE;