GBAlatro
A Demake of Balatro for the GBA
Loading...
Searching...
No Matches
shop.c File Reference

Shop state functions implementation. More...

#include "game/shop.h"
#include "audio_utils.h"
#include "background_shop_gfx.h"
#include "bitset.h"
#include "button.h"
#include "game.h"
#include "game/blind_select.h"
#include "game/joker_row.h"
#include "game_variables.h"
#include "joker.h"
#include "layout.h"
#include "list.h"
#include "mgba_logger.h"
#include "random.h"
#include "save.h"
#include "soundbank.h"
#include "state_machine.h"
#include "timer.h"
#include "util.h"
#include <string.h>

Go to the source code of this file.

Macros

#define TM_END_GAME_SHOP_INTRO   12
 
#define TM_CREATE_SHOP_ITEMS_WAIT   1
 
#define TM_SHIFT_SHOP_ICON_WAIT   7
 
#define TM_SHOW_CARD_DESC_WAIT   12
 
#define TM_HIDE_DECK_WAIT   5
 
#define ITEM_SHOP_Y   71
 
#define OWNED_CARDS_HIDE_Y_OFFSET   50
 
#define REROLL_BASE_COST   5
 
#define NEXT_ROUND_BTN_SEL_X   0
 
#define REROLL_BTN_PAL_IDX   3
 
#define NEXT_ROUND_BTN_SELECTED_BORDER_PAL_IDX   5
 
#define SHOP_PANEL_SHADOW_PAL_IDX   6
 
#define REROLL_BTN_SELECTED_BORDER_PAL_IDX   7
 
#define SHOP_LIGHTS_1_PAL_IDX   8
 
#define SHOP_LIGHTS_2_PAL_IDX   14
 
#define NEXT_ROUND_BTN_PAL_IDX   16
 
#define SHOP_LIGHTS_3_PAL_IDX   17
 
#define SHOP_LIGHTS_4_PAL_IDX   22
 
#define SHOP_BOTTOM_PANEL_BORDER_PAL_IDX   26
 
#define SHOP_DESC_RARITY_MAIN_COLOR_PAL_IDX   27
 
#define SHOP_DESC_RARITY_SHADOW_COLOR_PAL_IDX   28
 
#define SHOP_LIGHTS_1_CLR   0xFFFF
 
#define SHOP_LIGHTS_2_CLR   0x32BE
 
#define SHOP_LIGHTS_3_CLR   0x4B5F
 
#define SHOP_LIGHTS_4_CLR   0x5F9F
 

Enumerations

enum  GameShopStates {
  GAME_SHOP_INTRO , GAME_SHOP_ACTIVE , GAME_SHOP_SHOW_CARD_DESC , GAME_SHOP_HIDE_CARD_DESC ,
  GAME_SHOP_EXIT , GAME_SHOP_MAX
}
 

Functions

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)
 
JokerObjectgame_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 Itemgame_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.
 

Variables

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 JokerObjects_description_card = NULL
 
static FIXED s_description_card_original_x_pos = UNDEFINED
 
static FIXED s_description_card_original_y_pos = UNDEFINED
 
static Lists_description_card_original_list = NULL
 
static int s_show_description_anim_progress = 0
 

Detailed Description

Shop state functions implementation.

Definition in file shop.c.

Macro Definition Documentation

◆ ITEM_SHOP_Y

#define ITEM_SHOP_Y   71

Definition at line 38 of file shop.c.

◆ NEXT_ROUND_BTN_PAL_IDX

#define NEXT_ROUND_BTN_PAL_IDX   16

Definition at line 52 of file shop.c.

◆ NEXT_ROUND_BTN_SEL_X

#define NEXT_ROUND_BTN_SEL_X   0

Definition at line 43 of file shop.c.

◆ NEXT_ROUND_BTN_SELECTED_BORDER_PAL_IDX

#define NEXT_ROUND_BTN_SELECTED_BORDER_PAL_IDX   5

Definition at line 47 of file shop.c.

◆ OWNED_CARDS_HIDE_Y_OFFSET

#define OWNED_CARDS_HIDE_Y_OFFSET   50

Definition at line 39 of file shop.c.

◆ REROLL_BASE_COST

