Data structures and implementation of functions relative to the Rounds we play.
More...
|
| static int | game_round_button_row_get_size (void) |
| |
| static bool | game_round_button_row_on_selection_changed (SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection) |
| |
| static void | game_round_button_row_on_key_hit (SelectionGrid *selection_grid, Selection *selection) |
| |
| static void | game_round_hand_row_on_key_transit (SelectionGrid *selection_grid, Selection *selection) |
| |
| static bool | game_round_hand_row_on_selection_changed (SelectionGrid *selection_grid, int row_idx, const Selection *prev_selection, const Selection *new_selection) |
| |
| static int | game_round_hand_row_get_size (void) |
| |
| static int | hand_sel_idx_to_card_idx (int selection_index) |
| | Converts a selection index from the selection grid into a card index within the hand array.
|
| |
| static void | game_round_discard_on_pressed (void) |
| | "Discard" button implementation.
|
| |
| static void | game_round_play_hand_on_pressed (void) |
| | "Play" button implementation.
|
| |
| static void | game_round_sort_by_rank_on_pressed (void) |
| | "Rank" sorting button implementation.
|
| |
| static void | game_round_sort_by_suit_on_pressed (void) |
| | "Suit" sorting button implementation.
|
| |
| static bool | can_discard_hand (void) |
| | Determines whether the "Discard" button can be pressed or not.
|
| |
| static bool | can_play_hand (void) |
| | Determines whether the "Play" button can be pressed or not.
|
| |
| int | get_played_top (void) |
| | Get the index of the last played card.
|
| |
| int | get_played_size (void) |
| | Get the number of cards played.
|
| |
| static void | played_push (CardObject *card_object) |
| | Push a new card to play at the end of the associated array.
|
| |
| int | get_discard_top (void) |
| | Get the index of the last discarded card.
|
| |
| static void | discard_push (Card *card) |
| | Push a new card to discard at the end of the associated array.
|
| |
| static Card * | discard_pop () |
| | Remove and recover the last discarded card.
|
| |
| int | get_scored_card_index (void) |
| | Get the index of the card that is currently being scored.
|
| |
| void | set_retrigger (bool new_retrigger) |
| | Set whether the current card should get triggered again.
|
| |
| static GBAL_UNUSED void | get_played_distribution (u8 ranks_out[NUM_RANKS], u8 suits_out[NUM_SUITS]) |
| | Outputs the distribution of ranks and suits in the played stack.
|
| |
| void | game_round_change_background_selecting (void) |
| | Change to the round card selection background.
|
| |
| void | game_round_change_background_playing (void) |
| | Change to the round card playing background.
|
| |
| static void | game_round_execute_discard (void) |
| | Triggers the discard of the currently selected cards in hand.
|
| |
| static void | game_round_execute_play_hand (void) |
| | Triggers the playing of the currently selected cards in hand.
|
| |
| static void | game_round_button_set_highlight (int btn_idx, bool highlight) |
| |
| static void | game_round_process_hand_select_input (void) |
| |
| static void | game_round_handle_round_over (void) |
| | Evaluates if we have won or lost when we can no longer play so that we land on the correct Game Over screen.
|
| |
| static void | card_in_hand_loop_handle_discard_and_shuffling (int card_idx, FIXED *hand_x, FIXED *hand_y, bool *break_loop) |
| |
| static void | select_flush_and_straight_cards_in_played_hand (void) |
| |
| static void | select_all_five_cards_in_played_hand (void) |
| |
| static void | select_four_of_a_kind_cards_in_played_hand (void) |
| |
| static void | select_three_of_a_kind_cards_in_played_hand (void) |
| |
| static void | select_two_pair_cards_in_played_hand (void) |
| |
| static void | select_pair_cards_in_played_hand (void) |
| |
| static void | select_highcard_cards_in_played_hand (void) |
| |
| static bool | game_round_is_over (void) |
| | Determines if the round is over, be it because we lost or won the round.
|
| |
| static void | game_round_process_input_and_state (void) |
| |
| static void | card_draw (void) |
| | Draw the next card at the top of the Deck and play a little Sprite animation to position it in our hand.
|
| |
| static void | game_round_process_card_draw (void) |
| |
| static void | game_round_discarded_cards_loop (void) |
| |
| static void | select_cards_in_played_hand (void) |
| |
| static void | cards_in_hand_update_loop (void) |
| |
| static void | game_round_ui_text_update (void) |
| |
| void | toggle_flaming_score (void) |
| | Checks whether the score that would result from the current Chips and Mult exceeds the current Blind's score requirement, and applies the flaming effect if needed.
|
| |
| static void | game_round_process_flaming_score (void) |
| |
| static bool | check_and_score_joker_for_event (ListItr *starting_joker_itr, CardObject *card_object, enum JokerEvent joker_event) |
| | Iterate over the Jokers List until we encounter one that scores for the specified event.
|
| |
| static void | play_starting_played_cards_update (int played_idx) |
| |
| static bool | play_before_scoring_cards_update (void) |
| | Returns true if the Jokers scoring loop has returned early for event JOKER_EVENT_ON_HAND_PLAYED.
|
| |
| static bool | play_scoring_cards_update (void) |
| | Score all played cards in order, then Jokers after each one.
|
| |
| static bool | play_scoring_card_jokers_update (void) |
| | Activate Jokers for event JOKER_EVENT_ON_CARD_SCORED_END for the previous scored card, if any.
|
| |
| static bool | play_scoring_held_cards_update (int played_idx) |
| | Activate Jokers for event JOKER_EVENT_ON_CARD_HELD for the previous scored card, if any.
|
| |
| static bool | play_scoring_independent_jokers_update (int played_idx) |
| | Score Jokers normally for event JOKER_EVENT_INDEPENDENT.
|
| |
| static bool | play_scoring_hand_scored_end_update (int played_idx) |
| | Trigger all Jokers for event JOKER_EVENT_ON_HAND_SCORED_END once they are done scoring.
|
| |
| static void | play_ending_played_cards_update (int played_idx) |
| | This is the reverse of PLAY_STARTING. The cards get reset back to their neutral position sequentially.
|
| |
| static bool | play_ended_played_cards_update (int played_idx) |
| | Returns true if the card at index played_idx has been discarded. Basically a copy of HAND_DISCARD.
|
| |
| static void | played_cards_update_loop (void) |
| |
| void | game_round_on_init (void) |
| | Round state initialization.
|
| |
| void | game_round_on_update (void) |
| | Round state update.
|
| |
|
| static const Rect | SCORE_FLAME_RESET = {26, 20, 28, 20} |
| |
| static const Rect | SCORE_FLAME_FRAMES_START = {26, 21, 28, 21} |
| |
| static const BG_POINT | SCORE_FLAME_CHIPS_POS = {1, 9} |
| |
| static const BG_POINT | SCORE_FLAME_MULT_POS = {5, 9} |
| |
| static const BG_POINT | TOP_LEFT_BLIND_TITLE_POINT = {0, 21} |
| |
| static const Rect | BIG_BLIND_TITLE_SRC_RECT = {0, 26, 8, 26 } |
| |
| static const Rect | BOSS_BLIND_TITLE_SRC_RECT = {0, 27, 8, 27 } |
| |
| static const Rect | HAND_BG_RECT_SELECTING = {9, 11, 24, 17 } |
| |
| static const Rect | HAND_SIZE_RECT_SELECT = {120, 128, 160, 136 } |
| |
| static const Rect | HAND_SIZE_RECT_PLAYING = {120, 152, 160, 160 } |
| |
| static const Rect | PLAYED_CARDS_SCORES_RECT = {72, 48, 240, 56 } |
| |
| static const Rect | HELD_CARDS_SCORES_RECT = {72, 108, 240, 116 } |
| |
| static const BG_POINT | CARD_DRAW_POS = {208, 110} |
| |
| static const BG_POINT | CARD_DISCARD_PNT = {240, 70} |
| |
| static const BG_POINT | HAND_START_POS = {120, 90} |
| |
| static const BG_POINT | HAND_PLAY_POS = {120, 70} |
| |
| static SelectionGridRow | game_round_selection_rows [] |
| |
| static const Selection | GAME_PLAYING_INIT_SEL = {0, 1} |
| |
| static SelectionGrid | game_round_selection_grid |
| |
| static Button | game_round_buttons [] |
| |
| static enum PlayState | play_state = PLAY_STARTING |
| |
| static const int | HAND_SPACING_LUT [MAX_HAND_SIZE] |
| |
| static CardObject * | s_played_hand [MAX_SELECTION_SIZE] = {NULL} |
| |
| static int | s_played_top = -1 |
| |
| static Card * | s_discard_pile [MAX_DECK_SIZE] = {NULL} |
| |
| static int | s_discard_top = -1 |
| |
| static int | s_scored_card_index = 0 |
| |
| static bool | s_retrigger = false |
| |
| static ListItr | s_joker_scored_itr |
| |
| static ListItr | s_joker_card_scored_end_itr |
| |
| static ListItr | s_joker_round_end_itr |
| |
| static u32 | s_temp_score = 0 |
| |
| static bool | s_score_flames_active = false |
| |
| static FIXED | s_lerped_score = 0 |
| |
| static FIXED | s_lerped_temp_score = 0 |
| |
| static bool | s_sound_played = false |
| |
| static bool | s_discarded_card = false |
| |
| static int | s_cards_drawn = 0 |
| |
| static int | s_cards_discarded = 0 |
| |
| static bool | s_moving_card = false |
| |
| static bool | s_card_moved_too_fast = false |
| |
| static bool | s_card_selected_instead_of_moved = false |
| |
| static const int | CARD_SWAP_TIME_THRESHOLD = 6 |
| |
| static int | s_selection_hit_timer = UNDEFINED |
| |
Data structures and implementation of functions relative to the Rounds we play.
Definition in file round.c.