aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entity.c')
-rw-r--r--src/entity.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/entity.c b/src/entity.c
index ea9c66c..bcb7735 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -152,6 +152,16 @@ InteractionCommand interactWithEntity(Entity* entity, Game* game,
return INTERACTION_END;
}
+int getInteractionMenuIndex(Selection selection)
+{
+ if (selection < SELECTION_MENU_ITEM || selection >= SELECTION_LEAVE)
+ {
+ return SELECTION_NONE;
+ }
+
+ return selection - SELECTION_MENU_ITEM;
+}
+
BoundingBox entityBoxFromScale(float scale, float width, float height)
{
Vector2 size = (Vector2){width / height * scale, scale};