Subversion Repositories Games.Chess Giants

Rev

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

Rev 59 Rev 75
Line 131... Line 131...
131
         DialogBox_Save (); // fire up the save dialog box
131
         DialogBox_Save (); // fire up the save dialog box
132
 
132
 
133
      // game menu, save position as
133
      // game menu, save position as
134
      else if (wParam_loword == MENUID_GAME_SAVEPOSITIONAS)
134
      else if (wParam_loword == MENUID_GAME_SAVEPOSITIONAS)
135
         DialogBox_SavePosition (); // fire up the save position dialog box
135
         DialogBox_SavePosition (); // fire up the save position dialog box
-
 
136
 
-
 
137
      // game menu, pause
-
 
138
      else if (wParam_loword == MENUID_GAME_PAUSE)
-
 
139
      {
-
 
140
         is_paused ^= true; // toggle game pause state on/off
-
 
141
         CheckMenuItem (GetMenu (hWnd), MENUID_GAME_PAUSE, (is_paused ? MF_CHECKED : MF_UNCHECKED)); // highlight the menu entry as necessary
-
 
142
         the_board.reevaluate = true; // evaluate board again
-
 
143
      }
136
 
144
 
137
      // game menu, resign
145
      // game menu, resign
138
      else if (wParam_loword == MENUID_GAME_RESIGN)
146
      else if (wParam_loword == MENUID_GAME_RESIGN)
139
         DialogBox_Resign (); // if a game has started, ask for confirmation
147
         DialogBox_Resign (); // if a game has started, ask for confirmation
140
 
148
 
Line 176... Line 184...
176
         DialogBox_GoToMove (); // fire up the go to move dialog box
184
         DialogBox_GoToMove (); // fire up the go to move dialog box
177
 
185
 
178
      // chessboard menu, swap sides
186
      // chessboard menu, swap sides
179
      else if (wParam_loword == MENUID_CHESSBOARD_SWAPSIDES)
187
      else if (wParam_loword == MENUID_CHESSBOARD_SWAPSIDES)
180
         the_board.want_playerswap = true; // remember board sides are to be swapped
188
         the_board.want_playerswap = true; // remember board sides are to be swapped
-
 
189
 
-
 
190
      // chessboard menu, rename players
-
 
191
      else if (wParam_loword == MENUID_CHESSBOARD_RENAMESIDES)
-
 
192
         DialogBox_RenameSides(); // fire up the rename sides dialog box
181
 
193
 
182
      // chessboard menu, beginning of game
194
      // chessboard menu, beginning of game
183
      else if (wParam_loword == MENUID_CHESSBOARD_BEGINNINGOFGAME)
195
      else if (wParam_loword == MENUID_CHESSBOARD_BEGINNINGOFGAME)
184
      {
196
      {
185
         the_board.viewed_move = 0; // enter view mode and go to the beginning of the game
197
         the_board.viewed_move = 0; // enter view mode and go to the beginning of the game
Line 483... Line 495...
483
      // get current player and see if we're online
495
      // get current player and see if we're online
484
      current_player = Player_GetCurrent ();
496
      current_player = Player_GetCurrent ();
485
      remote_player = Player_FindByType (PLAYER_INTERNET);
497
      remote_player = Player_FindByType (PLAYER_INTERNET);
486
 
498
 
487
      // if we are not allowed to select anything, don't even try
499
      // if we are not allowed to select anything, don't even try
488
      if ((current_player->type != PLAYER_HUMAN) || (the_board.viewed_move != the_board.move_count - 1)
500
      if (is_paused || (current_player->type != PLAYER_HUMAN) || (the_board.viewed_move != the_board.move_count - 1)
489
          || ((remote_player != NULL) && !remote_player->is_in_game))
501
          || ((remote_player != NULL) && !remote_player->is_in_game))
490
      {
502
      {
491
         the_scene.update = true; // update the 3D scene
503
         the_scene.update = true; // update the 3D scene
492
 
504
 
493
         // call the default window message processing function to keep things going
505
         // call the default window message processing function to keep things going