summaryrefslogtreecommitdiff
path: root/src/stage.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-05-24 00:36:51 -0700
committerVito Caputo <vcaputo@pengaru.com>2018-05-24 01:06:12 -0700
commit04a6feb4ddf22dac13b8f9e5478b817ea4527d37 (patch)
tree04c654e9832f22adc395f19eb3923904c6710801 /src/stage.c
parent29e7e9c928bd0b2918091a56013d3c3435ebed5e (diff)
libstage: use v2f_t instead of float x,y in api
Diffstat (limited to 'src/stage.c')
-rw-r--r--src/stage.c12
1 files changed, 5 insertions, 7 deletions
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;
}
© All Rights Reserved