From 5ddcae7ccebd05ed17c942c583fdb03cddd9221f Mon Sep 17 00:00:00 2001 From: ZockerKatze Date: Mon, 19 May 2025 07:27:02 +0200 Subject: [PATCH] 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. --- CMakeLists.txt | 2 +- main.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8271bd..085d395 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/main.cpp b/main.cpp index 2f566c1..d59d760 100644 --- a/main.cpp +++ b/main.cpp @@ -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;