diff --git a/pacman/src/CMakeLists.txt b/pacman/src/CMakeLists.txt index 8405220..9c947de 100644 --- a/pacman/src/CMakeLists.txt +++ b/pacman/src/CMakeLists.txt @@ -9,4 +9,7 @@ include_directories(${sdl2_INCLUDE_DIRS} ${sdl2_image_INCLUDE_DIRS}) file(GLOB_RECURSE sources CONFIGURE_DEPENDS "*.cpp") add_executable(PacMan ${sources}) -target_link_libraries(PacMan sdl2::sdl2 sdl2_image::sdl2_image) \ No newline at end of file +target_link_libraries(PacMan sdl2::sdl2 sdl2_image::sdl2_image) + +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../assets/maze.png DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/bin) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../assets/sprites32.png DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/bin) \ No newline at end of file diff --git a/pacman/src/GameWindow.cpp b/pacman/src/GameWindow.cpp index c99708b..62f339a 100644 --- a/pacman/src/GameWindow.cpp +++ b/pacman/src/GameWindow.cpp @@ -12,8 +12,8 @@ GameWindow::GameWindow(int width, int height) { auto sdl_renderer = createRenderer(sdl_window); createWindowSurface(sdl_window); setDrawColor(sdl_renderer); - maze_texture = loadTexture(sdl_renderer, "../../../../pacman/assets/maze.png"); - sprite_texture = loadTexture(sdl_renderer, "../../../../pacman/assets/sprites32.png"); + maze_texture = loadTexture(sdl_renderer, "maze.png"); + sprite_texture = loadTexture(sdl_renderer, "sprites32.png"); } void GameWindow::update(const PacMan & pacMan, Board board) {