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: 4DGL-uLCD-SE mbed SDFileSystem wave_player
Revision 18:2e42ec5e2311, committed 2016-10-31
- Comitter:
- kswanson31
- Date:
- Mon Oct 31 20:18:51 2016 +0000
- Parent:
- 17:95948ed73911
- Commit message:
- Added end of game screen, updated pause.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 95948ed73911 -r 2e42ec5e2311 main.cpp
--- a/main.cpp Mon Oct 31 20:03:20 2016 +0000
+++ b/main.cpp Mon Oct 31 20:18:51 2016 +0000
@@ -156,7 +156,16 @@
}
}
- lcd.printf("Your score is: %i", score);
+ lcd.cls();
+
+ char message[20];
+ sprintf(message, "Your score? %d", score);
+ while (true) { // end game
+ lcd.text_string(message, 1, 7, FONT_7X8, WHITE);
+ wait(0.7);
+ lcd.text_string(message, 1, 7, FONT_7X8, BLACK);
+ wait(0.4);
+ }
}
bool collisionCheck() {
@@ -204,12 +213,12 @@
fclose(wave_file);
if (lives == 2) {
- lcd.filled_circle(118, 100, 3, BLACK); // erase the life symbol
+ lcd.filled_circle(118, 80, 3, BLACK); // erase the life symbol
}
else if (lives == 1) {
- lcd.filled_circle(118, 108, 3, BLACK);
+ lcd.filled_circle(118, 90, 3, BLACK);
}
else if (lives == 0) {
- lcd.filled_circle(118, 116, 3, BLACK);
+ lcd.filled_circle(118, 100, 3, BLACK);
}
}
