Rev 185 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 185 | Rev 193 | ||
---|---|---|---|
Line 131... | Line 131... | ||
131 | void Scene_Update (scene_t *scene, board_t *board) |
131 | void Scene_Update (scene_t *scene, board_t *board) |
132 | { |
132 | { |
133 | // this function updates the scene objects to display with what's currently on the board |
133 | // this function updates the scene objects to display with what's currently on the board |
134 | 134 | ||
135 | static bool rooksound_played = false; // hack to have two sounds when a king castles |
135 | static bool rooksound_played = false; // hack to have two sounds when a king castles |
- | 136 | static wchar_t displayed_pgntext[16] = L""; |
|
136 | 137 | ||
137 | boardslot_t *boardslot; |
138 | boardslot_t *boardslot; |
138 | boardmove_t *currentmove; |
139 | boardmove_t *currentmove; |
139 | player_t *local_player; |
140 | player_t *local_player; |
140 | player_t *network_player; |
141 | player_t *network_player; |
Line 1057... | Line 1058... | ||
1057 | // every move pair, append move pair number |
1058 | // every move pair, append move pair number |
1058 | if (move_index % 2 == 1) |
1059 | if (move_index % 2 == 1) |
1059 | swprintf_s (&history_text[length], historytext_size - length, L"%d. ", 1 + move_index / 2); |
1060 | swprintf_s (&history_text[length], historytext_size - length, L"%d. ", 1 + move_index / 2); |
1060 | 1061 | ||
1061 | // append move text |
1062 | // append move text |
- | 1063 | Move_DescribeInSAN (&board->moves[move_index], &board->moves[move_index - 2], displayed_pgntext, WCHAR_SIZEOF (displayed_pgntext), true); // use localized part letters |
|
1062 | wcscat_s (history_text, historytext_size, |
1064 | wcscat_s (history_text, historytext_size, displayed_pgntext); |
1063 | wcscat_s (history_text, historytext_size, L" "); |
1065 | wcscat_s (history_text, historytext_size, L" "); |
1064 | 1066 | ||
1065 | // every odd move, drop a newline |
1067 | // every odd move, drop a newline |
1066 | if (move_index % 2 == 0) |
1068 | if (move_index % 2 == 0) |
1067 | wcscat_s (history_text, historytext_size, L"\n"); |
1069 | wcscat_s (history_text, historytext_size, L"\n"); |