#define REROLL_BASE_COST   5

Definition at line 42 of file shop.c.

◆ REROLL_BTN_PAL_IDX

#define REROLL_BTN_PAL_IDX   3

Definition at line 46 of file shop.c.

◆ REROLL_BTN_SELECTED_BORDER_PAL_IDX

#define REROLL_BTN_SELECTED_BORDER_PAL_IDX   7

Definition at line 49 of file shop.c.

◆ SHOP_BOTTOM_PANEL_BORDER_PAL_IDX

#define SHOP_BOTTOM_PANEL_BORDER_PAL_IDX   26

Definition at line 55 of file shop.c.

◆ SHOP_DESC_RARITY_MAIN_COLOR_PAL_IDX

#define SHOP_DESC_RARITY_MAIN_COLOR_PAL_IDX   27

Definition at line 56 of file shop.c.

◆ SHOP_DESC_RARITY_SHADOW_COLOR_PAL_IDX

#define SHOP_DESC_RARITY_SHADOW_COLOR_PAL_IDX   28

Definition at line 57 of file shop.c.

◆ SHOP_LIGHTS_1_CLR

#define SHOP_LIGHTS_1_CLR   0xFFFF

Definition at line 59 of file shop.c.

◆ SHOP_LIGHTS_1_PAL_IDX

#define SHOP_LIGHTS_1_PAL_IDX   8

Definition at line 50 of file shop.c.

◆ SHOP_LIGHTS_2_CLR

#define SHOP_LIGHTS_2_CLR   0x32BE

Definition at line 60 of file shop.c.

◆ SHOP_LIGHTS_2_PAL_IDX

#define SHOP_LIGHTS_2_PAL_IDX   14

Definition at line 51 of file shop.c.

◆ SHOP_LIGHTS_3_CLR

#define SHOP_LIGHTS_3_CLR   0x4B5F

Definition at line 61 of file shop.c.

◆ SHOP_LIGHTS_3_PAL_IDX

#define SHOP_LIGHTS_3_PAL_IDX   17

Definition at line 53 of file shop.c.

◆ SHOP_LIGHTS_4_CLR

#define SHOP_LIGHTS_4_CLR   0x5F9F

Definition at line 62 of file shop.c.

◆ SHOP_LIGHTS_4_PAL_IDX

#define SHOP_LIGHTS_4_PAL_IDX   22

Definition at line 54 of file shop.c.

◆ SHOP_PANEL_SHADOW_PAL_IDX

#define SHOP_PANEL_SHADOW_PAL_IDX   6

Definition at line 48 of file shop.c.

◆ TM_CREATE_SHOP_ITEMS_WAIT

#define TM_CREATE_SHOP_ITEMS_WAIT   1

Definition at line 32 of file shop.c.

◆ TM_END_GAME_SHOP_INTRO

#define TM_END_GAME_SHOP_INTRO   12

Definition at line 31 of file shop.c.

◆ TM_HIDE_DECK_WAIT

#define TM_HIDE_DECK_WAIT   5

Definition at line 35 of file shop.c.

◆ TM_SHIFT_SHOP_ICON_WAIT

#define TM_SHIFT_SHOP_ICON_WAIT   7

Definition at line 33 of file shop.c.

◆ TM_SHOW_CARD_DESC_WAIT

#define TM_SHOW_CARD_DESC_WAIT   12

Definition at line 34 of file shop.c.

Enumeration Type Documentation

◆ GameShopStates

enum GameShopStates

Definition at line 94 of file shop.c.

Function Documentation

◆ game_shop_buy_item()

static void game_shop_buy_item ( int  shop_item_idx)
inlinestatic

Called when pressing A on a Shop Joker to buy it.

Definition at line 341 of file shop.c.

◆ game_shop_change_background()

void game_shop_change_background ( void  )

Change to the shop background.

Definition at line 194 of file shop.c.

◆ game_shop_create_top_row_item()

static Item * game_shop_create_top_row_item ( void  )
static

Create a shop top row item - jokers, consumables, and possibly playing cards Currently only jokers are implemented.

Definition at line 237 of file shop.c.

◆ game_shop_create_top_row_items()

static void game_shop_create_top_row_items ( void  )
static

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.

Definition at line 247 of file shop.c.

