Josh Davy / Mbed 2 deprecated Flip

Dependencies:   mbed el17jd

Committer:
joshdavy
Date:
Tue Apr 02 10:45:44 2019 +0000
Revision:
2:b62e8be35a5d
Parent:
1:37802772843e
Child:
3:b34685dbdb8d
Basic Sprite Rendering

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 1:37802772843e 9 /*Sprite Class*/
joshdavy 1:37802772843e 10
joshdavy 1:37802772843e 11 extern N5110 lcd;
joshdavy 1:37802772843e 12
joshdavy 1:37802772843e 13 class Sprite {
joshdavy 1:37802772843e 14
joshdavy 1:37802772843e 15 public:
joshdavy 1:37802772843e 16 Sprite();
joshdavy 1:37802772843e 17 ~Sprite();
joshdavy 1:37802772843e 18 void init(int height,int width, int * bitmap,Vector2D pos);
joshdavy 2:b62e8be35a5d 19 void render(N5110 &lcd);
joshdavy 1:37802772843e 20 Vector2D getPos();
joshdavy 1:37802772843e 21 void setPos(Vector2D pos);
joshdavy 2:b62e8be35a5d 22 void update(Gamepad &pad);
joshdavy 2:b62e8be35a5d 23
joshdavy 1:37802772843e 24 private:
joshdavy 1:37802772843e 25 Vector2D _pos;
joshdavy 1:37802772843e 26 Vector2D _velocity;
joshdavy 1:37802772843e 27 int _height;
joshdavy 1:37802772843e 28 int _width;
joshdavy 1:37802772843e 29 int * _bitmap;
joshdavy 1:37802772843e 30 };
joshdavy 1:37802772843e 31
joshdavy 1:37802772843e 32 #endif