From 91b1c45da05c892a04b6a1daa99b1de89fa1f363 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 29 Dec 2025 05:42:08 -0700 Subject: working on building roofs --- src/entity.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/entity.h') diff --git a/src/entity.h b/src/entity.h index 5f03e52..0469476 100644 --- a/src/entity.h +++ b/src/entity.h @@ -14,7 +14,8 @@ #define INTERACTION_CHAT_MAX 256 #define ENTITY_BUILDING_CUBE_SIZE (Vector3){4.0, 4.0, 4.0} -#define ENTITY_BUILDING_GROUND_OFFSET 0.03 +#define BUILDING_DEFAULT_ROOF_HEIGHT 10.0 +#define BUILDING_ROOF_SLICES 9 // Yes 9 (: typedef int8_t EntityId; typedef enum InteractionCommand InteractionCommand; @@ -74,6 +75,11 @@ struct Entity { typedef struct { Model model; Color* pixelMap; + float width; + float height; + float roofSize; + float roofHeight; + Vector3 roofOffset; } EntityBuilding; typedef struct { @@ -114,5 +120,7 @@ BoundingBox entityBoxFromScale(float scale, float width, float height); EntityBuilding* createEntityBuilding(Image heightmap); void freeEntityBuilding(EntityBuilding* entityBuilding); +void drawBuildingRoof(const EntityBuilding* building, Vector3 position, + Color color); #endif -- cgit v1.2.3