◆ game_shop_get_description_card()

JokerObject * game_shop_get_description_card ( void  )

Get a pointer to the Card we are currently showing the description of.

Returns
JokerObject*

Definition at line 182 of file shop.c.

◆ game_shop_hide_card_desc()

static void game_shop_hide_card_desc ( void  )
static

Definition at line 708 of file shop.c.

◆ game_shop_intro()

static void game_shop_intro ( void  )
static

Intro sequence (menu and shop icon coming into frame)

Definition at line 285 of file shop.c.

◆ game_shop_lights_anim_frame()

static void game_shop_lights_anim_frame ( void  )
inlinestatic

Cycling shop lights animation substate update.

Definition at line 873 of file shop.c.

◆ game_shop_on_exit()

void game_shop_on_exit ( void  )

Shop cleanup.

Definition at line 909 of file shop.c.

◆ game_shop_on_init()

void game_shop_on_init ( void  )

Shop state initialization.

Definition at line 218 of file shop.c.

◆ game_shop_on_update()

void game_shop_on_update ( void  )

Shop state update.

Definition at line 899 of file shop.c.

◆ game_shop_outro()

static void game_shop_outro ( void  )
static

Outro sequence substate update. This makes the menu and shop icon go out of frame.

Definition at line 831 of file shop.c.

◆ game_shop_process_user_input()

static void game_shop_process_user_input ( void  )
static

Handle user inputs logic in the Shop though a SelectionGrid.

Definition at line 555 of file shop.c.

◆ game_shop_reroll()

static void game_shop_reroll ( void  )
inlinestatic

Reroll items up for sale in the Shop. Reroll cost will go up by a rate that increases by 1 each reroll.

Definition at line 473 of file shop.c.

◆ game_shop_reset()

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.

Definition at line 187 of file shop.c.

◆ game_shop_show_card_desc()

static void game_shop_show_card_desc ( void  )
static

Definition at line 606 of file shop.c.

◆ next_round_on_pressed()

static void next_round_on_pressed ( void  )
static

Definition at line 531 of file shop.c.

◆ reroll_can_be_pressed()

static bool reroll_can_be_pressed ( void  )
static

Definition at line 547 of file shop.c.

◆ reroll_on_pressed()

static void reroll_on_pressed ( void  )
static

Definition at line 541 of file shop.c.

◆ shop_reroll_row_get_size()

static int shop_reroll_row_get_size ( void  )
static

Get size of the row with the "Reroll" button.

Returns
Always 1, because there is only the "Reroll" button on that row.

Definition at line 435 of file shop.c.

◆ shop_reroll_row_on_key_transit()

static void shop_reroll_row_on_key_transit ( SelectionGrid selection_grid,
Selection *  selection 
)
static

Handle button inputs for the "Reroll" button's row.

Definition at line 521 of file shop.c.

◆ shop_reroll_row_on_selection_changed()

static bool shop_reroll_row_on_selection_changed ( SelectionGrid selection_grid,
int  row_idx,
const Selection *  prev_selection,
const Selection *  new_selection 
)
static

Handle d-pad inputs for the "Reroll" button's row.

Definition at line 443 of file shop.c.

◆ shop_top_row_get_size()

static int shop_top_row_get_size ( void  )
static

Computes the number of Jokers up for sale, aka the number of "buttons" there are on the top row of the Shop.

Definition at line 332 of file shop.c.

◆ shop_top_row_on_key_transit()

static void shop_top_row_on_key_transit ( SelectionGrid selection_grid,
Selection *  selection 
)
static

Handle button inputs for the "Next Round" button and shop Jokers.

Definition at line 357 of file shop.c.

◆ shop_top_row_on_selection_changed()

static bool shop_top_row_on_selection_changed ( SelectionGrid selection_grid,
int  row_idx,
const Selection *  prev_selection,
const Selection *  new_selection 
)
static

Handle d-pad inputs for the "Next Round" button and shop Jokers' row.

Definition at line 383 of file shop.c.

Variable Documentation

◆ CARD_DESC_9_PTCH_SRC

const NinePatchRect CARD_DESC_9_PTCH_SRC
static
Initial value:
= {
.patch_rect = { 27, 25, 31, 31},
.margins = { 2, 3, 2, 3}
}

