From 097dff02004c1ba618ea7355313150a61cac201f Mon Sep 17 00:00:00 2001 From: Luca Sas Date: Tue, 24 Mar 2020 16:26:18 +0000 Subject: Updated gitignore and added asset path variable --- .gitignore | 4 +++- src/main.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index da05179..7493ec2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ .vs/ cmake-build-debug/ bin/ -build/ \ No newline at end of file +build/ +out/ +CMakeSettings.json \ No newline at end of file diff --git a/src/main.c b/src/main.c index 4b5071d..cc6efd1 100644 --- a/src/main.c +++ b/src/main.c @@ -3,13 +3,16 @@ #define SCREEN_WIDTH (800) #define SCREEN_HEIGHT (450) +// Change this depending on the path of your executable relative to the assets folder +#define ASSET_PATH "../assets/" + int main(void) { // Initialization //-------------------------------------------------------------------------------------- InitWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "Window title"); - Texture2D texture = LoadTexture("../assets/test.png"); + Texture2D texture = LoadTexture(ASSET_PATH"test.png"); SetTargetFPS(60); // Set our game to run at 60 frames-per-second -- cgit v1.2.3