Sound update
Dependencies: 4DGL-uLCD-SE Physac-MBED PinDetect SDFileSystem mbed-rtos mbed
Diff: main.cpp
- Revision:
- 30:4d8aa9229bdd
- Parent:
- 29:431e5788a313
- Child:
- 31:b08cc3c126d6
diff -r 431e5788a313 -r 4d8aa9229bdd main.cpp --- a/main.cpp Fri Dec 09 20:44:32 2022 +0000 +++ b/main.cpp Fri Dec 09 21:06:11 2022 +0000 @@ -70,15 +70,15 @@ speaker.write_u16(tetris[i]); i++; } - else if (game2) { + if (game2) { speaker.write_u16(air_hockey[j]); j++; } - else { + if (!game1 && !game2) { speaker.write_u16(mii_menu[k]); k++; } - if (k>= NUM_ELEMENTS) { + if (k>= 71904) { k = 0; } if (i>= 72584) {