summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/robospierre/element.c
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-31 15:07:25 +0200
committerNicolas Schodet2011-05-31 15:17:37 +0200
commit32a21a69bb7adb44c4fc91d025ad8f0ccdaf45a1 (patch)
tree03aac5ed95b95902279b7604e4dc13697104942f /digital/io-hub/src/robospierre/element.c
parent7110e5fc8d629f10a85a4355bf34e5d022845f1c (diff)
digital/io-hub: remove special case for green elements
Diffstat (limited to 'digital/io-hub/src/robospierre/element.c')
-rw-r--r--digital/io-hub/src/robospierre/element.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/digital/io-hub/src/robospierre/element.c b/digital/io-hub/src/robospierre/element.c
index bc76a2b0..71f754e0 100644
--- a/digital/io-hub/src/robospierre/element.c
+++ b/digital/io-hub/src/robospierre/element.c
@@ -706,24 +706,21 @@ element_opposed (uint8_t element_id)
return op;
}
-position_t
+vect_t
element_get_pos (uint8_t element_id)
{
element_t e = element_get (element_id);
- position_t pos;
- pos.v = e.pos;
- pos.a = 0xffff;
+ vect_t pos;
+ pos = e.pos;
if (e.attr == (ELEMENT_GREEN |ELEMENT_RIGHT))
{
/* To the right. */
- pos.a = 0x0000;
- pos.v.x = PG_WIDTH - BOT_GREEN_ELEMENT_PLACE_DISTANCE_MM;
+ pos.x = PG_WIDTH - BOT_GREEN_ELEMENT_DISTANCE_MM;
}
if (e.attr == (ELEMENT_GREEN |ELEMENT_LEFT))
{
/* To the left. */
- pos.a = 0x8000;
- pos.v.x = BOT_GREEN_ELEMENT_PLACE_DISTANCE_MM;
+ pos.x = BOT_GREEN_ELEMENT_DISTANCE_MM;
}
return pos;
}