aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/entity.h')
-rw-r--r--src/entity.h7
1 files changed, 6 insertions, 1 deletions
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);