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

Setup Run menu state functions implementation. More...

#include "game/run_setup.h"
#include "background_run_setup_gfx.h"
#include "button.h"
#include "card.h"
#include "game.h"
#include "game_variables.h"
#include "graphic_utils.h"
#include "save.h"
#include "selection_grid.h"
#include "sprite.h"
#include "state_machine.h"
#include "util.h"
#include <string.h>
#include <tonc.h>

Go to the source code of this file.

Macros

#define CHANGE_DECK_BTN_MAIN_COLOR_PAL_IDX   1
 
#define RED_BTN_MAIN_COLOR_PAL_IDX   10
 
#define RED_DISABLED_BTN_MAIN_COLOR_PAL_IDX   11
 
#define BLUE_BTN_MAIN_COLOR_PAL_IDX   12
 
#define BLUE_DISABLED_BTN_MAIN_COLOR_PAL_IDX   13
 
#define BACK_BTN_MAIN_COLOR_PAL_IDX   14
 
#define NEW_RUN_BTN_OUTLINE_COLOR_PAL_IDX   30
 
#define RESUME_BTN_OUTLINE_COLOR_PAL_IDX   31
 
#define CHANGE_DECK_BTN_OUTLINE_COLOR_PAL_IDX   32
 
#define SEED_CHECK_BTN_OUTLINE_COLOR_PAL_IDX   33
 
#define SEED_DECK_BTN_OUTLINE_COLOR_PAL_IDX   34
 
#define PLAY_BTN_OUTLINE_COLOR_PAL_IDX   35
 
#define BACK_BTN_OUTLINE_COLOR_PAL_IDX   36
 
#define KEYBOARD_1_BTN_OUTLINE_COLOR_PAL_IDX   40
 
#define KEYBOARD_2_BTN_OUTLINE_COLOR_PAL_IDX   41
 
#define KEYBOARD_3_BTN_OUTLINE_COLOR_PAL_IDX   42
 
#define KEYBOARD_4_BTN_OUTLINE_COLOR_PAL_IDX   43
 
#define KEYBOARD_5_BTN_OUTLINE_COLOR_PAL_IDX   44
 
#define KEYBOARD_6_BTN_OUTLINE_COLOR_PAL_IDX   45
 
#define KEYBOARD_7_BTN_OUTLINE_COLOR_PAL_IDX   46
 
#define KEYBOARD_8_BTN_OUTLINE_COLOR_PAL_IDX   47
 
#define KEYBOARD_9_BTN_OUTLINE_COLOR_PAL_IDX   48
 
#define KEYBOARD_0_BTN_OUTLINE_COLOR_PAL_IDX   49
 
#define KEYBOARD_A_BTN_OUTLINE_COLOR_PAL_IDX   50
 
#define KEYBOARD_B_BTN_OUTLINE_COLOR_PAL_IDX   51
 
#define KEYBOARD_C_BTN_OUTLINE_COLOR_PAL_IDX   52
 
#define KEYBOARD_D_BTN_OUTLINE_COLOR_PAL_IDX   53
 
#define KEYBOARD_E_BTN_OUTLINE_COLOR_PAL_IDX   54
 
#define KEYBOARD_F_BTN_OUTLINE_COLOR_PAL_IDX   55
 
#define KEYBOARD_G_BTN_OUTLINE_COLOR_PAL_IDX   56
 
#define KEYBOARD_H_BTN_OUTLINE_COLOR_PAL_IDX   57
 
#define KEYBOARD_I_BTN_OUTLINE_COLOR_PAL_IDX   58
 
#define KEYBOARD_J_BTN_OUTLINE_COLOR_PAL_IDX   59
 
#define KEYBOARD_K_BTN_OUTLINE_COLOR_PAL_IDX   60
 
#define KEYBOARD_L_BTN_OUTLINE_COLOR_PAL_IDX   61
 
#define KEYBOARD_M_BTN_OUTLINE_COLOR_PAL_IDX   62
 
#define KEYBOARD_N_BTN_OUTLINE_COLOR_PAL_IDX   63
 
#define KEYBOARD_O_BTN_OUTLINE_COLOR_PAL_IDX   64
 
#define KEYBOARD_P_BTN_OUTLINE_COLOR_PAL_IDX   65
 
#define KEYBOARD_Q_BTN_OUTLINE_COLOR_PAL_IDX   66
 
#define KEYBOARD_R_BTN_OUTLINE_COLOR_PAL_IDX   67
 
#define KEYBOARD_S_BTN_OUTLINE_COLOR_PAL_IDX   68
 
#define KEYBOARD_T_BTN_OUTLINE_COLOR_PAL_IDX   69
 
#define KEYBOARD_RAND_BTN_OUTLINE_COLOR_PAL_IDX   70
 
#define KEYBOARD_U_BTN_OUTLINE_COLOR_PAL_IDX   71
 
#define KEYBOARD_V_BTN_OUTLINE_COLOR_PAL_IDX   72
 
#define KEYBOARD_W_BTN_OUTLINE_COLOR_PAL_IDX   73
 
#define KEYBOARD_X_BTN_OUTLINE_COLOR_PAL_IDX   74
 
#define KEYBOARD_Y_BTN_OUTLINE_COLOR_PAL_IDX   75
 
#define KEYBOARD_Z_BTN_OUTLINE_COLOR_PAL_IDX   76
 
#define KEYBOARD_DEL_BTN_OUTLINE_COLOR_PAL_IDX   77
 
#define RUN_SETUP_DECK_SPRITE_T_X   48
 
#define RUN_SETUP_DECK_SPRITE_T_Y   54
 
#define KEYBOARD_WIDTH   10
 
#define KEYBOARD_HEIGHT   4
 
#define DEF_SEED_KEYBOARD_BUTTON_OBJECT(key)
 

Enumerations

enum  RunSetupSubstate { RUN_SETUP_SUBSTATE_CHOOSE_DECK , RUN_SETUP_SUBSTATE_CHOOSE_SEED , RUN_SETUP_SUBSTATE_RESUME , RUN_SETUP_SUBSTATE_MAX }
 
enum  RunSetupTab { RUN_SETUP_TAB_NEW_RUN , RUN_SETUP_TAB_RESUME , RUN_SETUP_TAB_MAX }
 
enum  RunSetupDeckRows { RUN_SETUP_DECK_ROW_CHANGE_DECK , RUN_SETUP_DECK_ROW_SEED_PLAY , RUN_SETUP_DECK_ROW_BACK , RUN_SETUP_DECK_ROW_MAX }
 
