Subversion Repositories Games.Chess Giants

Rev

Rev 81 | Rev 130 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 81 Rev 116
Line 1435... Line 1435...
1435
      {
1435
      {
1436
         Debug_Log (L"===Server tells us that black [resigns|forfeits|loses adjudication]: white wins!===\n");
1436
         Debug_Log (L"===Server tells us that black [resigns|forfeits|loses adjudication]: white wins!===\n");
1437
         the_board.game_state = STATE_WHITEWIN_RESIGNORFORFEIT; // remember game state
1437
         the_board.game_state = STATE_WHITEWIN_RESIGNORFORFEIT; // remember game state
1438
      }
1438
      }
1439
 
1439
 
1440
      // if white player is human, play the victory sound, else, play defeat sound
1440
      // if white player is human, play the victory sound, else, play defeat sound at the center of the board
1441
      Audio_PlaySound (the_board.players[COLOR_WHITE].type == PLAYER_HUMAN ? SOUNDTYPE_VICTORY : SOUNDTYPE_DEFEAT);
1441
      Audio_PlaySound (the_board.players[COLOR_WHITE].type == PLAYER_HUMAN ? SOUNDTYPE_VICTORY : SOUNDTYPE_DEFEAT, 0.0f, 0.0f, 0.04f);
1442
   }
1442
   }
1443
 
1443
 
1444
   // else do the black win ?
1444
   // else do the black win ?
1445
   else if (wcsstr (field_start, L"} 0-1") != NULL)
1445
   else if (wcsstr (field_start, L"} 0-1") != NULL)
1446
   {
1446
   {
Line 1456... Line 1456...
1456
      {
1456
      {
1457
         Debug_Log (L"===Server tells us that white [resigns|forfeits|loses adjudication]: black wins!===\n");
1457
         Debug_Log (L"===Server tells us that white [resigns|forfeits|loses adjudication]: black wins!===\n");
1458
         the_board.game_state = STATE_BLACKWIN_RESIGNORFORFEIT; // remember game state
1458
         the_board.game_state = STATE_BLACKWIN_RESIGNORFORFEIT; // remember game state
1459
      }
1459
      }
1460
 
1460
 
1461
      // if black player is human, play the victory sound, else, play defeat sound
1461
      // if black player is human, play the victory sound, else, play defeat sound at the center of the board
1462
      Audio_PlaySound (the_board.players[COLOR_BLACK].type == PLAYER_HUMAN ? SOUNDTYPE_VICTORY : SOUNDTYPE_DEFEAT);
1462
      Audio_PlaySound (the_board.players[COLOR_BLACK].type == PLAYER_HUMAN ? SOUNDTYPE_VICTORY : SOUNDTYPE_DEFEAT, 0.0f, 0.0f, 0.04f);
1463
   }
1463
   }
1464
 
1464
 
1465
   // else is it a draw ?
1465
   // else is it a draw ?
1466
   else if (wcsstr (field_start, L"} 1/2-1/2") != NULL)
1466
   else if (wcsstr (field_start, L"} 1/2-1/2") != NULL)
1467
   {
1467
   {
Line 1484... Line 1484...
1484
      {
1484
      {
1485
         Debug_Log (L"===Server tells us it's a draw for another reason: game is a draw===\n");
1485
         Debug_Log (L"===Server tells us it's a draw for another reason: game is a draw===\n");
1486
         the_board.game_state = STATE_DRAW_OTHER; // remember game state
1486
         the_board.game_state = STATE_DRAW_OTHER; // remember game state
1487
      }
1487
      }
1488
 
1488
 
1489
      // play a defeat sound
1489
      // play a defeat sound at the center of the board
1490
      Audio_PlaySound (SOUNDTYPE_DEFEAT);
1490
      Audio_PlaySound (SOUNDTYPE_DEFEAT, 0.0f, 0.0f, 0.04f);
1491
   }
1491
   }
1492
 
1492
 
1493
   // else is it an adjournment ?
1493
   // else is it an adjournment ?
1494
   else if (wcsstr (field_start, L"} *") != NULL)
1494
   else if (wcsstr (field_start, L"} *") != NULL)
1495
   {
1495
   {