|
| static void | game_shop_intro () |
| | Intro sequence (menu and shop icon coming into frame)
|
| |
| static void | game_shop_process_user_input (void) |
| | Handle user inputs logic in the Shop though a SelectionGrid.
|
| |
| static void | game_shop_show_card_desc (void) |
| |
| static void | game_shop_hide_card_desc (void) |
| |
| static void | game_shop_outro (void) |
| | Outro sequence substate update. This makes the menu and shop icon go out of frame.
|
| |
| static int | shop_top_row_get_size (void) |
| | Computes the number of Jokers up for sale, aka the number of "buttons" there are on the top row of the Shop.
|
| |
| static bool | shop_top_row_on_selection_changed (SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection) |
| | Handle d-pad inputs for the "Next Round" button and shop Jokers' row.
|
| |
| static void | shop_top_row_on_key_transit (SelectionGrid *selection_grid, Selection *selection) |
| | Handle button inputs for the "Next Round" button and shop Jokers.
|
| |
| static int | shop_reroll_row_get_size () |
| | Get size of the row with the "Reroll" button.
|
| |
| static bool | shop_reroll_row_on_selection_changed (SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection) |
| | Handle d-pad inputs for the "Reroll" button's row.
|
| |
| static void | shop_reroll_row_on_key_transit (SelectionGrid *selection_grid, Selection *selection) |
| | Handle button inputs for the "Reroll" button's row.
|
| |
| static void | next_round_on_pressed (void) |
| |
| static void | reroll_on_pressed (void) |
| |
| static bool | reroll_can_be_pressed (void) |
| |
| JokerObject * | game_shop_get_description_card (void) |
| | Get a pointer to the Card we are currently showing the description of.
|
| |
| void | game_shop_reset (void) |
| | Initialize the shop for a run. Resets all the shop data for the run, needs to be called once per run.
|
| |
| void | game_shop_change_background (void) |
| | Change to the shop background.
|
| |
| void | game_shop_on_init (void) |
| | Shop state initialization.
|
| |
| static Item * | game_shop_create_top_row_item (void) |
| | Create a shop top row item - jokers, consumables, and possibly playing cards Currently only jokers are implemented.
|
| |
| static void | game_shop_create_top_row_items (void) |
| | Setup for the lists of items we can purchase in the top row of the Shop. i.e. Jokers and consumables and possibly playing cards.
|
| |
| static void | game_shop_buy_item (int shop_item_idx) |
| | Called when pressing A on a Shop Joker to buy it.
|
| |
| static void | game_shop_reroll (void) |
| | Reroll items up for sale in the Shop. Reroll cost will go up by a rate that increases by 1 each reroll.
|
| |
| static void | game_shop_lights_anim_frame (void) |
| | Cycling shop lights animation substate update.
|
| |
| void | game_shop_on_update (void) |
| | Shop state update.
|
| |
| void | game_shop_on_exit (void) |
| | Shop cleanup.
|
| |
|
| static const Rect | SHOP_ICON_FROM_RECT = { 0, 26, 8, 26} |
| |
| static const BG_POINT | SHOP_ICON_TO_POS = { 0, 0} |
| |
| static const BG_POINT | OWNED_CARDS_PANEL_3X3_SRC_POS = { 29, 21} |
| |
| static const Rect | OWNED_JOKERS_PANEL_RECT = { 9, 1, 21, 5} |
| |
| static const Rect | OWNED_CONSUMABLES_PANEL_RECT = { 23, 1, 28, 5} |
| |
| static const Rect | OWNED_CARDS_PANEL_RECT = { 9, 1, 28, 5} |
| |
| static const Rect | OWNED_CARDS_PANEL_ANIM_CLEAR = { 9, 0, 28, 1} |
| |
| static const Rect | CARD_DESC_9_PTCH_TO_RECT = { 9, 6, 28, 18} |
| |
| static const NinePatchRect | CARD_DESC_9_PTCH_SRC |
| |
| static const int | CARD_DESC_MAX_TEXT_HEIGHT |
| |
| static const Rect | CARD_DESC_TEXT_RECT = { 11, 9, 26, 18} |
| |
| static const Rect | CARD_NAME_TEXT_RECT = { 10, 7, 27, 7} |
| |
| static const BG_POINT | SHOP_JOKER_SPRITES_INIT_POS = {120, 160} |
| |
| static const BG_POINT | CARD_DESCRIPTION_SPRITE_POS = {135, 9} |
| |
| static const Rect | SHOP_PRICES_TEXT_RECT = { 72, 56, 192, 160 } |
| |
| static const Rect | SHOP_REROLL_RECT = { 88, 96, UNDEFINED, UNDEFINED } |
| |
| static List | s_shop_items_list = LIST_DEFAULT |
| |
| static StateInfo | shop_state_actions [GAME_SHOP_MAX] |
| |
| static StateMachine | shop_sm = STATE_MACHINE_DEFINE(shop_state_actions, GAME_SHOP_MAX) |
| |
| static SelectionGridRow | shop_selection_rows [] |
| |
| static const Selection | SHOP_INIT_SEL = {-1, 1} |
| |
| static SelectionGrid | shop_selection_grid |
| |
| static Button | next_round_button |
| |
| static Button | reroll_button |
| |
| static int | s_timer |
| |
| static int | s_reroll_cost = REROLL_BASE_COST |
| |
| static JokerObject * | s_description_card = NULL |
| |
| static FIXED | s_description_card_original_x_pos = UNDEFINED |
| |
| static FIXED | s_description_card_original_y_pos = UNDEFINED |
| |
| static List * | s_description_card_original_list = NULL |
| |
| static int | s_show_description_anim_progress = 0 |
| |
Shop state functions implementation.
Definition in file shop.c.