Don't like ads? PRO users don't see any ads ;-)
Guest

Maincpp

By: a guest on Aug 8th, 2011  |  syntax: None  |  size: 0.73 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <SFML/Graphics.hpp>
  2. #include "humain.h"
  3.  
  4. using namespace std;
  5. using namespace sf;
  6.  
  7. int main()
  8. {
  9.     // creation de la fenetre
  10.     RenderWindow App(sf::VideoMode(800, 600), "RogueLike");
  11.  
  12.     Humain test; //creation de l'objet
  13.  
  14.         // boucle principale
  15.     while (App.IsOpened())
  16.     {
  17.         // gere les events
  18.         sf::Event Event;
  19.         while (App.GetEvent(Event))
  20.         {
  21.             if (Event.Type == sf::Event::Closed)
  22.                 App.Close();
  23.         }
  24.  
  25.         //Efface l'ecran
  26.         App.Clear();
  27.  
  28.         // appelle de l'atribut affichage de la classe Humain
  29.         test.affichage(App);
  30.  
  31.         // rafraichisement de l'ecran
  32.         App.Display();
  33.     }
  34.  
  35.     return EXIT_SUCCESS;
  36. }