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.
Spaceship/Spaceship.cpp
- Committer:
- evanso
- Date:
- 2020-04-13
- Revision:
- 3:dee187b8b30c
- Child:
- 4:0df2b85e47f1
File content as of revision 3:dee187b8b30c:
#include "Spaceship.h"
const int kSpaceshipSprite[4][13] = {
{ 1,1,1,1,1,1,0,0,0,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,1,1,1 },
{ 0,0,1,1,1,1,1,0,0,0,0,0,0 },
};
Spaceship::Spaceship() {
}
Spaceship::~Spaceship() {
}
void Spaceship::init() {
position_x_spaceship_ = 40;
position_y_spaceship_ = 20;
}
void Spaceship::draw(N5110 &lcd) {
// Draws spaceships at defined x and y positions
lcd.drawSprite(position_x_spaceship_, position_y_spaceship_, 4, 13, (int*)kSpaceshipSprite);
}