From bcdd09d5075c9755538a93db8e3ca2690a803cc1 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 18 Dec 2025 03:23:19 -0700 Subject: Finally getting interaction stuff done --- src/entity.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/entity.h') diff --git a/src/entity.h b/src/entity.h index 3a707c9..a71b5ff 100644 --- a/src/entity.h +++ b/src/entity.h @@ -7,6 +7,8 @@ #define ENTITY_COUNT 14 +#define ENTITY_NAME_MAX 16 + #define INTERACTION_MENU_MAX 9 #define INTERACTION_LABEL_MAX 6 #define INTERACTION_CHAT_MAX 256 @@ -53,7 +55,7 @@ enum Selection { SELECTION_INTERACT, SELECTION_NEXT_MESSAGE, SELECTION_MENU_ITEM, // +x to select any given menu entry - SELECTION_LEAVE + SELECTION_LEAVE = SELECTION_MENU_ITEM + 16 }; struct Entity { @@ -65,6 +67,7 @@ struct Entity { }; typedef struct { + char name[ENTITY_NAME_MAX]; InitEntityCallback initCallback; UpdateEntityCallback updateCallback; CloseEntityCallback closeCallback; @@ -81,6 +84,8 @@ Entity createEntity(EntityId id, Vector3 position); void updateEntity(Entity* entity, Game* game); void closeEntity(Entity* entity); +const char* getEntityName(EntityId id); + void setEntityPosition(Entity* entity, Vector3 position); void placeEntityOnGround(Entity* entity, const World* world); -- cgit v1.2.3