OSDN Git Service

#xxxxx (XG表示のみ)ゲージ空orRISKY:1時に演奏画面でレーン背後に表示される黒幕を実装
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / DTXManiaプロジェクト / コード / ステージ / 07.演奏 / GITADORA / ドラム画面 / CAct演奏DrumsステータスパネルGD.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Runtime.InteropServices;
5 using System.Drawing;
6 using System.Drawing.Drawing2D;
7 using System.IO;
8 using System.Diagnostics;
9 using SlimDX;
10 using FDK;
11
12 namespace DTXMania
13 {
14     internal class CAct演奏DrumsステータスパネルGD : CAct演奏ステータスパネル共通
15     {
16         //2016.02.21 kairera0467 Imageの解放方法を変更。これでファイルが無かった時の例外処理の書き方が楽になるはず。
17
18         public override void On活性化()
19         {
20             //if( true )
21             //    return;
22
23             this.ftGroupFont = new Font( CDTXMania.ConfigIni.str選曲リストフォント, 16f, FontStyle.Regular, GraphicsUnit.Pixel );
24
25             this.pfNameFont = new CPrivateFastFont( new FontFamily( "Arial" ), 20, FontStyle.Bold ); //2013.09.07.kairera0467 PrivateFontへの移行テスト。
26             this.pfSongTitleFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 20, FontStyle.Regular );
27             base.On活性化();
28         }
29         public override void OnManagedリソースの作成()
30         {
31             if( !base.b活性化してない )
32             {
33                 this.txScore = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_score numbers.png" ) );
34                 this.iPart = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Part_XG.png" ) ); //2016.02.21 kairera0467 ダミーファイルを不要にするため、最初から読み込ませるよう変更。
35                 if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B ) {
36                     this.iDifficulty = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Difficulty_XG.png" ) );
37                     this.iDifficultyNumber = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Difficulty_number_XG.png" ) );
38                 } else {
39                     this.iDifficulty = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Difficulty.png" ) );
40                     this.iDifficultyNumber = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_Difficulty_number_XG2.png" ) );
41                 }
42
43                 this.txSongNamePlate = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\7_Drums Songpanel.png" ) );
44
45                 #region[ ネームプレート本体 ]
46                 this.iNamePlate = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_nameplate.png" ) );
47                 if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
48                 {
49                     if( CDTXMania.ConfigIni.bCLASSIC譜面判別を有効にする && 
50                         ( CDTXMania.DTX.bCLASSIC譜面である.Drums && CDTXMania.DTX.b強制的にXG譜面にする == false ) )
51                     {
52                         if( this.iNamePlate != null )
53                             this.iNamePlate = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_nameplate_cls.png" ) );
54                     }
55                 }
56                 else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B )
57                 {
58                     this.iNamePlate = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_nameplate_XG.png" ) );
59                     if( CDTXMania.ConfigIni.bCLASSIC譜面判別を有効にする && 
60                         ( CDTXMania.DTX.bCLASSIC譜面である.Drums && CDTXMania.DTX.b強制的にXG譜面にする == false ) )
61                     {
62                         if( this.iNamePlate != null && File.Exists( CSkin.Path( @"Graphics\7_nameplate_XG_ccls.png" ) ) )
63                             this.iNamePlate = Image.FromFile( CSkin.Path( @"Graphics\7_nameplate_XG_cls.png" ) );
64                     }
65                 }
66                 #endregion
67                 this.iDrumspeed = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_panel_icons.jpg" ) );
68                 this.iRisky = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\7_panel_icons2.jpg" ) );
69
70                 this.b4font = new Bitmap( 1, 1 );
71                 Graphics gNamePlate = Graphics.FromImage( this.b4font );
72                 gNamePlate.PageUnit = GraphicsUnit.Pixel;
73
74                 if ( string.IsNullOrEmpty( CDTXMania.DTX.TITLE ) || ( !CDTXMania.bコンパクトモード && CDTXMania.ConfigIni.b曲名表示をdefのものにする ) )
75                     this.strPanelString = CDTXMania.stage選曲GITADORA.r現在選択中の曲.strタイトル;
76                 else
77                     this.strPanelString = CDTXMania.DTX.TITLE;
78
79                 this.strPlayerName = string.IsNullOrEmpty( CDTXMania.ConfigIni.strCardName[0] ) ? "GUEST" : CDTXMania.ConfigIni.strCardName[0];
80                 this.strGroupName = string.IsNullOrEmpty( CDTXMania.ConfigIni.strGroupName[0] ) ? "" : CDTXMania.ConfigIni.strGroupName[0];
81                 gNamePlate.Dispose();
82
83                 this.bNamePlate = new Bitmap( 0x170, 0x103 );
84
85                 gNamePlate = Graphics.FromImage( this.bNamePlate );
86                 gNamePlate.DrawImage( this.iNamePlate, 0, 0, 0x170, 0x103 );
87
88                 if (CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A)
89                 {
90                     Rectangle Rect1 = new Rectangle(7, 167, 150, 38);
91                     Rectangle Rect2 = new Rectangle( base.rectDiffPanelPoint.X, base.rectDiffPanelPoint.Y, 150, 38);
92                     gNamePlate.DrawImage(this.iDifficulty, Rect1, Rect2, GraphicsUnit.Pixel);
93                 }
94                 else if (CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B)
95                 {
96                     Rectangle Rect1 = new Rectangle(7, 138, 194, 60);
97                     Rectangle Rect2 = new Rectangle( base.rectDiffPanelPoint.X, base.rectDiffPanelPoint.Y, 194, 60);
98                     gNamePlate.DrawImage(this.iDifficulty, Rect1, Rect2, GraphicsUnit.Pixel);
99                     if (this.iPart != null)
100                     {
101                         Rectangle RectP = new Rectangle(0, 0, 194, 60);
102                         gNamePlate.DrawImage(this.iPart, 7, 138, RectP, GraphicsUnit.Pixel);
103                     }
104                 }
105
106                 this.nCurrentDrumspeed = CDTXMania.ConfigIni.n譜面スクロール速度.Drums;
107
108                 #region[ ネームカラー ]
109                 //--------------------
110                 Color clNameColor = Color.White;
111                 Color clNameColorLower = Color.White;
112                 switch( CDTXMania.ConfigIni.nNameColor[ 0 ] )
113                 {
114                     case 0:
115                         clNameColor = Color.White;
116                         break;
117                     case 1:
118                         clNameColor = Color.LightYellow;
119                         break;
120                     case 2:
121                         clNameColor = Color.Yellow;
122                         break;
123                     case 3:
124                         clNameColor = Color.Green;
125                         break;
126                     case 4:
127                         clNameColor = Color.Blue;
128                         break;
129                     case 5:
130                         clNameColor = Color.Purple;
131                         break;
132                     case 6:
133                         clNameColor = Color.Red;
134                         break;
135                     case 7:
136                         clNameColor = Color.Brown;
137                         break;
138                     case 8:
139                         clNameColor = Color.Silver;
140                         break;
141                     case 9:
142                         clNameColor = Color.Gold;
143                         break;
144
145                     case 10:
146                         clNameColor = Color.White;
147                         break;
148                     case 11:
149                         clNameColor = Color.LightYellow;
150                         clNameColorLower = Color.White;
151                         break;
152                     case 12:
153                         clNameColor = Color.Yellow;
154                         clNameColorLower = Color.White;
155                         break;
156                     case 13:
157                         clNameColor = Color.FromArgb( 0, 255, 33 );
158                         clNameColorLower = Color.White;
159                         break;
160                     case 14:
161                         clNameColor = Color.FromArgb( 0, 38, 255 );
162                         clNameColorLower = Color.White;
163                         break;
164                     case 15:
165                         clNameColor = Color.FromArgb( 72, 0, 255 );
166                         clNameColorLower = Color.White;
167                         break;
168                     case 16:
169                         clNameColor = Color.FromArgb( 255, 255, 0, 0 );
170                         clNameColorLower = Color.White;
171                         break;
172                     case 17:
173                         clNameColor = Color.FromArgb( 255, 232, 182, 149 );
174                         clNameColorLower = Color.FromArgb( 255, 122, 69, 26 );
175                         break;
176                     case 18:
177                         clNameColor = Color.FromArgb( 246, 245, 255 );
178                         clNameColorLower = Color.FromArgb( 125, 128, 137 );
179                         break;
180                     case 19:
181                         clNameColor = Color.FromArgb( 255, 238, 196, 85 );
182                         clNameColorLower = Color.FromArgb(255, 255, 241, 200 );
183                         break;
184                 }
185
186                 Bitmap bmpCardName = new Bitmap( 1, 1 );
187
188                 if (CDTXMania.ConfigIni.nNameColor.Drums >= 11)
189                 {
190                     bmpCardName = this.pfNameFont.DrawPrivateFont(this.strPlayerName, clNameColor, Color.Transparent, clNameColor, clNameColorLower);
191                 }
192                 else
193                 {
194                     bmpCardName = this.pfNameFont.DrawPrivateFont(this.strPlayerName, clNameColor, Color.Transparent);
195                 }
196                 //--------------------
197                 #endregion
198                 #region[ 名前、グループ名 ]
199                 //2013.09.07.kairera0467 できればこの辺のメンテナンスが楽にできるよう、コードを簡略にしたいが・・・・
200                 Bitmap bmpSongTitle = new Bitmap( 1, 1 );
201                 #region[ 曲名 ]
202                 if( File.Exists( CDTXMania.DTX.strフォルダ名 + "\\TitleTexture.png" ) )
203                 {
204                     Image imgCustomSongNameTexture;
205                     imgCustomSongNameTexture = CDTXMania.tテクスチャをImageで読み込む( CDTXMania.DTX.strフォルダ名 + "\\TitleTexture.png" );
206                     //2014.08.11 kairera0467 XG1とXG2では座標が異なるため、変数を使って対処する。
207                     int x = CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ? 78 : 80;
208                     int y = CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ? 59 : 50;
209                     gNamePlate.DrawImage( imgCustomSongNameTexture, x, y, 238, 30 );
210                 }
211                 else
212                 {
213                     //PrivateFontのテスト
214                     Bitmap bmpSongName = pfSongTitleFont.DrawPrivateFont( this.strPanelString, Color.White );
215                     int y = CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ? 60 : 52;
216                     if( ( bmpSongName.Size.Width / 1.25f ) > 240 )
217                     {
218                         gNamePlate.DrawImage( bmpSongName, 80f, y, ( bmpSongName.Size.Width / 1.25f ) * ( 240.0f / ( bmpSongName.Size.Width / 1.25f ) ), bmpSongName.Size.Height );
219                     }
220                     else
221                     {
222                         gNamePlate.DrawImage( bmpSongName, 80f, y, ( bmpSongName.Size.Width / 1.25f ), bmpSongName.Size.Height );
223                     }
224                     CDTXMania.t安全にDisposeする( ref bmpSongName );
225                 }
226                 #endregion
227
228                 if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
229                 {
230                     gNamePlate.DrawImage( bmpCardName, 42f, 126f );
231                     gNamePlate.DrawString( this.strGroupName, this.ftGroupFont, Brushes.White, 54f, 105f );
232                 }
233                 else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B )
234                 {
235                     gNamePlate.DrawImage( bmpCardName, 46f, 92f );
236                 }
237                 #endregion
238                 #region[ 難易度数値 ]
239                 string str = string.Format( "{0:0.00}", ( (float)CDTXMania.DTX.LEVEL.Drums) / 10f );
240                 str = string.Format( "{0:0.00}", ( (float)CDTXMania.DTX.LEVEL.Drums ) / 10.0f + ( CDTXMania.DTX.LEVELDEC.Drums != 0 ? CDTXMania.DTX.LEVELDEC.Drums / 100.0f : 0 ) );
241                 int[] nDigit = new int[]{ Convert.ToInt16( str[ 0 ].ToString() ), Convert.ToInt16( str[ 2 ].ToString() ),Convert.ToInt16( str[ 3 ].ToString() ) };
242
243                 if ( CDTXMania.ConfigIni.bCLASSIC譜面判別を有効にする ? ( CDTXMania.DTX.bCLASSIC譜面である.Drums && CDTXMania.DTX.b強制的にXG譜面にする == false ) : false )
244                 {
245                     str = string.Format( "{0:00}", CDTXMania.DTX.LEVEL.Drums );
246                     nDigit = new int[]{ Convert.ToInt16( str[ 0 ].ToString() ), Convert.ToInt16( str[ 1 ].ToString() ) };
247                 }
248                 //左
249                 if( CDTXMania.ConfigIni.bCLASSIC譜面判別を有効にする ? ( CDTXMania.DTX.bCLASSIC譜面である.Drums && CDTXMania.DTX.b強制的にXG譜面にする == false ) : false )
250                 {
251                     if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ){
252                         gNamePlate.DrawImage( this.iDifficultyNumber, 94, 170, new Rectangle( nDigit[ 0 ] * 22, 0, 22, 32 ), GraphicsUnit.Pixel );
253                         gNamePlate.DrawImage( this.iDifficultyNumber, 116, 170, new Rectangle( nDigit[ 1 ] * 22, 0, 22, 32 ), GraphicsUnit.Pixel );
254                     } else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B ) {
255                         gNamePlate.DrawImage( this.iDifficultyNumber, new Rectangle( 88, 148, 25, 42), new Rectangle( nDigit[ 0 ] * 34, 0, 34, 48 ), GraphicsUnit.Pixel );
256                         gNamePlate.DrawImage( this.iDifficultyNumber, new Rectangle( 113, 148, 25, 42), new Rectangle( nDigit[ 1 ] * 34, 0, 34, 48 ), GraphicsUnit.Pixel );
257                     }
258                 }
259                 else
260                 {
261                     if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ) {
262                         gNamePlate.DrawImage( this.iDifficultyNumber, 83, 170, new Rectangle( nDigit[ 0 ] * 22, 0, 22, 32 ), GraphicsUnit.Pixel );
263                         gNamePlate.DrawImage( this.iDifficultyNumber, 106, 197, new Rectangle( 0, 54, 4, 4 ), GraphicsUnit.Pixel );
264                     } else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B ) {
265                         gNamePlate.DrawImage( this.iDifficultyNumber, 94, 145, new Rectangle( nDigit[ 0 ] * 34, 0, 34, 48 ), GraphicsUnit.Pixel );
266                         gNamePlate.DrawImage( this.iDifficultyNumber, 130, 185, new Rectangle( 0, 70, 4, 4 ), GraphicsUnit.Pixel );
267                     }
268                 }
269
270                 //右
271                 if( CDTXMania.ConfigIni.bCLASSIC譜面判別を有効にする ? ( !CDTXMania.DTX.bCLASSIC譜面である.Drums || CDTXMania.DTX.b強制的にXG譜面にする ) : true )
272                 {
273                     if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A ) {
274                         gNamePlate.DrawImage( this.iDifficultyNumber, 112, 180, new Rectangle( 16 * nDigit[ 1 ], 32, 16, 22 ), GraphicsUnit.Pixel );
275                         gNamePlate.DrawImage( this.iDifficultyNumber, 128, 180, new Rectangle( 16 * nDigit[ 2 ], 32, 16, 22 ), GraphicsUnit.Pixel );
276                     } else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B ) {
277                         gNamePlate.DrawImage( this.iDifficultyNumber, 136, 170, new Rectangle( 16 * nDigit[ 1 ], 48, 16, 22 ), GraphicsUnit.Pixel );
278                         gNamePlate.DrawImage( this.iDifficultyNumber, 152, 170, new Rectangle( 16 * nDigit[ 2 ], 48, 16, 22 ), GraphicsUnit.Pixel );
279                     }
280                 }
281                 #endregion
282                 #region[ ジャケット画像 オプションアイコン ]
283                 string path = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.PATH + CDTXMania.DTX.PREIMAGE;
284                 if( !File.Exists( path ) ) {
285                     this.iAlbum = CDTXMania.tテクスチャをImageで読み込む( CSkin.Path( @"Graphics\5_preimage default.png" ) );
286                 } else {
287                     this.iAlbum = CDTXMania.tテクスチャをImageで読み込む( path );
288                 }
289
290                 if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
291                 {
292                     gNamePlate.DrawImage( this.iAlbum,     new Rectangle( 6, 0x11, 0x45, 0x4b ),  new Rectangle( 0, 0, this.iAlbum.Width, this.iAlbum.Height ), GraphicsUnit.Pixel );
293                     if( this.iDrumspeed != null )
294                         gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 209, 156, 42, 48 ),     new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel );
295                     if( this.iRisky != null )
296                         gNamePlate.DrawImage( this.iRisky,     new Rectangle( 258, 156, 42, 48 ),     new Rectangle( 0, ( ( CDTXMania.ConfigIni.nRisky > 10 ) ? 10 : CDTXMania.ConfigIni.nRisky ) * 48, 42, 48 ), GraphicsUnit.Pixel );
297                 }
298                 else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B )
299                 {
300                     gNamePlate.DrawImage( this.iAlbum,     new Rectangle( 6, 9, 0x45, 0x4b ), new Rectangle( 0, 0, this.iAlbum.Width, this.iAlbum.Height ), GraphicsUnit.Pixel );
301                     gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 210, 141, 42, 48 ), new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel );
302                     gNamePlate.DrawImage( this.iRisky,     new Rectangle( 258, 141, 42, 48 ), new Rectangle( 0, ( ( CDTXMania.ConfigIni.nRisky > 10 ) ? 10 : CDTXMania.ConfigIni.nRisky ) * 48, 42, 48 ), GraphicsUnit.Pixel );
303                 }
304                 #endregion
305
306                 CDTXMania.t安全にDisposeする( ref gNamePlate );
307                 CDTXMania.t安全にDisposeする( ref bmpCardName );
308                 CDTXMania.t安全にDisposeする( ref bmpSongTitle );
309                 CDTXMania.t安全にDisposeする( ref b4font );
310                 //テクスチャ変換
311                 this.txNamePlate = new CTexture( CDTXMania.app.Device, this.bNamePlate, CDTXMania.TextureFormat, false );
312
313                 //ハイスピ画像の描画で使うので、ここでbNamePlateをDisposeしてはいけない。
314                 CDTXMania.t安全にDisposeする( ref this.iAlbum );
315                 CDTXMania.t安全にDisposeする( ref this.iNamePlate );
316                 CDTXMania.t安全にDisposeする( ref this.iDifficulty );
317                 CDTXMania.t安全にDisposeする( ref this.iDifficultyNumber );
318                 CDTXMania.t安全にDisposeする( ref this.iPart );
319
320                 //ここで使用したフォント3つはここで開放。
321                 CDTXMania.t安全にDisposeする( ref this.pfNameFont );
322                 CDTXMania.t安全にDisposeする( ref this.pfSongTitleFont );
323
324                 base.OnManagedリソースの作成();
325             }
326         }
327         public override void OnManagedリソースの解放()
328         {
329             if( !base.b活性化してない )
330             {
331                 //テクスチャ5枚
332                 //イメージ 6枚(ジャケット画像はここで解放しない)
333                 //フォント 5個
334                 CDTXMania.tテクスチャの解放( ref this.txNamePlate );
335                 CDTXMania.tテクスチャの解放( ref this.txScore );
336                 CDTXMania.tテクスチャの解放( ref this.txSongNamePlate );
337                 CDTXMania.t安全にDisposeする( ref this.iRisky );
338                 CDTXMania.t安全にDisposeする( ref this.iDrumspeed );
339                 CDTXMania.t安全にDisposeする( ref this.pfNameFont );
340                 CDTXMania.t安全にDisposeする( ref this.pfSongTitleFont );
341
342                 base.OnManagedリソースの解放();
343             }
344         }
345
346         public override int On進行描画()
347         {
348             if( !base.b活性化してない )
349             {
350                 //if( true )
351                 //    return 0;
352
353                 SlimDX.Matrix identity = SlimDX.Matrix.Identity;
354                 if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B )
355                 {
356                     identity *= SlimDX.Matrix.Translation( -1135, 150, 0 );
357                     identity *= SlimDX.Matrix.Scaling( 0.338f, 0.62f, 1f );
358                     identity *= SlimDX.Matrix.RotationY( -0.8f );
359                 }
360                 else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
361                 {
362                     identity *= SlimDX.Matrix.Translation( -991, 225, 0 );
363                     identity *= SlimDX.Matrix.Scaling( 0.385f, 0.61f, 1.0f );
364                     identity *= SlimDX.Matrix.RotationY( -0.60f );
365                 }
366
367                 //if ( CDTXMania.ConfigIni.bShowMusicInfo )
368                 if( this.txNamePlate != null )
369                 {
370                     //this.txNamePlate.t3D描画( CDTXMania.app.Device, identity );
371                 }
372
373                 if( this.txSongNamePlate != null )
374                 {
375                     this.txSongNamePlate.t2D描画( CDTXMania.app.Device, 969, -2 );
376                 }
377
378
379                 #region[ HSアイコン ]
380                 //ハイスピはここで描画させる。
381                 if( this.nCurrentDrumspeed != CDTXMania.ConfigIni.n譜面スクロール速度.Drums && this.iDrumspeed != null )
382                 {
383                     Graphics gNamePlate = Graphics.FromImage( this.bNamePlate );
384                     this.nCurrentDrumspeed = CDTXMania.ConfigIni.n譜面スクロール速度.Drums;
385                     if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
386                     {
387                         gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 209, 156, 42, 48 ), new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel );
388                     }
389                     else if(CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B)
390                     {
391                         gNamePlate.DrawImage( this.iDrumspeed, new Rectangle( 210, 141, 42, 48 ), new Rectangle( 0, ( ( this.nCurrentDrumspeed > 15 ) ? 15 : this.nCurrentDrumspeed ) * 0x30, 0x2a, 0x30 ), GraphicsUnit.Pixel );
392                     }
393                     gNamePlate.Dispose();
394                     this.txNamePlate.Dispose();
395                     this.txNamePlate = new CTexture( CDTXMania.app.Device, this.bNamePlate, CDTXMania.TextureFormat, false );
396                 }
397                 #endregion
398                 #region[ スコア表示 ]
399                 this.n表示スコア.Drums = (long)CDTXMania.stage演奏ドラム画面.actScore.n現在表示中のスコア.Drums;
400                 //if ( CDTXMania.ConfigIni.nSkillMode == 0 && CDTXMania.ConfigIni.bShowScore )
401                 if( CDTXMania.ConfigIni.eSkillMode == ESkillType.DTXMania )
402                 {
403                     string str = this.n表示スコア.Drums.ToString("0000000000");
404                     for (int i = 0; i < 10; i++)
405                     {
406                         Rectangle rectangle;
407                         char ch = str[i];
408                         if (ch.Equals(' '))
409                         {
410                             rectangle = new Rectangle(0, 0, 32, 36);
411                         }
412                         else
413                         {
414                             int num3 = int.Parse(str.Substring(i, 1));
415                             if (num3 < 5)
416                             {
417                                 rectangle = new Rectangle((num3 * 32), 0, 32, 36);
418                             }
419                             else
420                             {
421                                 rectangle = new Rectangle((num3 * 32), 0, 32, 36);
422                             }
423                         }
424                         if (this.txScore != null)
425                         {
426                             SlimDX.Matrix matScoreXG = SlimDX.Matrix.Identity;
427                             //if ( !CDTXMania.ConfigIni.bShowMusicInfo )
428                             //{
429                             //    matScoreXG *= SlimDX.Matrix.Translation((-615f + (i * 21f)) / 0.7f, 280, 0);
430                             //    matScoreXG *= SlimDX.Matrix.Scaling(0.7f, 1f, 1f);
431                             //}
432                             //else if ( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
433                             if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
434                             {
435                                 matScoreXG *= SlimDX.Matrix.Translation(-1220 + (i * 30), 120 + CDTXMania.stage演奏ドラム画面.actScore.x位置[i].Drums, 0);
436                                 matScoreXG *= SlimDX.Matrix.Scaling(0.34f, 0.62f, 1.0f);
437                                 matScoreXG *= SlimDX.Matrix.RotationY(-0.60f);
438                             }
439                             else if ( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B )
440                             {
441                                 matScoreXG *= SlimDX.Matrix.Translation(-1370 + (i * 30), 50 + CDTXMania.stage演奏ドラム画面.actScore.x位置[i].Drums, 0);
442                                 matScoreXG *= SlimDX.Matrix.Scaling(0.3f, 0.62f, 1f);
443                                 matScoreXG *= SlimDX.Matrix.RotationY(-0.8f);
444                                 //matScoreXG *= SlimDX.Matrix.RotationZ(-0.01f);
445                             }
446                             //this.txScore.t3D描画(CDTXMania.app.Device, matScoreXG, rectangle);
447                         }
448                     }
449                 }
450                 //else if ( CDTXMania.ConfigIni.eSkillMode == ESkillType.XG && CDTXMania.ConfigIni.bShowScore )
451                 else if( CDTXMania.ConfigIni.eSkillMode == ESkillType.XG )
452                 {
453                     string str = this.n表示スコア.Drums.ToString("0000000");
454                     for( int i = 0; i < 7; i++ )
455                     {
456                         Rectangle rectangle;
457                         char ch = str[i];
458                         if (ch.Equals(' '))
459                         {
460                             rectangle = new Rectangle(0, 0, 32, 36);
461                         }
462                         else
463                         {
464                             int num3 = int.Parse(str.Substring(i, 1));
465                             if (num3 < 5)
466                             {
467                                 rectangle = new Rectangle((num3 * 32), 0, 32, 36);
468                             }
469                             else
470                             {
471                                 rectangle = new Rectangle((num3 * 32), 0, 32, 36);
472                             }
473                         }
474                         if( this.txScore != null )
475                         {
476                             SlimDX.Matrix matScoreXG = SlimDX.Matrix.Identity;
477                             //if ( !CDTXMania.ConfigIni.bShowMusicInfo )
478                             //{
479                             //    matScoreXG *= SlimDX.Matrix.Translation(-610 + (i * 30), 280, 0);
480                             //    matScoreXG *= SlimDX.Matrix.Scaling(1f, 1f, 1f);
481                             //}
482                             //else if ( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
483                             if ( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.A )
484                             {
485                                 matScoreXG *= SlimDX.Matrix.Translation(-870 + (i * 30), 114 + CDTXMania.stage演奏ドラム画面.actScore.x位置[i].Drums, 0);
486                                 matScoreXG *= SlimDX.Matrix.Scaling(0.47f, 0.65f, 1.0f);
487                                 matScoreXG *= SlimDX.Matrix.RotationY(-0.60f);
488                             }
489                             else if( CDTXMania.ConfigIni.eNamePlateType == Eタイプ.B )
490                             {
491                                 matScoreXG *= SlimDX.Matrix.Translation(-974 + (i * 30), 50 + CDTXMania.stage演奏ドラム画面.actScore.x位置[i].Drums, 0);
492                                 matScoreXG *= SlimDX.Matrix.Scaling(0.42f, 0.62f, 1f);
493                                 matScoreXG *= SlimDX.Matrix.RotationY(-0.8f);
494                                 //matScoreXG *= SlimDX.Matrix.RotationZ(-0.01f);
495                             }
496                             //this.txScore.t3D描画(CDTXMania.app.Device, matScoreXG, rectangle);
497                         }
498                     }
499                 }
500                 #endregion
501             }
502             return 0;
503
504         }
505
506
507         // その他
508
509         #region [ private ]
510         //-----------------
511         private Bitmap b4font;
512         private Bitmap bNamePlate;
513         private Font ftGroupFont;
514         private Image iAlbum;
515         private Image iDifficulty;
516         private Image iDifficultyNumber;
517         private Image iDrumspeed;
518         private Image iNamePlate;
519         private Image iPart;
520         private Image iRisky;
521         private int nCurrentDrumspeed;
522         private string strGroupName;
523         private string strPanelString;
524         private string strPlayerName;
525         private CTexture txNamePlate;
526         private CTexture txScore;
527         private CPrivateFastFont pfNameFont;
528         private CPrivateFastFont pfSongTitleFont;
529         private CPrivateFastFont pfPlayerNameFont;
530         private CPrivateFastFont pfGroupNameFont;
531
532         private CTexture txSongNamePlate;
533         //-----------------
534         #endregion
535     }
536 }