enum  RunSetupDeckBottomButtons { RUN_SETUP_DECK_BB_PLAY , RUN_SETUP_DECK_BB_USE_SEED , RUN_SETUP_DECK_BB_SEED , RUN_SETUP_DECK_BB_MAX }
 
enum  RunSetupSeedRows {
  RUN_SETUP_SEED_ROW_KEY0 , RUN_SETUP_SEED_ROW_KEY1 , RUN_SETUP_SEED_ROW_KEY2 , RUN_SETUP_SEED_ROW_KEY3 ,
  RUN_SETUP_SEED_ROW_DECK_PLAY , RUN_SETUP_SEED_ROW_BACK , RUN_SETUP_SEED_ROW_MAX
}
 
enum  RunSetupKeyboardButtons {
  RUN_SETUP_KEYBOARD_BEGIN , RUN_SETUP_KEYBOARD_1 = RUN_SETUP_KEYBOARD_BEGIN , RUN_SETUP_KEYBOARD_2 , RUN_SETUP_KEYBOARD_3 ,
  RUN_SETUP_KEYBOARD_4 , RUN_SETUP_KEYBOARD_5 , RUN_SETUP_KEYBOARD_6 , RUN_SETUP_KEYBOARD_7 ,
  RUN_SETUP_KEYBOARD_8 , RUN_SETUP_KEYBOARD_9 , RUN_SETUP_KEYBOARD_0 , RUN_SETUP_KEYBOARD_A ,
  RUN_SETUP_KEYBOARD_B , RUN_SETUP_KEYBOARD_C , RUN_SETUP_KEYBOARD_D , RUN_SETUP_KEYBOARD_E ,
  RUN_SETUP_KEYBOARD_F , RUN_SETUP_KEYBOARD_G , RUN_SETUP_KEYBOARD_H , RUN_SETUP_KEYBOARD_I ,
  RUN_SETUP_KEYBOARD_J , RUN_SETUP_KEYBOARD_K , RUN_SETUP_KEYBOARD_L , RUN_SETUP_KEYBOARD_M ,
  RUN_SETUP_KEYBOARD_N , RUN_SETUP_KEYBOARD_O , RUN_SETUP_KEYBOARD_P , RUN_SETUP_KEYBOARD_Q ,
  RUN_SETUP_KEYBOARD_R , RUN_SETUP_KEYBOARD_S , RUN_SETUP_KEYBOARD_T , RUN_SETUP_KEYBOARD_RAND ,
  RUN_SETUP_KEYBOARD_U , RUN_SETUP_KEYBOARD_V , RUN_SETUP_KEYBOARD_W , RUN_SETUP_KEYBOARD_X ,
  RUN_SETUP_KEYBOARD_Y , RUN_SETUP_KEYBOARD_Z , RUN_SETUP_KEYBOARD_DEL , RUN_SETUP_KEYBOARD_MAX
}
 
enum  RunSetupSeedBottomButtons { RUN_SETUP_SEED_BB_PLAY , RUN_SETUP_SEED_BB_DECK , RUN_SETUP_SEED_BB_MAX }
 
enum  RunSetupResumeRows { RUN_SETUP_RESUME_ROW_PLAY , RUN_SETUP_RESUME_ROW_BACK , RUN_SETUP_RESUME_ROW_MAX }
 

Functions

static void choose_deck_substate_init (void)
 Initializes the Deck changing substate.
 
static void choose_deck_substate_update (void)
 Update the deck changing substate by handling user input though its corresponding SelectionGrid.
 
static void seed_keyboard_substate_init (void)
 Initialize the Choose Seed substate.
 
static void seed_keyboard_substate_update (void)
 Update the Choose Seed substate by handling user inputs though the corresponding choose_seed_selection_grid SelectionGrid.
 
static void resume_substate_init (void)
 Initialize the "Resume Previous Run" substate.
 
static void tab_set_highlight (enum RunSetupTab tab_sel)
 Highlights the tab_sel Tab at the top of the screen, and removes highlight from all the others.
 
static void run_setup_tabs_update (void)
 Handle user input in regards to the Tabs. Tabs are cycled through using the L/R buttons.
 
static int back_row_get_size ()
 Retuns the width of the Back button's row.
 
static void back_row_on_key_transit (SelectionGrid *selection_grid, Selection *selection)
 
static void toggle_seed_enabled (bool enable)
 Toggle whether or not we will use the seed chosen by the user. Changes the looks of the Seed button to signal if it is clickable or not, and that of the checkbox next to it.
 
static void use_seed_on_pressed (void)
 Seed checkbox Button Callback. Toggles custom seed usage.
 
static void seed_on_pressed (void)
 Seed Button Callback. Opens the seed input keyboard.
 
static void deck_on_pressed (void)
 Deck Button Callback.
 
static void play_on_pressed (void)
 Play Button Callback. Applies the chosen seed if enabled and starts a new run.
 
static void back_on_pressed (void)
 Back Button Callback. Goes back to the Main Menu.
 
static int change_deck_get_row_size (void)
 Returns the width of the Change Deck Button's row.
 
static bool choose_deck_row_on_selection_changed (SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection)
 Handle directional input in choose_deck_selection_grid
 
static int seed_play_get_row_size (void)
 Returns the width of the Seed checkbox/Seed/Play buttons' row.
 
static void seed_play_row_on_key_transit (SelectionGrid *selection_grid, Selection *selection)
 Handle button inputs for choose_deck_selection_grid
 
static void change_deck_on_pressed (void)
 Button Callback used for cycling through the Decks.
 
static int choose_seed_get_keyboard_row_size (void)
 Returns the width of the 3 top keyboard rows.
 
static int choose_seed_get_keyboard_short_row_size (void)
 Returns the width of the bottom keyboard row, the shortest one.
 
static int choose_seed_get_bottom_row_size (void)
 Returns the width of the Deck/Play buttons' row.
 
static void choose_seed_row_on_key_transit (SelectionGrid *selection_grid, Selection *selection)
 Handle button imputs in choose_seed_selection_grid
 
static bool choose_seed_row_on_selection_changed (SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection)
 Handle directional imputs in choose_seed_selection_grid
 
static void keyboard_button_on_pressed (void)
 Keyboard key Button callback.
 
