mirror of
https://github.com/AntoineHX/LivingMachine.git
synced 2025-05-04 05:40:46 +02:00
Ajout de sonorité
This commit is contained in:
parent
c62f7fa243
commit
8a27f1193a
4 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue