OSDN Git Service

作業部屋#50705 CActResultImage.csをXGとGITADORAで分離。
authorkairera0467 <gennsou76573@gmail.com>
Sat, 18 Nov 2017 14:32:36 +0000 (23:32 +0900)
committerkairera0467 <gennsou76573@gmail.com>
Sat, 18 Nov 2017 14:32:36 +0000 (23:32 +0900)
作業部屋#50705 曲読み込み画面のGUIをmatixx風に変更する作業を開始。
#xxxxx XG風表示で曲決定アニメが動いていない不具合を修正。
#xxxxx リザルト画面に入れなくなっていた不具合を修正。

DTXManiaプロジェクト/DTXManiaプロジェクト.csproj
DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect演奏履歴パネル.cs
DTXManiaプロジェクト/コード/ステージ/05.選曲/XG/CActSelectステータスパネルXG.cs
DTXManiaプロジェクト/コード/ステージ/05.選曲/XG/CActSelect曲リストXG.cs
DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CAct曲読み込みメイン画面GD.cs [new file with mode: 0644]
DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs
DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage共通.cs [new file with mode: 0644]
DTXManiaプロジェクト/コード/ステージ/08.結果/CStage結果.cs
DTXManiaプロジェクト/コード/ステージ/08.結果/GITADORA/CActResultImageGD.cs [new file with mode: 0644]
DTXManiaプロジェクト/コード/ステージ/08.結果/XG/CActResultImageXG.cs [moved from DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage.cs with 98% similarity]
DTXManiaプロジェクト/コード/全体/CDTXMania.cs

index a05e025..9819336 100644 (file)
     <Compile Include="コード\ステージ\05.選曲\CActSortSongs.cs" />
     <Compile Include="コード\ステージ\05.選曲\CStage選曲.cs" />
     <Compile Include="コード\ステージ\05.選曲\XG\CStage選曲XG.cs" />
+    <Compile Include="コード\ステージ\06.曲読み込み\CAct曲読み込みメイン画面GD.cs" />
     <Compile Include="コード\ステージ\06.曲読み込み\CStage曲読み込み.cs" />
     <Compile Include="コード\ステージ\07.演奏\CAct演奏AVI.cs" />
     <Compile Include="コード\ステージ\07.演奏\CAct演奏BGA.cs" />
     <Compile Include="コード\ステージ\07.演奏\ドラム画面\CAct演奏DrumsレーンフラッシュGB.cs" />
     <Compile Include="コード\ステージ\07.演奏\ドラム画面\CAct演奏Drums判定文字列.cs" />
     <Compile Include="コード\ステージ\07.演奏\ドラム画面\CStage演奏ドラム画面.cs" />
-    <Compile Include="コード\ステージ\08.結果\CActResultImage.cs" />
+    <Compile Include="コード\ステージ\08.結果\CActResultImage共通.cs" />
     <Compile Include="コード\ステージ\08.結果\CActResultParameterPanel.cs" />
     <Compile Include="コード\ステージ\08.結果\CActResultRank.cs" />
     <Compile Include="コード\ステージ\08.結果\CActResultSongBar.cs" />
     <Compile Include="コード\ステージ\08.結果\CStage結果.cs" />
+    <Compile Include="コード\ステージ\08.結果\GITADORA\CActResultImageGD.cs" />
+    <Compile Include="コード\ステージ\08.結果\XG\CActResultImageXG.cs" />
     <Compile Include="コード\ステージ\09.終了\CStage終了.cs" />
     <Compile Include="コード\ステージ\10.ChangeSkin\CStageChangeSkin.cs" />
     <Compile Include="コード\ステージ\CActDFPFont.cs" />
index 3d0409f..5406ff1 100644 (file)
@@ -112,15 +112,19 @@ namespace DTXMania
                                }
                 if( CDTXMania.r現在のステージ.eフェーズID == CStage.Eフェーズ.選曲_決定演出 || CDTXMania.r現在のステージ.eフェーズID == CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト )
                 {
-                    this.n本体Y = 558 + ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
-                    this.txパネル本体.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
-                    this.tx文字列パネル.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
-                    if( CDTXMania.stage選曲.ct決定演出待機.n現在の値 > 250 )
+                    if( CDTXMania.bXGRelease )
                     {
-                        this.n本体Y = 558 + 70;
-                        this.txパネル本体.n透明度 = 0;
-                        this.tx文字列パネル.n透明度 = 0;
+                        this.n本体Y = 558 + ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
+                        this.txパネル本体.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                        this.tx文字列パネル.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                        if( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 > 250 )
+                        {
+                            this.n本体Y = 558 + 70;
+                            this.txパネル本体.n透明度 = 0;
+                            this.tx文字列パネル.n透明度 = 0;
+                        }
                     }
+
                 }
                                if( this.txパネル本体 != null )
                                {
index cb08294..c47fac5 100644 (file)
@@ -451,7 +451,8 @@ namespace DTXMania
                                 }
                                 if( db曲別スキル != 0 )
                                 {
-                                    this.txゲージ用数字他.t2D描画( CDTXMania.app.Device, n曲別スキル位置[ j ], this.n本体Y[ j ] + 51, new Rectangle( 0, 32, 64, 38 ) );
+                                    if( this.txゲージ用数字他 != null )
+                                        this.txゲージ用数字他.t2D描画( CDTXMania.app.Device, n曲別スキル位置[ j ], this.n本体Y[ j ] + 51, new Rectangle( 0, 32, 64, 38 ) );
                                     this.t達成率表示( n曲別スキル位置[ j ] + 11, this.n本体Y[ j ] + 69, string.Format( "{0,6:##0.00}", db曲別スキル ) );
                                 }
                             }
