From 701cd7cdef7e764b88390e8c14b749bf9ac1d301 Mon Sep 17 00:00:00 2001 From: DarthMooMancer Date: Wed, 22 Oct 2025 18:22:36 -0400 Subject: [PATCH] os specifc locations for fonts --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index b875b6b..10fd0d9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,13 @@ #include "elements.hpp" #include "maps.hpp" +#ifdef __APPLE__ + sf::Font font("/Users/andrewhaynes/personal/Projects/CPP/SFML_game_engine/assets/pixel.ttf"); +#endif +#ifdef __linux__ + sf::Font font("/home/andrew/personal/Projects/CPP/SFML_game_engine/assets/pixel.ttf"); +#endif + int main() { Entity *wall_list[MAX_ROWS][MAX_COLS] = {}; struct { @@ -76,7 +83,6 @@ int main() { sf::RenderWindow window(sf::VideoMode({WIDTH, HEIGHT}), "SFML window", sf::Style::Default); window.setFramerateLimit(60); - sf::Font font("/Users/andrewhaynes/personal/Projects/CPP/SFML_game_engine/assets/pixel.ttf"); sf::Text text(font, "0, 0", 16); text.setPosition({ WIDTH - (TILESIZE * 11.5), HEIGHT - (int)(TILESIZE / 1.5)});