mirror of
https://github.com/AntoineHX/LivingMachine.git
synced 2025-05-03 13:20:45 +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);
|
||||
|
|
BIN
Code/Stock SFML/Aye Sir.ogg
Normal file
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 |
BIN
Code/gmon.out
BIN
Code/gmon.out
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue