Game For ECE 2035

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Revision:
14:7225da81314a
Parent:
11:6cd02a8539d1
Child:
16:06a88c0110ff
--- a/graphics.cpp	Thu Dec 02 20:16:28 2021 +0000
+++ b/graphics.cpp	Fri Dec 03 08:45:49 2021 +0000
@@ -156,13 +156,13 @@
 }
 
 
-void draw_upper_status(int player_x, int player_y)
+void draw_upper_status(int player_x, int player_y, int coin)
 {
     uLCD.locate(0,0);
     uLCD.text_width(1);
     uLCD.text_height(1);
     uLCD.color(GREEN);
-    uLCD.printf("X: [%2i] Y: [%2i]",player_x,player_y);
+    uLCD.printf("X:[%2i] Y:[%2i] $:%1i",player_x,player_y,coin);
     
     // Draw bottom border of status bar
     
@@ -176,7 +176,19 @@
     uLCD.text_width(1);
     uLCD.text_height(1);
     uLCD.color(GREEN);
-    uLCD.printf("HP: %3i MP: %3i",hp,mp);
+    uLCD.printf("HP:%3i MP:%3i",hp,mp);
+    
+    // Add other status info drawing code here
+}
+
+void draw_spell(char spell)
+{   
+    // Draw top border of status bar
+    uLCD.locate(16,15);
+    uLCD.text_width(1);
+    uLCD.text_height(1);
+    uLCD.color(GREEN);
+    uLCD.printf("%c",spell);
     
     // Add other status info drawing code here
 }