Ajout de sonorité

This commit is contained in:
Antoine H. Mézon 2017-05-25 18:25:36 +02:00
parent c62f7fa243
commit 8a27f1193a
4 changed files with 11 additions and 1 deletions

View file

@ -43,6 +43,11 @@ int main(int argc, char* argv[])
sf::Event event;
tracking = 0; //Pas de tracking de base en mode SFML
sf::Music aye;
if (!aye.openFromFile("Stock SFML/Aye Sir.ogg"))
return EXIT_FAILURE; // erreur
#endif
@ -169,18 +174,23 @@ int main(int argc, char* argv[])
//printf("\n\n\n OK \n\n\n");
if (tracking){ tracking = 0;}
else tracking = 1;
aye.play();
cvWaitKey(100);
}
//Detection du bouton reset
if (sf::Mouse::isButtonPressed(sf::Mouse::Left)&&(PosMouse.x>640)&&(PosMouse.x<760)&&(PosMouse.y>110)&&(PosMouse.y<160)){
//printf("\n\n\n OK \n\n\n");
tracking = 0;
//Reset Position moteur
angle[0]=0; //ANGLES A VERIFIER
angle[1]=0;
controle_moteur(angle);
aye.play();
cvWaitKey(100);
}
//printf("Pos Mouse : %d %d \n", PosMouse.x, PosMouse.y);

BIN
Code/Stock SFML/Aye Sir.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Before After
Before After

Binary file not shown.