implement feedback
This commit is contained in:
@@ -35,6 +35,8 @@
|
|||||||
#define NUM_RANKS 13
|
#define NUM_RANKS 13
|
||||||
#define RANK_OFFSET 2 // Because the first rank is 2 and ranks start at 0
|
#define RANK_OFFSET 2 // Because the first rank is 2 and ranks start at 0
|
||||||
|
|
||||||
|
#define IMPOSSIBLY_HIGH_CARD_VALUE 99
|
||||||
|
|
||||||
// Card types
|
// Card types
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
// Tile size in pixels, both height and width as tiles are square
|
// Tile size in pixels, both height and width as tiles are square
|
||||||
#define TILE_SIZE 8
|
#define TILE_SIZE 8
|
||||||
|
#define EFFECT_TEXT_SEPARATION_AMOUNT 32; // If we need to show multiple effects at once
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
+4
-4
@@ -243,7 +243,7 @@ bool joker_object_score(JokerObject *joker_object, Card* scored_card, int *chips
|
|||||||
tte_set_special(0xD000); // Blue
|
tte_set_special(0xD000); // Blue
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "+%d", joker_effect.chips);
|
snprintf(score_buffer, sizeof(score_buffer), "+%d", joker_effect.chips);
|
||||||
tte_write(score_buffer);
|
tte_write(score_buffer);
|
||||||
cursorPosX += 30;
|
cursorPosX += EFFECT_TEXT_SEPARATION_AMOUNT;
|
||||||
}
|
}
|
||||||
if (joker_effect.mult > 0)
|
if (joker_effect.mult > 0)
|
||||||
{
|
{
|
||||||
@@ -252,7 +252,7 @@ bool joker_object_score(JokerObject *joker_object, Card* scored_card, int *chips
|
|||||||
tte_set_special(0xE000); // Red
|
tte_set_special(0xE000); // Red
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "+%d", joker_effect.mult);
|
snprintf(score_buffer, sizeof(score_buffer), "+%d", joker_effect.mult);
|
||||||
tte_write(score_buffer);
|
tte_write(score_buffer);
|
||||||
cursorPosX += 30;
|
cursorPosX += EFFECT_TEXT_SEPARATION_AMOUNT;
|
||||||
}
|
}
|
||||||
if (joker_effect.xmult > 0)
|
if (joker_effect.xmult > 0)
|
||||||
{
|
{
|
||||||
@@ -261,7 +261,7 @@ bool joker_object_score(JokerObject *joker_object, Card* scored_card, int *chips
|
|||||||
tte_set_special(0xE000); // Red
|
tte_set_special(0xE000); // Red
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "X%d", joker_effect.xmult);
|
snprintf(score_buffer, sizeof(score_buffer), "X%d", joker_effect.xmult);
|
||||||
tte_write(score_buffer);
|
tte_write(score_buffer);
|
||||||
cursorPosX += 30;
|
cursorPosX += EFFECT_TEXT_SEPARATION_AMOUNT;
|
||||||
}
|
}
|
||||||
if (joker_effect.money > 0)
|
if (joker_effect.money > 0)
|
||||||
{
|
{
|
||||||
@@ -270,7 +270,7 @@ bool joker_object_score(JokerObject *joker_object, Card* scored_card, int *chips
|
|||||||
tte_set_special(0xC000); // Yellow
|
tte_set_special(0xC000); // Yellow
|
||||||
snprintf(score_buffer, sizeof(score_buffer), "+%d", joker_effect.money);
|
snprintf(score_buffer, sizeof(score_buffer), "+%d", joker_effect.money);
|
||||||
tte_write(score_buffer);
|
tte_write(score_buffer);
|
||||||
cursorPosX += 30;
|
cursorPosX += EFFECT_TEXT_SEPARATION_AMOUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
joker_object->joker->processed = true; // Mark the joker as processed
|
joker_object->joker->processed = true; // Mark the joker as processed
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ static JokerEffect raised_fist_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
|
|
||||||
// Find the lowest rank card in hand
|
// Find the lowest rank card in hand
|
||||||
// Aces are always considered high value, even in an ace-low straight
|
// Aces are always considered high value, even in an ace-low straight
|
||||||
u8 lowest_value = 99;
|
u8 lowest_value = IMPOSSIBLY_HIGH_CARD_VALUE;
|
||||||
CardObject** hand = get_hand_array();
|
CardObject** hand = get_hand_array();
|
||||||
int hand_top = get_hand_top();
|
int hand_top = get_hand_top();
|
||||||
for (int i = 0; i < hand_top; i++ )
|
for (int i = 0; i < hand_top; i++ )
|
||||||
|
|||||||
Reference in New Issue
Block a user