summaryrefslogtreecommitdiff
path: root/include/game.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/game.h')
-rw-r--r--include/game.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h
new file mode 100644
index 0000000..9f44f46
--- /dev/null
+++ b/include/game.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <raylib.h>
+#include <stdint.h>
+
+#include "constants.h"
+
+#define ENTITY_ALLOCATED 1
+#define ENTITY_VISIBLE (1 << 1)
+#define ENTITY_PHYSICS_ACTIVE (1 << 2)
+
+typedef enum EntityType {
+ Player_Entity
+} EntityType;
+
+typedef struct Entity {
+ int id;
+ EntityType type;
+ uint16_t flags;
+
+ Vector2 position;
+
+ //Physics information
+ Rectangle collider;
+ int numHitBoxes;
+ Rectangle hitBoxes[MAX_AREA_COUNT];
+ int numHurtBoxes;
+ Rectangle hurtBoxes[MAX_AREA_COUNT];
+} Entity;
+
+typedef struct Game {
+ bool paused;
+
+ Entity entities[MAX_ENTITY_COUNT];
+} Game;
+
+void InitGame();
+void UpdateGame(float deltaTime);
+void DrawGame(); \ No newline at end of file