Commit fd0f6b677b9d0dc8d52a920194cf8a5ff258646e

Authored by Geoffrey PREUD'HOMME
1 parent ab4200c6

Intégration de la sfml

Makefile
1 1 # Variables
2 2 ## Compilation
3 3 CXX = g++
4   -#CXXFLAGS = -lsfml-graphics -lsfml-window -lsfml-system
  4 +CXXFLAGS = -lsfml-graphics -lsfml-window -lsfml-system
5 5  
6 6 # Programmes possibles
7 7 main: bin/main
8 8  
9 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 11 $(CXX) $^ -o $@ $(CXXFLAGS)
12 12  
13 13 # Objets
... ...
src/main.cpp
... ... @@ -2,10 +2,12 @@
2 2  
3 3 #include "test.hpp"
4 4 #include "testClasse.hpp"
  5 +#include "sfmlTest.hpp"
5 6  
6 7 int main() {
7 8 Geoffrey frogeye;
8 9 frogeye.setN(42);
9 10 helloWorld(frogeye.getN());
  11 + sfmlTest();
10 12 return 0;
11 13 }
... ...
src/sfmlTest.cpp
1 1 #include <SFML/Graphics.hpp>
2 2  
3   -int main()
  3 +#include "sfmlTest.hpp"
  4 +
  5 +int sfmlTest()
4 6 {
5 7 sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
6 8 sf::CircleShape shape(100.f);
... ...
src/sfmlTest.hpp 0 → 100644
... ... @@ -0,0 +1 @@
  1 +int sfmlTest();
... ...