Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/DTXManiaプロジェクト/コード/全体/CDTXMania.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 146 by kairera0467, Thu Aug 8 23:38:35 2013 UTC revision 153 by kairera0467, Sat Sep 7 14:47:16 2013 UTC
# Line 335  namespace DTXMania Line 335  namespace DTXMania
335    
336                  // メソッド                  // メソッド
337    
338          public void t全画面・ウィンドウモード切り替え()                  public void t全画面・ウィンドウモード切り替え()
339          {                  {
340  #if WindowedFullscreen  #if WindowedFullscreen
341              if ( ConfigIni != null )                          if ( ConfigIni != null )
342  #else  #else
343              DeviceSettings settings = base.GraphicsDeviceManager.CurrentSettings.Clone();                          DeviceSettings settings = base.GraphicsDeviceManager.CurrentSettings.Clone();
344              if ((ConfigIni != null) && (ConfigIni.bウィンドウモード != settings.Windowed))                          if ( ( ConfigIni != null ) && ( ConfigIni.bウィンドウモード != settings.Windowed ) )
345  #endif  #endif
346              {                          {
347  #if !WindowedFullscreen  #if !WindowedFullscreen
348                  settings.Windowed = ConfigIni.bウィンドウモード;                                  settings.Windowed = ConfigIni.bウィンドウモード;
349  #endif  #endif
350                  if (ConfigIni.bウィンドウモード == false)       // #23510 2010.10.27 yyagi: backup current window size before going fullscreen mode                                  if ( ConfigIni.bウィンドウモード == false )     // #23510 2010.10.27 yyagi: backup current window size before going fullscreen mode
351                  {                                  {
352                      currentClientSize = this.Window.ClientSize;                                          currentClientSize = this.Window.ClientSize;
353                      ConfigIni.nウインドウwidth = this.Window.ClientSize.Width;                                          ConfigIni.nウインドウwidth = this.Window.ClientSize.Width;
354                      ConfigIni.nウインドウheight = this.Window.ClientSize.Height;                                          ConfigIni.nウインドウheight = this.Window.ClientSize.Height;
355  //                  FDK.CTaskBar.ShowTaskBar( false );  //                                      FDK.CTaskBar.ShowTaskBar( false );
356                  }                                  }
357  #if !WindowedFullscreen  #if !WindowedFullscreen
358                  base.GraphicsDeviceManager.ChangeDevice(settings);                                  base.GraphicsDeviceManager.ChangeDevice( settings );
359  #endif  #endif
                 if (ConfigIni.bウィンドウモード == true)        // #23510 2010.10.27 yyagi: to resume window size from backuped value  
                 {  
 #if WindowedFullscreen  
                     base.Window.ClientSize =  
                         new Size(currentClientSize.Width, currentClientSize.Height);  
                 }  
             }  
360                                  if ( ConfigIni.bウィンドウモード == true )      // #23510 2010.10.27 yyagi: to resume window size from backuped value                                  if ( ConfigIni.bウィンドウモード == true )      // #23510 2010.10.27 yyagi: to resume window size from backuped value
361                                  {                                  {
362    #if WindowedFullscreen
363                                                                                                                          // #30666 2013.2.2 yyagi Don't use Fullscreen mode becasue NVIDIA GeForce is                                                                                                                          // #30666 2013.2.2 yyagi Don't use Fullscreen mode becasue NVIDIA GeForce is
364                                                                                                                          // tend to delay drawing on Fullscreen mode. So DTXMania uses Maximized window                                                                                                                          // tend to delay drawing on Fullscreen mode. So DTXMania uses Maximized window
365                                                                                                                          // in spite of using fullscreen mode.                                                                                                                          // in spite of using fullscreen mode.
# Line 373  namespace DTXMania Line 367  namespace DTXMania
367                                          app.Window.FormBorderStyle = FormBorderStyle.Sizable;                                          app.Window.FormBorderStyle = FormBorderStyle.Sizable;
368                                          app.Window.WindowState = FormWindowState.Normal;                                          app.Window.WindowState = FormWindowState.Normal;
369  #endif  #endif
370                      base.Window.ClientSize =                                          base.Window.ClientSize =
371                          new Size(currentClientSize.Width, currentClientSize.Height);                                                  new Size( currentClientSize.Width, currentClientSize.Height );
372  //                  FDK.CTaskBar.ShowTaskBar( true );  //                                      FDK.CTaskBar.ShowTaskBar( true );
373                  }                                  }
374  #if WindowedFullscreen  #if WindowedFullscreen
375                                  else                                  else
376                                  {                                  {
# Line 384  namespace DTXMania Line 378  namespace DTXMania
378                                          app.Window.FormBorderStyle = FormBorderStyle.None;                                          app.Window.FormBorderStyle = FormBorderStyle.None;
379                                          app.Window.WindowState = FormWindowState.Maximized;                                          app.Window.WindowState = FormWindowState.Maximized;
380                                  }                                  }
381              if ( ConfigIni.bウィンドウモード )                                  if ( ConfigIni.bウィンドウモード )
382              {                                  {
383                  if ( !this.bマウスカーソル表示中 )                                      if ( !this.bマウスカーソル表示中 )
384                  {                                      {
385                      Cursor.Show();                                          Cursor.Show();
386                      this.bマウスカーソル表示中 = true;                                          this.bマウスカーソル表示中 = true;
387                  }                                      }
388              }                                  }
389              else if ( this.bマウスカーソル表示中 )                                  else if ( this.bマウスカーソル表示中 )
390              {                                  {
391                  Cursor.Hide();                                      Cursor.Hide();
392                  this.bマウスカーソル表示中 = false;                                      this.bマウスカーソル表示中 = false;
393              }                                  }
394  #endif  #endif
395              }                          }
396                                    }
         }  
