Josh Davy / Mbed 2 deprecated Flip

Dependencies:   mbed el17jd

Sprite/Sprite.cpp

Committer:
joshdavy
Date:
2019-03-25
Revision:
1:37802772843e
Child:
2:b62e8be35a5d

File content as of revision 1:37802772843e:

#include "Sprite.h"



Sprite::Sprite()
{

}

Sprite::~Sprite()
{

}

void Sprite::init(int height,int width,int * bitmap,Vector2D pos)
{
    _height = height;
    _width = width;
    _bitmap = bitmap;
    _pos = pos;    
}




void Sprite::render(N5110 lcd) {
     lcd.drawSprite(_pos.x,_pos.y,_height,_width, _bitmap);
};

Vector2D Sprite::getPos() {
    return _pos;
};

void Sprite::setPos(Vector2D pos) {
    _pos = pos;
};