Subversion Repositories Games.Chess Giants

Rev

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

Rev 14 Rev 18
Line 300... Line 300...
300
 
300
 
301
   // add our custom fonts to the list of available fonts for the duration of the process
301
   // add our custom fonts to the list of available fonts for the duration of the process
302
   swprintf_s (font_pathname, WCHAR_SIZEOF (font_pathname), L"%s/data/fonts/papyrus.ttf", app_path);
302
   swprintf_s (font_pathname, WCHAR_SIZEOF (font_pathname), L"%s/data/fonts/papyrus.ttf", app_path);
303
   AddFontResourceEx (font_pathname, FR_PRIVATE, 0);
303
   AddFontResourceEx (font_pathname, FR_PRIVATE, 0);
304
   // load rendered fonts
304
   // load rendered fonts
305
   arrow_fontindex = Render_LoadFont (L"Papyrus", 20, false, false);
305
   arrow_fontindex = Render_LoadFont (L"Papyrus", 24, false, false);
306
   chat_fontindex = Render_LoadFont (L"Papyrus", 24, false, false);
306
   chat_fontindex = Render_LoadFont (L"Papyrus", 32, false, false);
307
   players_fontindex = Render_LoadFont (L"Papyrus", 32, false, true);
307
   players_fontindex = Render_LoadFont (L"Papyrus", 40, false, true);
308
   centermsg_fontindex = Render_LoadFont (L"Papyrus", 48, false, true);
308
   centermsg_fontindex = Render_LoadFont (L"Papyrus", 54, false, true);
309
 
309
 
310
   // load themes, initialize a new human vs. human game and setup the scene
310
   // load themes, initialize a new human vs. human game and setup the scene
311
   if (!Themes_Init ())
311
   if (!Themes_Init ())
312
      return (-1); // bomb out on error
312
      return (-1); // bomb out on error
313
   Board_Init (&the_board, PLAYER_HUMAN, PLAYER_HUMAN, FENSTARTUP_STANDARDCHESS);
313
   Board_Init (&the_board, PLAYER_HUMAN, PLAYER_HUMAN, FENSTARTUP_STANDARDCHESS);
Line 342... Line 342...
342
      // see what time it is
342
      // see what time it is
343
      current_time = ProcessTime ();
343
      current_time = ProcessTime ();
344
 
344
 
345
      // are we in demo mode and is it time to quit ?
345
      // are we in demo mode and is it time to quit ?
346
      if (!is_registered && (current_time > DEMO_TIMEOUT))
346
      if (!is_registered && (current_time > DEMO_TIMEOUT))
347
         terminate_everything = true; // if so, send a quit message in order to break the loop
347
         DestroyWindow (hMainWnd); // if so, send a quit message in order to break the loop
348
 
348
 
349
      // grab the current window size
349
      // grab the current window size
350
      GetWindowRect (hMainWnd, &rect);
350
      GetWindowRect (hMainWnd, &rect);
351
      options.window_width = rect.right - rect.left;
351
      options.window_width = rect.right - rect.left;
352
      options.window_height = rect.bottom - rect.top;
352
      options.window_height = rect.bottom - rect.top;
Line 658... Line 658...
658
            the_scene.gui.larrow.state = 1; // enable "back" arrow if it isn't displayed yet
658
            the_scene.gui.larrow.state = 1; // enable "back" arrow if it isn't displayed yet
659
         if (the_scene.gui.rarrow.state == 0)
659
         if (the_scene.gui.rarrow.state == 0)
660
            the_scene.gui.rarrow.state = 1; // enable "forward" arrow if it isn't displayed yet
660
            the_scene.gui.rarrow.state = 1; // enable "forward" arrow if it isn't displayed yet
661
         Scene_SetText (&the_scene.gui.arrow_text, 3.3f, 5.0f, -1, ALIGN_CENTER, ALIGN_TOP, ALIGN_CENTER, arrow_fontindex,
661
         Scene_SetText (&the_scene.gui.arrow_text, 3.3f, 5.0f, -1, ALIGN_CENTER, ALIGN_TOP, ALIGN_CENTER, arrow_fontindex,
662
                        RGBACOLOR_SETALPHA (options.clock_color, 0x7f), 999999.0f, false,
662
                        RGBACOLOR_SETALPHA (options.clock_color, 0x7f), 999999.0f, false,
663
                        L"%s %d\n%s", LOCALIZE (L"Move"), (the_board.viewed_move + 1) / 2, (the_board.viewed_move % 2 ? LOCALIZE (L"Games_White "): LOCALIZE (L"Games_Black")));
663
                        L"%s %d\n%s", LOCALIZE (L"Move"), (the_board.viewed_move + 1) / 2, (the_board.viewed_move % 2 ? LOCALIZE (L"Games_White"): LOCALIZE (L"Games_Black")));
664
 
664
 
665
         // enable the "save position as" and "comment on this move" menu options
665
         // enable the "save position as" and "comment on this move" menu options
666
         EnableMenuItem (GetMenu (hMainWnd), MENUID_GAME_SAVEPOSITIONAS, MF_ENABLED);
666
         EnableMenuItem (GetMenu (hMainWnd), MENUID_GAME_SAVEPOSITIONAS, MF_ENABLED);
667
         EnableMenuItem (GetMenu (hMainWnd), MENUID_CHESSBOARD_COMMENTMOVE, MF_ENABLED);
667
         EnableMenuItem (GetMenu (hMainWnd), MENUID_CHESSBOARD_COMMENTMOVE, MF_ENABLED);
668
      }
668
      }