diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-05-24 01:00:48 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-05-24 01:06:12 -0700 |
commit | 635e2e8f2b0007a52121c0240d445d0fcf82a231 (patch) | |
tree | 2e776732e3bb84c253b25dee6734451be46eabd7 /src/stage.h | |
parent | b021a32ac44f5d92fb8dc210d08510d1850a260c (diff) |
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.
Diffstat (limited to 'src/stage.h')
-rw-r--r-- | src/stage.h | 2 |
1 files changed, 2 insertions, 0 deletions
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); |