@@ -592,13 +593,13 @@ namespace DTXMania
 
                         if( CDTXMania.r現在のステージ.eフェーズID == CStage.Eフェーズ.選曲_決定演出 || CDTXMania.r現在のステージ.eフェーズID == CStage.Eフェーズ.選曲_NowLoading画面へのフェードアウト )
                         {
-                            this.n本体Y[ 0 ] = 43 - ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
-                            this.n本体Y[ 1 ] = 43 - ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
-                            this.n本体Y[ 2 ] = 546 + ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
-                            this.txパネル本体.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
-                            this.txゲージ用数字他.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
-                            this.tx難易度パネル.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
-                            this.tx難易度数字XG.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                            this.n本体Y[ 0 ] = 43 - ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
+                            this.n本体Y[ 1 ] = 43 - ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
+                            this.n本体Y[ 2 ] = 546 + ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 <= 250 && CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 >= 0 ? (int)( 70 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) : 0 );
+                            this.txパネル本体.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                            this.txゲージ用数字他.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                            this.tx難易度パネル.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                            this.tx難易度数字XG.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
                             if( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 > 250 )
                             {
                                 this.txパネル本体.n透明度 = 0;
@@ -607,13 +608,13 @@ namespace DTXMania
                             }
                             if( this.tx決定後_難易度パネル1P == null )
                                 this.t決定アニメ_難易度パネルを生成する();
-                            if( this.tx決定後_難易度パネル1P != null && ( CDTXMania.ConfigIni.bGuitar有効 && CDTXMania.stage選曲.r確定されたスコア.譜面情報.b譜面がある.Guitar ) )
+                            if( this.tx決定後_難易度パネル1P != null && ( CDTXMania.ConfigIni.bGuitar有効 && CDTXMania.stage選曲XG.r確定されたスコア.譜面情報.b譜面がある.Guitar ) )
                             {
                                 //挙動が謎のためY軸回転は保留。
 
-                                if( CDTXMania.stage選曲.ct決定演出待機.n現在の値 < 400 )
+                                if( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 < 400 )
                                 {
-                                    int nX = (int)( CDTXMania.stage選曲.ct決定演出待機.n現在の値 < 200 ? 100 * ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 / 200.0 ) : 100 - 100 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 - 200.0 ) / 200.0 ) );
+                                    int nX = (int)( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 < 200 ? 100 * ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 / 200.0 ) : 100 - 100 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 - 200.0 ) / 200.0 ) );
                                     this.tx決定後_難易度パネル1P.t2D描画( CDTXMania.app.Device, 254 - nX, 162 );
                                     //CDTXMania.act文字コンソール.tPrint( 0, 64, C文字コンソール.Eフォント種別.白, nX.ToString() );
                                 }
@@ -626,9 +627,9 @@ namespace DTXMania
                             {
                                 //挙動が謎のためY軸回転は保留。
 
-                                if( CDTXMania.stage選曲.ct決定演出待機.n現在の値 < 400 )
+                                if( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 < 400 )
                                 {
-                                    int nX = (int)( CDTXMania.stage選曲.ct決定演出待機.n現在の値 < 200 ? 100 * ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 / 200.0 ) : 100 - 100 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 - 200.0 ) / 200.0 ) );
+                                    int nX = (int)( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 < 200 ? 100 * ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 / 200.0 ) : 100 - 100 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 - 200.0 ) / 200.0 ) );
                                     this.tx決定後_難易度パネル1P.t2D描画( CDTXMania.app.Device, 254 - nX, 162 );
                                     //CDTXMania.act文字コンソール.tPrint( 0, 64, C文字コンソール.Eフォント種別.白, nX.ToString() );
                                 }
