Subversion Repositories Games.Chess Giants

Rev

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

Rev 154 Rev 171
Line 30... Line 30...
30
#include "resource/resource.h"
30
#include "resource/resource.h"
31
 
31
 
32
 
32
 
33
// link with specific libraries
33
// link with specific libraries
34
#pragma comment (lib, "comctl32.lib") // for ImageList_*()
34
#pragma comment (lib, "comctl32.lib") // for ImageList_*()
35
#pragma comment (lib, "winmm.lib") // for PlaySound()
-
 
36
#pragma comment (lib, "ws2_32.lib") // for network
35
#pragma comment (lib, "ws2_32.lib") // for network
37
 
36
 
38
 
37
 
39
// global preprocessor defines
38
// global preprocessor defines
40
#include "defines.h"
39
#include "defines.h"
Line 176... Line 175...
176
   float view_distance; // current view distance to the table center
175
   float view_distance; // current view distance to the table center
177
   float custom_pitch; // user-saved view pitch
176
   float custom_pitch; // user-saved view pitch
178
   float custom_yaw; // user-saved view yaw
177
   float custom_yaw; // user-saved view yaw
179
   float custom_distance; // user-saved view distance
178
   float custom_distance; // user-saved view distance
180
   bool wants_cancel; // set to TRUE when this player wants to cancel its last move
179
   bool wants_cancel; // set to TRUE when this player wants to cancel its last move
-
 
180
   bool should_wakeup; // set to TRUE when the current player has just changed to us
181
 
181
 
182
   // PLAYER_HUMAN related data
182
   // PLAYER_HUMAN related data
183
 
183
 
184
   // PLAYER_COMPUTER related data
184
   // PLAYER_COMPUTER related data
185
   bool wants_hint;
185
   bool wants_hint;
Line 191... Line 191...
191
   bool is_in_game;
191
   bool is_in_game;
192
   int game_number;
192
   int game_number;
193
   int remaining_seconds;
193
   int remaining_seconds;
194
 
194
 
195
   // PLAYER_COMPUTER and PLAYER_INTERNET related data
195
   // PLAYER_COMPUTER and PLAYER_INTERNET related data
-
 
196
   float sleep_time; // date until which that player should not think at all
196
   bool sendbuffer_locked; // set to TRUE if a thread currently locks the send buffer
197
   bool sendbuffer_locked; // set to TRUE if a thread currently locks the send buffer
197
   wchar_t *sendbuffer; // used both for PLAYER_COMPUTER and PLAYER_INTERNET, mallocated
198
   wchar_t *sendbuffer; // used both for PLAYER_COMPUTER and PLAYER_INTERNET, mallocated
198
   int sendbuffer_size; // size of the sendbuffer buffer
199
   int sendbuffer_size; // size of the sendbuffer buffer
199
   char *ascii_recvbuffer; // mallocated
200
   char *ascii_recvbuffer; // mallocated
200
   wchar_t *recvbuffer; // used both for PLAYER_COMPUTER and PLAYER_INTERNET, mallocated
201
   wchar_t *recvbuffer; // used both for PLAYER_COMPUTER and PLAYER_INTERNET, mallocated
Line 248... Line 249...
248
   int selected_position[2]; // this chess board's selected position ([line][column] array)
249
   int selected_position[2]; // this chess board's selected position ([line][column] array)
249
   boardmove_t *moves; // array of moves describing the game (mallocated)
250
   boardmove_t *moves; // array of moves describing the game (mallocated)
250
   int move_count; // amount of moves in this game so far
251
   int move_count; // amount of moves in this game so far
251
   int viewed_move; // index of the move currently viewed (for watching game history)
252
   int viewed_move; // index of the move currently viewed (for watching game history)
252
   player_t players[2]; // game state data structure for both opposing sides (COLOR_BLACK and COLOR_WHITE)
253
   player_t players[2]; // game state data structure for both opposing sides (COLOR_BLACK and COLOR_WHITE)
253
   bool has_playerchanged; // set to TRUE when the current player has just changed
-
 
254
   bool want_playerswap; // set to TRUE when a players swap is requested
254
   bool want_playerswap; // set to TRUE when a players swap is requested
255
   int game_state; // one of the STATE_XXX #defines that describe the game and victory state
255
   int game_state; // one of the STATE_XXX #defines that describe the game and victory state
256
   float lastmove_time; // date of last move
256
   float lastmove_time; // date of last move
257
   bool reevaluate; // set to TRUE if the game state should be reevaluated
257
   bool reevaluate; // set to TRUE if the game state should be reevaluated
258
} board_t;
258
} board_t;