diff options
author | UnavailableDev <ggwildplay@gmail.com> | 2023-04-03 10:05:19 +0200 |
---|---|---|
committer | UnavailableDev <ggwildplay@gmail.com> | 2023-04-03 10:05:19 +0200 |
commit | db78763b67a75be924cf6940258b026ba962cfe0 (patch) | |
tree | e88548784a32d40aad988c537f8c7e17984da9b1 /src/GameLoop/shop.h | |
parent | 7373a9529659d4591e9fd921ef3a4771ec378965 (diff) |
shop statemachine
Diffstat (limited to 'src/GameLoop/shop.h')
-rw-r--r-- | src/GameLoop/shop.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h index 4014f58..5cd6b53 100644 --- a/src/GameLoop/shop.h +++ b/src/GameLoop/shop.h @@ -7,10 +7,26 @@ #include <stdbool.h> typedef enum { - hh_e_STATE_SHOW, - hh_e_STATE_Input, - hh_e_STATE_END + hh_e_shop_init, + hh_e_shop_main, + hh_e_shop_end } hh_e_ShopStates; +/** @brief amount of upgrade types */ +#define HH_SHOP_UPG_COUNT 2 +/** @brief count of visible upgrades in shop */ +#define HH_SHOP_UPG_DISPLAY 4 +/** @brief all possible upgrades */ +typedef enum { + hh_e_UPG_JUMP, + hh_e_UPG_HEALTH +} hh_e_upgrades; + +/** @brief init */ +void hh_shop_init(hh_e_upgrades* in); +/** @brief deals with displayed entity rendering */ +void hh_shop_display(uint8_t selected, hh_e_upgrades* upgrades); +/** @brief moves 'cursor' through selection field */ +void hh_shift_selected(uint8_t* pos, bool dir, uint8_t min, uint8_t max); bool hh_show_Shop(); |