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.
Sprite/Sprite.h
- Committer:
- joshdavy
- Date:
- 2019-05-08
- Revision:
- 14:1e6f74233e8e
- Parent:
- 10:58cf89dd878c
File content as of revision 14:1e6f74233e8e:
#ifndef SPRITE_H
#define SPRITE_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Bitmap.h"
#define GRAVITY 2
/** Sprite Class
@brief Sprite Class. Handles Sprites, their location,rendering and bitmaps.
@version 1.0
@author Joshua Davy el17jd
@date April 2019
*/
class Sprite {
public:
Sprite();
~Sprite();
void init(int height,int width, int * bitmap,Vector2D pos);
void render(N5110 &lcd);
Vector2D get_pos();
void set_pos(Vector2D pos);
void setBitmap(int * bitmap);
protected: //Protected as will need to be accesible by child classes.
Vector2D _pos;
int _height;
int _width;
int * _bitmap;
};
#endif