diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c5668e..01ac60f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,3 +33,6 @@ target_link_libraries(FLOPPE_FION SDL2 SDL2_image SDL2_ttf SDL2_mixer pthread m) set_property(TARGET FLOPPE_FION PROPERTY C_STANDARD 23) + + +file(COPY assets DESTINATION ${CMAKE_BINARY_DIR}) \ No newline at end of file diff --git a/assets/fonts/arial.ttf b/assets/fonts/arial.ttf new file mode 100644 index 0000000..8682d94 Binary files /dev/null and b/assets/fonts/arial.ttf differ diff --git a/assets/img/pp.png b/assets/img/pp.png new file mode 100644 index 0000000..044cc47 Binary files /dev/null and b/assets/img/pp.png differ diff --git a/src/main.c b/src/main.c index c6efadd..93478f9 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ int main(void) { return 0; } - Mix_Music *music = Mix_LoadMUS("../assets/music/test.mp3"); + Mix_Music *music = Mix_LoadMUS("./assets/music/pet.mp3"); if(Mix_PlayMusic(music, -1) != 0){ printf("Music sound could not be played!\n" "SDL_Error: %s\n", Mix_GetError()); @@ -25,12 +25,12 @@ int main(void) { RenderObject_t text; SDL_Color white = {255, 255, 255, 255}; TTF_Init(); - if(text_renderText(&text, 0.f, 0.f, 1000, 1, white, "/usr/share/fonts/TTF/arial.ttf", 25, "Hello World") < 0){ + if(text_renderText(&text, 0.f, 0.f, 1000, 1, white, "./assets/fonts/arial.ttf", 25, "Hello World") < 0){ printf("error"); exit(1); } - SDL_Surface* img = IMG_Load("pp.png"); + SDL_Surface* img = IMG_Load("./assets/img/pp.png"); RenderObject_t duck = { 0.2,