DTXManiaXG(Ver.K)4.00Series
修訂 | 9a50e9260ab94a42f64babfe8fe1b84849981f08 (tree) |
---|---|
時間 | 2016-08-28 20:48:35 |
作者 | ![]() |
Commiter | kairera0467 |
#xxxxx (作業部屋50635)FT、LP、LBDのチップ識別用フラグを動くようにした。
#xxxxx (作業部屋50599)背景画像用意のコードを一新。これにより、一時的にBGA枠、DTX指定の背景画像は廃止。
#xxxxx SkillMode切り替えに使う変数をCDTXMania.CDTXのものを使うように変更。
@@ -3195,7 +3195,7 @@ namespace DTXMania | ||
3195 | 3195 | #endregion |
3196 | 3196 | #region[ CLASSIC譜面であるかの判別 ] |
3197 | 3197 | //ここで判別して、演奏画面等のコードを簡略化する。 |
3198 | - if( !this.bチップがある.LeftCymbal && !this.bチップがある.LP && !this.bチップがある.LBD && !this.bチップがある.FT && !this.bチップがある.Ride ) | |
3198 | + if( this.bチップがある.LeftCymbal == false && this.bチップがある.LP == false && this.bチップがある.LBD == false && this.bチップがある.FT == false && this.bチップがある.Ride == false ) | |
3199 | 3199 | { |
3200 | 3200 | this.bCLASSIC譜面である.Drums = true; |
3201 | 3201 | } |
@@ -5836,6 +5836,10 @@ namespace DTXMania | ||
5836 | 5836 | |
5837 | 5837 | switch ( nチャンネル番号 ) |
5838 | 5838 | { |
5839 | + case 0x17: | |
5840 | + this.bチップがある.FT = true; | |
5841 | + break; | |
5842 | + | |
5839 | 5843 | case 0x18: |
5840 | 5844 | this.bチップがある.HHOpen = true; |
5841 | 5845 | break; |
@@ -5848,6 +5852,14 @@ namespace DTXMania | ||
5848 | 5852 | this.bチップがある.LeftCymbal = true; |
5849 | 5853 | break; |
5850 | 5854 | |
5855 | + case 0x1B: | |
5856 | + this.bチップがある.LP = true; | |
5857 | + break; | |
5858 | + | |
5859 | + case 0x1C: | |
5860 | + this.bチップがある.LBD = true; | |
5861 | + break; | |
5862 | + | |
5851 | 5863 | case 0x20: |
5852 | 5864 | this.bチップがある.OpenGuitar = true; |
5853 | 5865 | break; |
@@ -653,8 +653,8 @@ namespace DTXMania | ||
653 | 653 | |
654 | 654 | private void tSkillModeを譜面に応じて切り替える( CDTX cdtx ) |
655 | 655 | { |
656 | - if( CDTXMania.ConfigIni.bDrums有効 ? ( CDTXMania.stage選曲.r確定されたスコア.譜面情報.b完全にCLASSIC譜面である.Drums ) : | |
657 | - ( CDTXMania.stage選曲.r確定されたスコア.譜面情報.b完全にCLASSIC譜面である.Guitar | CDTXMania.stage選曲.r確定されたスコア.譜面情報.b完全にCLASSIC譜面である.Bass ) && | |
656 | + if( CDTXMania.ConfigIni.bDrums有効 ? ( cdtx.bCLASSIC譜面である.Drums ) : | |
657 | + ( cdtx.bCLASSIC譜面である.Guitar | cdtx.bCLASSIC譜面である.Bass ) && | |
658 | 658 | !cdtx.b強制的にXG譜面にする ) |
659 | 659 | CDTXMania.ConfigIni.eSkillMode = ESkillType.DTXMania; |
660 | 660 | else |
@@ -3587,131 +3587,30 @@ namespace DTXMania | ||
3587 | 3587 | } |
3588 | 3588 | |
3589 | 3589 | protected abstract void t背景テクスチャの生成(); |
3590 | - protected void t背景テクスチャの生成( string DefaultBgFilename, string DefaultLaneFilename, Rectangle bgrect, string bgfilename ) | |
3591 | - { // Default...: レーン等があるレイヤー bgfilename: DTXファイルで指定する背景 | |
3590 | + protected void t背景テクスチャの生成( string DefaultBgFilename, Rectangle bgrect, string bgfilename ) | |
3591 | + { | |
3592 | 3592 | Bitmap image = null; |
3593 | 3593 | bool bSuccessLoadDTXbgfile = false; |
3594 | 3594 | |
3595 | + | |
3596 | + | |
3595 | 3597 | //2016.06.18 kairera0467 |
3596 | 3598 | //--ムービークリップが使用されない曲の場合、デフォルトの背景画像を表示させる。 |
3597 | - //--ムービークリップが使用される曲の場合、黒背景を表示させる。 | |
3599 | + //--ムービークリップが使用される曲の場合、黒背景を表示させる。(tx背景を初期化したままにしなければ、ムービーを描画できない。) | |
3598 | 3600 | //--BGAの場合、デフォルトの背景画像の上に、BGAの大きさの黒背景を表示させる。 |
3601 | + if( File.Exists( CSkin.Path( DefaultBgFilename ) ) && CDTXMania.DTX.bチップがある.Movie == false ) | |
3602 | + { | |
3603 | + this.tx背景 = CDTXMania.tテクスチャの生成( CSkin.Path( DefaultBgFilename ) ); | |
3604 | + if( CDTXMania.DTX.listBGA.Count != 0 ) | |
3605 | + { | |
3599 | 3606 | |
3600 | - | |
3601 | - | |
3602 | - | |
3603 | - | |
3604 | - | |
3605 | - | |
3606 | - | |
3607 | - if ( bgfilename != null && File.Exists( bgfilename ) && !CDTXMania.DTX.bチップがある.Movie ) | |
3608 | - { | |
3609 | - try | |
3610 | - { | |
3611 | - #region [ DTXデータで指定されている背景画像を読み込む ] | |
3612 | - Bitmap bitmap1 = null; | |
3613 | - bitmap1 = new Bitmap( bgfilename ); | |
3614 | - if ( ( bitmap1.Size.Width == 0 ) && ( bitmap1.Size.Height == 0 ) ) | |
3615 | - { | |
3616 | - this.tx背景 = null; | |
3617 | - return; | |
3618 | - } | |
3619 | - #endregion | |
3620 | - | |
3621 | - int newWidth = (int) ( bitmap1.Width * Scale.X ); | |
3622 | - int newHeight = (int) ( bitmap1.Height * Scale.Y ); | |
3623 | - Bitmap bitmap2; | |
3624 | - | |
3625 | - #region [ 背景画像がVGAサイズ以下なら、FullHDサイズに拡大する ] | |
3626 | - if ( bitmap1.Width <= 640 && bitmap1.Height <= 480 ) | |
3627 | - { | |
3628 | - bitmap2 = new Bitmap( newWidth, newHeight ); | |
3629 | - Graphics graphic2 = Graphics.FromImage( bitmap2 ); | |
3630 | - graphic2.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; | |
3631 | - graphic2.DrawImage( bitmap1, 0, 0, newWidth, newHeight ); | |
3632 | - graphic2.Dispose(); | |
3633 | - } | |
3634 | - else | |
3635 | - { | |
3636 | - bitmap2 = (Bitmap) bitmap1.Clone(); | |
3637 | - } | |
3638 | - bitmap1.Dispose(); | |
3639 | - #endregion | |
3640 | - | |
3641 | - #region [ 実背景に格子状に配置するよう、コピーしていく ] | |
3642 | - Bitmap bitmap3 = new Bitmap( SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height ); | |
3643 | - Graphics graphics3 = Graphics.FromImage( bitmap3 ); | |
3644 | - for ( int i = 0; i < SampleFramework.GameWindowSize.Height; i += bitmap2.Size.Height ) | |
3645 | - { | |
3646 | - for ( int j = 0; j < SampleFramework.GameWindowSize.Width; j += bitmap2.Size.Width ) | |
3647 | - { | |
3648 | - graphics3.DrawImage( bitmap2, j, i, bitmap2.Width, bitmap2.Height ); | |
3649 | - } | |
3650 | - } | |
3651 | - graphics3.Dispose(); | |
3652 | - bitmap2.Dispose(); | |
3653 | - #endregion | |
3654 | - | |
3655 | - #region [ レーン外・レーンそのもののフレームを合成 ] | |
3656 | - image = new Bitmap( CSkin.Path( DefaultBgFilename ) ); // レーン外のフレーム | |
3657 | - graphics3 = Graphics.FromImage( image ); | |
3658 | - | |
3659 | - //#region [ レーンのフレームがあれば、それを合成 ] | |
3660 | - //if ( DefaultLaneFilename != "" ) | |
3661 | - //{ | |
3662 | - // Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) ); | |
3663 | - // graphics3.DrawImage( bmLane, offsetX[ nLanePosition ], 0 ); | |
3664 | - // bmLane.Dispose(); | |
3665 | - //} | |
3666 | - //#endregion | |
3667 | - | |
3668 | - ColorMatrix matrix2 = new ColorMatrix(); | |
3669 | - matrix2.Matrix00 = 1f; | |
3670 | - matrix2.Matrix11 = 1f; | |
3671 | - matrix2.Matrix22 = 1f; | |
3672 | - matrix2.Matrix33 = ( (float) CDTXMania.ConfigIni.n背景の透過度 ) / 255f; | |
3673 | - matrix2.Matrix44 = 1f; | |
3674 | - ColorMatrix newColorMatrix = matrix2; | |
3675 | - ImageAttributes imageAttr = new ImageAttributes(); | |
3676 | - imageAttr.SetColorMatrix( newColorMatrix ); | |
3677 | - graphics3.DrawImage( bitmap3, new Rectangle( 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height ), 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height, GraphicsUnit.Pixel, imageAttr ); | |
3678 | - // graphics3.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel ); | |
3679 | - bitmap3.Dispose(); | |
3680 | - #endregion | |
3681 | - | |
3682 | - imageAttr.Dispose(); | |
3683 | - graphics3.Dispose(); | |
3684 | - bSuccessLoadDTXbgfile = true; | |
3685 | - } | |
3686 | - catch | |
3687 | - { | |
3688 | - Trace.TraceError( "背景画像とレーン画像の合成に失敗しました。({0})", bgfilename ); | |
3689 | - } | |
3690 | - } | |
3691 | - #region [ BGA画像を表示する予定がある場合は、背景画像からあらかじめその領域を黒抜きにしておく ] | |
3692 | - if ( ( CDTXMania.DTX.listBMP.Count > 0 ) || ( CDTXMania.DTX.listBMPTEX.Count > 0 ) || CDTXMania.DTX.listAVI.Count > 0 ) | |
3693 | - { | |
3694 | - Graphics graphics2 = Graphics.FromImage( image ); | |
3695 | - graphics2.FillRectangle( Brushes.Black, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height ); | |
3696 | - graphics2.Dispose(); | |
3697 | - } | |
3698 | - #endregion | |
3699 | - #region [ 背景画像をテクスチャにする。背景動画の表示予定がある場合は、更に透明度を付与する。 ] | |
3700 | - try | |
3701 | - { | |
3702 | - this.tx背景 = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat ); | |
3703 | - if ( CDTXMania.DTX.bMovieをFullscreen再生する ) // Fullscreen動画再生が発生する場合は、動画レイヤーに対してレーン+背景レイヤーに透明度を設定する | |
3704 | - { | |
3705 | - this.tx背景.n透明度 = 255 - CDTXMania.ConfigIni.n背景の透過度; // 背景動画用 | |
3706 | - } | |
3707 | - } | |
3708 | - catch ( CTextureCreateFailedException ) | |
3709 | - { | |
3710 | - Trace.TraceError( "背景テクスチャの生成に失敗しました。" ); | |
3711 | - this.tx背景 = null; | |
3712 | - } | |
3713 | - #endregion | |
3714 | - CDTXMania.t安全にDisposeする( ref image ); | |
3607 | + } | |
3608 | + } | |
3609 | + else | |
3610 | + { | |
3611 | + image = new Bitmap( 1280, 720 ); | |
3612 | + this.tx背景 = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat ); | |
3613 | + } | |
3715 | 3614 | } |
3716 | 3615 | |
3717 | 3616 | protected virtual void t入力処理_ギター() |
@@ -414,7 +414,7 @@ namespace DTXMania | ||
414 | 414 | { |
415 | 415 | BgFilename = CDTXMania.DTX.strフォルダ名 + BACKGROUND; |
416 | 416 | } |
417 | - base.t背景テクスチャの生成( DefaultBgFilename, DefaultLaneFilename, bgrect, BgFilename ); | |
417 | + base.t背景テクスチャの生成( DefaultBgFilename, bgrect, BgFilename ); | |
418 | 418 | } |
419 | 419 | |
420 | 420 | protected override void t進行描画_チップ_ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip ) |
@@ -2762,25 +2762,14 @@ namespace DTXMania | ||
2762 | 2762 | |
2763 | 2763 | protected override void t背景テクスチャの生成() |
2764 | 2764 | { |
2765 | - Rectangle bgrect; | |
2766 | - if ( CDTXMania.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) | |
2767 | - { | |
2768 | - bgrect = new Rectangle( (int) ( 338 * Scale.X ), (int) ( 57 * Scale.Y ), (int) ( 278 * 2 ), (int) ( 355 * 2 ) ); | |
2769 | - } | |
2770 | - else | |
2771 | - { | |
2772 | - bgrect = new Rectangle( 619 + 682, (int) ( 57 * Scale.Y ), (int) ( 278 * 2 ), (int) ( 355 * 2 ) ); | |
2773 | - } | |
2774 | - string DefaultBgFilename = ( CDTXMania.ConfigIni.eドラムレーン表示位置 == Eドラムレーン表示位置.Left ) ? | |
2775 | - @"Graphics\ScreenPlayDrums background.png" : | |
2776 | - @"Graphics\ScreenPlayDrums-background-center.png"; | |
2777 | - string DefaultLaneFilename = ""; | |
2765 | + string strDefaultBgImagePath = @"Graphics\7_background.png"; | |
2766 | + | |
2778 | 2767 | string BgFilename = ""; |
2779 | 2768 | if ( ( ( CDTXMania.DTX.BACKGROUND != null ) && ( CDTXMania.DTX.BACKGROUND.Length > 0 ) ) && !CDTXMania.ConfigIni.bストイックモード ) |
2780 | 2769 | { |
2781 | 2770 | BgFilename = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.BACKGROUND; |
2782 | 2771 | } |
2783 | - base.t背景テクスチャの生成( DefaultBgFilename, DefaultLaneFilename, bgrect, BgFilename ); | |
2772 | + base.t背景テクスチャの生成( strDefaultBgImagePath, new Rectangle( 0, 0, 1280, 720 ), BgFilename ); | |
2784 | 2773 | } |
2785 | 2774 | |
2786 | 2775 | protected override void t進行描画_チップ_ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip ) |