Rev 18 | Rev 30 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18 | Rev 21 | ||
---|---|---|---|
Line 113... | Line 113... | ||
113 | is_window_motd_validated = false; |
113 | is_window_motd_validated = false; |
114 | is_window_opponents_validated = false; |
114 | is_window_opponents_validated = false; |
115 | is_window_sought_validated = false; |
115 | is_window_sought_validated = false; |
116 | save_pathname[0] = 0; |
116 | save_pathname[0] = 0; |
117 | srand ((unsigned int) time (NULL)); // initialize PRNG |
117 | srand ((unsigned int) time (NULL)); // initialize PRNG |
- | 118 | animation_endtime = 0.0f; |
|
- | 119 | command_ignoretime = 0.0f; |
|
- | 120 | sound_playtime = 0.0f; |
|
- | 121 | highlight_endtime = 0.0f; |
|
- | 122 | previous_time = 0.0f; |
|
- | 123 | frame_count = 0; |
|
118 | 124 | ||
119 | // read configuration data |
125 | // read configuration data |
120 | Config_Load (); |
126 | Config_Load (); |
121 | 127 | ||
122 | // see if the program is registered |
128 | // see if the program is registered |
Line 186... | Line 192... | ||
186 | AppendMenu (hMenu, MF_POPUP, (UINT) hDropDownMenu, LOCALIZE (L"Menu_Internet")); |
192 | AppendMenu (hMenu, MF_POPUP, (UINT) hDropDownMenu, LOCALIZE (L"Menu_Internet")); |
187 | DestroyMenu (hDropDownMenu); |
193 | DestroyMenu (hDropDownMenu); |
188 | hDropDownMenu = CreateMenu (); // create the fourth drop-down item |
194 | hDropDownMenu = CreateMenu (); // create the fourth drop-down item |
189 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_HELP, LOCALIZE (L"Menu_HelpDisplayHelp")); |
195 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_HELP, LOCALIZE (L"Menu_HelpDisplayHelp")); |
190 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_GETCHESSGAMES, LOCALIZE (L"Menu_HelpGetChessGames")); |
196 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_GETCHESSGAMES, LOCALIZE (L"Menu_HelpGetChessGames")); |
- | 197 | AppendMenu (hDropDownMenu, MF_SEPARATOR, 0, NULL); |
|
- | 198 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_ADDMODIFYVISUALTHEMES, LOCALIZE (L"Menu_HelpAddModifyThemes")); |
|
- | 199 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_ADDMODIFYTRANSLATIONS, LOCALIZE (L"Menu_HelpAddModifyTranslations")); |
|
191 | AppendMenu (hDropDownMenu, MF_SEPARATOR, 0, NULL); |
200 | AppendMenu (hDropDownMenu, MF_SEPARATOR, 0, NULL); |
192 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_ABOUT, LOCALIZE (L"Menu_HelpAbout")); |
201 | AppendMenu (hDropDownMenu, MF_STRING, MENUID_HELP_ABOUT, LOCALIZE (L"Menu_HelpAbout")); |
193 | AppendMenu (hMenu, MF_POPUP, (UINT) hDropDownMenu, LOCALIZE (L"Menu_Help")); |
202 | AppendMenu (hMenu, MF_POPUP, (UINT) hDropDownMenu, LOCALIZE (L"Menu_Help")); |
194 | DestroyMenu (hDropDownMenu); |
203 | DestroyMenu (hDropDownMenu); |
195 | 204 | ||
Line 281... | Line 290... | ||
281 | handlestatus[HANDLESTATUS_OFFLINE].text = LOCALIZE (L"Opponents_StatusOffline"); |
290 | handlestatus[HANDLESTATUS_OFFLINE].text = LOCALIZE (L"Opponents_StatusOffline"); |
282 | 291 | ||
283 | // load the system fonts |
292 | // load the system fonts |
284 | hFontChat = CreateFont (17, 0, 0, 0, FW_DONTCARE, false, false, false, ANSI_CHARSET, OUT_DEFAULT_PRECIS, |
293 | hFontChat = CreateFont (17, 0, 0, 0, FW_DONTCARE, false, false, false, ANSI_CHARSET, OUT_DEFAULT_PRECIS, |
285 | CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, L"Comic Sans MS"); |
294 | CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, L"Comic Sans MS"); |
- | 295 | ||
- | 296 | // before any rendering is done, it's a good idea to know what time it is |
|
- | 297 | current_time = ProcessTime (); |
|
286 | 298 | ||
287 | // initialize renderer |
299 | // initialize renderer |
288 | if (!Render_Init ()) |
300 | if (!Render_Init ()) |
289 | return (-1); // bomb out on error |
301 | return (-1); // bomb out on error |
290 | 302 | ||
Line 330... | Line 342... | ||
330 | } |
342 | } |
331 | else |
343 | else |
332 | DialogBox_NewGame (); // when no filename is specified, display the new game dialog box |
344 | DialogBox_NewGame (); // when no filename is specified, display the new game dialog box |
333 | 345 | ||
334 | // enter the main loop |
346 | // enter the main loop |
335 | animation_endtime = 0.0f; |
- | |
336 | sound_playtime = 0.0f; |
- | |
337 | highlight_endtime = 0.0f; |
- | |
338 | previous_time = 0.0f; |
- | |
339 | frame_count = 0; |
- | |
340 | while (!terminate_everything) |
347 | while (!terminate_everything) |
341 | { |
348 | { |
342 | // see what time it is |
349 | // see what time it is |
343 | current_time = ProcessTime (); |
350 | current_time = ProcessTime (); |
344 | 351 |