From 04a6feb4ddf22dac13b8f9e5478b817ea4527d37 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 24 May 2018 00:36:51 -0700 Subject: libstage: use v2f_t instead of float x,y in api --- src/stage.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/stage.c') diff --git a/src/stage.c b/src/stage.c index 064c739..c30f785 100644 --- a/src/stage.c +++ b/src/stage.c @@ -178,25 +178,23 @@ void stage_node_set_aabb(const stage_t *stage, stage_node_t *node, const aabb_t /* get the aabb for a node */ -void stage_node_get_aabb(const stage_t *stage, stage_node_t *node, aabb_t *res_aabb) +void stage_node_get_aabb(const stage_t *stage, const stage_node_t *node, aabb_t *res_aabb) { *res_aabb = node->aabb; } /* set the position for a node */ -void stage_node_set_position(const stage_t *stage, stage_node_t *node, float x, float y) +void stage_node_set_position(const stage_t *stage, stage_node_t *node, v2f_t *position) { - node->position.x = x; - node->position.y = y; + node->position = *position; } /* get the position for a node */ -void stage_node_get_position(const stage_t *stage, stage_node_t *node, float *res_x, float *res_y) +void stage_node_get_position(const stage_t *stage, const stage_node_t *node, v2f_t *res_position) { - *res_x = node->position.x; - *res_y = node->position.y; + *res_position = node->position; } -- cgit v1.2.3