void run_setup_change_background (void)
 Change to the Run Setup menu background.
 
void run_setup_on_init (void)
 Run Setup menu state initialization.
 
void run_setup_on_update (void)
 Run Setup menu state update.
 
void run_setup_on_exit (void)
 Run Setup menu cleanup.
 
static Button * change_deck_get_button_from_sel (const Selection *sel)
 Gets the Button corresponding to the current Selection in choose_deck_selection_grid
 
static void update_seed_text (void)
 Prints the string representing the chosen seed in base-36.
 
static void reroll_seed_str (void)
 Deletes the last char in the seed string base-36 representation.
 
static void delete_seed_char (void)
 Deletes the last char in the seed string base-36 representation.
 
static void type_seed_char (enum RunSetupKeyboardButtons key)
 Add a new char at the end of the seed string.
 
static enum RunSetupKeyboardButtons get_keyboard_index_from_sel (const Selection *sel)
 Get the keyboard key index from a SelectionGrid's Selection. The returned value is valid only if the Selection is within the keyboard Rows.
 
static Button * choose_seed_get_button_from_sel (const Selection *sel)
 Get the Button corresponding to a Selection within choose_seed_selection_grid
 

Variables

static StateInfo state_info []
 
static StateMachine run_setup_sm
 
static const BG_POINT RUN_SETUP_FRAME_BG_SE_FILL_SRC_POS = {9 , 31}
 
static const Rect RUN_SETUP_CHOOSE_DECK_CHOICE_BG_9_PTCH_DEST = {6 , 4 , 23, 13}
 
static const NinePatchRect RUN_SETUP_CHOOSE_DECK_CHOICE_BG_9_PTCH_SRC
 
static const Rect RUN_SETUP_CHOOSE_DECK_CLEAN_LEFT_DEST = {4 , 6 , 5 , 13}
 
static const Rect RUN_SETUP_CHOOSE_DECK_CLEAN_RIGHT_DEST = {24, 6 ,25 , 13}
 
static const Rect RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_OFF_SRC = {30, 8 , 31, 10}
 
static const Rect RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_ON_SRC = {30, 11, 31, 13}
 
static const BG_POINT RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_DEST_POS = {17, 14}
 
static const BG_POINT RUN_SETUP_CHOOSE_DECK_SEED_BTN_3X3_SRC_POS = {0 , 29}
 
static const BG_POINT RUN_SETUP_CHOOSE_DECK_SEED_BTN_DISABLED_3X3_SRC_POS = {3 , 29}
 
static const Rect RUN_SETUP_CHOOSE_DECK_SEED_BTN_DEST = {19, 14, 24, 16}
 
static const Rect RUN_SETUP_CHOOSE_SEED_FRAME_CLEAN_DEST = {4 , 3 , 25, 5 }
 
static const Rect RUN_SETUP_CHOOSE_SEED_KEYBOARD_SRC = {10, 24, 31, 31}
 
static const Rect RUN_SETUP_CHOOSE_SEED_FIELD_SRC = {24, 22, 31, 23}
 
static const BG_POINT RUN_SETUP_CHOOSE_SEED_KEYBOARD_DEST_POS = {4 , 6}
 
static const BG_POINT RUN_SETUP_CHOOSE_SEED_FIELD_DEST_POS = {11, 4}
 
static const BG_POINT RUN_SETUP_CHOOSE_SEED_DECK_BTN_3X3_SRC_POS = RUN_SETUP_CHOOSE_DECK_SEED_BTN_3X3_SRC_POS
 
static const Rect RUN_SETUP_CHOOSE_SEED_DECK_BTN_DEST = {17, 14, 24, 16}
 
static const BG_POINT RUN_SETUP_DECK_NAME_TEXT_POS = {80 , 40 }
 
static const BG_POINT RUN_SETUP_DECK_DESC_TEXT_POS = {80 , 56 }
 
static const Rect RUN_SETUP_DECK_NAME_DESC_RECT = {80 , 40 ,176, 96 }
 
static const BG_POINT RUN_SETUP_SEED_FIELD_TEXT_POS = {96 , 40 }
 
static const BG_POINT RUN_SETUP_SEED_DECK_TEXT_POS = {152, 120}
 
static const BG_POINT RUN_SETUP_PLAY_TEXT_POS = {76 , 120}
 
static const BG_POINT RUN_SETUP_BACK_TEXT_POS = {104, 136}
 
static bool is_saved_game_valid = false
 
static Button tabs_buttons [RUN_SETUP_TAB_MAX]
 
static Button back_button
 
static SelectionGridRow choose_deck_rows [RUN_SETUP_DECK_ROW_MAX]
 
static const Selection RUN_SETUP_CHOOSE_DECK_INIT_SEL = {0, 0}
 
static const Selection RUN_SETUP_CHOOSE_DECK_SEL_FROM_SEED = {2, 1}
 
static SelectionGrid choose_deck_selection_grid
 
static Button change_deck_button
 
static Button choose_deck_bottom_buttons [RUN_SETUP_DECK_BB_MAX]
 
static bool use_seed = false
 
static CardObject * run_setup_deck = NULL
 
static SelectionGridRow choose_seed_selection_rows []
 
static const Selection RUN_SETUP_CHOOSE_SEED_INIT_SEL = {1, 4}
 
static SelectionGrid choose_seed_selection_grid
 
static Button keyboard_buttons [KEYBOARD_HEIGHT *KEYBOARD_WIDTH]
 
static Button choose_seed_bottom_buttons [2]
 
static const char KEYBOARD_BUTTONS_TO_CHAR [KEYBOARD_HEIGHT *KEYBOARD_WIDTH]
 
static char s_seed_str [BASE36_MAX_DIGITS+1] = {'\0'}
 
static u8 s_seed_cursor_pos = 0
 

Detailed Description

Setup Run menu state functions implementation.

Definition in file run_setup.c.

Macro Definition Documentation

◆ BACK_BTN_MAIN_COLOR_PAL_IDX

#define BACK_BTN_MAIN_COLOR_PAL_IDX   14

Definition at line 31 of file run_setup.c.

◆ BACK_BTN_OUTLINE_COLOR_PAL_IDX

#define BACK_BTN_OUTLINE_COLOR_PAL_IDX   36

Definition at line 39 of file run_setup.c.

◆ BLUE_BTN_MAIN_COLOR_PAL_IDX

#define BLUE_BTN_MAIN_COLOR_PAL_IDX   12

