diff --git a/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp b/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp index 795c7cd3b..15ce66a17 100644 --- a/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp +++ b/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp @@ -20,22 +20,22 @@ // Here is a small helper for you! Have a look. #include "ResourcePath.hpp" -int main(int, char const**) +int main() { // Create the main window sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window"); // Set the Icon sf::Image icon; - if (!icon.loadFromFile(resourcePath() + "icon.png")) + if (!icon.loadFromFile(resourcePath() / "icon.png")) { return EXIT_FAILURE; } - window.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr()); + window.setIcon(icon); // Load a sprite to display sf::Texture texture; - if (!texture.loadFromFile(resourcePath() + "background.jpg")) + if (!texture.loadFromFile(resourcePath() / "background.jpg")) { return EXIT_FAILURE; } @@ -43,7 +43,7 @@ int main(int, char const**) // Create a graphical text to display sf::Font font; - if (!font.loadFromFile(resourcePath() + "tuffy.ttf")) + if (!font.loadFromFile(resourcePath() / "tuffy.ttf")) { return EXIT_FAILURE; } @@ -52,7 +52,7 @@ int main(int, char const**) // Load a music to play sf::Music music; - if (!music.openFromFile(resourcePath() + "doodle_pop.ogg")) + if (!music.openFromFile(resourcePath() / "doodle_pop.ogg")) { return EXIT_FAILURE; } diff --git a/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp b/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp index 54dce7e29..33b329e15 100644 --- a/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp +++ b/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp @@ -18,7 +18,7 @@ #include #include -int main(int argc, char const** argv) +int main() { // Create the main window sf::RenderWindow window(sf::VideoMode({800, 600}), "SFML window"); @@ -29,7 +29,7 @@ int main(int argc, char const** argv) { return EXIT_FAILURE; } - window.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr()); + window.setIcon(icon); // Load a sprite to display sf::Texture texture;