Subversion Repositories Games.Chess Giants

Rev

Rev 124 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 124 Rev 140
Line 18... Line 18...
18
 
18
 
19
void DialogBox_Takeback (int howmany_halfmoves)
19
void DialogBox_Takeback (int howmany_halfmoves)
20
{
20
{
21
   // helper function to fire up the modeless dialog box
21
   // helper function to fire up the modeless dialog box
22
 
22
 
-
 
23
   is_dialogbox_displayed = true;
23
   _beginthread (StartThread_ThisDialog, 0, (void *) howmany_halfmoves); // fire up the thread
24
   _beginthread (StartThread_ThisDialog, 0, (void *) howmany_halfmoves); // fire up the thread
24
   return; // return as soon as the thread is fired up
25
   return; // return as soon as the thread is fired up
25
}
26
}
26
 
27
 
27
 
28
 
Line 56... Line 57...
56
   player_t *network_player;
57
   player_t *network_player;
57
   int interlocutor_index;
58
   int interlocutor_index;
58
   int howmany_halfmoves;
59
   int howmany_halfmoves;
59
   HWND hParentWnd;
60
   HWND hParentWnd;
60
   int retval;
61
   int retval;
61
   int error;
62
   //int error;
62
 
63
 
63
   howmany_halfmoves = (int) thread_parms;
64
   howmany_halfmoves = (int) thread_parms;
64
   network_player = Player_FindByType (PLAYER_INTERNET); // quick access to network player
65
   network_player = Player_FindByType (PLAYER_INTERNET); // quick access to network player
65
   if (network_player == NULL)
66
   if (network_player == NULL)
66
      return; // consistency check
67
      return; // consistency check
Line 74... Line 75...
74
         break; // break as soon as we find it
75
         break; // break as soon as we find it
75
      }
76
      }
76
 
77
 
77
   // display the dialog box
78
   // display the dialog box
78
   retval = DialogBoxParam (hAppInstance, MAKEINTRESOURCE (THIS_DIALOG), hParentWnd, DialogProc_ThisDialog, (LPARAM) howmany_halfmoves);
79
   retval = DialogBoxParam (hAppInstance, MAKEINTRESOURCE (THIS_DIALOG), hParentWnd, DialogProc_ThisDialog, (LPARAM) howmany_halfmoves);
-
 
80
   is_dialogbox_displayed = false;
79
   error = GetLastError ();
81
   //error = GetLastError ();
80
   is_takebackaccepted = (retval != 0);
82
   is_takebackaccepted = (retval != 0);
81
   is_dialogbox_takeback_validated = true;
83
   is_dialogbox_takeback_validated = true;
82
 
84
 
83
   the_board.reevaluate = true; // refresh the GUI buttons if needed
85
   the_board.reevaluate = true; // refresh the GUI buttons if needed
84
   return; // _endthread() implied
86
   return; // _endthread() implied