Commit fd0f6b677b9d0dc8d52a920194cf8a5ff258646e
1 parent
ab4200c6
Intégration de la sfml
Showing
4 changed files
with
8 additions
and
3 deletions
Show diff stats
Makefile
1 | # Variables | 1 | # Variables |
2 | ## Compilation | 2 | ## Compilation |
3 | CXX = g++ | 3 | CXX = g++ |
4 | -#CXXFLAGS = -lsfml-graphics -lsfml-window -lsfml-system | 4 | +CXXFLAGS = -lsfml-graphics -lsfml-window -lsfml-system |
5 | 5 | ||
6 | # Programmes possibles | 6 | # Programmes possibles |
7 | main: bin/main | 7 | main: bin/main |
8 | 8 | ||
9 | # Éxecutables | 9 | # Éxecutables |
10 | -bin/main: obj/main.o obj/test.o obj/testClasse.o | 10 | +bin/main: obj/main.o obj/test.o obj/testClasse.o obj/sfmlTest.o |
11 | $(CXX) $^ -o $@ $(CXXFLAGS) | 11 | $(CXX) $^ -o $@ $(CXXFLAGS) |
12 | 12 | ||
13 | # Objets | 13 | # Objets |
src/main.cpp
@@ -2,10 +2,12 @@ | @@ -2,10 +2,12 @@ | ||
2 | 2 | ||
3 | #include "test.hpp" | 3 | #include "test.hpp" |
4 | #include "testClasse.hpp" | 4 | #include "testClasse.hpp" |
5 | +#include "sfmlTest.hpp" | ||
5 | 6 | ||
6 | int main() { | 7 | int main() { |
7 | Geoffrey frogeye; | 8 | Geoffrey frogeye; |
8 | frogeye.setN(42); | 9 | frogeye.setN(42); |
9 | helloWorld(frogeye.getN()); | 10 | helloWorld(frogeye.getN()); |
11 | + sfmlTest(); | ||
10 | return 0; | 12 | return 0; |
11 | } | 13 | } |
src/sfmlTest.cpp
1 | #include <SFML/Graphics.hpp> | 1 | #include <SFML/Graphics.hpp> |
2 | 2 | ||
3 | -int main() | 3 | +#include "sfmlTest.hpp" |
4 | + | ||
5 | +int sfmlTest() | ||
4 | { | 6 | { |
5 | sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); | 7 | sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); |
6 | sf::CircleShape shape(100.f); | 8 | sf::CircleShape shape(100.f); |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +int sfmlTest(); |