- // prototypes.h 
-   
- #ifndef PROTOTYPES_H 
- #define PROTOTYPES_H 
-   
-   
- // audio.cpp function prototypes 
- void Audio_Think (void); 
- void Audio_PlaySound (int sound_type); 
-   
- // board.cpp function prototypes 
- bool Board_Init (board_t *board, int white_playertype, int black_playertype, wchar_t *fen_string); 
- void Board_Shutdown (board_t *board); 
- bool Board_Reset (board_t *board, wchar_t *fen_string); 
- bool Board_Think (board_t *board); 
- void Board_SwapSides (board_t *board); 
- void Board_SetSelectedAndHovered (board_t *board, int selected_line, int selected_column, int hovered_line, int hovered_column); 
- char Board_ColorToMove (board_t *board); 
- void Board_AppendMove (board_t *board, int from_line, int from_column, int to_line, int to_column, char promotion_type, wchar_t *comment); 
-   
- // challenge.cpp function prototypes 
- void Challenges_Init (void); 
- void Challenges_Shutdown (void); 
- challenge_t *Challenge_FindOrCreate (const wchar_t *nickname); 
- challenge_t *Challenge_Find (const wchar_t *nickname); 
- void Challenge_UpdateData (challenge_t *challenge, challenge_t *new_challenge); 
-   
- // chessengine.cpp function prototypes 
- bool PlayerEngine_Init (player_t *player); 
- void PlayerEngine_Shutdown (player_t *player); 
- bool PlayerEngine_Think (player_t *player); 
-   
- // config.cpp function prototypes 
- void Config_Load (void); 
- void Config_Save (void); 
-   
- // fenfile.cpp function prototypes 
- bool FENFile_Load (const wchar_t *fenfile_pathname, wchar_t *fen_string, int fenstring_maxsize); 
- bool FENFile_Save (const wchar_t *fenfile_pathname, wchar_t *fen_string); 
-   
- // hyperlinks.cpp function prototypes 
- void ConvertStaticToHyperlink (HWND hWndStatic); 
-   
- // inifile.cpp function prototypes 
- void *INIFile_NewINIFile (void); 
- int INIFile_GetNumberOfSections (void *ini_data); 
- wchar_t *INIFile_GetSectionName (void *ini_data, int section_index); 
- int INIFile_GetNumberOfEntries (void  *ini_data, wchar_t *section); 
- wchar_t *INIFile_GetEntryName (void *ini_data, wchar_t *section, int entry_index); 
- unsigned char INIFile_ReadEntryAsBool (void *ini_data, wchar_t *section, wchar_t *entry, unsigned char default_value); 
- long INIFile_ReadEntryAsLong (void *ini_data, wchar_t *section, wchar_t *entry, long default_value); 
- unsigned long INIFile_ReadEntryAsUnsignedLong (void *ini_data, wchar_t *section, wchar_t *entry, unsigned long default_value); 
- double INIFile_ReadEntryAsDouble (void *ini_data, wchar_t *section, wchar_t *entry, double default_value); 
- wchar_t *INIFile_ReadEntryAsString (void *ini_data, wchar_t *section, wchar_t *entry, wchar_t *default_value); 
- void INIFile_WriteEntryAsBool (void *ini_data, wchar_t *section, wchar_t *entry, unsigned char value); 
- void INIFile_WriteEntryAsLong (void *ini_data, wchar_t *section, wchar_t *entry, long value); 
- void INIFile_WriteEntryAsUnsignedLong (void *ini_data, wchar_t *section, wchar_t *entry, unsigned long value); 
- void INIFile_WriteEntryAsDouble (void *ini_data, wchar_t *section, wchar_t *entry, double value); 
- void INIFile_WriteEntryAsString (void *ini_data, wchar_t *section, wchar_t *entry, wchar_t *value); 
- void INIFile_DeleteEntry (void *ini_data, wchar_t *section, wchar_t *entry); 
- void INIFile_DeleteSection (void *ini_data, wchar_t *section); 
- void *INIFile_LoadINIFile (const wchar_t *filename); 
- unsigned char INIFile_SaveINIFile (const wchar_t *filename, void *ini_data); 
- void INIFile_FreeINIFile (void *ini_data); 
-   
- // interlocutor.cpp function prototypes 
- void Interlocutors_Init (void); 
- void Interlocutors_Shutdown (void); 
- interlocutor_t *Interlocutor_FindOrCreate (const wchar_t *nickname); 
- interlocutor_t *Interlocutor_FindByWindowHandle (HWND window_handle); 
- void Interlocutor_Chat (interlocutor_t *interlocutor, const wchar_t *sender, bool is_localsender, const wchar_t *fmt, ...); 
- void Interlocutor_Notify (interlocutor_t *interlocutor, const wchar_t *fmt, ...); 
-   
- // localizedtexts.cpp function prototypes 
- bool LocalizedTexts_Init (const wchar_t *fmt, ...); 
- void LocalizedTexts_Shutdown (void); 
- wchar_t *LocalizedTexts_GetLocalizedTextFor (wchar_t *id_string); 
-   
- // move.cpp function prototypes 
- void Move_SetSlot (boardmove_t *move, int line, int column, int color, int part_type); 
- bool Move_IsKingThreatenedAtLocation (boardmove_t *move, int color, int at_line, int at_column, int *threat_line, int *threat_column); 
- bool Move_IsCheck (boardmove_t *move, int color); 
- bool Move_IsStaleMate (boardmove_t *move, int color); 
- bool Move_IsMoveValid (boardmove_t *move, int from_line, int from_column, int to_line, int to_column); 
- bool Move_FindRandomMove (boardmove_t *move, int color, boardmove_t *random_move); 
- int Move_CountPartsByColorAndType (boardmove_t *move, int color, int part_type); 
- bool Move_IsColorInCheckAfterTestMove (boardmove_t *move, int source_line, int source_column, int target_line, int target_column, int color); 
- bool Move_IsColorInCheckAfterTestMoveEP (boardmove_t *move, int source_line, int source_column, int target_line, int target_column, int clear_line, int clear_column, int color); 
- void Move_DescribeInFEN (boardmove_t *move); 
- bool Move_SetupFromFEN (boardmove_t *move, wchar_t *fen_string); 
- bool Move_SetupFromStyle12 (boardmove_t *move, wchar_t *positions, int move_color, int pawnrush_column, 
-                             bool can_white_castle_short, bool can_white_castle_long, bool can_black_castle_short, bool can_black_castle_long, wchar_t *pretty_movestring); 
-   
- // network.cpp function prototypes 
- bool PlayerNetwork_Init (player_t *player); 
- void PlayerNetwork_Shutdown (player_t *player); 
- bool PlayerNetwork_Think (player_t *player); 
-   
- // network-eval.cpp function prototypes 
- void EvaluateServerReply_MOTD (player_t *player); 
- void EvaluateServerReply_Seek (player_t *player); 
- void EvaluateServerReply_Challenge (player_t *player); 
- void EvaluateServerReply_Finger (player_t *player); 
- void EvaluateServerReply_PrivateMessage (player_t *player); 
- void EvaluateServerReply_ChallengeAccepted (player_t *player); 
- void EvaluateServerReply_ChallengeDeclined (player_t *player); 
- void EvaluateServerReply_Takeback (player_t *player); 
- void EvaluateServerReply_TakebackDeclinedByOther (player_t *player); 
- void EvaluateServerReply_TakebackDeclinedByYou (player_t *player); 
- void EvaluateServerReply_PlayNotAllowed (player_t *player); 
- void EvaluateServerReply_PlayUnexistent (player_t *player); 
- void EvaluateServerReply_PlayWrongRating (player_t *player); 
- void EvaluateServerReply_Announcement (player_t *player); 
- void EvaluateServerReply_ChannelMessage (player_t *player); 
- void EvaluateServerReply_ChannelsAndMembers (player_t *player); 
- void EvaluateServerReply_SoughtList (player_t *player); 
- void EvaluateServerReply_PlayersList (player_t *player); 
- void EvaluateServerReply_GameStarting (player_t *player); 
- void EvaluateServerReply_GameState (player_t *player); 
- void EvaluateServerReply_GameResults (player_t *player); 
-   
- // pgnfile.cpp function prototypes 
- bool PGNFile_Load (const wchar_t *pgnfile_pathname); 
- bool PGNFile_LoadGame (board_t *board, const wchar_t *pgnfile_pathname, pgngame_t *game); 
- bool PGNFile_Save (board_t *board, const wchar_t *pgnfile_pathname); 
-   
- // player.cpp function prototypes 
- void Player_Init (player_t *player, int color, int type); 
- void Player_Shutdown (player_t *player); 
- void Player_ResetView (player_t *player); 
- bool Player_RotateTable (player_t *player, float frame_time); 
- bool Player_Think (player_t *player); 
- bool Player_SendBuffer_Add (player_t *player, int milliseconds_max, const wchar_t *fmt, ...); 
- player_t *Player_FindByType (int player_type); 
- player_t *Player_GetCurrent (void); 
- player_t *Player_GetOpposite (void); 
-   
- // playercard.cpp function prototypes 
- void PlayerCards_Init (void); 
- void PlayerCards_Shutdown (void); 
- playercard_t *PlayerCard_FindOrCreate (const wchar_t *nickname); 
- void PlayerCard_AppendPersonalData (playercard_t *playercard, const wchar_t *text); 
-   
- // render.cpp function prototypes 
- bool Render_Init (void); 
- void Render_Shutdown (void); 
- void Render_RenderFrame (scene_t *scene); 
- int Render_LoadMesh (const wchar_t *fmt, ...); 
- int Render_LoadTexture (const wchar_t *fmt, ...); 
- int Render_LoadFont (const wchar_t *font_name, int font_size, bool is_bold, bool is_italic); 
- int Render_LoadSprite (const wchar_t *fmt, ...); 
- int Render_MaterialIndexOf (const wchar_t *material_name); 
- void Render_MouseToFloor (short mouse_x, short mouse_y, float *floor_x, float *floor_y); 
- bool Render_IsMouseInBox (short mouse_x, short mouse_y, float x_percent, float y_percent, float width_percent, float height_percent); 
-   
- // safelib.cpp function prototypes 
- void *SAFE_malloc (int count, size_t element_size, bool cleanup); 
- void *SAFE_realloc (void *allocation, int old_count, int new_count, size_t element_size, bool cleanup); 
- void SAFE_free (void **address_of_pointer_to_allocation); 
-   
- // san.cpp function prototypes 
- bool Move_SetupFromSAN (boardmove_t *move, boardmove_t *new_move, int move_color); 
- bool Move_DescribeInSAN (boardmove_t *move); 
-   
- // scene.cpp function prototypes 
- void Scene_Init (scene_t *scene, board_t *board); 
- void Scene_Shutdown (scene_t *scene); 
- void Scene_Update (scene_t *scene, board_t *board); 
- void Scene_AddCCReply (scene_t *scene, wchar_t *nickname, wchar_t *channelname, unsigned long color_rgbx, wchar_t *fmt, ...); 
- void Scene_AddAnnouncement (scene_t *scene, wchar_t *fmt, ...); 
- void Scene_SetButton (guibutton_t *button, float left, float top, float width, float height, int sprite_index); 
- void Scene_SetText (guitext_t *text, float xpos_percent, float ypos_percent, float maxwidth_percent, int horizontal_align, int vertical_align, int text_align, int font_index, unsigned long color_rgba, float duration, bool want_fade, wchar_t *fmt, ...); 
-   
- // tabcontrol.cpp function prototypes 
- void *TabControl_New (HWND hTabControlWnd, WNDPROC ParentProc); 
- void TabControl_AddPage (void *tab_control, wchar_t *page_name, int dialog_id); 
- void TabControl_SelectTab (void *tab_control, int page_index); 
- HWND TabControl_GetItem (void *tab_control, int item_id); 
- void TabControl_Destroy (void *tab_control); 
- bool TabControl_Notify (NMHDR *notification); 
-   
- // theme.cpp function prototypes 
- bool Themes_Init (void); 
- void Themes_Shutdown (void); 
- void Theme_Load (theme_t *theme, bool want_all); 
- void Background_LoadImage (backgroundsprite_t *bg, const wchar_t *fmt, ...); 
-   
- // util.cpp function prototypes 
- const wchar_t *GetDirectoryPath (const wchar_t *pathname, wchar_t *path); 
- void CenterWindow (HWND hWnd, HWND hParentWnd); 
- void HintWindow (HWND hWnd); 
- float ProcessTime (void); 
- float WrapAngle (float angle); 
- bool SafeTerminateProcess (HANDLE hProcess, unsigned int uExitCode); 
- wchar_t *ReachBeginningOfCurrentLine (wchar_t *string, wchar_t *current_pos); 
- wchar_t *ReachBeginningOfNextLine (wchar_t *string, wchar_t *current_pos); 
- wchar_t *ReadACompleteLine (wchar_t *destination_line, int max_length, wchar_t *source_buffer); 
- wchar_t *wcsgets (wchar_t *destination_line, int max_length, wchar_t *source_buffer); 
- wchar_t *wcsistr (const wchar_t *haystack, const wchar_t *needle); 
- void ConvertCRLFsToSingleSpaces (wchar_t *multiline_string); 
- void ConvertTo7BitASCII (char *dest, size_t dest_size_in_bytes, wchar_t *source); 
- void ConvertToWideChar (wchar_t *dest, size_t dest_size_in_wchars, char *source); 
- void MinutesToWideCharString (wchar_t *dest, size_t dest_size_in_wchars, int minutes); 
- void SecondsToWideCharString (wchar_t *dest, size_t dest_size_in_wchars, int seconds); 
- int MonthStringToNumber (wchar_t *month_string); 
- bool GetImageSize (const wchar_t *imagefile_pathname, int *width, int *height); 
- void Debug_Init (const wchar_t *logfile_name); 
- void Debug_Log (const wchar_t *fmt, ...); 
- const wchar_t *GetLastNetworkError (void); 
- HICON W32LoadIcon (const wchar_t *fmt, ...); 
- HBITMAP W32LoadImage (const wchar_t *fmt, ...); 
-   
- // dialog_xxx.cpp and window_xxx.cpp function prototypes 
- void DialogBox_About (void);                             void DialogBox_About_Validated (void); 
- void DialogBox_Challenge (int challenge_index);          void DialogBox_Challenge_Validated (void); 
- void DialogBox_ChangeAppearance (void);                  void DialogBox_ChangeAppearance_Validated (void); 
- void DialogBox_Comment (void);                           void DialogBox_Comment_Validated (void); 
- void DialogBox_EndGame (void);                           void DialogBox_EndGame_Validated (void); 
- void DialogBox_GoToMove (void);                          void DialogBox_GoToMove_Validated (void); 
- void DialogBox_Load (void);                              void DialogBox_Load_Validated (void); 
- void DialogBox_Message (messagebox_t *messagebox_parms); void DialogBox_Message_Validated (void); 
- void DialogBox_NewGame (void);                           void DialogBox_NewGame_Validated (void); 
- void DialogBox_Options (void);                           void DialogBox_Options_Validated (void); 
- void DialogBox_PawnPromotion (void);                     void DialogBox_PawnPromotion_Validated (void); 
- void DialogBox_PlayerCard (int playercard_index);        void DialogBox_PlayerCard_Validated (void); 
- void DialogBox_PlayerInfoName (void);                    void DialogBox_PlayerInfoName_Validated (void); 
- void DialogBox_Quit (void);                              void DialogBox_Quit_Validated (void); 
- void DialogBox_Resign (void);                            void DialogBox_Resign_Validated (void); 
- void DialogBox_Save (void);                              void DialogBox_Save_Validated (void); 
- void DialogBox_SavePosition (void);                      void DialogBox_SavePosition_Validated (void); 
- void DialogBox_SendChallenge (wchar_t *challengee_name); void DialogBox_SendChallenge_Validated (void); 
- void DialogBox_SendSeek (void);                          void DialogBox_SendSeek_Validated (void); 
- void DialogBox_Takeback (int howmany_halfmoves);         void DialogBox_Takeback_Validated (void); 
- void Window_Chat (int interlocutor_index);               void Window_Chat_Validated (void); 
- void Window_ChatterChannels (void);                      void Window_ChatterChannels_Validated (void); 
- void Window_Games (void);                                void Window_Games_Validated (void); 
- void Window_MOTD (void);                                 void Window_MOTD_Validated (void); 
- void Window_Opponents (void);                            void Window_Opponents_Validated (void); 
- void Window_Sought (void);                               void Window_Sought_Validated (void); 
- LRESULT CALLBACK WindowProc_Main (HWND hWnd, unsigned int message, WPARAM wParam, LPARAM lParam); 
-   
-   
- #endif // PROTOTYPES_H 
-