diff options
author | Louie S <louie@example.com> | 2023-10-24 13:31:17 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-10-24 13:31:17 -0400 |
commit | 4cc4ba6bc250e8981a6fb3f6e6b96945a16628e5 (patch) | |
tree | c9f853616e5b791dd945290871ed6fbe644f4279 /src/tower.c | |
parent | 3c6cf0ed9980990ca07f6d76817814979691d65e (diff) |
Working controls
Diffstat (limited to 'src/tower.c')
-rw-r--r-- | src/tower.c | 5 |
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; } |