* Everything works, need to clean up * cleanup * fix rebase issue * clang format * docs * clang format * clang format * address part of review * Protect against edge case when discarding at end of hand * Protect undiscard against popping a discarded card that doesn't exist * Protect against out of bounds access to the `played` cards stack * fix condition in `select_four_of_a_kind_cards_in_played_hand` * change `get_played_top() + 1` to `get_played_size()` * move `can_play/discard_hand` functions to round.c --------- Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
37 lines
643 B
C
37 lines
643 B
C
/**
|
|
* @file common_ui.h
|
|
*
|
|
* @brief Common functions to render UI elements.
|
|
*/
|
|
#ifndef COMMON_UI_H
|
|
#define COMMON_UI_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
/**
|
|
* @brief Enum of possible backgrounds to render with @ref change_background
|
|
*/
|
|
enum BackgroundId
|
|
{
|
|
BG_NONE,
|
|
BG_CARD_SELECTING,
|
|
BG_CARD_PLAYING,
|
|
BG_ROUND_END,
|
|
BG_SHOP,
|
|
BG_BLIND_SELECT,
|
|
BG_RUN_SETUP,
|
|
BG_OPTIONS_MENU,
|
|
BG_MAIN_MENU
|
|
};
|
|
|
|
enum BackgroundId get_current_background(void);
|
|
|
|
/**
|
|
* Change the background
|
|
*
|
|
* @param id @ref BackgroundId to render to screen
|
|
*/
|
|
void change_background(enum BackgroundId id, bool force_redraw);
|
|
|
|
#endif // COMMON_UI_H
|