diff options
author | BoredGuy <osome3717@gmail.com> | 2025-07-24 20:37:56 -0700 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2025-07-24 20:37:56 -0700 |
commit | dc3d98ab47fefc8388455dbbd4d330e81499d95a (patch) | |
tree | 39edca664d3aca027181a9aa567d8e81775e8c2a /include |
Initial Commit
Diffstat (limited to 'include')
-rw-r--r-- | include/constants.h | 7 | ||||
-rw-r--r-- | include/game.h | 39 |
2 files changed, 46 insertions, 0 deletions
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 <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 |