James Heavey
/
EL17JH
FINAL VERSION
Diff: main.cpp
- Revision:
- 55:b7bde601c23e
- Parent:
- 54:d96f68f4735b
- Child:
- 56:f9e586348e0b
--- a/main.cpp Sat Apr 27 20:58:12 2019 +0000 +++ b/main.cpp Sun Apr 28 15:59:45 2019 +0000 @@ -125,7 +125,7 @@ lcd.printString(" JOYSTICK ",0,2); // start with default as joystick lcd.printString(" TILT ",0,3); // choose between joystick and tilt lcd.refresh(); - wait(0.1); + wait(0.3); int pointer = 2; @@ -151,17 +151,17 @@ pad.tone(750.0,0.3); wait(0.1); tilt = false; - } - else if (pad.check_event(Gamepad::A_PRESSED) && pointer == 3) { // this one doesnt work because of the order?? + } else if (pad.check_event(Gamepad::A_PRESSED) && pointer == 3) { pad.tone(750.0,0.3); wait(0.1); tilt = true; } + if (pad.check_event(Gamepad::B_PRESSED)) { main_menu(); } } - settings(); //sometimes the button bounce causes it to skip the while loop (could add wait in at the top) + //settings(); //sometimes the button bounce causes it to skip the while loop (could add wait in at the top) } void how_to_play() { @@ -220,7 +220,7 @@ if (pad.check_event(Gamepad::START_PRESSED)) { prev_score = breakout.get_prev_score(); - main_game(tilt); // placeholder, change so game restarts + main_game(tilt); } else if (pad.check_event(Gamepad::BACK_PRESSED)) { title_screen();