Merge pull request #66 from cellos51/bug_fixes
Fixed a bug where selecting discard with 0 discards would toggle card select and extracted function game_playing_process_hand_select_input() from game_playing_process_input_and_state()
This commit is contained in:
+9
-4
@@ -1038,9 +1038,7 @@ void game_init()
|
|||||||
tte_printf("#{P:%d,%d; cx:0xC000}%d#{cx:0xF000}/%d", ANTE_TEXT_RECT.left, ANTE_TEXT_RECT.top, ante, MAX_ANTE); // Ante
|
tte_printf("#{P:%d,%d; cx:0xC000}%d#{cx:0xF000}/%d", ANTE_TEXT_RECT.left, ANTE_TEXT_RECT.top, ante, MAX_ANTE); // Ante
|
||||||
}
|
}
|
||||||
|
|
||||||
static void game_playing_process_input_and_state()
|
static void game_playing_process_hand_select_input()
|
||||||
{
|
|
||||||
if (hand_state == HAND_SELECT)
|
|
||||||
{
|
{
|
||||||
static bool discard_button_highlighted = false; // true = play button highlighted, false = discard button highlighted
|
static bool discard_button_highlighted = false; // true = play button highlighted, false = discard button highlighted
|
||||||
|
|
||||||
@@ -1120,19 +1118,26 @@ static void game_playing_process_input_and_state()
|
|||||||
{
|
{
|
||||||
memcpy16(&pal_bg_mem[1], &pal_bg_mem[7], 1); // Play button highlight color
|
memcpy16(&pal_bg_mem[1], &pal_bg_mem[7], 1); // Play button highlight color
|
||||||
memcpy16(&pal_bg_mem[9], &pal_bg_mem[12], 1); // Discard button highlight color
|
memcpy16(&pal_bg_mem[9], &pal_bg_mem[12], 1); // Discard button highlight color
|
||||||
}
|
|
||||||
|
|
||||||
if (key_hit(SELECT_CARD))
|
if (key_hit(SELECT_CARD))
|
||||||
{
|
{
|
||||||
hand_select();
|
hand_select();
|
||||||
set_hand();
|
set_hand();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (key_hit(SORT_HAND))
|
if (key_hit(SORT_HAND))
|
||||||
{
|
{
|
||||||
hand_change_sort();
|
hand_change_sort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void game_playing_process_input_and_state()
|
||||||
|
{
|
||||||
|
if (hand_state == HAND_SELECT)
|
||||||
|
{
|
||||||
|
game_playing_process_hand_select_input();
|
||||||
|
}
|
||||||
else if (play_state == PLAY_ENDING)
|
else if (play_state == PLAY_ENDING)
|
||||||
{
|
{
|
||||||
if (mult > 0)
|
if (mult > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user