From 635e2e8f2b0007a52121c0240d445d0fcf82a231 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 24 May 2018 01:00:48 -0700 Subject: libstage: add stage_node_[sg]et_origin() A way to specify how the node's position relates to the node's AABB rather than always being centered. An origin of -1,-1 would place position at the bottom left corner of the node's AABB, and +1,+1 the top right corner. --- src/stage.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/stage.h') diff --git a/src/stage.h b/src/stage.h index e16f917..edb35dd 100644 --- a/src/stage.h +++ b/src/stage.h @@ -51,6 +51,8 @@ void stage_node_set_aabb(const stage_t *stage, stage_node_t *node, const aabb_t void stage_node_get_aabb(const stage_t *stage, const stage_node_t *node, aabb_t *res_aabb); void stage_node_set_position(const stage_t *stage, stage_node_t *node, v2f_t *position); void stage_node_get_position(const stage_t *stage, const stage_node_t *node, v2f_t *res_position); +void stage_node_set_origin(const stage_t *stage, stage_node_t *node, v2f_t *origin); +void stage_node_get_origin(const stage_t *stage, const stage_node_t *node, v2f_t *res_origin); void stage_node_set_active(const stage_t *stage, stage_node_t *node); void stage_node_set_inactive(const stage_t *stage, stage_node_t *node); void stage_node_set_locked(const stage_t *stage, stage_node_t *node); -- cgit v1.2.3