Josh Davy / Mbed OS Flip_OS_5

Dependencies:   el17jd

Committer:
joshdavy
Date:
Sat Apr 06 11:47:18 2019 +0000
Revision:
4:afbf3dd71403
Parent:
3:b34685dbdb8d
Child:
8:21b6d4dbce44
Began implemting music playing class

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joshdavy 1:37802772843e 1 #ifndef SPRITE_H
joshdavy 1:37802772843e 2 #define SPRITE_H
joshdavy 1:37802772843e 3
joshdavy 1:37802772843e 4 #include "mbed.h"
joshdavy 1:37802772843e 5 #include "N5110.h"
joshdavy 1:37802772843e 6 #include "Gamepad.h"
joshdavy 1:37802772843e 7 #include "Bitmap.h"
joshdavy 1:37802772843e 8
joshdavy 3:b34685dbdb8d 9 #define GRAVITY 2
joshdavy 1:37802772843e 10 /*Sprite Class*/
joshdavy 1:37802772843e 11
joshdavy 3:b34685dbdb8d 12 //extern N5110 lcd;
joshdavy 1:37802772843e 13
joshdavy 1:37802772843e 14 class Sprite {
joshdavy 1:37802772843e 15
joshdavy 1:37802772843e 16 public:
joshdavy 1:37802772843e 17 Sprite();
joshdavy 1:37802772843e 18 ~Sprite();
joshdavy 1:37802772843e 19 void init(int height,int width, int * bitmap,Vector2D pos);
joshdavy 2:b62e8be35a5d 20 void render(N5110 &lcd);
joshdavy 1:37802772843e 21 Vector2D getPos();
joshdavy 1:37802772843e 22 void setPos(Vector2D pos);
joshdavy 3:b34685dbdb8d 23 void update();
joshdavy 4:afbf3dd71403 24 void flip();
joshdavy 4:afbf3dd71403 25 void setBitmap(int * bitmap);
joshdavy 2:b62e8be35a5d 26
joshdavy 3:b34685dbdb8d 27 protected: //Protected as will need to be accesible by inherited classes.
joshdavy 1:37802772843e 28 Vector2D _pos;
joshdavy 1:37802772843e 29 Vector2D _velocity;
joshdavy 1:37802772843e 30 int _height;
joshdavy 1:37802772843e 31 int _width;
joshdavy 1:37802772843e 32 int * _bitmap;
joshdavy 1:37802772843e 33 };
joshdavy 1:37802772843e 34
joshdavy 1:37802772843e 35 #endif