index 9fcb3d4..0867b46 100644 (file)
@@ -934,11 +934,11 @@ namespace DTXMania
                 for( int i = 0; i < 15; i++ )
                 {
                     if( this.txTumbnail[ i ] != null )
-                        this.txTumbnail[ i ].n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                        this.txTumbnail[ i ].n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
                     if( this.stバー情報[ i ].txパネル != null )
-                        this.stバー情報[ i ].txパネル.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                        this.stバー情報[ i ].txパネル.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
                 }
-                this.txパネル帯.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
+                this.txパネル帯.n透明度 = (int)( 255 - ( 255 * ( ( CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 ) / 250.0 ) ) );
                 #endregion
                 #region[ 決定時のパネル表示 ]
                 if( this.txベース曲パネル == null )
@@ -946,7 +946,7 @@ namespace DTXMania
                 if( this.txベース曲パネル != null )
                 {
                     //拡大終了まで80ms
-                    int nNowTime = CDTXMania.stage選曲.ct決定演出待機.n現在の値 - 100;
+                    int nNowTime = CDTXMania.stage選曲XG.ct決定演出待機.n現在の値 - 100;
 
                     float fScale = nNowTime > -1 ? ( nNowTime < 100 ? 0.778f + ( 0.222f * ( nNowTime / 100.0f ) ) : 1.0f ) : 0.778f;
                     int nMusicPanelX = (int)( 648 - ( ( 290.0f / 2.0f ) * fScale ) );
diff --git a/DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CAct曲読み込みメイン画面GD.cs b/DTXManiaプロジェクト/コード/ステージ/06.曲読み込み/CAct曲読み込みメイン画面GD.cs
new file mode 100644 (file)
index 0000000..8ff3af5
--- /dev/null
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing;
+using System.Diagnostics;
+using System.IO;
+using SlimDX;
+using FDK;
+
+namespace DTXMania
+{
+       internal class CAct曲読み込みメイン画面GD
+       {
+               // メソッド
+
+               public CAct曲読み込みメイン画面GD()
+               {
+
+               }
+
+               // CActivity 実装
+
+               public void On活性化()
+               {
+
+               }
+               public void On非活性化()
+               {
+
+               }
+               public void OnManagedリソースの作成()
+               {
+            
+               }
+               public void OnManagedリソースの解放()
+               {
+            CDTXMania.tテクスチャの解放( ref this.txJacket );
+               }
+               public int On進行描画()
+               {
+            if( this.txJacket != null )
+            {
+                //とりあえず400x400(1:1)前提で
+                this.txJacket.vc拡大縮小倍率 = new Vector3( 384.0f / this.txJacket.sz画像サイズ.Width, 384.0f / this.txJacket.sz画像サイズ.Height, 1.0f );
+                this.txJacket.t2D描画( CDTXMania.app.Device, 100, 77 );
+            }
+            if( this.txDiffPanel != null )
+            {
+                this.txDiffPanel.t2D描画( CDTXMania.app.Device, 520, 77 );
+            }
+                       return 0;
+               }
+
+        /// <summary>
+        /// ジャケット画像を受け渡しする
+        /// </summary>
+        public void t指定されたパスからジャケット画像を生成する( string path )
+        {
+            if( this.txJacket == null )
+            {
+                this.txJacket = CDTXMania.tテクスチャの生成( path );
+            }
+        }
+
+        public void t難易度パネルの描画( int level )
+        {
+            //しばらくは短形描画で実装
+            Bitmap canvas = new Bitmap( 278, 188 ); //42
+            Graphics g = Graphics.FromImage( canvas );
+
+            SolidBrush sbBack = new SolidBrush( Color.FromArgb( 50, 50, 50 ) );
+            SolidBrush sbLabel = new SolidBrush( Color.FromArgb( 70, 140, 255 ) ); //NOVICE
+
+            g.FillRectangle( sbBack, 0, 0, 278, 188 );
+            g.FillRectangle( sbLabel, 0, 0, 278, 42 );
+
+            this.txDiffPanel = CDTXMania.tテクスチャの生成( canvas );
+            g.Dispose();
+            sbBack.Dispose();
+            sbLabel.Dispose();
+            canvas.Dispose();
+        }
+
+        // その他
+
+        #region [ private ]
+        //-----------------
+        private CTexture txJacket;
+        private CTexture txDiffPanel;
+               //-----------------
+               #endregion
+       }
+}
index e06d0d4..6e0bddf 100644 (file)
@@ -22,6 +22,10 @@ namespace DTXMania
                        base.b活性化してない = true;
                        base.list子Activities.Add( this.actFI = new CActFIFOBlack() ); // #27787 2012.3.10 yyagi 曲読み込み画面のフェードインの省略
                        base.list子Activities.Add( this.actFO = new CActFIFOBlack() );
+
+            if( !CDTXMania.bXGRelease ) {
+                this.actLoadMain = new CAct曲読み込みメイン画面GD();
+            }
                }
 
 
