summaryrefslogtreecommitdiff
path: root/src/tower.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tower.c')
-rw-r--r--src/tower.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tower.c b/src/tower.c
index 9220db2..6dcbc9a 100644
--- a/src/tower.c
+++ b/src/tower.c
@@ -1,3 +1,6 @@
+#include <stdlib.h>
+
+#include "ring.h"
#include "tower.h"
int hover_max = 2;
@@ -5,9 +8,11 @@ int hover_max = 2;
void hover_move_right() {
++hover;
if(hover > hover_max) hover = hover_max;
+ if(held != NULL) held->location = hover;
}
void hover_move_left() {
--hover;
if(hover < 0) hover = 0;
+ if(held != NULL) held->location = hover;
}