Definition at line 29 of file run_setup.c.

◆ BLUE_DISABLED_BTN_MAIN_COLOR_PAL_IDX

#define BLUE_DISABLED_BTN_MAIN_COLOR_PAL_IDX   13

Definition at line 30 of file run_setup.c.

◆ CHANGE_DECK_BTN_MAIN_COLOR_PAL_IDX

#define CHANGE_DECK_BTN_MAIN_COLOR_PAL_IDX   1

Definition at line 26 of file run_setup.c.

◆ CHANGE_DECK_BTN_OUTLINE_COLOR_PAL_IDX

#define CHANGE_DECK_BTN_OUTLINE_COLOR_PAL_IDX   32

Definition at line 35 of file run_setup.c.

◆ DEF_SEED_KEYBOARD_BUTTON_OBJECT

#define DEF_SEED_KEYBOARD_BUTTON_OBJECT (   key)
Value:
{ \
KEYBOARD_##key##_BTN_OUTLINE_COLOR_PAL_IDX, RED_BTN_MAIN_COLOR_PAL_IDX, \
} \
static void keyboard_button_on_pressed(void)
Keyboard key Button callback.
Definition run_setup.c:967

Definition at line 481 of file run_setup.c.

◆ KEYBOARD_0_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_0_BTN_OUTLINE_COLOR_PAL_IDX   49

Definition at line 50 of file run_setup.c.

◆ KEYBOARD_1_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_1_BTN_OUTLINE_COLOR_PAL_IDX   40

Definition at line 41 of file run_setup.c.

◆ KEYBOARD_2_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_2_BTN_OUTLINE_COLOR_PAL_IDX   41

Definition at line 42 of file run_setup.c.

◆ KEYBOARD_3_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_3_BTN_OUTLINE_COLOR_PAL_IDX   42

Definition at line 43 of file run_setup.c.

◆ KEYBOARD_4_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_4_BTN_OUTLINE_COLOR_PAL_IDX   43

Definition at line 44 of file run_setup.c.

◆ KEYBOARD_5_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_5_BTN_OUTLINE_COLOR_PAL_IDX   44

Definition at line 45 of file run_setup.c.

◆ KEYBOARD_6_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_6_BTN_OUTLINE_COLOR_PAL_IDX   45

Definition at line 46 of file run_setup.c.

◆ KEYBOARD_7_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_7_BTN_OUTLINE_COLOR_PAL_IDX   46

Definition at line 47 of file run_setup.c.

◆ KEYBOARD_8_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_8_BTN_OUTLINE_COLOR_PAL_IDX   47

Definition at line 48 of file run_setup.c.

◆ KEYBOARD_9_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_9_BTN_OUTLINE_COLOR_PAL_IDX   48

Definition at line 49 of file run_setup.c.

◆ KEYBOARD_A_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_A_BTN_OUTLINE_COLOR_PAL_IDX   50

Definition at line 52 of file run_setup.c.

◆ KEYBOARD_B_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_B_BTN_OUTLINE_COLOR_PAL_IDX   51

Definition at line 53 of file run_setup.c.

◆ KEYBOARD_C_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_C_BTN_OUTLINE_COLOR_PAL_IDX   52

Definition at line 54 of file run_setup.c.

◆ KEYBOARD_D_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_D_BTN_OUTLINE_COLOR_PAL_IDX   53

Definition at line 55 of file run_setup.c.

◆ KEYBOARD_DEL_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_DEL_BTN_OUTLINE_COLOR_PAL_IDX   77

Definition at line 81 of file run_setup.c.

◆ KEYBOARD_E_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_E_BTN_OUTLINE_COLOR_PAL_IDX   54

Definition at line 56 of file run_setup.c.

◆ KEYBOARD_F_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_F_BTN_OUTLINE_COLOR_PAL_IDX   55

Definition at line 57 of file run_setup.c.

◆ KEYBOARD_G_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_G_BTN_OUTLINE_COLOR_PAL_IDX   56

Definition at line 58 of file run_setup.c.

◆ KEYBOARD_H_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_H_BTN_OUTLINE_COLOR_PAL_IDX   57

Definition at line 59 of file run_setup.c.

◆ KEYBOARD_HEIGHT

#define KEYBOARD_HEIGHT   4

Definition at line 341 of file run_setup.c.

◆ KEYBOARD_I_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_I_BTN_OUTLINE_COLOR_PAL_IDX   58

Definition at line 60 of file run_setup.c.

◆ KEYBOARD_J_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_J_BTN_OUTLINE_COLOR_PAL_IDX   59

Definition at line 61 of file run_setup.c.

◆ KEYBOARD_K_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_K_BTN_OUTLINE_COLOR_PAL_IDX   60

Definition at line 63 of file run_setup.c.

◆ KEYBOARD_L_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_L_BTN_OUTLINE_COLOR_PAL_IDX   61

Definition at line 64 of file run_setup.c.

◆ KEYBOARD_M_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_M_BTN_OUTLINE_COLOR_PAL_IDX   62

Definition at line 65 of file run_setup.c.

◆ KEYBOARD_N_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_N_BTN_OUTLINE_COLOR_PAL_IDX   63

Definition at line 66 of file run_setup.c.

◆ KEYBOARD_O_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_O_BTN_OUTLINE_COLOR_PAL_IDX   64

Definition at line 67 of file run_setup.c.

◆ KEYBOARD_P_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_P_BTN_OUTLINE_COLOR_PAL_IDX   65

Definition at line 68 of file run_setup.c.

◆ KEYBOARD_Q_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_Q_BTN_OUTLINE_COLOR_PAL_IDX   66

Definition at line 69 of file run_setup.c.

◆ KEYBOARD_R_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_R_BTN_OUTLINE_COLOR_PAL_IDX   67

Definition at line 70 of file run_setup.c.

◆ KEYBOARD_RAND_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_RAND_BTN_OUTLINE_COLOR_PAL_IDX   70

Definition at line 74 of file run_setup.c.

◆ KEYBOARD_S_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_S_BTN_OUTLINE_COLOR_PAL_IDX   68

Definition at line 71 of file run_setup.c.

◆ KEYBOARD_T_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_T_BTN_OUTLINE_COLOR_PAL_IDX   69

Definition at line 72 of file run_setup.c.

◆ KEYBOARD_U_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_U_BTN_OUTLINE_COLOR_PAL_IDX   71

