Steven Mahasin / Mbed 2 deprecated DreamDungeon

Dependencies:   mbed MotionSensor

Revision:
12:a1c1991835ca
Parent:
11:63e54f6e7939
Child:
13:d04a6caba40d
--- a/Entity/Player/Player.h	Tue Apr 23 03:10:09 2019 +0000
+++ b/Entity/Player/Player.h	Tue Apr 23 22:59:12 2019 +0000
@@ -9,10 +9,247 @@
     
     // Functions
     virtual void move(float, float);
+    virtual int * get_frame();
     virtual void chkdmg();
     void buttons(bool, bool, bool, bool);
 };
 
 const float player_speed = 1.2;
 
+const int sprite_player [4][4][12][6] = {   // Player [Face][SpriteAnimationFrame][Size_Y][Size_X]
+    {   // Up
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {1,0,1,1,0,1,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,1,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {0,0,1,1,0,1,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,0,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {1,0,1,1,0,1,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,1,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {1,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,0,0,0,1,0,}
+        }
+    },
+    {   // Right
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,2,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,0,0,0,},
+            {0,0,1,0,0,0,},
+            {0,0,1,1,0,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,2,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,0,1,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,0,1,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,2,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,0,0,0,},
+            {0,0,1,0,0,0,},
+            {0,0,1,1,0,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,1,1,1,2,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,0,1,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,0,1,}
+        }
+    },
+    {
+        // Down
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,2,1,},
+            {1,1,2,2,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {1,0,1,1,0,1,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,1,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,2,1,},
+            {1,1,2,2,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {0,0,1,1,0,1,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,0,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,2,1,},
+            {1,1,2,2,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {1,0,1,1,0,1,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,1,0,0,1,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,2,1,},
+            {1,1,2,2,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,1,1,1,1,0,},
+            {1,0,1,1,0,1,},
+            {1,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,1,0,0,1,0,},
+            {0,0,0,0,1,0,}
+        }
+    },
+    {   // Left
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,0,1,0,0,},
+            {0,0,0,1,0,0,},
+            {0,0,1,1,0,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,1,0,1,0,0,},
+            {0,1,0,0,1,0,},
+            {1,0,0,0,1,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,0,1,0,0,},
+            {0,0,0,1,0,0,},
+            {0,0,1,1,0,0,}
+        },
+        {
+            {0,1,1,1,1,0,},
+            {1,1,1,1,1,1,},
+            {1,2,1,1,1,1,},
+            {1,1,1,1,1,1,},
+            {0,1,1,1,1,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,0,1,1,0,0,},
+            {0,1,0,1,0,0,},
+            {0,1,0,0,1,0,},
+            {1,0,0,0,1,0,}
+        }
+    }
+};
+
 #endif
\ No newline at end of file