Definition at line 74 of file shop.c.

◆ CARD_DESC_9_PTCH_TO_RECT

const Rect CARD_DESC_9_PTCH_TO_RECT = { 9, 6, 28, 18}
static

Definition at line 73 of file shop.c.

◆ CARD_DESC_MAX_TEXT_HEIGHT

const int CARD_DESC_MAX_TEXT_HEIGHT
static
Initial value:
= CARD_DESC_9_PTCH_TO_RECT.bottom -
CARD_DESC_9_PTCH_TO_RECT.top + 1 -
CARD_DESC_9_PTCH_SRC.margins.top -
CARD_DESC_9_PTCH_SRC.margins.bottom

Definition at line 78 of file shop.c.

◆ CARD_DESC_TEXT_RECT

const Rect CARD_DESC_TEXT_RECT = { 11, 9, 26, 18}
static

Definition at line 82 of file shop.c.

◆ CARD_DESCRIPTION_SPRITE_POS

const BG_POINT CARD_DESCRIPTION_SPRITE_POS = {135, 9}
static

Definition at line 87 of file shop.c.

◆ CARD_NAME_TEXT_RECT

const Rect CARD_NAME_TEXT_RECT = { 10, 7, 27, 7}
static

Definition at line 83 of file shop.c.

◆ next_round_button

Button next_round_button
static
Initial value:
=
{NEXT_ROUND_BTN_SELECTED_BORDER_PAL_IDX, NEXT_ROUND_BTN_PAL_IDX, next_round_on_pressed, NULL}

Definition at line 158 of file shop.c.

◆ OWNED_CARDS_PANEL_3X3_SRC_POS

const BG_POINT OWNED_CARDS_PANEL_3X3_SRC_POS = { 29, 21}
static

Definition at line 68 of file shop.c.

◆ OWNED_CARDS_PANEL_ANIM_CLEAR

const Rect OWNED_CARDS_PANEL_ANIM_CLEAR = { 9, 0, 28, 1}
static

Definition at line 72 of file shop.c.

◆ OWNED_CARDS_PANEL_RECT

const Rect OWNED_CARDS_PANEL_RECT = { 9, 1, 28, 5}
static

Definition at line 71 of file shop.c.

◆ OWNED_CONSUMABLES_PANEL_RECT

const Rect OWNED_CONSUMABLES_PANEL_RECT = { 23, 1, 28, 5}
static

Definition at line 70 of file shop.c.

◆ OWNED_JOKERS_PANEL_RECT

const Rect OWNED_JOKERS_PANEL_RECT = { 9, 1, 21, 5}
static

Definition at line 69 of file shop.c.

◆ reroll_button

Button reroll_button
static
Initial value:
= {
REROLL_BTN_SELECTED_BORDER_PAL_IDX,
REROLL_BTN_PAL_IDX,
reroll_on_pressed,
reroll_can_be_pressed
}

Definition at line 160 of file shop.c.

◆ s_description_card

JokerObject* s_description_card = NULL
static

Definition at line 176 of file shop.c.

◆ s_description_card_original_list

List* s_description_card_original_list = NULL
static

Definition at line 179 of file shop.c.

◆ s_description_card_original_x_pos

FIXED s_description_card_original_x_pos = UNDEFINED
static

Definition at line 177 of file shop.c.

◆ s_description_card_original_y_pos

FIXED s_description_card_original_y_pos = UNDEFINED
static

Definition at line 178 of file shop.c.

◆ s_reroll_cost

int s_reroll_cost = REROLL_BASE_COST
static

Definition at line 171 of file shop.c.

◆ s_shop_items_list

List s_shop_items_list = LIST_DEFAULT
static

Definition at line 92 of file shop.c.

◆ s_show_description_anim_progress

int s_show_description_anim_progress = 0
static

Definition at line 180 of file shop.c.

◆ s_timer

int s_timer
static

Definition at line 169 of file shop.c.

◆ SHOP_ICON_FROM_RECT

const Rect SHOP_ICON_FROM_RECT = { 0, 26, 8, 26}
static

Definition at line 66 of file shop.c.

◆ SHOP_ICON_TO_POS

