Implementation of functions related to the different types of Decks.
More...
#include "deck_types.h"
#include "game.h"
#include <tonc.h>
Go to the source code of this file.
|
| static void | print_desc_red_deck (BG_POINT pos) |
| | Print the decription of the Red Deck.
|
| |
| static void | print_desc_blue_deck (BG_POINT pos) |
| | Print the decription of the Blue Deck.
|
| |
| static void | print_desc_yellow_deck (BG_POINT pos) |
| | Print the decription of the Yellow Deck.
|
| |
| static void | print_desc_green_deck (BG_POINT pos) |
| | Print the decription of the Green Deck.
|
| |
| static void | print_desc_black_deck (BG_POINT pos) |
| | Print the decription of the Black Deck.
|
| |
| static void | print_desc_painted_deck (BG_POINT pos) |
| | Print the decription of the Painted Deck.
|
| |
| void | print_deck_name (enum DeckType deck, BG_POINT pos) |
| | Prints the Deck name string to the screen at the given position.
|
| |
| void | print_deck_description (enum DeckType deck, BG_POINT pos) |
| | Prints the Deck description string to the screen at the given position.
|
| |
| static void | print_empty_desc_line (int pos_x, int pos_y) |
| | Print an empty string of 13 characters long at given coordinates. Reduces boilerplate in deck descriptions functions.
|
| |
|
| static const char | DECK_NAMES [DECK_TYPE_MAX][DECK_NAME_LENGTH] |
| | List of DeckType names, all formatted to be centered in a string of 13 characters.
|
| |
| static const PrintDescCallback | deck_description_functions [DECK_TYPE_MAX] |
| |
Implementation of functions related to the different types of Decks.
Definition in file deck_types.c.
◆ TTE_COLOR_TEXT_FORMAT
| #define TTE_COLOR_TEXT_FORMAT "#{cx:0x%X000}%s" |
◆ PrintDescCallback
| typedef void(* PrintDescCallback) (BG_POINT) |
◆ print_deck_description()
| void print_deck_description |
( |
enum DeckType |
deck, |
|
|
BG_POINT |
pos |
|
) |
| |
Prints the Deck description string to the screen at the given position.
- Parameters
-
| deck | DeckType we want the description of. |
| pos | screen position in pixels of the top-left corner of the rectangle we'll print the Deck description into |
Definition at line 48 of file deck_types.c.
◆ print_deck_name()
| void print_deck_name |
( |
enum DeckType |
deck, |
|
|
BG_POINT |
pos |
|
) |
| |
Prints the Deck name string to the screen at the given position.
- Parameters
-
| deck | Decktype we want the name of. |
| pos | screen position in pixels to print the name at. |
Definition at line 43 of file deck_types.c.
◆ print_desc_black_deck()
| static void print_desc_black_deck |
( |
BG_POINT |
pos | ) |
|
|
static |
Print the decription of the Black Deck.
"+1 Joker slot"
" "
" -1 hand "
" every Round "
" "
- Parameters
-
| pos | position of the rectagle to print the description to |
Definition at line 235 of file deck_types.c.
◆ print_desc_blue_deck()
| static void print_desc_blue_deck |
( |
BG_POINT |
pos | ) |
|
|
static |
Print the decription of the Blue Deck.
" "
" +1 hand "
" every Round "
" "
" "
- Parameters
-
| pos | position of the rectagle to print the description to |
Definition at line 113 of file deck_types.c.
◆ print_desc_green_deck()
| static void print_desc_green_deck |
( |
BG_POINT |
pos | ) |
|
|
static |
Print the decription of the Green Deck.
"End of Round:"
" "
"-$2 per Hand "
"-$2 per Disc."
"-No Interest "
- Parameters
-
| pos | position of the rectagle to print the description to |
Definition at line 181 of file deck_types.c.
◆ print_desc_painted_deck()
| static void print_desc_painted_deck |
( |
BG_POINT |
pos | ) |
|
|
static |
Print the decription of the Painted Deck.
" "
"+2 Hand size "
"-1 Joker slot"
" "
" "
- Parameters
-
| pos | position of the rectagle to print the description to |
Definition at line 277 of file deck_types.c.
◆ print_desc_red_deck()
| static void print_desc_red_deck |
( |
BG_POINT |
pos | ) |
|
|
static |
Print the decription of the Red Deck.
" "
" +1 discard "
" every Round "
" "
" "
- Parameters
-
| pos | position of the rectagle to print the description to |
Definition at line 79 of file deck_types.c.
◆ print_desc_yellow_deck()
| static void print_desc_yellow_deck |
( |
BG_POINT |
pos | ) |
|
|
static |
Print the decription of the Yellow Deck.
" "
" Start with "
"an extra $10 "
" "
" "
- Parameters
-
| pos | position of the rectagle to print the description to |
Definition at line 147 of file deck_types.c.
◆ print_empty_desc_line()
| static void print_empty_desc_line |
( |
int |
pos_x, |
|
|
int |
pos_y |
|
) |
| |
|
inlinestatic |
Print an empty string of 13 characters long at given coordinates. Reduces boilerplate in deck descriptions functions.
- Parameters
-
Definition at line 63 of file deck_types.c.
◆ deck_description_functions
| const PrintDescCallback deck_description_functions[DECK_TYPE_MAX] |
|
static |
Initial value:= {
}
static void print_desc_yellow_deck(BG_POINT pos)
Print the decription of the Yellow Deck.
static void print_desc_black_deck(BG_POINT pos)
Print the decription of the Black Deck.
static void print_desc_painted_deck(BG_POINT pos)
Print the decription of the Painted Deck.
static void print_desc_blue_deck(BG_POINT pos)
Print the decription of the Blue Deck.
static void print_desc_green_deck(BG_POINT pos)
Print the decription of the Green Deck.
static void print_desc_red_deck(BG_POINT pos)
Print the decription of the Red Deck.
Definition at line 34 of file deck_types.c.
◆ DECK_NAMES
| const char DECK_NAMES[DECK_TYPE_MAX][DECK_NAME_LENGTH] |
|
static |
Initial value:= {
" Red Deck ",
" Blue Deck ",
" Yellow Deck ",
" Green Deck ",
" Black Deck ",
"Painted Deck "
}
List of DeckType names, all formatted to be centered in a string of 13 characters.
Definition at line 17 of file deck_types.c.