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
Diff: Rasturizer/Rasturizer.cpp
- Revision:
- 29:4a02f0bae202
- Parent:
- 27:e46af658c67a
- Child:
- 30:91038c2afec7
--- a/Rasturizer/Rasturizer.cpp Thu Apr 04 21:47:00 2019 +0000
+++ b/Rasturizer/Rasturizer.cpp Thu Apr 04 22:04:10 2019 +0000
@@ -134,10 +134,10 @@
lcd.printString(text, x, y);
}
-void Rasturizer::printScore(int score){
+void Rasturizer::printScore(int score, int x, int y){
char buffer[5];
sprintf(buffer, "%d", score/3);
- print(buffer, 0, 0);
+ print(buffer, x, y);
memset(buffer, 0, sizeof buffer);
}
@@ -154,7 +154,7 @@
lcd.turnOff();
}
-void Rasturizer::drawDeathScreen(bool selection){
+void Rasturizer::drawDeathScreen(bool selection, int highScore){
Face faces[6];
int x;
int y;
@@ -171,6 +171,7 @@
z = 50;
}
+ printScore(highScore, 40, 0);
drawDeathButtons();
drawSelectionCube(x, y, z, 2);
}