OSDN Git Service

#xxxxx (作業部屋50635)FT、LP、LBDのチップ識別用フラグを動くようにした。
authorkairera0467 <gennsou76573@gmail.com>
Sun, 28 Aug 2016 11:48:35 +0000 (20:48 +0900)
committerkairera0467 <gennsou76573@gmail.com>
Sun, 28 Aug 2016 11:48:35 +0000 (20:48 +0900)
#xxxxx (作業部屋50599)背景画像用意のコードを一新。これにより、一時的にBGA枠、DTX指定の背景画像は廃止。
#xxxxx SkillMode切り替えに使う変数をCDTXMania.CDTXのものを使うように変更。

DTXManiaプロジェクト/コード/スコア、曲/CDTX.cs
DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs
DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs
DTXManiaプロジェクト/コード/ステージ/07.演奏/ギター画面/CStage演奏ギター画面.cs
DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CStage演奏ドラム画面.cs
実行時フォルダ/DTXManiaGR.exe

index 977583f..3ca05fb 100644 (file)
@@ -3195,7 +3195,7 @@ namespace DTXMania
                                                #endregion
                         #region[ CLASSIC譜面であるかの判別 ]
                         //ここで判別して、演奏画面等のコードを簡略化する。
-                        if( !this.bチップがある.LeftCymbal && !this.bチップがある.LP && !this.bチップがある.LBD && !this.bチップがある.FT && !this.bチップがある.Ride )
+                        if( this.bチップがある.LeftCymbal == false && this.bチップがある.LP == false && this.bチップがある.LBD == false && this.bチップがある.FT == false && this.bチップがある.Ride == false )
                         {
                             this.bCLASSIC譜面である.Drums = true;
                         }
