Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.

Dependencies:   mbed FXOS8700CQ mbed-rtos

Revision:
11:5a6b9dffd78a
Parent:
5:bc0691d02fd5
Child:
17:5d8ff39a0e49
diff -r adff3c804985 -r 5a6b9dffd78a Game_one/Game_one.cpp
--- a/Game_one/Game_one.cpp	Fri Apr 12 17:19:14 2019 +0000
+++ b/Game_one/Game_one.cpp	Sun Apr 14 15:56:58 2019 +0000
@@ -215,11 +215,11 @@
 {
     Page currentPage = PAGE_1;
     int fps = 8.0;
-    static int instruct_data[] = {
-        1,1,1,1,1,1,1,
-        0,1,1,1,1,1,0,
-        0,0,1,1,1,0,0,
-        0,0,0,1,0,0,0
+    int instruct_data[4][7] = {
+        {1,1,1,1,1,1,1},
+        {0,1,1,1,1,1,0},
+        {0,0,1,1,1,0,0},
+        {0,0,0,1,0,0,0},
     };
     
     while(pad.check_event(Gamepad::A_PRESSED) == false){
@@ -230,7 +230,7 @@
                 lcd.printString("is rushing",0,1);
                 lcd.printString("to his lecture",0,2);
                 lcd.printString("Collect coins",0,4);
-                lcd.drawSprite(39, 44, 4, 7, instruct_data);
+                lcd.drawSprite(39, 44, 4, 7, (int *)instruct_data);
                 lcd.refresh();
                 if(pad.get_direction() == S){currentPage = PAGE_2;}
                 wait(1.0f/fps);
@@ -242,7 +242,7 @@
                 lcd.printString("reach the",0,2);
                 lcd.printString("classroom in",0,3);
                 lcd.printString("time by ",0,4);
-                lcd.drawSprite(39, 44, 4, 7, instruct_data);
+                lcd.drawSprite(39, 44, 4, 7, (int *)instruct_data);
                 lcd.refresh();
                 if(pad.get_direction() == S){currentPage = PAGE_3;}
                 wait(1.0f/fps);