Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MotionSensor
Diff: Title/Title.cpp
- Revision:
- 47:6e31b195ce3c
- Parent:
- 45:8725b4171646
- Child:
- 48:f7d9ae3e554d
--- a/Title/Title.cpp Wed May 08 20:47:52 2019 +0000
+++ b/Title/Title.cpp Thu May 09 01:57:49 2019 +0000
@@ -35,7 +35,7 @@
} else if (title_option == 2) {
title_option_credit(lcd, gamepad);
} else if (title_option == 3) {
- title_option_hi_scores(lcd);
+ title_option_tutorial(lcd, gamepad);
}
}
player.~Player();
@@ -113,7 +113,45 @@
}
}
-void Title::title_option_hi_scores(N5110 &lcd)
+void Title::title_option_tutorial(N5110 &lcd, Gamepad &gamepad)
{
-
+ lcd.clear();
+ lcd.printString("Use the joypad", 0, 0);
+ lcd.printString("to move the", 0, 1);
+ lcd.printString("player", 0, 2);
+ lcd.printString("Use buttons", 0, 3);
+ lcd.printString("ABXY to shoot", 0, 4);
+ lcd.printString("directionally", 0, 5);
+ lcd.refresh();
+ wait(0.05);
+ while(!gamepad.check_event(Gamepad::A_PRESSED)) {
+ }
+ wait(0.05);
+ while(gamepad.check_event(Gamepad::A_PRESSED)) {
+ }
+ lcd.clear();
+ lcd.printString("Hold L to", 0, 0);
+ lcd.printString("show player", 0, 1);
+ lcd.printString("health", 0, 2);
+ lcd.printString("Hold Back", 0, 3);
+ lcd.printString("to view a", 0, 4);
+ lcd.printString("minimap", 0, 5);
+ lcd.refresh();
+ wait(0.05);
+ while(!gamepad.check_event(Gamepad::A_PRESSED)) {
+ }
+ wait(0.05);
+ while(gamepad.check_event(Gamepad::A_PRESSED)) {
+ }
+ lcd.clear();
+ lcd.printString("Press Start", 0, 0);
+ lcd.printString("to pause", 0, 1);
+ lcd.printString("the game", 0, 2);
+ lcd.refresh();
+ wait(0.05);
+ while(!gamepad.check_event(Gamepad::A_PRESSED)) {
+ }
+ wait(0.05);
+ while(gamepad.check_event(Gamepad::A_PRESSED)) {
+ }
}