@@ -5836,6 +5836,10 @@ namespace DTXMania
 
                        switch ( nチャンネル番号 )
                        {
+                case 0x17:
+                    this.bチップがある.FT = true;
+                    break;
+
                                case 0x18:
                                        this.bチップがある.HHOpen = true;
                                        break;
@@ -5848,6 +5852,14 @@ namespace DTXMania
                                        this.bチップがある.LeftCymbal = true;
                                        break;
 
+                case 0x1B:
+                    this.bチップがある.LP = true;
+                    break;
+
+                case 0x1C:
+                    this.bチップがある.LBD = true;
+                    break;
+
                                case 0x20:
                                        this.bチップがある.OpenGuitar = true;
                                        break;
index 525d7cb..62cdcb5 100644 (file)
@@ -653,8 +653,8 @@ namespace DTXMania
 
         private void tSkillModeを譜面に応じて切り替える( CDTX cdtx )
         {
-            if( CDTXMania.ConfigIni.bDrums有効 ? ( CDTXMania.stage選曲.r確定されたスコア.譜面情報.b完全にCLASSIC譜面である.Drums ) :
-                                                 ( CDTXMania.stage選曲.r確定されたスコア.譜面情報.b完全にCLASSIC譜面である.Guitar | CDTXMania.stage選曲.r確定されたスコア.譜面情報.b完全にCLASSIC譜面である.Bass ) &&
+            if( CDTXMania.ConfigIni.bDrums有効 ? ( cdtx.bCLASSIC譜面である.Drums ) :
+                                                 ( cdtx.bCLASSIC譜面である.Guitar | cdtx.bCLASSIC譜面である.Bass ) &&
               !cdtx.b強制的にXG譜面にする )
                 CDTXMania.ConfigIni.eSkillMode = ESkillType.DTXMania;
             else
index d9ccd26..228aee9 100644 (file)
@@ -3587,131 +3587,30 @@ namespace DTXMania
                }
 
                protected abstract void t背景テクスチャの生成();
-               protected void t背景テクスチャの生成( string DefaultBgFilename, string DefaultLaneFilename, Rectangle bgrect, string bgfilename )
-               {                                                                       // Default...: レーン等があるレイヤー                bgfilename: DTXファイルで指定する背景
+               protected void t背景テクスチャの生成( string DefaultBgFilename, Rectangle bgrect, string bgfilename )
+               {
                        Bitmap image = null;
                        bool bSuccessLoadDTXbgfile = false;
                        
+
+
             //2016.06.18 kairera0467
             //--ムービークリップが使用されない曲の場合、デフォルトの背景画像を表示させる。
-            //--ムービークリップが使用される曲の場合、黒背景を表示させる。
+            //--ムービークリップが使用される曲の場合、黒背景を表示させる。(tx背景を初期化したままにしなければ、ムービーを描画できない。)
             //--BGAの場合、デフォルトの背景画像の上に、BGAの大きさの黒背景を表示させる。
+            if( File.Exists( CSkin.Path( DefaultBgFilename ) ) && CDTXMania.DTX.bチップがある.Movie == false )
+            {
+                this.tx背景 = CDTXMania.tテクスチャの生成( CSkin.Path( DefaultBgFilename ) );
+                if( CDTXMania.DTX.listBGA.Count != 0 )
+                {
 
-
-
-
-
-
-
-
-                       if ( bgfilename != null && File.Exists( bgfilename ) && !CDTXMania.DTX.bチップがある.Movie )
-                       {
-                               try
-                               {
-                                       #region [ DTXデータで指定されている背景画像を読み込む ]
-                                       Bitmap bitmap1 = null;
-                                       bitmap1 = new Bitmap( bgfilename );
-                                       if ( ( bitmap1.Size.Width == 0 ) && ( bitmap1.Size.Height == 0 ) )
-                                       {
-                                               this.tx背景 = null;
-                                               return;
-                                       }
-                                       #endregion
-
-                                       int newWidth = (int) ( bitmap1.Width * Scale.X );
-                                       int newHeight = (int) ( bitmap1.Height * Scale.Y );
-                                       Bitmap bitmap2;
-
-                                       #region [ 背景画像がVGAサイズ以下なら、FullHDサイズに拡大する ]
-                                       if ( bitmap1.Width <= 640 && bitmap1.Height <= 480 )
-                                       {
-                                               bitmap2 = new Bitmap( newWidth, newHeight );
-                                               Graphics graphic2 = Graphics.FromImage( bitmap2 );
-                                               graphic2.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
-                                               graphic2.DrawImage( bitmap1, 0, 0, newWidth, newHeight );
-                                               graphic2.Dispose();
-                                       }
-                                       else
-                                       {
-                                               bitmap2 = (Bitmap) bitmap1.Clone();
-                                       }
-                                       bitmap1.Dispose();
-                                       #endregion
-
-                                       #region [ 実背景に格子状に配置するよう、コピーしていく ]
-                                       Bitmap bitmap3 = new Bitmap( SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height );
-                                       Graphics graphics3 = Graphics.FromImage( bitmap3 );
-                                       for ( int i = 0; i < SampleFramework.GameWindowSize.Height; i += bitmap2.Size.Height )
-                                       {
-                                               for ( int j = 0; j < SampleFramework.GameWindowSize.Width; j += bitmap2.Size.Width )
-                                               {
-                                                       graphics3.DrawImage( bitmap2, j, i, bitmap2.Width, bitmap2.Height );
-                                               }
-                                       }
-                                       graphics3.Dispose();
-                                       bitmap2.Dispose();
-                                       #endregion
-
-                                       #region [ レーン外・レーンそのもののフレームを合成 ]
-                                       image = new Bitmap( CSkin.Path( DefaultBgFilename ) );  // レーン外のフレーム
-                                       graphics3 = Graphics.FromImage( image );
-
-                                       //#region [ レーンのフレームがあれば、それを合成 ]
-                                       //if ( DefaultLaneFilename != "" )
-                                       //{
-                                       //      Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );
-                                       //      graphics3.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );
-                                       //      bmLane.Dispose();
-                                       //}
-                                       //#endregion
-               
-                                       ColorMatrix matrix2 = new ColorMatrix();
-                                       matrix2.Matrix00 = 1f;
-                                       matrix2.Matrix11 = 1f;
-                                       matrix2.Matrix22 = 1f;
-                                       matrix2.Matrix33 = ( (float) CDTXMania.ConfigIni.n背景の透過度 ) / 255f;
-                                       matrix2.Matrix44 = 1f;
-                                       ColorMatrix newColorMatrix = matrix2;
-                                       ImageAttributes imageAttr = new ImageAttributes();
-                                       imageAttr.SetColorMatrix( newColorMatrix );
-                                       graphics3.DrawImage( bitmap3, new Rectangle( 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height ), 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height, GraphicsUnit.Pixel, imageAttr );
-                               //      graphics3.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel );
-                                       bitmap3.Dispose();
-                                       #endregion
-
-                                       imageAttr.Dispose();
-                                       graphics3.Dispose();
-                                       bSuccessLoadDTXbgfile = true;
-                               }
-                               catch
-                               {
-                                       Trace.TraceError( "背景画像とレーン画像の合成に失敗しました。({0})", bgfilename );
-                               }
-                       }
-                       #region [ BGA画像を表示する予定がある場合は、背景画像からあらかじめその領域を黒抜きにしておく ]
-                       if ( ( CDTXMania.DTX.listBMP.Count > 0 ) || ( CDTXMania.DTX.listBMPTEX.Count > 0 ) || CDTXMania.DTX.listAVI.Count > 0 )
-                       {
-                               Graphics graphics2 = Graphics.FromImage( image );
-                               graphics2.FillRectangle( Brushes.Black, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height );
-                               graphics2.Dispose();
-                       }
-                       #endregion
-                       #region [ 背景画像をテクスチャにする。背景動画の表示予定がある場合は、更に透明度を付与する。 ]
-                       try
-                       {
-                               this.tx背景 = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
-                               if ( CDTXMania.DTX.bMovieをFullscreen再生する )                                            // Fullscreen動画再生が発生する場合は、動画レイヤーに対してレーン+背景レイヤーに透明度を設定する
-                               {
-                                       this.tx背景.n透明度 = 255 - CDTXMania.ConfigIni.n背景の透過度;       // 背景動画用
-                               }
-                       }
-                       catch ( CTextureCreateFailedException )
-                       {
-                               Trace.TraceError( "背景テクスチャの生成に失敗しました。" );
-                               this.tx背景 = null;
-                       }
-                       #endregion
-            CDTXMania.t安全にDisposeする( ref image );
+                }
+            }
+            else
+            {
+                image = new Bitmap( 1280, 720 );
+                this.tx背景 = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
+            }
                }
 
                protected virtual void t入力処理_ギター()
index 29b032f..eed52dd 100644 (file)
@@ -414,7 +414,7 @@ namespace DTXMania
                        {
                                BgFilename = CDTXMania.DTX.strフォルダ名 + BACKGROUND;
                        }
-                       base.t背景テクスチャの生成( DefaultBgFilename, DefaultLaneFilename, bgrect, BgFilename );
+                       base.t背景テクスチャの生成( DefaultBgFilename, bgrect, BgFilename );
                }
 
                protected override void t進行描画_チップ_ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
index 98e19cc..38a700f 100644 (file)
@@ -2762,25 +2762,14 @@ namespace DTXMania
 
                protected override void t背景テクスチャの生成()
                {
-                       Rectangle bgrect;
-                       if ( CDTXMania.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left )
-                       {
-                               bgrect = new Rectangle( (int) ( 338 * Scale.X ), (int) ( 57 * Scale.Y ), (int) ( 278 * 2 ), (int) ( 355 * 2 ) );
-                       }
-                       else
-                       {
-                               bgrect = new Rectangle( 619 + 682, (int) ( 57 * Scale.Y ), (int) ( 278 * 2 ), (int) ( 355 * 2 ) );
-                       }
-                       string DefaultBgFilename = ( CDTXMania.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ?
-                                                                               @"Graphics\ScreenPlayDrums background.png" :
-                                                                               @"Graphics\ScreenPlayDrums-background-center.png";
-                       string DefaultLaneFilename = "";
+            string strDefaultBgImagePath = @"Graphics\7_background.png";
+
                        string BgFilename = "";
                        if ( ( ( CDTXMania.DTX.BACKGROUND != null ) && ( CDTXMania.DTX.BACKGROUND.Length > 0 ) ) && !CDTXMania.ConfigIni.bストイックモード )
                        {
                                BgFilename = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.BACKGROUND;
                        }
-                       base.t背景テクスチャの生成( DefaultBgFilename, DefaultLaneFilename, bgrect, BgFilename );
+                       base.t背景テクスチャの生成( strDefaultBgImagePath, new Rectangle( 0, 0, 1280, 720 ), BgFilename );
                }
 
                protected override void t進行描画_チップ_ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )
index cdb5d6f..8e249f1 100644 (file)
Binary files a/実行時フォルダ/DTXManiaGR.exe and b/実行時フォルダ/DTXManiaGR.exe differ