Definition at line 75 of file run_setup.c.

◆ KEYBOARD_V_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_V_BTN_OUTLINE_COLOR_PAL_IDX   72

Definition at line 76 of file run_setup.c.

◆ KEYBOARD_W_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_W_BTN_OUTLINE_COLOR_PAL_IDX   73

Definition at line 77 of file run_setup.c.

◆ KEYBOARD_WIDTH

#define KEYBOARD_WIDTH   10

Definition at line 340 of file run_setup.c.

◆ KEYBOARD_X_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_X_BTN_OUTLINE_COLOR_PAL_IDX   74

Definition at line 78 of file run_setup.c.

◆ KEYBOARD_Y_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_Y_BTN_OUTLINE_COLOR_PAL_IDX   75

Definition at line 79 of file run_setup.c.

◆ KEYBOARD_Z_BTN_OUTLINE_COLOR_PAL_IDX

#define KEYBOARD_Z_BTN_OUTLINE_COLOR_PAL_IDX   76

Definition at line 80 of file run_setup.c.

◆ NEW_RUN_BTN_OUTLINE_COLOR_PAL_IDX

#define NEW_RUN_BTN_OUTLINE_COLOR_PAL_IDX   30

Definition at line 33 of file run_setup.c.

◆ PLAY_BTN_OUTLINE_COLOR_PAL_IDX

#define PLAY_BTN_OUTLINE_COLOR_PAL_IDX   35

Definition at line 38 of file run_setup.c.

◆ RED_BTN_MAIN_COLOR_PAL_IDX

#define RED_BTN_MAIN_COLOR_PAL_IDX   10

Definition at line 27 of file run_setup.c.

◆ RED_DISABLED_BTN_MAIN_COLOR_PAL_IDX

#define RED_DISABLED_BTN_MAIN_COLOR_PAL_IDX   11

Definition at line 28 of file run_setup.c.

◆ RESUME_BTN_OUTLINE_COLOR_PAL_IDX

#define RESUME_BTN_OUTLINE_COLOR_PAL_IDX   31

Definition at line 34 of file run_setup.c.

◆ RUN_SETUP_DECK_SPRITE_T_X

#define RUN_SETUP_DECK_SPRITE_T_X   48

Definition at line 161 of file run_setup.c.

◆ RUN_SETUP_DECK_SPRITE_T_Y

#define RUN_SETUP_DECK_SPRITE_T_Y   54

Definition at line 162 of file run_setup.c.

◆ SEED_CHECK_BTN_OUTLINE_COLOR_PAL_IDX

#define SEED_CHECK_BTN_OUTLINE_COLOR_PAL_IDX   33

Definition at line 36 of file run_setup.c.

◆ SEED_DECK_BTN_OUTLINE_COLOR_PAL_IDX

#define SEED_DECK_BTN_OUTLINE_COLOR_PAL_IDX   34

Definition at line 37 of file run_setup.c.

Enumeration Type Documentation

◆ RunSetupDeckBottomButtons

enum RunSetupDeckBottomButtons

Definition at line 250 of file run_setup.c.

◆ RunSetupDeckRows

enum RunSetupDeckRows

Definition at line 242 of file run_setup.c.

◆ RunSetupKeyboardButtons

enum RunSetupKeyboardButtons

Definition at line 354 of file run_setup.c.

◆ RunSetupResumeRows

enum RunSetupResumeRows

Definition at line 562 of file run_setup.c.

◆ RunSetupSeedBottomButtons

enum RunSetupSeedBottomButtons

Definition at line 402 of file run_setup.c.

◆ RunSetupSeedRows

enum RunSetupSeedRows

Definition at line 343 of file run_setup.c.

◆ RunSetupSubstate

enum RunSetupSubstate

Definition at line 83 of file run_setup.c.

◆ RunSetupTab

enum RunSetupTab

Definition at line 182 of file run_setup.c.

Function Documentation

◆ back_on_pressed()

static void back_on_pressed ( void  )
static

Back Button Callback. Goes back to the Main Menu.

Definition at line 1201 of file run_setup.c.

◆ back_row_get_size()

static int back_row_get_size ( void  )
static

Retuns the width of the Back button's row.

Returns
1, as there is only the Back button on that row.

Definition at line 1274 of file run_setup.c.

◆ back_row_on_key_transit()

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

Definition at line 1279 of file run_setup.c.

◆ change_deck_get_button_from_sel()

static Button * change_deck_get_button_from_sel ( const Selection *  sel)
inlinestatic

Gets the Button corresponding to the current Selection in choose_deck_selection_grid

Parameters
selSelection within choose_deck_selection_grid
Returns
a pointer to the currently hovered Button

Definition at line 739 of file run_setup.c.

◆ change_deck_get_row_size()

static int change_deck_get_row_size ( void  )
static

Returns the width of the Change Deck Button's row.

Returns
1

Definition at line 728 of file run_setup.c.

◆ change_deck_on_pressed()

static void change_deck_on_pressed ( void  )
static

Button Callback used for cycling through the Decks.

Definition at line 1209 of file run_setup.c.

◆ choose_deck_row_on_selection_changed()

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

Handle directional input in choose_deck_selection_grid

Parameters
selection_gridpointer to choose_deck_selection_grid
row_idxrow index in choose_deck_selection_grid this function is being called for
prev_selectionprevious selection in selection_grid
new_selectionnew selection in selection_grid
Returns
bool

Definition at line 766 of file run_setup.c.

◆ choose_deck_substate_init()

static void choose_deck_substate_init ( void  )
static

Initializes the Deck changing substate.

Definition at line 662 of file run_setup.c.

◆ choose_deck_substate_update()

static void choose_deck_substate_update ( void  )
static

Update the deck changing substate by handling user input though its corresponding SelectionGrid.

Definition at line 718 of file run_setup.c.

◆ choose_seed_get_bottom_row_size()

static int choose_seed_get_bottom_row_size ( void  )
static

Returns the width of the Deck/Play buttons' row.

Returns
2

Definition at line 906 of file run_setup.c.

◆ choose_seed_get_button_from_sel()

static Button * choose_seed_get_button_from_sel ( const Selection *  sel)
inlinestatic

Get the Button corresponding to a Selection within choose_seed_selection_grid

Parameters
selSelection in choose_seed_selection_grid
Returns
pointer to the Button at coordinates sel in grid

Definition at line 1013 of file run_setup.c.