@@ -268,12 +272,7 @@ namespace DTXMania
                        if( !base.b活性化してない )
                        {
                                this.tx背景 = CDTXMania.tテクスチャの生成( this.strSTAGEFILE, false );
-
-                               if ( !this.b音符を表示する && this.tx背景 != null )
-                               {
-                                       this.tx背景.vc拡大縮小倍率 = new Vector3( Scale.X, Scale.Y, 1f );       // とりあえずFullHD化
-                               }
-                               base.OnManagedリソースの作成();
+                base.OnManagedリソースの作成();
                        }
                }
                public override void OnManagedリソースの解放()
@@ -281,6 +280,12 @@ namespace DTXMania
                        if( !base.b活性化してない )
                        {
                                CDTXMania.tテクスチャの解放( ref this.tx背景 );
+
+                if( !CDTXMania.bXGRelease )
+                {
+                    this.actLoadMain.OnManagedリソースの解放();
+                }
+
                                base.OnManagedリソースの解放();
                        }
                }
@@ -344,10 +349,19 @@ namespace DTXMania
                        //-----------------------------
                        #endregion
 
+            if( !CDTXMania.bXGRelease ) {
+                if( !CDTXMania.bコンパクトモード ) { 
+                    this.actLoadMain.t指定されたパスからジャケット画像を生成する( CDTXMania.stage選曲GITADORA.r確定されたスコア.ファイル情報.フォルダの絶対パス + CDTXMania.stage選曲GITADORA.r確定されたスコア.譜面情報.Preimage );
+                    this.actLoadMain.t難易度パネルの描画( 0 );
+                }
+
+                this.actLoadMain.On進行描画();
+            }
+
                        switch( base.eフェーズID )
                        {
                                case CStage.Eフェーズ.共通_フェードイン:
-//                                     if( this.actFI.On進行描画() != 0 )                                  // #27787 2012.3.10 yyagi 曲読み込み画面のフェードインの省略
+                                       //if( this.actFI.On進行描画() != 0 )                                        // #27787 2012.3.10 yyagi 曲読み込み画面のフェードインの省略
                                                                                                                                                // 必ず一度「CStaeg.Eフェーズ.共通_フェードイン」フェーズを経由させること。
                                                                                                                                                // さもないと、曲読み込みが完了するまで、曲読み込み画面が描画されない。
                                                base.eフェーズID = CStage.Eフェーズ.NOWLOADING_DTXファイルを読み込む;
@@ -384,7 +398,7 @@ namespace DTXMania
                                                Trace.TraceInformation( "TITLE: {0}", CDTXMania.DTX.TITLE );
                                                Trace.TraceInformation( "FILE: {0}",  CDTXMania.DTX.strファイル名の絶対パス );
                                                Trace.TraceInformation( "---------------------------" );
-
+                        
                         if( !CDTXMania.bコンパクトモード )
                         {
                             if( CDTXMania.ConfigIni.bSkillModeを自動切替えする && CDTXMania.ConfigIni.bDrums有効 )
@@ -652,7 +666,7 @@ namespace DTXMania
                                        }
                                        return (int) E曲読込画面の戻り値.読込完了;
                        }
-                       return (int) E曲読込画面の戻り値.継続;
+               return (int) E曲読込画面の戻り値.継続;
                }
 
                /// <summary>
@@ -703,10 +717,11 @@ namespace DTXMania
                 CDTXMania.ConfigIni.eSkillMode = ESkillType.XG;
         }
 
-               // その他
+        // その他
 
-               #region [ private ]
-               //-----------------
+        #region [ private ]
+        //-----------------
+        private CAct曲読み込みメイン画面GD actLoadMain;
                private CActFIFOBlack actFI;
                private CActFIFOBlack actFO;
                private bool b音符を表示する;
diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage共通.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/CActResultImage共通.cs
new file mode 100644 (file)
index 0000000..9fb3c1b
--- /dev/null
@@ -0,0 +1,350 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Diagnostics;
+using System.IO;
+using System.Drawing;
+using SlimDX;
+using SlimDX.Direct3D9;
+using FDK;
+
+namespace DTXMania
+{
+       internal class CActResultImage共通 : CActivity
+       {
+               // コンストラクタ
+
+               public CActResultImage共通()
+               {
+                       base.b活性化してない = true;
+               }
+
+
+               // メソッド
+
+               public void tアニメを完了させる()
+               {
+                       this.ct登場用.n現在の値 = this.ct登場用.n終了値;
+               }
+
+               // CActivity 実装
+
+               public override void On活性化()
+               {
+            if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
+            {
+                this.nAlbumWidth = 102;
+                this.nAlbumHeight = 102;
+            }
+            else
+            {
+                this.nAlbumWidth = 128;
+                this.nAlbumHeight = 128;
+            }
+
+            #region [ 本体位置 ]
+
+            int n上X = 453;
+            int n上Y = 11;
+
+            int n下X = 106;
+            int n下Y = 430;
+
+            this.n本体X[0] = 0;
+            this.n本体Y[0] = 0;
+
+            this.n本体X[1] = 0;
+            this.n本体Y[1] = 0;
+
+            this.n本体X[2] = 0;
+            this.n本体Y[2] = 0;
+
+            if (CDTXMania.ConfigIni.bDrums有効)
+            {
+                this.n本体X[0] = n上X;
+                this.n本体Y[0] = n上Y;
+            }
+            else if (CDTXMania.ConfigIni.bGuitar有効)
+            {
+                if (CDTXMania.DTX.bチップがある.Guitar)
+                {
+                    if (CDTXMania.ConfigIni.bIsSwappedGuitarBass)
+                    {
+                        this.n本体X[1] = n下X;
+                        this.n本体Y[1] = n下Y;
+                    }
+                    else
+                    {
+                        this.n本体X[1] = n上X;
+                        this.n本体Y[1] = n上Y;
+                    }
+                }
+
+                if (CDTXMania.DTX.bチップがある.Bass)
+                {
+                    if (CDTXMania.ConfigIni.bIsSwappedGuitarBass)
+                    {
+                        this.n本体X[2] = n上X;
+                        this.n本体Y[2] = n上Y;
+                    }
+                    else
+                    {
+                        this.n本体X[2] = n下X;
+                        this.n本体Y[2] = n下Y;
+                    }
+                }
+
+            }
+            #endregion
+                       base.On活性化();
+               }
+               public override void On非活性化()
+               {
+                       if( this.ct登場用 != null )
+                       {
+                               this.ct登場用 = null;
+                       }
+                       base.On非活性化();
+               }
+               public override void OnManagedリソースの作成()
+               {
+                       if( !base.b活性化してない )
+                       {
+                this.txリザルト画像がないときの画像 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_preimage default.png" ) );
+                this.tx中央パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\8_Center Panel.png" ) );
+
+                if( CDTXMania.bXGRelease )
+                {
+                    if( string.IsNullOrEmpty( CDTXMania.DTX.TITLE ) || ( !CDTXMania.bコンパクトモード && CDTXMania.ConfigIni.b曲名表示をdefのものにする ) )
+                        this.strSongName = CDTXMania.stage選曲XG.r現在選択中の曲.strタイトル;
+                    else
+                        this.strSongName = CDTXMania.DTX.TITLE;
+
+                    if( File.Exists( CDTXMania.stage選曲XG.r確定されたスコア.ファイル情報.フォルダの絶対パス + "\\TitleTexture.png" ) )
+                        this.tx曲名 = CDTXMania.tテクスチャの生成( CDTXMania.stage選曲XG.r確定されたスコア.ファイル情報.フォルダの絶対パス + "\\TitleTexture.png" );
+                    else
+                    {
+                        this.prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 18 );
+                        Bitmap bmpSongName = this.prvFont.DrawPrivateFont( this.strSongName, Color.White );
+                        this.tx曲名 = CDTXMania.tテクスチャの生成( bmpSongName, false );
+
+                        CDTXMania.t安全にDisposeする( ref bmpSongName );
+                    }
+                }
+                else
+                {
+                    if( string.IsNullOrEmpty( CDTXMania.DTX.TITLE ) || ( !CDTXMania.bコンパクトモード && CDTXMania.ConfigIni.b曲名表示をdefのものにする ) )
+                        this.strSongName = CDTXMania.stage選曲GITADORA.r現在選択中の曲.strタイトル;
+                    else
+                        this.strSongName = CDTXMania.DTX.TITLE;
+
+                    if( File.Exists( CDTXMania.stage選曲GITADORA.r確定されたスコア.ファイル情報.フォルダの絶対パス + "\\TitleTexture.png" ) )
+                        this.tx曲名 = CDTXMania.tテクスチャの生成( CDTXMania.stage選曲GITADORA.r確定されたスコア.ファイル情報.フォルダの絶対パス + "\\TitleTexture.png" );
+                    else
+                    {
+                        this.prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 18 );
+                        Bitmap bmpSongName = this.prvFont.DrawPrivateFont( this.strSongName, Color.White );
+                        this.tx曲名 = CDTXMania.tテクスチャの生成( bmpSongName, false );
+
+                        CDTXMania.t安全にDisposeする( ref bmpSongName );
+                    }
+                }
+
+
+
+
+                               base.OnManagedリソースの作成();
+                       }
+               }
+               public override void OnManagedリソースの解放()
+               {
+                       if( !base.b活性化してない )
+                       {
+                               CDTXMania.tテクスチャの解放( ref this.txリザルト画像 );
+                               CDTXMania.tテクスチャの解放( ref this.txリザルト画像がないときの画像 );
+                CDTXMania.tテクスチャの解放( ref this.tx中央パネル );
+                CDTXMania.tテクスチャの解放( ref this.tx曲名 );
+
+                CDTXMania.t安全にDisposeする( ref this.prvFont );
+                               base.OnManagedリソースの解放();
+                       }
+               }
+               public override int On進行描画()
+               {
+                       if( base.b活性化してない )
+                       {
+                               return 0;
+                       }
+                       if( base.b初めての進行描画 )
+                       {
+                               if ( CDTXMania.ConfigIni.bストイックモード )
+                               {
+                                       this.r表示するリザルト画像 = this.txリザルト画像がないときの画像;
+                               }
+                               else if ( ( ( !this.tリザルト画像の指定があれば構築する() ) && ( !this.tプレビュー画像の指定があれば構築する() ) ) )
+                               {
+                                       this.r表示するリザルト画像 = this.txリザルト画像がないときの画像;
+                               }
+
+                               this.ct登場用 = new CCounter( 0, 100, 5, CDTXMania.Timer );
+                               base.b初めての進行描画 = false;
+                       }
+                       this.ct登場用.t進行();
+
+                       #region [ プレビュー画像表示 ]
+            this.tx中央パネル.t2D描画( CDTXMania.app.Device, 0, 267 );
+            if( this.r表示するリザルト画像 != null )
+            {
+                int width = this.r表示するリザルト画像.szテクスチャサイズ.Width;
+                int height = this.r表示するリザルト画像.szテクスチャサイズ.Height;
+
+                /*if( this.ct登場用.n現在の値 < 500 )
+                {
+
+                    var mat = Matrix.Identity;
+
+                    //mat *= Matrix.RotationX( 0.1f - ( ( 0.1f / 200.0f ) * this.ct登場用.n現在の値 ) );
+                    mat *= Matrix.RotationY( this.ct登場用.n現在の値 < 200 ? ( -0.2f - ( ( -0.2f / 200.0f ) * this.ct登場用.n現在の値 ) ) : 0.0f );
+                    //mat *= Matrix.RotationZ( this.ct登場用.n現在の値 < 500 ? ( -0.2f - ( ( -0.2f / 500.0f ) * this.ct登場用.n現在の値 ) ) : 0.0f );
+                    mat *= Matrix.Scaling( ((float)this.nAlbumWidth) / ((float)width), ((float)this.nAlbumHeight) / (float)height, 0.0f );
+
+                    mat *= Matrix.Translation(0f, 0f, 0f);
+
+                    this.r表示するリザルト画像.t3D描画( CDTXMania.app.Device, mat );
+                }
+                else 
+                */
+                {
+                    this.r表示するリザルト画像.vc拡大縮小倍率.X = ((float)this.nAlbumWidth) / ((float)width);
+                    this.r表示するリザルト画像.vc拡大縮小倍率.Y = ((float)this.nAlbumHeight) / ((float)height);
+
+                    int nアルバムX = 436;
+                    int nアルバムY = 271;
+
+                    if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
+                    {
+                        nアルバムX = 449;
+                        nアルバムY = 284;
+                    }
+
+                    this.r表示するリザルト画像.t2D描画(CDTXMania.app.Device, nアルバムX, nアルバムY, new Rectangle(0, 0, width, height));
+                }
+            }
+            #endregion
+            if( CDTXMania.bXGRelease )
+            {
+                if ( File.Exists( CDTXMania.stage選曲XG.r確定されたスコア.ファイル情報.フォルダの絶対パス + "\\TitleTexture.png" ) )
+                {
+                    if( this.tx曲名 != null )
+                    {
+                        this.tx曲名.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f );
+                        this.tx曲名.t2D描画( CDTXMania.app.Device, 576, 345 );
+                    }
+                }
+                else
+                {
+                    if( this.tx曲名 != null )
+                    {
+                        this.tx曲名.vc拡大縮小倍率.X = 0.75f;
+                        this.tx曲名.t2D描画( CDTXMania.app.Device, 576, 346 );
+
+                    }
+                }
+            }
+            else
+            {
+                if ( File.Exists( CDTXMania.stage選曲GITADORA.r確定されたスコア.ファイル情報.フォルダの絶対パス + "\\TitleTexture.png" ) )
+                {
+                    if( this.tx曲名 != null )
+                    {
+                        this.tx曲名.vc拡大縮小倍率 = new Vector3( 0.75f, 0.75f, 1f );
+                        this.tx曲名.t2D描画( CDTXMania.app.Device, 576, 345 );
+                    }
+                }
+                else
+                {
+                    if( this.tx曲名 != null )
+                    {
+                        this.tx曲名.vc拡大縮小倍率.X = 0.75f;
+                        this.tx曲名.t2D描画( CDTXMania.app.Device, 576, 346 );
+
+                    }
+                }
+            }
+
+                       if( !this.ct登場用.b終了値に達した )
+                       {
+                               return 0;
+                       }
+                       return 1;
+               }
+
+
+               // その他
+
+               #region [ private ]
+               //-----------------
+               //private CAvi avi;
+               //private bool b動画フレームを作成した;
+               private CCounter ct登場用;
+               //private long nAVI再生開始時刻;
+               //private int n前回描画したフレーム番号;
+        private STDGBVALUE<int> n本体X;
+        private STDGBVALUE<int> n本体Y;
+        private int nAlbumHeight;
+        private int nAlbumWidth;
+               //private IntPtr pAVIBmp;
+               private CTexture r表示するリザルト画像;
+               //private Surface sfリザルトAVI画像;
+        private CTexture tx中央パネル;
+               private CTexture txリザルト画像;
+               private CTexture txリザルト画像がないときの画像;
+        private CTexture tx曲名;
+        private CPrivateFastFont prvFont;
+        private string strSongName;
+
+               protected bool tプレビュー画像の指定があれば構築する()
+               {
+                       if( string.IsNullOrEmpty( CDTXMania.DTX.PREIMAGE ) )
+                       {
+                               return false;
+                       }
+                       CDTXMania.tテクスチャの解放( ref this.txリザルト画像 );
+                       this.r表示するリザルト画像 = null;
+                       string path = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.PATH + CDTXMania.DTX.PREIMAGE;
+                       if( !File.Exists( path ) )
+                       {
+                               Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { path } );
+                               return false;
+                       }
+                       this.txリザルト画像 = CDTXMania.tテクスチャの生成( path );
+                       this.r表示するリザルト画像 = this.txリザルト画像;
+                       return ( this.r表示するリザルト画像 != null );
+               }
+               protected bool tリザルト画像の指定があれば構築する()
+               {
+                       int rank = CScoreIni.t総合ランク値を計算して返す( CDTXMania.stage結果.st演奏記録.Drums, CDTXMania.stage結果.st演奏記録.Guitar, CDTXMania.stage結果.st演奏記録.Bass );
+                       if (rank == 99) // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
+                       {
+                               rank = 6;
+                       }
+                       if (string.IsNullOrEmpty(CDTXMania.DTX.RESULTIMAGE[rank]))
+                       {
+                               return false;
+                       }
+                       CDTXMania.tテクスチャの解放( ref this.txリザルト画像 );
+                       this.r表示するリザルト画像 = null;
+                       string path = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.PATH + CDTXMania.DTX.RESULTIMAGE[ rank ];
+                       if( !File.Exists( path ) )
+                       {
+                               Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { path } );
+                               return false;
+                       }
+                       this.txリザルト画像 = CDTXMania.tテクスチャの生成( path );
+                       this.r表示するリザルト画像 = this.txリザルト画像;
+                       return ( this.r表示するリザルト画像 != null );
+               }
+               //-----------------
+               #endregion
+       }
+}
index 978507b..b7bad9c 100644 (file)
@@ -44,7 +44,7 @@ namespace DTXMania
                        base.eステージID = CStage.Eステージ.結果;
                        base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
                        base.b活性化してない = true;
