diff options
| author | Mario Kilies <MarioKilies@GMX.net> | 2011-01-25 23:02:40 +0100 |
|---|---|---|
| committer | Mario Kilies <MarioKilies@GMX.net> | 2011-01-25 23:02:40 +0100 |
| commit | b3125e386140a040d8eff57ab9258eaafc60d983 (patch) | |
| tree | 37f2dd7bf2c4cf45010be7b55de4dcaa0d020ab8 /src/client_game_states.c | |
| parent | 92f8870fa7a75be8458e35fb8de51965c5c33d91 (diff) | |
Added optional highlighting of messages in the message window.
Diffstat (limited to 'src/client_game_states.c')
| -rw-r--r-- | src/client_game_states.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client_game_states.c b/src/client_game_states.c index 49870ed..3fe262f 100644 --- a/src/client_game_states.c +++ b/src/client_game_states.c @@ -2,12 +2,13 @@ #include "net/comm.h" #include "ui.h" #include "data_store.h" +#include <unistd.h> game_state_t state_client_wait_for_hand_cards(const int sock, const uint8_t round) { data_store_t *d = data_store(); - ui_display_wnd_messages("Waiting for hand cards from server"); + ui_display_wnd_messages("Waiting for hand cards from server", false); if(round == 1) { @@ -29,7 +30,7 @@ game_state_t state_client_select_open_card(const int sock) data_store_t *d = data_store(); uint8_t open_card_idx; - ui_display_wnd_messages("Please choose the card you want to play"); + ui_display_wnd_messages("Please choose the card you want to play", true); // Select open card open_card_idx = ui_choose_card(&d->hand); @@ -49,7 +50,7 @@ game_state_t state_client_wait_for_open_cards(const int sock) { data_store_t *d = data_store(); - ui_display_wnd_messages("Waiting for the other players to pick their cards"); // The two spaces between 'pick' and 'their' are intentionally and used for poor man's word wrap + ui_display_wnd_messages("Waiting for the other players to pick their cards", false); // The two spaces between 'pick' and 'their' are intentionally and used for poor man's word wrap net_recv(sock, msg_type_selected_card_all); player_list_sort_by_open_card(&d->player_list, d->player_list.count); // sort in ascending order @@ -79,12 +80,12 @@ game_state_t state_client_play_cards(const int sock) { if(our_turn) // our turn to select stack { - ui_display_wnd_messages("Please choose a stack"); + ui_display_wnd_messages("Please choose a stack", true); ds->stack_index = ui_choose_stack(&ds->table_stacks); net_send(sock, msg_type_selected_stack_c, NULL); } - ui_display_wnd_messages("Waiting for chosen stack"); + ui_display_wnd_messages("Waiting for player to choose stack", false); net_recv(sock, msg_type_selected_stack_s); ds->player_list.players[i].score += card_stack_get_points(&ds->table_stacks.stacks[ds->stack_index]); card_stack_replace(&ds->table_stacks.stacks[ds->stack_index], c); @@ -121,7 +122,7 @@ game_state_t state_client_play_cards(const int sock) // Wait between player turns, but not after the last one if (i != ds->player_list.count - 1) - sleep(3); + sleep(2); } if(hand_count_cards(&ds->hand) > 0) // still cards in hand? |
