Add option to enable a more readable deck, suggestion by @Turro75 (#495)

* Options menu revamp

* Implement readable card sprites

* redraw characters to fix the original style

* clang format

* remove usage of UNDEFINED (-1) for unsigned values

* typo

* change save fix for something cleaner

* remove dependency to game_variables.h from card.c

* Make the palette look less silly ^^'

* Address @ricfehr3's comments

* clang format

* quick rename

* clang format

---------

Co-authored-by: MathisMartin31 <mathis.martin31@gmail.com>
This commit is contained in:
Geralt
2026-05-25 11:00:37 -07:00
committed by GitHub
co-authored by MathisMartin31
parent 92cb9f9883
commit d3c0357856
10 changed files with 172 additions and 110 deletions
+9 -3
View File
@@ -40,6 +40,10 @@
#define IMPOSSIBLY_HIGH_CARD_VALUE 100
// Card sprites
#define DEFAULT_HIGH_CONTRAST false
#define DEFAULT_MORE_READABLE false
// Card types
typedef struct Card
{
@@ -54,9 +58,11 @@ typedef struct CardObject
bool selected;
} CardObject;
// Card functions
void card_init();
void toggle_high_contrast_cards(bool enable);
// Card sprites accessibility functions
void set_cards_high_contrast(bool enable);
void set_cards_more_readable(bool enable);
bool get_cards_high_contrast(void);
bool get_cards_more_readable(void);
// Card methods
Card* card_new(u8 suit, u8 rank);
+3 -5
View File
@@ -19,10 +19,9 @@
#define VOLUME_OPTION_MAX 5
#define VOLUME_OPTION_INCREMENT 20
#define DEFAULT_GAME_SPEED 1
#define DEFAULT_HIGH_CONTRAST false
#define DEFAULT_MUSIC_VOLUME VOLUME_OPTION_MAX
#define DEFAULT_SOUND_VOLUME VOLUME_OPTION_MAX
#define DEFAULT_GAME_SPEED 1
#define DEFAULT_MUSIC_VOLUME VOLUME_OPTION_MAX
#define DEFAULT_SOUND_VOLUME VOLUME_OPTION_MAX
#define MAX_HANDS 4
#define MAX_DISCARDS 4
@@ -66,7 +65,6 @@ typedef struct
// BY DEFAULT IS SET TO 1, but if changed to 2 or more, should speed up all (or most) of the
// game aspects that should be sped up by speed, as in the original game.
u8 game_speed;
bool high_contrast;
u8 music_volume;
u8 sound_volume;
} GameVariables;