summaryrefslogtreecommitdiffhomepage
path: root/games/skully_escape/player.h
diff options
context:
space:
mode:
Diffstat (limited to 'games/skully_escape/player.h')
-rw-r--r--games/skully_escape/player.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/games/skully_escape/player.h b/games/skully_escape/player.h
new file mode 100644
index 00000000..7d59bdde
--- /dev/null
+++ b/games/skully_escape/player.h
@@ -0,0 +1,51 @@
+#ifndef PLAYER_H
+#define PLAYER_H
+
+//----------------------------------------------------------------------------------
+// Types and Structures Definition
+//----------------------------------------------------------------------------------
+typedef enum { NONE, WALK_RIGHT, WALK_LEFT, SCARE_RIGHT, SCARE_LEFT, SEARCH, FIND_KEY } PlayerSequence;
+
+typedef struct Player {
+ Vector2 position;
+ Rectangle bounds;
+ Texture2D texture;
+ Color color;
+
+ // Animation variables
+ Rectangle frameRec;
+ int currentFrame;
+ int currentSeq;
+
+ bool key;
+ int numLifes;
+ bool dead;
+} Player;
+
+//----------------------------------------------------------------------------------
+// Global Variables Definition
+//----------------------------------------------------------------------------------
+Player player;
+
+#ifdef __cplusplus
+extern "C" { // Prevents name mangling of functions
+#endif
+
+//----------------------------------------------------------------------------------
+// Logo Screen Functions Declaration
+//----------------------------------------------------------------------------------
+void InitPlayer(void);
+void UpdatePlayer(void);
+void DrawPlayer(void);
+void UnloadPlayer(void);
+void ResetPlayer(void);
+
+void ScarePlayer(void);
+void SearchKeyPlayer(void);
+void FindKeyPlayer(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SCREENS_H \ No newline at end of file