From dc3d98ab47fefc8388455dbbd4d330e81499d95a Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Thu, 24 Jul 2025 20:37:56 -0700 Subject: Initial Commit --- include/constants.h | 7 +++++++ include/game.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 include/constants.h create mode 100644 include/game.h (limited to 'include') diff --git a/include/constants.h b/include/constants.h new file mode 100644 index 0000000..2f9625a --- /dev/null +++ b/include/constants.h @@ -0,0 +1,7 @@ +#pragma once + +#define WINDOW_WIDTH 1280 +#define WINDOW_HEIGHT 720 + +#define MAX_ENTITY_COUNT 2048 +#define MAX_AREA_COUNT 4 \ No newline at end of file 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 +#include + +#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 -- cgit v1.2.3