Commit cd132533cd97aa2492d25c9c8e0086d08962b153

Authored by Geoffrey PREUD'HOMME
0 parents

Workflow initial

Makefile 0 → 100644
  1 +++ a/Makefile
... ... @@ -0,0 +1,20 @@
  1 +# Variables
  2 +## Compilation
  3 +CXX = g++
  4 +#CXXFLAGS = -lsfml-graphics -lsfml-window -lsfml-system
  5 +
  6 +# Programmes possibles
  7 +main: bin/main
  8 +
  9 +# Éxecutables
  10 +bin/main: obj/main.o
  11 + $(CXX) $^ -o $@ $(CXXFLAGS)
  12 +
  13 +# Objets
  14 +obj/%.o: src/%.cpp
  15 + $(CXX) -c $< -o $@
  16 +
  17 +# Meta
  18 +.PHONY: clean
  19 +clean:
  20 + rm -rf obj/*.o bin/*
... ...
bin/.gitignore 0 → 100644
  1 +++ a/bin/.gitignore
... ... @@ -0,0 +1,2 @@
  1 +*
  2 +!.gitignore
... ...
obj/.gitignore 0 → 100644
  1 +++ a/obj/.gitignore
... ... @@ -0,0 +1,2 @@
  1 +*
  2 +!.gitignore
... ...
src/main.cpp 0 → 100644
  1 +++ a/src/main.cpp
... ... @@ -0,0 +1,8 @@
  1 +/* Programme principal */
  2 +
  3 +#include <iostream>
  4 +
  5 +int main() {
  6 + std::cout << "Hello world!" << std::endl;
  7 + return 0;
  8 +}
... ...
src/sfmlTest.cpp 0 → 100644
  1 +++ a/src/sfmlTest.cpp
... ... @@ -0,0 +1,24 @@
  1 +#include <SFML/Graphics.hpp>
  2 +
  3 +int main()
  4 +{
  5 + sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
  6 + sf::CircleShape shape(100.f);
  7 + shape.setFillColor(sf::Color::Green);
  8 +
  9 + while (window.isOpen())
  10 + {
  11 + sf::Event event;
  12 + while (window.pollEvent(event))
  13 + {
  14 + if (event.type == sf::Event::Closed)
  15 + window.close();
  16 + }
  17 +
  18 + window.clear();
  19 + window.draw(shape);
  20 + window.display();
  21 + }
  22 +
  23 + return 0;
  24 +}
... ...