aboutsummaryrefslogtreecommitdiff
path: root/src/game_loop/ui.c
diff options
context:
space:
mode:
authorUnavailableDev <ggwildplay@gmail.com>2023-04-06 21:36:24 +0200
committerUnavailableDev <ggwildplay@gmail.com>2023-04-06 21:36:24 +0200
commite88c48ae60dd48542e44b0cc244b191c91782681 (patch)
tree344243247b21a93311a9cc2173fbddb2d126c040 /src/game_loop/ui.c
parent03748610041bcc8ec7a7743e9a5fb35c06731fa0 (diff)
random shop items + animations
Diffstat (limited to 'src/game_loop/ui.c')
-rw-r--r--src/game_loop/ui.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game_loop/ui.c b/src/game_loop/ui.c
index 8980d03..60dbfc2 100644
--- a/src/game_loop/ui.c
+++ b/src/game_loop/ui.c
@@ -50,3 +50,10 @@ void itoa(char *c, int i) {
c[1] = '\0';
}
+void hh_shift_selected(uint8_t *pos, bool dir, uint8_t min, uint8_t max) {
+ if (dir) {
+ *pos = MIN(*pos+1,max);
+ } else {
+ *pos = MAX(*pos-1,min);
+ }
+}