-                       base.list子Activities.Add( this.actResultImage = new CActResultImage() );
+                       base.list子Activities.Add( this.actResultImage = new CActResultImage共通() );
                        base.list子Activities.Add( this.actParameterPanel = new CActResultParameterPanel() );
                        base.list子Activities.Add( this.actRank = new CActResultRank() );
                        base.list子Activities.Add( this.actSongBar = new CActResultSongBar() );
@@ -675,7 +675,7 @@ namespace DTXMania
                private CAct演奏AVI actAVI;
                private CActResultParameterPanel actParameterPanel;
                private CActResultRank actRank;
-               private CActResultImage actResultImage;
+               private CActResultImage共通 actResultImage;
                private CActResultSongBar actSongBar;
                private bool bアニメが完了;
                private bool bIsCheckedWhetherResultScreenShouldSaveOrNot;                              // #24509 2011.3.14 yyagi
diff --git a/DTXManiaプロジェクト/コード/ステージ/08.結果/GITADORA/CActResultImageGD.cs b/DTXManiaプロジェクト/コード/ステージ/08.結果/GITADORA/CActResultImageGD.cs
new file mode 100644 (file)
index 0000000..553d891
--- /dev/null
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Diagnostics;
+using System.IO;
+using System.Drawing;
+using SlimDX;
+using SlimDX.Direct3D9;
+using FDK;
+
+namespace DTXMania
+{
+       internal class CActResultImageGD : CActResultImage共通
+       {
+               // コンストラクタ
+
+               public CActResultImageGD()
+               {
+                       base.b活性化してない = true;
+               }
+
+        
+               // CActivity 実装
+
+               public override void On活性化()
+               {
+                       base.On活性化();
+               }
+               public override void On非活性化()
+               {
+                       base.On非活性化();
+               }
+               public override void OnManagedリソースの作成()
+               {
+                       if( !base.b活性化してない )
+                       {
+
+                               base.OnManagedリソースの作成();
+                       }
+               }
+               public override void OnManagedリソースの解放()
+               {
+                       if( !base.b活性化してない )
+                       {
+
+                               base.OnManagedリソースの解放();
+                       }
+               }
+               public override int On進行描画()
+               {
+                       if( base.b活性化してない )
+                       {
+                               return 0;
+                       }
+                       if( base.b初めての進行描画 )
+                       {
+
+                               base.b初めての進行描画 = false;
+                       }
+
+                       return 1;
+               }
+
+
+               // その他
+
+               #region [ private ]
+               //-----------------
+
+               //-----------------
+               #endregion
+       }
+}
@@ -10,23 +10,16 @@ using FDK;
 
 namespace DTXMania
 {
-       internal class CActResultImage : CActivity
+       internal class CActResultImageXG : CActResultImage共通
        {
                // コンストラクタ
 
-               public CActResultImage()
+               public CActResultImageXG()
                {
                        base.b活性化してない = true;
                }
 
-
-               // メソッド
-
-               public void tアニメを完了させる()
-               {
-                       this.ct登場用.n現在の値 = this.ct登場用.n終了値;
-               }
-
+        
                // CActivity 実装
 
                public override void On活性化()
index 638a356..68ace28 100644 (file)
@@ -26,8 +26,8 @@ namespace DTXMania
                public static readonly string D3DXDLL = "d3dx9_43.dll";         // June 2010
         //public static readonly string D3DXDLL = "d3dx9_42.dll";      // February 2010
         //public static readonly string D3DXDLL = "d3dx9_41.dll";      // March 2009
-        //public static readonly bool bXGRelease = true; //システム内部にGITADORA風表示とで大きく異る箇所があるので、わかりやすくなるようにフラグを作成。
-        public static readonly bool bXGRelease = false;
+        public static readonly bool bXGRelease = true; //システム内部にGITADORA風表示とで大きく異る箇所があるので、わかりやすくなるようにフラグを作成。
+        //public static readonly bool bXGRelease = false;
 
                public static CDTXMania app
                {
@@ -1303,11 +1303,11 @@ for (int i = 0; i < 3; i++) {
                                     {
                                                                            if ( !ConfigIni.bギタレボモード )
                                                                            {
-                                                                                   CDTXMania.stage演奏ドラム画面.t演奏位置の変更( CDTXMania.DTXVmode.nStartBar );
+                                                                                   CDTXMania.stage演奏ドラム画面GITADORA.t演奏位置の変更( CDTXMania.DTXVmode.nStartBar );
                                                                            }
                                                                            else
                                                                            {
-                                                                                   CDTXMania.stage演奏ギター画面.t演奏位置の変更( CDTXMania.DTXVmode.nStartBar );
+                                                                                   CDTXMania.stage演奏ギター画面GITADORA.t演奏位置の変更( CDTXMania.DTXVmode.nStartBar );
                                                                            }
                                     }
                                                                }
@@ -1488,14 +1488,23 @@ for (int i = 0; i < 3; i++) {
                                                                //-----------------------------
                                                                CScoreIni.C演奏記録 c演奏記録_Drums, c演奏記録_Guitar, c演奏記録_Bass;
                                                                CDTX.CChip[] chipArray = new CDTX.CChip[ 11 ];
-                                                               if( ConfigIni.bギタレボモード )
-                                                               {
-                                                                       stage演奏ギター画面.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass );
-                                                               }
-                                                               else
-                                                               {
-                                                                       stage演奏ドラム画面.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass, out chipArray );
-                                                               }
+                                if( CDTXMania.bXGRelease )
+                                {
+                                                                   if( ConfigIni.bギタレボモード ) {
+                                                                           stage演奏ギター画面.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass );
+                                                                   } else {
+                                                                           stage演奏ドラム画面.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass, out chipArray );
+                                                                   }
+                                }
+                                else
+                                {
+                                                                   if( ConfigIni.bギタレボモード ) {
+                                                                           stage演奏ギター画面GITADORA.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass );
+                                                                   } else {
+                                                                           stage演奏ドラム画面GITADORA.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass, out chipArray );
+                                                                   }
+                                }
+
 
                                                                if ( CDTXMania.ConfigIni.bIsSwappedGuitarBass )         // #24063 2011.1.24 yyagi Gt/Bsを入れ替えていたなら、演奏結果も入れ替える
                                                                {