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: Renderer/Renderer.cpp
- Revision:
- 46:824ec81ff578
- Parent:
- 39:41dcf1604fdf
--- a/Renderer/Renderer.cpp Tue May 07 17:37:23 2019 +0000 +++ b/Renderer/Renderer.cpp Wed May 08 18:17:59 2019 +0000 @@ -105,7 +105,7 @@ 1); } -void Renderer::drawAllFaces(Face *faceArray, int noOfCubes, float angle) { //draw all faces in game +void Renderer::drawAllFaces(Face *faceArray, int noOfCubes, float angle) { //draw all faces in game using the painters algorithm Face temp; for (int f = 0; f< (noOfCubes*6)-1; f++) { //sort the faces in decreasing average z value using bubble sort for (int f2 = 0; f2< (noOfCubes*6)-f-1; f2++) { @@ -165,6 +165,10 @@ lcd.turnOff(); } +void Renderer::setContrast(float contrast) { //set the contrast of the display + lcd.setContrast(contrast); +} + void Renderer::drawDeathScreen(int selection, int highScore) { //draw the screen once the user has collided with cube Face faces[6]; int x, y, z;