FINAL VERSION

Dependencies:   mbed

Revision:
95:09550aeca8b9
Parent:
94:8fa117200f6b
Child:
96:c30e110c0a93
--- a/main.cpp	Mon May 06 23:38:14 2019 +0000
+++ b/main.cpp	Mon May 06 23:43:28 2019 +0000
@@ -33,6 +33,11 @@
 void flash_screen(N5110 &lcd);
 void countdown();
 
+Bitmap breakwhite(breakwhite_data, 48, 84);  // assign the title screen sprites
+Bitmap breakblack(breakblack_data, 48, 84);
+Bitmap arrowup(arrowup_data, 5, 7);  // assign the arrow up sprite data
+Bitmap arrowdown(arrowdown_data, 5, 7);  // assign the arrow down sprite data
+
 bool tilt = false;
 float sens = 0.5; // default sens
 
@@ -67,9 +72,6 @@
 {
     tilt = false;   // reset the tilt variable so that on start, joystick is default
 
-    Bitmap breakwhite(breakwhite_data, 48, 84);  // assign the title screen sprites
-    Bitmap breakblack(breakblack_data, 48, 84);
-
     lcd.clear();
 
     breakblack.render(lcd, 0, 0);  // render the first frame
@@ -199,9 +201,6 @@
 
 void how_to_play()
 {
-    Bitmap arrowup(arrowup_data, 5, 7);  // assign the arrow up sprite data
-    Bitmap arrowdown(arrowdown_data, 5, 7);  // assign the arrow down sprite data
-
     lcd.clear();
     lcd.printString("   B = LASER  ",0,0);
     lcd.printString(" START = PAUSE  ",0,1);