◆ choose_seed_get_keyboard_row_size()

static int choose_seed_get_keyboard_row_size ( void  )
static

Returns the width of the 3 top keyboard rows.

Returns
KEYBOARD_WIDTH = 10

Definition at line 886 of file run_setup.c.

◆ choose_seed_get_keyboard_short_row_size()

static int choose_seed_get_keyboard_short_row_size ( void  )
static

Returns the width of the bottom keyboard row, the shortest one.

Returns
KEYBOARD_WIDTH - 2 = 8

Definition at line 896 of file run_setup.c.

◆ choose_seed_row_on_key_transit()

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

Handle button imputs in choose_seed_selection_grid

Always register A press, but only B press when we are on a keyboard row

Parameters
selection_gridpointer to choose_seed_selection_grid
selectionSelected button in choose_seed_selection_grid

Definition at line 1040 of file run_setup.c.

◆ choose_seed_row_on_selection_changed()

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

Handle directional imputs in choose_seed_selection_grid

Parameters
selection_gridpointer to choose_seed_selection_grid
row_idxindex of the row in selection_grid the function is being called for
prev_selectionprevious Selection in choose_seed_selection_grid
new_selectionnew selection in choose_seed_selection_grid
Returns
bool

Definition at line 1058 of file run_setup.c.

◆ deck_on_pressed()

static void deck_on_pressed ( void  )
static

Deck Button Callback.

Definition at line 1105 of file run_setup.c.

◆ delete_seed_char()

static void delete_seed_char ( void  )
inlinestatic

Deletes the last char in the seed string base-36 representation.

Definition at line 929 of file run_setup.c.

◆ get_keyboard_index_from_sel()

static enum RunSetupKeyboardButtons get_keyboard_index_from_sel ( const Selection *  sel)
inlinestatic

Get the keyboard key index from a SelectionGrid's Selection. The returned value is valid only if the Selection is within the keyboard Rows.

Parameters
selthe Selection within the choose_seed_selection_grid
Returns
the key index

Definition at line 959 of file run_setup.c.

◆ keyboard_button_on_pressed()

static void keyboard_button_on_pressed ( void  )
static

Keyboard key Button callback.

Definition at line 967 of file run_setup.c.

◆ play_on_pressed()

static void play_on_pressed ( void  )
static

Play Button Callback. Applies the chosen seed if enabled and starts a new run.

Definition at line 1184 of file run_setup.c.

◆ reroll_seed_str()

static void reroll_seed_str ( void  )
inlinestatic

Deletes the last char in the seed string base-36 representation.

Definition at line 914 of file run_setup.c.

◆ resume_substate_init()

static void resume_substate_init ( void  )
static

Initialize the "Resume Previous Run" substate.

Definition at line 1118 of file run_setup.c.

◆ run_setup_change_background()

void run_setup_change_background ( void  )

Change to the Run Setup menu background.

Definition at line 580 of file run_setup.c.

◆ run_setup_on_exit()

void run_setup_on_exit ( void  )

Run Setup menu cleanup.

Definition at line 640 of file run_setup.c.

◆ run_setup_on_init()

void run_setup_on_init ( void  )

Run Setup menu state initialization.

Definition at line 588 of file run_setup.c.

◆ run_setup_on_update()

void run_setup_on_update ( void  )

Run Setup menu state update.

Definition at line 635 of file run_setup.c.

◆ run_setup_tabs_update()

static void run_setup_tabs_update ( void  )
static

Handle user input in regards to the Tabs. Tabs are cycled through using the L/R buttons.

Definition at line 1230 of file run_setup.c.

◆ seed_keyboard_substate_init()

static void seed_keyboard_substate_init ( void  )
static

Initialize the Choose Seed substate.

Definition at line 824 of file run_setup.c.

◆ seed_keyboard_substate_update()

static void seed_keyboard_substate_update ( void  )
static

Update the Choose Seed substate by handling user inputs though the corresponding choose_seed_selection_grid SelectionGrid.

Definition at line 876 of file run_setup.c.

◆ seed_on_pressed()

static void seed_on_pressed ( void  )
static

Seed Button Callback. Opens the seed input keyboard.

Definition at line 1175 of file run_setup.c.

◆ seed_play_get_row_size()

static int seed_play_get_row_size ( void  )
static

Returns the width of the Seed checkbox/Seed/Play buttons' row.

Returns
3

Definition at line 787 of file run_setup.c.

◆ seed_play_row_on_key_transit()

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

Handle button inputs for choose_deck_selection_grid

Parameters
selection_gridpointer to choose_deck_selection_grid
selectioncurrent Selection in selection_grid

Definition at line 798 of file run_setup.c.

◆ tab_set_highlight()

static void tab_set_highlight ( enum RunSetupTab  tab_sel)
static

Highlights the tab_sel Tab at the top of the screen, and removes highlight from all the others.

Parameters
tab_selindex of the selected tab

Definition at line 1219 of file run_setup.c.

◆ toggle_seed_enabled()

static void toggle_seed_enabled ( bool  enable)
inlinestatic

Toggle whether or not we will use the seed chosen by the user. Changes the looks of the Seed button to signal if it is clickable or not, and that of the checkbox next to it.

Parameters
enablewhether the seed is enabled or not

Definition at line 1135 of file run_setup.c.

◆ type_seed_char()

static void type_seed_char ( enum RunSetupKeyboardButtons  key)
inlinestatic

Add a new char at the end of the seed string.

Parameters
keyindex of the keyboard key corresponding to the char we want to add

Definition at line 943 of file run_setup.c.

◆ update_seed_text()

static void update_seed_text ( void  )
inlinestatic

Prints the string representing the chosen seed in base-36.

Definition at line 809 of file run_setup.c.

◆ use_seed_on_pressed()

static void use_seed_on_pressed ( void  )
static

Seed checkbox Button Callback. Toggles custom seed usage.

Definition at line 1167 of file run_setup.c.

Variable Documentation

◆ back_button

Button back_button
static
Initial value:
= {
BACK_BTN_OUTLINE_COLOR_PAL_IDX, BACK_BTN_MAIN_COLOR_PAL_IDX,
}
static void back_on_pressed(void)
Back Button Callback. Goes back to the Main Menu.
Definition run_setup.c:1201

Definition at line 229 of file run_setup.c.

◆ change_deck_button