397            
398    
399                  #region [ #24609 リザルト画像をpngで保存する ]              // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill.                  #region [ #24609 リザルト画像をpngで保存する ]              // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill.
# Line 476  namespace DTXMania Line 469  namespace DTXMania
469                                  Cursor.Hide();                                  Cursor.Hide();
470                                  this.bマウスカーソル表示中 = false;                                  this.bマウスカーソル表示中 = false;
471                          }                          }
472              this.Device.SetTransform(TransformState.View, Matrix.LookAtLH(new Vector3(0f, 0f, (float)(-SampleFramework.GameWindowSize.Height / 2 * Math.Sqrt(3.0))), new Vector3(0f, 0f, 0f), new Vector3(0f, 1f, 0f)));                          this.Device.SetTransform(TransformState.View, Matrix.LookAtLH(new Vector3(0f, 0f, (float)(-SampleFramework.GameWindowSize.Height / 2 * Math.Sqrt(3.0))), new Vector3(0f, 0f, 0f), new Vector3(0f, 1f, 0f)));
473              this.Device.SetTransform(TransformState.Projection, Matrix.PerspectiveFovLH(C変換.DegreeToRadian((float)60f), ((float)this.Device.Viewport.Width) / ((float)this.Device.Viewport.Height), -100f, 100f));                          this.Device.SetTransform(TransformState.Projection, Matrix.PerspectiveFovLH(C変換.DegreeToRadian((float)60f), ((float)this.Device.Viewport.Width) / ((float)this.Device.Viewport.Height), -100f, 100f));
474              this.Device.SetRenderState(RenderState.Lighting, false);                          this.Device.SetRenderState( RenderState.Lighting, false );
475              this.Device.SetRenderState(RenderState.ZEnable, false);                          this.Device.SetRenderState( RenderState.ZEnable, false );
476              this.Device.SetRenderState(RenderState.AntialiasedLineEnable, false);                          this.Device.SetRenderState( RenderState.AntialiasedLineEnable, false );
477              this.Device.SetRenderState(RenderState.AlphaTestEnable, true);                          this.Device.SetRenderState( RenderState.AlphaTestEnable, true );
478              this.Device.SetRenderState(RenderState.AlphaRef, 10);                          this.Device.SetRenderState( RenderState.AlphaRef, 10 );
479    
480              if (CDTXMania.ConfigIni.b縮小文字のアンチエイリアスを有効にする == true)              if (CDTXMania.ConfigIni.b縮小文字のアンチエイリアスを有効にする == true)
481              {              {
# Line 543  namespace DTXMania Line 536  namespace DTXMania
536    
537                          if( Timer != null )                          if( Timer != null )
538                                  Timer.t更新();                                  Timer.t更新();
539              if (CSound管理.rc演奏用タイマ != null)  
540                if ( CSound管理.rc演奏用タイマ != null )
541                  CSound管理.rc演奏用タイマ.t更新();                  CSound管理.rc演奏用タイマ.t更新();
542    
543                          if( Input管理 != null )                          if( Input管理 != null )
# Line 796  namespace DTXMania Line 790  namespace DTXMania
790                                                          Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );                                                          Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
791                                                  }                                                  }
792    
793                                                  this.tガベージコレクションを実行する();                          //this.tガベージコレクションを実行する();       // #31980 2013.9.3 yyagi タイトル画面でだけ、毎フレームGCを実行して重くなっていた問題の修正
794                                                  //-----------------------------                                                  //-----------------------------
795                                                  #endregion                                                  #endregion
796                                                  break;                                                  break;

Legend:
Removed from v.146  
changed lines
  Added in v.153

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26