James Heavey
/
EL17JH
FINAL VERSION
Diff: main.cpp
- Revision:
- 84:6483503a72fc
- Parent:
- 83:645cdbd79c21
- Child:
- 91:c01a736fb0d9
--- a/main.cpp Mon May 06 14:37:48 2019 +0000 +++ b/main.cpp Mon May 06 17:49:36 2019 +0000 @@ -199,13 +199,39 @@ } void how_to_play() { + Bitmap arrowup(arrowup_data, 5, 7); // assign the arrow up sprite data + Bitmap arrowdown(arrowdown_data, 5, 7); // assign the arrow down sprite data + + lcd.clear(); + lcd.printString(" B = LASER ",0,0); + lcd.printString(" START = PAUSE ",0,1); + lcd.printString(" DESTROY ALL ",0,2); + lcd.printString(" BRICKS ",0,3); + arrowdown.render(lcd, 38, 43); + lcd.refresh(); + wait(0.4); while (pad.check_event(Gamepad::B_PRESSED) == false) { // while B is not pressed to return to main menu display instruction on how to interact with the game - lcd.clear(); - lcd.printString(" explain ",2,2); - lcd.printString(" PRESS B ",1,4); - lcd.refresh(); - wait(0.1); + + if (pad.check_event(Gamepad::R_PRESSED)){ + lcd.clear(); + lcd.printString(" CONTINUE TO ",0,2); + lcd.printString("INCREASE SCORE. ",0,3); + arrowup.render(lcd, 38, 0); + lcd.refresh(); + wait(0.1); + } + if (pad.check_event(Gamepad::L_PRESSED)){ + lcd.clear(); + lcd.printString(" B = LASER ",0,0); + lcd.printString(" START = PAUSE ",0,1); + lcd.printString(" DESTROY ALL ",0,2); + lcd.printString(" BRICKS ",0,3); + arrowdown.render(lcd, 38, 43); + lcd.refresh(); + wait(0.1); + } } + wait(0.3); main_menu(); // when B is pressed, the loop is exited and main menu is entered once again }