ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

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;