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.
Dependencies: mbed MotionSensor
Diff: Entity/Bosses/Skull/Skull.h
- Revision:
- 33:4f3948dcd2f7
- Parent:
- 32:fe6359ef9916
- Child:
- 34:1d5b4da3935e
--- a/Entity/Bosses/Skull/Skull.h Mon May 06 08:56:48 2019 +0000
+++ b/Entity/Bosses/Skull/Skull.h Mon May 06 13:27:26 2019 +0000
@@ -1,89 +1,89 @@
-//#ifndef SKULL_H
-//#define SKULL_H
-//
-//class Skull : public Entity {
-//
-//public:
-// // Constructor
-// Skull(float, float);
-//
-// // Functions
-// virtual void move(float player_x, float player_y, int * map, bool * doorways);
-// virtual int * get_frame();
-// virtual void take_damage(int damage);
-//
-//};
-//
-//const int skull_sprite[2][23][21] = //skull_sprite[mouthclose/mouthopen][Size_Y][Size_X]
-//{
-// {
-// {0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0},
-// {0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0},
-// {0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0},
-// {0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0},
-// {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0},
-// {0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0},
-// {0,1,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,1,0},
-// {1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1},
-// {1,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,1},
-// {1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1},
-// {1,0,0,0,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0,0,1},
-// {1,0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,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0}
-// }
-//}
-//
-//#endif
\ No newline at end of file
+#ifndef SKULL_H
+#define SKULL_H
+#include "Entity.h"
+
+class Skull : public Entity {
+
+public:
+ // Constructor
+ Skull(float pos_x, float pos_y);
+
+ // Functions
+ virtual void move(float, float, int * map, bool * doorways); // movement control and miscellaneous updates
+ virtual void take_damage(int);
+ virtual void draw(N5110 &lcd);
+};
+
+const char skull_sprite[2][23][21] = //skull_sprite[mouthclose/mouthopen][Size_Y][Size_X]
+{
+ {
+ {0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0},
+ {0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0},
+ {0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0},
+ {0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0},
+ {0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0},
+ {0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0},
+ {0,1,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,1,0},
+ {1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1},
+ {1,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,1},
+ {1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1},
+ {1,0,0,0,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0,0,1},
+ {1,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1},
+ {1,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,1},
+ {0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0},
+ {0,1,0,0,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0,1,0},
+ {0,0,1,0,1,1,1,0,1,0,1,0,1,0,1,1,1,0,1,0,0},
+ {0,0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