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:
@@ -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)
|
||||
|
||||
|
||||
9
main.cpp
9
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;
|
||||
|
||||
Reference in New Issue
Block a user