Rev 83 | Rev 116 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | // prototypes.h |
2 | |||
3 | #ifndef PROTOTYPES_H |
||
4 | #define PROTOTYPES_H |
||
5 | |||
6 | |||
7 | // audio.cpp function prototypes |
||
8 | void Audio_Think (void); |
||
9 | void Audio_PlaySound (int sound_type); |
||
10 | |||
11 | // board.cpp function prototypes |
||
12 | bool Board_Init (board_t *board, int white_playertype, int black_playertype, wchar_t *fen_string); |
||
13 | void Board_Shutdown (board_t *board); |
||
14 | bool Board_Reset (board_t *board, wchar_t *fen_string); |
||
15 | bool Board_Think (board_t *board); |
||
16 | void Board_SwapSides (board_t *board); |
||
17 | void Board_SetSelectedAndHovered (board_t *board, int selected_line, int selected_column, int hovered_line, int hovered_column); |
||
18 | char Board_ColorToMove (board_t *board); |
||
19 | void Board_AppendMove (board_t *board, int from_line, int from_column, int to_line, int to_column, char promotion_type, wchar_t *comment); |
||
20 | |||
21 | // challenge.cpp function prototypes |
||
22 | void Challenges_Init (void); |
||
23 | void Challenges_Shutdown (void); |
||
24 | challenge_t *Challenge_FindOrCreate (const wchar_t *nickname); |
||
25 | challenge_t *Challenge_Find (const wchar_t *nickname); |
||
26 | void Challenge_UpdateData (challenge_t *challenge, challenge_t *new_challenge); |
||
27 | |||
28 | // chessengine.cpp function prototypes |
||
29 | bool PlayerEngine_Init (player_t *player); |
||
30 | void PlayerEngine_Shutdown (player_t *player); |
||
31 | bool PlayerEngine_Think (player_t *player); |
||
32 | |||
33 | // config.cpp function prototypes |
||
34 | void Config_Load (void); |
||
40 | pmbaty | 35 | void Config_LoadEngine (const wchar_t *engine_name); |
1 | pmbaty | 36 | void Config_Save (void); |
37 | |||
38 | // fenfile.cpp function prototypes |
||
39 | bool FENFile_Load (const wchar_t *fenfile_pathname, wchar_t *fen_string, int fenstring_maxsize); |
||
40 | bool FENFile_Save (const wchar_t *fenfile_pathname, wchar_t *fen_string); |
||
41 | |||
42 | // hyperlinks.cpp function prototypes |
||
43 | void ConvertStaticToHyperlink (HWND hWndStatic); |
||
44 | |||
45 | // inifile.cpp function prototypes |
||
46 | void *INIFile_NewINIFile (void); |
||
47 | int INIFile_GetNumberOfSections (void *ini_data); |
||
48 | wchar_t *INIFile_GetSectionName (void *ini_data, int section_index); |
||
49 | int INIFile_GetNumberOfEntries (void *ini_data, wchar_t *section); |
||
50 | wchar_t *INIFile_GetEntryName (void *ini_data, wchar_t *section, int entry_index); |
||
51 | unsigned char INIFile_ReadEntryAsBool (void *ini_data, wchar_t *section, wchar_t *entry, unsigned char default_value); |
||
52 | long INIFile_ReadEntryAsLong (void *ini_data, wchar_t *section, wchar_t *entry, long default_value); |
||
53 | unsigned long INIFile_ReadEntryAsUnsignedLong (void *ini_data, wchar_t *section, wchar_t *entry, unsigned long default_value); |
||
54 | double INIFile_ReadEntryAsDouble (void *ini_data, wchar_t *section, wchar_t *entry, double default_value); |
||
55 | wchar_t *INIFile_ReadEntryAsString (void *ini_data, wchar_t *section, wchar_t *entry, wchar_t *default_value); |
||
56 | void INIFile_WriteEntryAsBool (void *ini_data, wchar_t *section, wchar_t *entry, unsigned char value); |
||
57 | void INIFile_WriteEntryAsLong (void *ini_data, wchar_t *section, wchar_t *entry, long value); |
||
58 | void INIFile_WriteEntryAsUnsignedLong (void *ini_data, wchar_t *section, wchar_t *entry, unsigned long value); |
||
59 | void INIFile_WriteEntryAsDouble (void *ini_data, wchar_t *section, wchar_t *entry, double value); |
||
60 | void INIFile_WriteEntryAsString (void *ini_data, wchar_t *section, wchar_t *entry, wchar_t *value); |
||
61 | void INIFile_DeleteEntry (void *ini_data, wchar_t *section, wchar_t *entry); |
||
62 | void INIFile_DeleteSection (void *ini_data, wchar_t *section); |
||
63 | void *INIFile_LoadINIFile (const wchar_t *filename); |
||
64 | unsigned char INIFile_SaveINIFile (const wchar_t *filename, void *ini_data); |
||
65 | void INIFile_FreeINIFile (void *ini_data); |
||
66 | |||
67 | // interlocutor.cpp function prototypes |
||
68 | void Interlocutors_Init (void); |
||
69 | void Interlocutors_Shutdown (void); |
||
70 | interlocutor_t *Interlocutor_FindOrCreate (const wchar_t *nickname); |
||
71 | interlocutor_t *Interlocutor_FindByWindowHandle (HWND window_handle); |
||
72 | void Interlocutor_Chat (interlocutor_t *interlocutor, const wchar_t *sender, bool is_localsender, const wchar_t *fmt, ...); |
||
73 | void Interlocutor_Notify (interlocutor_t *interlocutor, const wchar_t *fmt, ...); |
||
74 | |||
75 | // localizedtexts.cpp function prototypes |
||
59 | pmbaty | 76 | void LocalizedTexts_Init (void); |
1 | pmbaty | 77 | void LocalizedTexts_Shutdown (void); |
78 | wchar_t *LocalizedTexts_GetLocalizedTextFor (wchar_t *id_string); |
||
79 | |||
80 | // move.cpp function prototypes |
||
81 | void Move_SetSlot (boardmove_t *move, int line, int column, int color, int part_type); |
||
82 | bool Move_IsKingThreatenedAtLocation (boardmove_t *move, int color, int at_line, int at_column, int *threat_line, int *threat_column); |
||
83 | bool Move_IsCheck (boardmove_t *move, int color); |
||
84 | bool Move_IsStaleMate (boardmove_t *move, int color); |
||
85 | bool Move_IsMoveValid (boardmove_t *move, int from_line, int from_column, int to_line, int to_column); |
||
86 | bool Move_FindRandomMove (boardmove_t *move, int color, boardmove_t *random_move); |
||
87 | int Move_CountPartsByColorAndType (boardmove_t *move, int color, int part_type); |
||
88 | bool Move_IsColorInCheckAfterTestMove (boardmove_t *move, int source_line, int source_column, int target_line, int target_column, int color); |
||
89 | 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); |
||
90 | void Move_DescribeInFEN (boardmove_t *move); |
||
91 | bool Move_SetupFromFEN (boardmove_t *move, wchar_t *fen_string); |
||
92 | bool Move_SetupFromStyle12 (boardmove_t *move, wchar_t *positions, int move_color, int pawnrush_column, |
||
93 | bool can_white_castle_short, bool can_white_castle_long, bool can_black_castle_short, bool can_black_castle_long, wchar_t *pretty_movestring); |
||
94 | |||
95 | // network.cpp function prototypes |
||
96 | bool PlayerNetwork_Init (player_t *player); |
||
97 | void PlayerNetwork_Shutdown (player_t *player); |
||
98 | bool PlayerNetwork_Think (player_t *player); |
||
99 | |||
100 | // network-eval.cpp function prototypes |
||
101 | void EvaluateServerReply_MOTD (player_t *player); |
||
102 | void EvaluateServerReply_Seek (player_t *player); |
||
103 | void EvaluateServerReply_Challenge (player_t *player); |
||
104 | void EvaluateServerReply_Finger (player_t *player); |
||
105 | void EvaluateServerReply_PrivateMessage (player_t *player); |
||
106 | void EvaluateServerReply_ChallengeAccepted (player_t *player); |
||
107 | void EvaluateServerReply_ChallengeDeclined (player_t *player); |
||
108 | void EvaluateServerReply_Takeback (player_t *player); |
||
109 | void EvaluateServerReply_TakebackDeclinedByOther (player_t *player); |
||
110 | void EvaluateServerReply_TakebackDeclinedByYou (player_t *player); |
||
111 | void EvaluateServerReply_PlayNotAllowed (player_t *player); |
||
112 | void EvaluateServerReply_PlayUnexistent (player_t *player); |
||
113 | void EvaluateServerReply_PlayWrongRating (player_t *player); |
||
114 | void EvaluateServerReply_Announcement (player_t *player); |
||
115 | void EvaluateServerReply_ChannelMessage (player_t *player); |
||
116 | void EvaluateServerReply_ChannelsAndMembers (player_t *player); |
||
117 | void EvaluateServerReply_SoughtList (player_t *player); |
||
118 | void EvaluateServerReply_PlayersList (player_t *player); |
||
119 | void EvaluateServerReply_GameStarting (player_t *player); |
||
120 | void EvaluateServerReply_GameState (player_t *player); |
||
121 | void EvaluateServerReply_GameResults (player_t *player); |
||
122 | |||
123 | // pgnfile.cpp function prototypes |
||
124 | bool PGNFile_Load (const wchar_t *pgnfile_pathname); |
||
125 | bool PGNFile_LoadGame (board_t *board, const wchar_t *pgnfile_pathname, pgngame_t *game); |
||
126 | bool PGNFile_Save (board_t *board, const wchar_t *pgnfile_pathname); |
||
127 | |||
128 | // player.cpp function prototypes |
||
129 | void Player_Init (player_t *player, int color, int type); |
||
130 | void Player_Shutdown (player_t *player); |
||
131 | void Player_ResetView (player_t *player); |
||
132 | bool Player_RotateTable (player_t *player, float frame_time); |
||
133 | bool Player_Think (player_t *player); |
||
134 | bool Player_SendBuffer_Add (player_t *player, int milliseconds_max, const wchar_t *fmt, ...); |
||
135 | player_t *Player_FindByType (int player_type); |
||
136 | player_t *Player_GetCurrent (void); |
||
137 | player_t *Player_GetOpposite (void); |
||
138 | |||
139 | // playercard.cpp function prototypes |
||
140 | void PlayerCards_Init (void); |
||
141 | void PlayerCards_Shutdown (void); |
||
142 | playercard_t *PlayerCard_FindOrCreate (const wchar_t *nickname); |
||
143 | void PlayerCard_AppendPersonalData (playercard_t *playercard, const wchar_t *text); |
||
144 | |||
145 | // render.cpp function prototypes |
||
146 | bool Render_Init (void); |
||
147 | void Render_Shutdown (void); |
||
148 | void Render_RenderFrame (scene_t *scene); |
||
149 | int Render_LoadMesh (const wchar_t *fmt, ...); |
||
150 | int Render_LoadTexture (const wchar_t *fmt, ...); |
||
151 | int Render_LoadFont (const wchar_t *font_name, int font_size, bool is_bold, bool is_italic); |
||
152 | int Render_LoadSprite (const wchar_t *fmt, ...); |
||
153 | int Render_MaterialIndexOf (const wchar_t *material_name); |
||
154 | void Render_MouseToFloor (short mouse_x, short mouse_y, float *floor_x, float *floor_y); |
||
155 | bool Render_IsMouseInBox (short mouse_x, short mouse_y, float x_percent, float y_percent, float width_percent, float height_percent); |
||
156 | |||
157 | // safelib.cpp function prototypes |
||
158 | void *SAFE_malloc (int count, size_t element_size, bool cleanup); |
||
159 | void *SAFE_realloc (void *allocation, int old_count, int new_count, size_t element_size, bool cleanup); |
||
160 | void SAFE_free (void **address_of_pointer_to_allocation); |
||
161 | |||
162 | // san.cpp function prototypes |
||
163 | bool Move_SetupFromSAN (boardmove_t *move, boardmove_t *new_move, int move_color); |
||
164 | bool Move_DescribeInSAN (boardmove_t *move); |
||
165 | |||
166 | // scene.cpp function prototypes |
||
167 | void Scene_Init (scene_t *scene, board_t *board); |
||
168 | void Scene_Shutdown (scene_t *scene); |
||
169 | void Scene_Update (scene_t *scene, board_t *board); |
||
170 | void Scene_AddCCReply (scene_t *scene, wchar_t *nickname, wchar_t *channelname, unsigned long color_rgbx, wchar_t *fmt, ...); |
||
171 | void Scene_AddAnnouncement (scene_t *scene, wchar_t *fmt, ...); |
||
172 | void Scene_SetButton (guibutton_t *button, float left, float top, float width, float height, int sprite_index); |
||
173 | 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, ...); |
||
174 | |||
175 | // tabcontrol.cpp function prototypes |
||
176 | void *TabControl_New (HWND hTabControlWnd, WNDPROC ParentProc); |
||
177 | void TabControl_AddPage (void *tab_control, wchar_t *page_name, int dialog_id); |
||
178 | void TabControl_SelectTab (void *tab_control, int page_index); |
||
179 | HWND TabControl_GetItem (void *tab_control, int item_id); |
||
180 | void TabControl_Destroy (void *tab_control); |
||
181 | bool TabControl_Notify (NMHDR *notification); |
||
182 | |||
183 | // theme.cpp function prototypes |
||
184 | bool Themes_Init (void); |
||
185 | void Themes_Shutdown (void); |
||
85 | pmbaty | 186 | void Theme_LoadABitMore (theme_t *theme); |
11 | pmbaty | 187 | void Background_LoadImage (backgroundsprite_t *bg, const wchar_t *fmt, ...); |
1 | pmbaty | 188 | |
189 | // util.cpp function prototypes |
||
190 | const wchar_t *GetDirectoryPath (const wchar_t *pathname, wchar_t *path); |
||
59 | pmbaty | 191 | void CreateOrUpdateApplicationMenu (void); |
1 | pmbaty | 192 | void CenterWindow (HWND hWnd, HWND hParentWnd); |
193 | void HintWindow (HWND hWnd); |
||
194 | float ProcessTime (void); |
||
195 | float WrapAngle (float angle); |
||
196 | bool SafeTerminateProcess (HANDLE hProcess, unsigned int uExitCode); |
||
197 | wchar_t *ReachBeginningOfCurrentLine (wchar_t *string, wchar_t *current_pos); |
||
198 | wchar_t *ReachBeginningOfNextLine (wchar_t *string, wchar_t *current_pos); |
||
199 | wchar_t *ReadACompleteLine (wchar_t *destination_line, int max_length, wchar_t *source_buffer); |
||
200 | wchar_t *wcsgets (wchar_t *destination_line, int max_length, wchar_t *source_buffer); |
||
201 | wchar_t *wcsistr (const wchar_t *haystack, const wchar_t *needle); |
||
202 | void ConvertCRLFsToSingleSpaces (wchar_t *multiline_string); |
||
203 | void ConvertTo7BitASCII (char *dest, size_t dest_size_in_bytes, wchar_t *source); |
||
204 | void ConvertToWideChar (wchar_t *dest, size_t dest_size_in_wchars, char *source); |
||
205 | void MinutesToWideCharString (wchar_t *dest, size_t dest_size_in_wchars, int minutes); |
||
206 | void SecondsToWideCharString (wchar_t *dest, size_t dest_size_in_wchars, int seconds); |
||
207 | int MonthStringToNumber (wchar_t *month_string); |
||
208 | bool GetImageSize (const wchar_t *imagefile_pathname, int *width, int *height); |
||
209 | void Debug_Init (const wchar_t *logfile_name); |
||
210 | void Debug_Log (const wchar_t *fmt, ...); |
||
211 | const wchar_t *GetLastNetworkError (void); |
||
11 | pmbaty | 212 | HICON W32LoadIcon (const wchar_t *fmt, ...); |
213 | HBITMAP W32LoadImage (const wchar_t *fmt, ...); |
||
83 | pmbaty | 214 | bool IsRegistrationCorrect (const wchar_t *email, const unsigned __int32 code); |
1 | pmbaty | 215 | |
216 | // dialog_xxx.cpp and window_xxx.cpp function prototypes |
||
14 | pmbaty | 217 | void DialogBox_Registration (void); |
1 | pmbaty | 218 | void DialogBox_About (void); void DialogBox_About_Validated (void); |
219 | void DialogBox_Challenge (int challenge_index); void DialogBox_Challenge_Validated (void); |
||
220 | void DialogBox_ChangeAppearance (void); void DialogBox_ChangeAppearance_Validated (void); |
||
221 | void DialogBox_Comment (void); void DialogBox_Comment_Validated (void); |
||
222 | void DialogBox_EndGame (void); void DialogBox_EndGame_Validated (void); |
||
223 | void DialogBox_GoToMove (void); void DialogBox_GoToMove_Validated (void); |
||
75 | pmbaty | 224 | void DialogBox_RenameSides (void); void DialogBox_RenameSides_Validated (void); |
1 | pmbaty | 225 | void DialogBox_Load (void); void DialogBox_Load_Validated (void); |
226 | void DialogBox_Message (messagebox_t *messagebox_parms); void DialogBox_Message_Validated (void); |
||
227 | void DialogBox_NewGame (void); void DialogBox_NewGame_Validated (void); |
||
228 | void DialogBox_Options (void); void DialogBox_Options_Validated (void); |
||
229 | void DialogBox_PawnPromotion (void); void DialogBox_PawnPromotion_Validated (void); |
||
230 | void DialogBox_PlayerCard (int playercard_index); void DialogBox_PlayerCard_Validated (void); |
||
231 | void DialogBox_PlayerInfoName (void); void DialogBox_PlayerInfoName_Validated (void); |
||
232 | void DialogBox_Quit (void); void DialogBox_Quit_Validated (void); |
||
233 | void DialogBox_Resign (void); void DialogBox_Resign_Validated (void); |
||
234 | void DialogBox_Save (void); void DialogBox_Save_Validated (void); |
||
235 | void DialogBox_SavePosition (void); void DialogBox_SavePosition_Validated (void); |
||
236 | void DialogBox_SendChallenge (wchar_t *challengee_name); void DialogBox_SendChallenge_Validated (void); |
||
237 | void DialogBox_SendSeek (void); void DialogBox_SendSeek_Validated (void); |
||
238 | void DialogBox_Takeback (int howmany_halfmoves); void DialogBox_Takeback_Validated (void); |
||
239 | void Window_Chat (int interlocutor_index); void Window_Chat_Validated (void); |
||
240 | void Window_ChatterChannels (void); void Window_ChatterChannels_Validated (void); |
||
241 | void Window_Games (void); void Window_Games_Validated (void); |
||
242 | void Window_MOTD (void); void Window_MOTD_Validated (void); |
||
243 | void Window_Opponents (void); void Window_Opponents_Validated (void); |
||
244 | void Window_Sought (void); void Window_Sought_Validated (void); |
||
245 | LRESULT CALLBACK WindowProc_Main (HWND hWnd, unsigned int message, WPARAM wParam, LPARAM lParam); |
||
246 | |||
247 | |||
248 | #endif // PROTOTYPES_H |