aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.c
diff options
context:
space:
mode:
authornathan <nathan@disroot.org>2025-08-06 09:55:04 +0000
committernathan <nathan@disroot.org>2025-08-06 09:55:04 +0000
commitc5989ca9bcc1758f4d772d20b8bd4ae7762bc75e (patch)
treea1877dda9ed2958691fdc95ae8451a73d0729f78 /src/entity.c
parent6c6b8982ca4f1b29ecd0fd37beb6238315e36f10 (diff)
downloadFindThings-c5989ca9bcc1758f4d772d20b8bd4ae7762bc75e.tar.gz
FindThings-c5989ca9bcc1758f4d772d20b8bd4ae7762bc75e.tar.bz2
FindThings-c5989ca9bcc1758f4d772d20b8bd4ae7762bc75e.zip
Working on utility poles
Diffstat (limited to 'src/entity.c')
-rw-r--r--src/entity.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/entity.c b/src/entity.c
index 97af95e..f9f7989 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -40,6 +40,15 @@ Entity createEntity(EntityId id, Vector3 position)
};
break;
+ case UTILITY_POLE:
+ entity.box = (BoundingBox){
+ .min = (Vector3){-UTILITY_POLE_RADIUS, -UTILITY_POLE_HEIGHT,
+ -UTILITY_POLE_RADIUS},
+ .max = (Vector3){UTILITY_POLE_RADIUS, UTILITY_POLE_HEIGHT,
+ UTILITY_POLE_RADIUS},
+ };
+
+ break;
default:
break;
}
@@ -49,8 +58,11 @@ Entity createEntity(EntityId id, Vector3 position)
return entity;
}
+// TODO: Mesh instance the utility poles and make a 3d model
void updateEntity(Entity* entity, Game* game)
{
+ DrawBoundingBox(entity->box, RED);
+
switch (entity->id)
{
case OLD_MINT:
@@ -78,6 +90,12 @@ void updateEntity(Entity* entity, Game* game)
Vector3Add(entity->position, (Vector3){0.0, POND_HEIGHT * 2.0, 0.0}),
(Vector2){POND_SIZE * 2.5, POND_SIZE * 2.5}, BLUE);
break;
+ case UTILITY_POLE:
+ DrawCylinder(Vector3Subtract(entity->position,
+ (Vector3){0.0, UTILITY_POLE_HEIGHT}),
+ UTILITY_POLE_RADIUS, UTILITY_POLE_RADIUS,
+ UTILITY_POLE_HEIGHT * 2.0, 6, BROWN);
+ break;
default:
break;
}