Steven Mahasin / Mbed 2 deprecated DreamDungeon

Dependencies:   mbed MotionSensor

Revision:
33:4f3948dcd2f7
Parent:
32:fe6359ef9916
Child:
34:1d5b4da3935e
--- a/Entity/Player/Player.h	Mon May 06 08:56:48 2019 +0000
+++ b/Entity/Player/Player.h	Mon May 06 13:27:26 2019 +0000
@@ -2,6 +2,7 @@
 #define PLAYER_H
 #include "Entity.h"
 #include "Bullets.h"
+#define INVULNERABILITY_PERIOD 50
 
 const int bullets_max = 20;
 
@@ -13,14 +14,13 @@
     int fire_rate_counter;
     int fire_rate_delay;
     int _bullet_speed;
-    const static int invulnerability_period = 50;
     int invulnerability_counter;
     
     // Private Functions
     void move_player(float mapped_x, float mapped_y, int * map, bool * doorways);
     void move_bullets();
     void increment_frames(float mapped_x, float mapped_y);
-    int * get_frame();
+    char * get_frame();
     void draw_player(N5110 &lcd);
     void draw_bullets(N5110 &lcd);
     
@@ -34,7 +34,7 @@
     int get_bullet_speed();
     int get_hearts_width();
     int get_hearts_height();
-    int * get_hearts_sprite();
+    char * get_hearts_sprite();
     
     // Functions
     virtual void move(float, float, int * map, bool * doorways);
@@ -51,7 +51,7 @@
 };
 
 // Sprite
-const int sprite_heart[9][9] = {
+const char sprite_heart[9][9] = {
     {0,1,1,0,0,0,1,1,0,},
     {1,1,1,1,0,1,1,1,1,},
     {1,2,1,1,1,1,1,1,1,},
@@ -63,7 +63,7 @@
     {0,0,0,0,1,0,0,0,0,}
 };
 
-const int sprite_dying_player [5][12][12] = { // sprite_dying_player [Frame][Size_Y][Size_X]
+const char sprite_dying_player [5][12][12] = { // sprite_dying_player [Frame][Size_Y][Size_X]
     {
         {0,1,1,1,1,0,0,0,0,0,0,0,},
         {1,1,1,1,1,1,0,0,0,0,0,0,},
@@ -137,7 +137,7 @@
 };
     
 
-const int sprite_transparent_player[12][6] = {
+const char sprite_transparent_player[12][6] = {
     {0,0,0,0,0,0,},
     {0,0,0,0,0,0,},
     {0,0,0,0,0,0,},
@@ -152,7 +152,7 @@
     {0,0,0,0,0,0,}
 };
 
-const int sprite_player [4][4][12][6] = {   // Player [Face][SpriteAnimationFrame][Size_Y][Size_X]
+const char sprite_player [4][4][12][6] = {   // Player [Face][SpriteAnimationFrame][Size_Y][Size_X]
     {
         // Up
         {