Button change_deck_button
static
Initial value:
= {
CHANGE_DECK_BTN_OUTLINE_COLOR_PAL_IDX,
CHANGE_DECK_BTN_MAIN_COLOR_PAL_IDX,
NULL
}
static void change_deck_on_pressed(void)
Button Callback used for cycling through the Decks.
Definition run_setup.c:1209

Definition at line 307 of file run_setup.c.

◆ choose_deck_bottom_buttons

Button choose_deck_bottom_buttons[RUN_SETUP_DECK_BB_MAX]
static
Initial value:
= {
{
PLAY_BTN_OUTLINE_COLOR_PAL_IDX, BLUE_BTN_MAIN_COLOR_PAL_IDX,
}, {
SEED_CHECK_BTN_OUTLINE_COLOR_PAL_IDX, RED_BTN_MAIN_COLOR_PAL_IDX,
}, {
SEED_DECK_BTN_OUTLINE_COLOR_PAL_IDX, BLUE_DISABLED_BTN_MAIN_COLOR_PAL_IDX,
}
}
static void seed_on_pressed(void)
Seed Button Callback. Opens the seed input keyboard.
Definition run_setup.c:1175
static void play_on_pressed(void)
Play Button Callback. Applies the chosen seed if enabled and starts a new run.
Definition run_setup.c:1184
static void use_seed_on_pressed(void)
Seed checkbox Button Callback. Toggles custom seed usage.
Definition run_setup.c:1167

Definition at line 316 of file run_setup.c.

◆ choose_deck_rows

SelectionGridRow choose_deck_rows[RUN_SETUP_DECK_ROW_MAX]
static
Initial value:
= {
{
RUN_SETUP_DECK_ROW_CHANGE_DECK,
NULL,
{.wrap = true}
}, {
RUN_SETUP_DECK_ROW_SEED_PLAY,
{.wrap = false}
}, {
RUN_SETUP_DECK_ROW_BACK,
back_row_on_key_transit,
{.wrap = false}
}
}
static int back_row_get_size(void)
Retuns the width of the Back button's row.
Definition run_setup.c:1274
static void seed_play_row_on_key_transit(SelectionGrid *selection_grid, Selection *selection)
Handle button inputs for choose_deck_selection_grid
Definition run_setup.c:798
static int seed_play_get_row_size(void)
Returns the width of the Seed checkbox/Seed/Play buttons' row.
Definition run_setup.c:787
static int change_deck_get_row_size(void)
Returns the width of the Change Deck Button's row.
Definition run_setup.c:728
static bool choose_deck_row_on_selection_changed(SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection)
Handle directional input in choose_deck_selection_grid
Definition run_setup.c:766

Definition at line 271 of file run_setup.c.

◆ choose_deck_selection_grid

SelectionGrid choose_deck_selection_grid
static
Initial value:
= {
choose_deck_rows,
RUN_SETUP_DECK_ROW_MAX,
RUN_SETUP_CHOOSE_DECK_INIT_SEL
}

Definition at line 297 of file run_setup.c.

◆ choose_seed_bottom_buttons

Button choose_seed_bottom_buttons[2]
static
Initial value:
= {
{
PLAY_BTN_OUTLINE_COLOR_PAL_IDX, BLUE_BTN_MAIN_COLOR_PAL_IDX,
}, {
SEED_DECK_BTN_OUTLINE_COLOR_PAL_IDX, BLUE_BTN_MAIN_COLOR_PAL_IDX,
}
}
static void deck_on_pressed(void)
Deck Button Callback.
Definition run_setup.c:1105

Definition at line 533 of file run_setup.c.

◆ choose_seed_selection_grid

SelectionGrid choose_seed_selection_grid
static
Initial value:
= {
choose_seed_selection_rows,
RUN_SETUP_SEED_ROW_MAX,
RUN_SETUP_CHOOSE_SEED_INIT_SEL
}

Definition at line 469 of file run_setup.c.

◆ choose_seed_selection_rows

SelectionGridRow choose_seed_selection_rows[]
static

Definition at line 423 of file run_setup.c.

◆ is_saved_game_valid

bool is_saved_game_valid = false
static

Definition at line 189 of file run_setup.c.

◆ keyboard_buttons

Button keyboard_buttons[KEYBOARD_HEIGHT *KEYBOARD_WIDTH]
static

Definition at line 488 of file run_setup.c.

◆ KEYBOARD_BUTTONS_TO_CHAR

const char KEYBOARD_BUTTONS_TO_CHAR[KEYBOARD_HEIGHT *KEYBOARD_WIDTH]
static
Initial value:
= {
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
' ', 'U', 'V', 'W', 'X', 'Y', 'Z'
}

Definition at line 543 of file run_setup.c.

◆ RUN_SETUP_BACK_TEXT_POS

const BG_POINT RUN_SETUP_BACK_TEXT_POS = {104, 136}
static

Definition at line 169 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_CHOICE_BG_9_PTCH_DEST

const Rect RUN_SETUP_CHOOSE_DECK_CHOICE_BG_9_PTCH_DEST = {6 , 4 , 23, 13}
static

Definition at line 134 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_CHOICE_BG_9_PTCH_SRC

const NinePatchRect RUN_SETUP_CHOOSE_DECK_CHOICE_BG_9_PTCH_SRC
static
Initial value:
= {
{ 0 , 21, 7 , 28},
{ 5 , 3 , 2 , 4 }
}

Definition at line 135 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_CLEAN_LEFT_DEST

const Rect RUN_SETUP_CHOOSE_DECK_CLEAN_LEFT_DEST = {4 , 6 , 5 , 13}
static

Definition at line 140 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_CLEAN_RIGHT_DEST

const Rect RUN_SETUP_CHOOSE_DECK_CLEAN_RIGHT_DEST = {24, 6 ,25 , 13}
static

Definition at line 141 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_INIT_SEL

const Selection RUN_SETUP_CHOOSE_DECK_INIT_SEL = {0, 0}
static

Definition at line 294 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_SEED_BTN_3X3_SRC_POS

const BG_POINT RUN_SETUP_CHOOSE_DECK_SEED_BTN_3X3_SRC_POS = {0 , 29}
static

Definition at line 147 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_SEED_BTN_DEST

const Rect RUN_SETUP_CHOOSE_DECK_SEED_BTN_DEST = {19, 14, 24, 16}
static

Definition at line 149 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_SEED_BTN_DISABLED_3X3_SRC_POS