const BG_POINT SHOP_ICON_TO_POS = { 0, 0}
static

Definition at line 67 of file shop.c.

◆ SHOP_INIT_SEL

const Selection SHOP_INIT_SEL = {-1, 1}
static

Definition at line 145 of file shop.c.

◆ SHOP_JOKER_SPRITES_INIT_POS

const BG_POINT SHOP_JOKER_SPRITES_INIT_POS = {120, 160}
static

Definition at line 86 of file shop.c.

◆ SHOP_PRICES_TEXT_RECT

const Rect SHOP_PRICES_TEXT_RECT = { 72, 56, 192, 160 }
static

Definition at line 88 of file shop.c.

◆ SHOP_REROLL_RECT

const Rect SHOP_REROLL_RECT = { 88, 96, UNDEFINED, UNDEFINED }
static

Definition at line 89 of file shop.c.

◆ shop_selection_grid

SelectionGrid shop_selection_grid
static
Initial value:
= {
shop_selection_rows,
NUM_ELEM_IN_ARR(shop_selection_rows),
SHOP_INIT_SEL
}
#define NUM_ELEM_IN_ARR(arr)
Get the number of elements in an array.
Definition util.h:43

Definition at line 147 of file shop.c.

◆ shop_selection_rows

SelectionGridRow shop_selection_rows[]
static
Initial value:
= {
{0, jokers_sel_row_get_size, jokers_sel_row_on_selection_changed, jokers_sel_row_on_key_transit, {.wrap = false, .has_h_exit_idx = false, .h_exit_idx = 0}},
{1, shop_top_row_get_size, shop_top_row_on_selection_changed, shop_top_row_on_key_transit, {.wrap = false, .has_h_exit_idx = false, .h_exit_idx = 0}},
{2, shop_reroll_row_get_size, shop_reroll_row_on_selection_changed, shop_reroll_row_on_key_transit, {.wrap = false, .has_h_exit_idx = true, .h_exit_idx = 1} },
}
bool jokers_sel_row_on_selection_changed(SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection)
Handle directional inputs on the Jokers' row at the top of the game screen.
Definition joker_row.c:16
void jokers_sel_row_on_key_transit(SelectionGrid *selection_grid, Selection *selection)
Handle button inputs on the Jokers' row at the top of the game screen.
Definition joker_row.c:100
int jokers_sel_row_get_size(void)
Returns the size of the Jokers' row at the top of the game screen. Is equal to the number of Jokers o...
Definition joker_row.c:11
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.
Definition shop.c:443
static void shop_top_row_on_key_transit(SelectionGrid *selection_grid, Selection *selection)
Handle button inputs for the "Next Round" button and shop Jokers.
Definition shop.c:357
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.
Definition shop.c:383
static int shop_reroll_row_get_size(void)
Get size of the row with the "Reroll" button.
Definition shop.c:435
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 th...
Definition shop.c:332
static void shop_reroll_row_on_key_transit(SelectionGrid *selection_grid, Selection *selection)
Handle button inputs for the "Reroll" button's row.
Definition shop.c:521

Definition at line 139 of file shop.c.

◆ shop_sm

StateMachine shop_sm = STATE_MACHINE_DEFINE(shop_state_actions, GAME_SHOP_MAX)
static

Definition at line 118 of file shop.c.

◆ shop_state_actions

StateInfo shop_state_actions[GAME_SHOP_MAX]
static
Initial value:
= {
STATE_INFO_UPDATE_FN_ONLY(game_shop_intro),
STATE_INFO_UPDATE_FN_ONLY(game_shop_process_user_input),
STATE_INFO_UPDATE_FN_ONLY(game_shop_show_card_desc),
STATE_INFO_UPDATE_FN_ONLY(game_shop_hide_card_desc),
STATE_INFO_UPDATE_FN_ONLY(game_shop_outro),
}
static void game_shop_process_user_input(void)
Handle user inputs logic in the Shop though a SelectionGrid.
Definition shop.c:555
static void game_shop_intro(void)
Intro sequence (menu and shop icon coming into frame)
Definition shop.c:285
static void game_shop_outro(void)
Outro sequence substate update. This makes the menu and shop icon go out of frame.
Definition shop.c:831

Definition at line 110 of file shop.c.