-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
39 lines (26 loc) · 979 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <iostream>
#include <vector>
#include <thread>
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
#include "BoidsManager.h"
#include "AllegroManager.h"
using namespace std;
//inisialisation des paramètre de simulation
int displayWidth = 1920;
int displayHeight = 900;
int totalEntities = 150;
ALLEGRO_KEYBOARD_STATE keyboardState;
ALLEGRO_DISPLAY* displayWindows = nullptr;
int main(int argc, char **argv) {
//Création de l'objet de gestion de la fenêtre
auto allegroManager = new AllegroManager(displayWindows, displayWidth, displayHeight);
//Création de l'objet de gestion des oisoïde
BoidsManager boidsManager(totalEntities, displayWidth, displayHeight);
//Démarage de la boucle de simulation
allegroManager->mainLoop(keyboardState, boidsManager);
//Si la boucle et couper on ferme la fenetre et le programe
al_destroy_display(displayWindows);
al_shutdown_primitives_addon();
return 0;
}