const BG_POINT RUN_SETUP_CHOOSE_DECK_SEED_BTN_DISABLED_3X3_SRC_POS = {3 , 29}
static

Definition at line 148 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_SEL_FROM_SEED

const Selection RUN_SETUP_CHOOSE_DECK_SEL_FROM_SEED = {2, 1}
static

Definition at line 295 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_DEST_POS

const BG_POINT RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_DEST_POS = {17, 14}
static

Definition at line 145 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_OFF_SRC

const Rect RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_OFF_SRC = {30, 8 , 31, 10}
static

Definition at line 143 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_ON_SRC

const Rect RUN_SETUP_CHOOSE_DECK_USE_SEED_BTN_ON_SRC = {30, 11, 31, 13}
static

Definition at line 144 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_DECK_BTN_3X3_SRC_POS

const BG_POINT RUN_SETUP_CHOOSE_SEED_DECK_BTN_3X3_SRC_POS = RUN_SETUP_CHOOSE_DECK_SEED_BTN_3X3_SRC_POS
static

Definition at line 157 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_DECK_BTN_DEST

const Rect RUN_SETUP_CHOOSE_SEED_DECK_BTN_DEST = {17, 14, 24, 16}
static

Definition at line 158 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_FIELD_DEST_POS

const BG_POINT RUN_SETUP_CHOOSE_SEED_FIELD_DEST_POS = {11, 4}
static

Definition at line 155 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_FIELD_SRC

const Rect RUN_SETUP_CHOOSE_SEED_FIELD_SRC = {24, 22, 31, 23}
static

Definition at line 153 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_FRAME_CLEAN_DEST

const Rect RUN_SETUP_CHOOSE_SEED_FRAME_CLEAN_DEST = {4 , 3 , 25, 5 }
static

Definition at line 151 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_INIT_SEL

const Selection RUN_SETUP_CHOOSE_SEED_INIT_SEL = {1, 4}
static

Definition at line 467 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_KEYBOARD_DEST_POS

const BG_POINT RUN_SETUP_CHOOSE_SEED_KEYBOARD_DEST_POS = {4 , 6}
static

Definition at line 154 of file run_setup.c.

◆ RUN_SETUP_CHOOSE_SEED_KEYBOARD_SRC

const Rect RUN_SETUP_CHOOSE_SEED_KEYBOARD_SRC = {10, 24, 31, 31}
static

Definition at line 152 of file run_setup.c.

◆ run_setup_deck

CardObject* run_setup_deck = NULL
static

Definition at line 331 of file run_setup.c.

◆ RUN_SETUP_DECK_DESC_TEXT_POS

const BG_POINT RUN_SETUP_DECK_DESC_TEXT_POS = {80 , 56 }
static

Definition at line 164 of file run_setup.c.

◆ RUN_SETUP_DECK_NAME_DESC_RECT

const Rect RUN_SETUP_DECK_NAME_DESC_RECT = {80 , 40 ,176, 96 }
static

Definition at line 165 of file run_setup.c.

◆ RUN_SETUP_DECK_NAME_TEXT_POS

const BG_POINT RUN_SETUP_DECK_NAME_TEXT_POS = {80 , 40 }
static

Definition at line 163 of file run_setup.c.

◆ RUN_SETUP_FRAME_BG_SE_FILL_SRC_POS

const BG_POINT RUN_SETUP_FRAME_BG_SE_FILL_SRC_POS = {9 , 31}
static

Definition at line 132 of file run_setup.c.

◆ RUN_SETUP_PLAY_TEXT_POS

const BG_POINT RUN_SETUP_PLAY_TEXT_POS = {76 , 120}
static

Definition at line 168 of file run_setup.c.

◆ RUN_SETUP_SEED_DECK_TEXT_POS

const BG_POINT RUN_SETUP_SEED_DECK_TEXT_POS = {152, 120}
static

Definition at line 167 of file run_setup.c.

◆ RUN_SETUP_SEED_FIELD_TEXT_POS

const BG_POINT RUN_SETUP_SEED_FIELD_TEXT_POS = {96 , 40 }
static

Definition at line 166 of file run_setup.c.

◆ run_setup_sm

StateMachine run_setup_sm
static
Initial value:
= {
.state_infos = &state_info[0],
.num_infos = RUN_SETUP_SUBSTATE_MAX,
}

Definition at line 117 of file run_setup.c.

◆ s_seed_cursor_pos

u8 s_seed_cursor_pos = 0
static

Definition at line 553 of file run_setup.c.

◆ s_seed_str

char s_seed_str[BASE36_MAX_DIGITS+1] = {'\0'}
static

Definition at line 552 of file run_setup.c.

◆ state_info

StateInfo state_info[]
static
Initial value:
=
{
[RUN_SETUP_SUBSTATE_CHOOSE_DECK] = STATE_INFO_INIT_UPDATE_FN(
),
[RUN_SETUP_SUBSTATE_CHOOSE_SEED] = STATE_INFO_INIT_UPDATE_FN(
),
[RUN_SETUP_SUBSTATE_RESUME] = STATE_INFO_INIT_UPDATE_FN(
)
}
static void seed_keyboard_substate_update(void)
Update the Choose Seed substate by handling user inputs though the corresponding choose_seed_selectio...
Definition run_setup.c:876
static void choose_deck_substate_update(void)
Update the deck changing substate by handling user input though its corresponding SelectionGrid.
Definition run_setup.c:718
static void seed_keyboard_substate_init(void)
Initialize the Choose Seed substate.
Definition run_setup.c:824
static void resume_substate_init(void)
Initialize the "Resume Previous Run" substate.
Definition run_setup.c:1118
static void choose_deck_substate_init(void)
Initializes the Deck changing substate.
Definition run_setup.c:662
void noop(void)
no operation

Definition at line 100 of file run_setup.c.

◆ tabs_buttons

Button tabs_buttons[RUN_SETUP_TAB_MAX]
static
Initial value:
= {
{NEW_RUN_BTN_OUTLINE_COLOR_PAL_IDX, RED_BTN_MAIN_COLOR_PAL_IDX, NULL, NULL},
{RESUME_BTN_OUTLINE_COLOR_PAL_IDX, RED_BTN_MAIN_COLOR_PAL_IDX, NULL, NULL},
}

Definition at line 195 of file run_setup.c.

◆ use_seed

bool use_seed = false
static

Definition at line 330 of file run_setup.c.