Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Alien/Alien.cpp
- Revision:
- 91:f9e2ff484014
- Parent:
- 28:4786e81ce3e3
- Child:
- 92:8a1b14488ca5
--- a/Alien/Alien.cpp Sun Apr 28 15:21:54 2019 +0000 +++ b/Alien/Alien.cpp Sun Apr 28 19:44:34 2019 +0000 @@ -11,6 +11,26 @@ } + +const int Alien[12][10] = { + { 0,0,0,0,0,1,1,1,0,0 }, + { 0,0,0,0,0,1,1,1,0,0 }, + { 0,0,0,1,1,1,1,0,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + { 0,0,1,1,1,1,0,1,0,0 }, + +}; + + + + void Alien::init(int size,int speed) { @@ -42,7 +62,8 @@ void Alien::draw(N5110 &lcd) { - lcd.drawRect(_x,_y,_size,_size,FILL_BLACK); + lcd.drawSprite(x_Alien,y_Alien,12,10,(int *)Alien); + } void Alien::update()