ELEC2645 (2018/19) / Mbed 2 deprecated fy14lkaa

Dependencies:   mbed

Revision:
87:4635d00ffe9d
Parent:
86:79cfe806a11d
Child:
88:a19f315551ea
--- a/spase_ship/space_ship.cpp	Sun Apr 28 14:53:29 2019 +0000
+++ b/spase_ship/space_ship.cpp	Sun Apr 28 15:06:07 2019 +0000
@@ -10,6 +10,23 @@
 
 }
 
+
+
+
+const int space_ship[10][12]= {
+    {0,0,0,0,0,0,0,0,0,0,0,0},
+    {0,0,0,1,1,0,0,0,0,0,0,0},
+    {0,0,0,1,1,0,0,0,0,0,0,0},
+    {0,1,1,1,1,1,1,1,0,0,0,0},
+    {0,1,1,1,1,1,1,1,1,0,0,0},
+    {0,1,1,1,1,1,1,1,1,1,1,0},
+    {0,1,1,1,1,1,1,1,1,0,0,0},
+    {0,1,1,1,1,1,1,1,0,0,0,0},
+    {0,0,0,1,1,0,0,0,0,0,0,0},
+    {0,0,0,1,1,0,0,0,0,0,0,0},
+
+};
+
 void space_ship::init(int x,int height,int width)
 {
     _x = x;  // x value on screen is fixed
@@ -24,5 +41,5 @@
 void space_ship::draw(N5110 &lcd)
 {
     // draw space_ship in screen buffer. 
-  
+      lcd.drawSprite(x_space_ship,y_space_ship,10,12,(int *) space_ship);
 }