Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect曲リスト.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 431 - (show annotations) (download)
Thu Feb 12 13:42:11 2015 UTC (9 years, 1 month ago) by kairera0467
File size: 135472 byte(s)
#34831 Config.iniの説明書きを調整。
#xxxxx 一部の画像を最適化メソッドを使って描画するようにした。
#xxxxx 「MusicDecide.ogg」があった場合、曲決定時に別の効果音を使うようにした。
#xxxxx ギター画面のコンボ画像を作り直した。同時に1の位のアニメ実装。
#xxxxx 終了時にInput側のタイマーが原因でエラーが出るのを修正。

1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Globalization;
5 using System.Runtime.InteropServices;
6 using System.Drawing;
7 using System.Drawing.Imaging;
8 using System.Diagnostics;
9 using System.Drawing.Text;
10 using System.IO;
11 using SlimDX;
12 using FDK;
13
14 namespace DTXMania
15 {
16 //ここをXG風にする際に使ったコードはSSTから拝借、改造している。
17 internal class CActSelect曲リスト : CActivity
18 {
19
20 // プロパティ
21
22 public bool bIsEnumeratingSongs
23 {
24 get;
25 set;
26 }
27 public bool bスクロル中
28 {
29 get
30 {
31 if( this.n目標のスクロルカウンタ == 0 )
32 {
33 return ( this.n現在のスクロルカウンタ != 0 );
34 }
35 return true;
36 }
37 }
38 public int n現在のアンカ難易度レベル
39 {
40 get;
41 private set;
42 }
43 public int n現在選択中の曲の現在の難易度レベル
44 {
45 get
46 {
47 return this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( this.r現在選択中の曲 );
48 }
49 }
50 public Cスコア r現在選択中のスコア
51 {
52 get
53 {
54 if( this.r現在選択中の曲 != null )
55 {
56 return this.r現在選択中の曲.arスコア[ this.n現在選択中の曲の現在の難易度レベル ];
57 }
58 return null;
59 }
60 }
61 public C曲リストノ r現在選択中の曲
62 {
63 get;
64 private set;
65 }
66
67 public int nスクロルバ相対y座標
68 {
69 get;
70 private set;
71 }
72
73 // t選択曲が変更された()内で使う、直前の選曲の保持
74 // (前と同じ曲なら選択曲変更に掛かる再計算を省略して高速化するため)
75 private C曲リストノ song_last = null;
76
77
78 // コンストラクタ
79
80 public CActSelect曲リスト()
81 {
82 this.r現在選択中の曲 = null;
83 this.n現在のアンカ難易度レベル = 0;
84 base.b活性化してない = true;
85 this.bIsEnumeratingSongs = false;
86
87
88 this.stパネルマップ = null;
89 this.stパネルマップ = new STATUSPANEL[12]; // yyagi: 以下、手抜きの初期化でスマン
90 string[] labels = new string[12] {
91 "DTXMANIA", //0
92 "DEBUT", //1
93 "NOVICE", //2
94 "REGULAR", //3
95 "EXPERT", //4
96 "MASTER", //5
97 "BASIC", //6
98 "ADVANCED", //7
99 "EXTREME", //8
100 "RAW", //9
101 "RWS", //10
102 "REAL" //11
103 };
104 int[] status = new int[12] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
105
106 for (int i = 0; i < 12; i++)
107 {
108 this.stパネルマップ[i] = default(STATUSPANEL);
109 this.stパネルマップ[i].status = status[i];
110 this.stパネルマップ[i].label = labels[i];
111 }
112 }
113
114
115 // メソッド
116
117 public int n現在のアンカ難易度レベルに最も近い難易度レベルを返す( C曲リストノ song )
118 {
119 // 事前チェック。
120
121 if( song == null )
122 return this.n現在のアンカ難易度レベル; // 曲がまったくないよ
123
124 if( song.arスコア[ this.n現在のアンカ難易度レベル ] != null )
125 return this.n現在のアンカ難易度レベル; // 難易度ぴったりの曲があったよ
126
127 if( ( song.eド種別 == C曲リストノ.Eド種別.BOX ) || ( song.eド種別 == C曲リストノ.Eド種別.BACKBOX ) )
128 return 0; // BOX と BACKBOX は関係無いよ
129
130
131 // 現在のアンカレベルから、難易度上向きに検索開始。
132
133 int n最も近いレベル = this.n現在のアンカ難易度レベル;
134
135 for( int i = 0; i < 5; i++ )
136 {
137 if( song.arスコア[ n最も近いレベル ] != null )
138 break; // 曲があった。
139
140 n最も近いレベル = ( n最も近いレベル + 1 ) % 5; // 曲がなかったので次の難易度レベルへGo。(5以上になったら0に戻る。)
141 }
142
143
144 // 見つかった曲がアンカより下のレベルだった場合……
145 // アンカから下向きに検索すれば、もっとアンカに近い曲があるんじゃね?
146
147 if( n最も近いレベル < this.n現在のアンカ難易度レベル )
148 {
149 // 現在のアンカレベルから、難易度下向きに検索開始。
150
151 n最も近いレベル = this.n現在のアンカ難易度レベル;
152
153 for( int i = 0; i < 5; i++ )
154 {
155 if( song.arスコア[ n最も近いレベル ] != null )
156 break; // 曲があった。
157
158 n最も近いレベル = ( ( n最も近いレベル - 1 ) + 5 ) % 5; // 曲がなかったので次の難易度レベルへGo。(0未満になったら4に戻る。)
159 }
160 }
161
162 return n最も近いレベル;
163 }
164 public C曲リストノ r指定された曲が存在するリストの先頭の曲( C曲リストノ song )
165 {
166 List<C曲リストノ> songList = GetSongListWithinMe( song );
167 return ( songList == null ) ? null : songList[ 0 ];
168 }
169 public C曲リストノ r指定された曲が存在するリストの末尾の曲( C曲リストノ song )
170 {
171 List<C曲リストノ> songList = GetSongListWithinMe( song );
172 return ( songList == null ) ? null : songList[ songList.Count - 1 ];
173 }
174
175 private List<C曲リストノ> GetSongListWithinMe( C曲リストノ song )
176 {
177 if ( song.r親ノ == null ) // root階層のノートだったら
178 {
179 return CDTXMania.Songs管理.list曲ル; // rootのリストを返す
180 }
181 else
182 {
183 if ( ( song.r親ノ.list子リスト != null ) && ( song.r親ノ.list子リスト.Count > 0 ) )
184 {
185 return song.r親ノ.list子リスト;
186 }
187 else
188 {
189 return null;
190 }
191 }
192 }
193
194
195 public delegate void DGSortFunc( List<C曲リストノ> songList, E楽器パ eInst, int order, params object[] p);
196 /// <summary>
197 /// 主にCSong管理.cs内にあるソート機能を、delegateで呼び出す。
198 /// </summary>
199 /// <param name="sf">ソート用に呼び出すメソッド</param>
200 /// <param name="eInst">ソート基準とする楽器</param>
201 /// <param name="order">-1=降順, 1=昇順</param>
202 public void t曲リストのソ( DGSortFunc sf, E楽器パ eInst, int order, params object[] p )
203 {
204 List<C曲リストノ> songList = GetSongListWithinMe( this.r現在選択中の曲 );
205 if ( songList == null )
206 {
207 // 何もしない;
208 }
209 else
210 {
211 // CDTXMania.Songs管理.t曲リストのソート3_演奏回数の多い順( songList, eInst, order );
212 sf( songList, eInst, order, p );
213 // this.r現在選択中の曲 = CDTXMania
214 this.t現在選択中の曲を元に曲バを再構成する();
215 }
216 }
217
218 public bool tBOXに入る()
219 {
220 //Trace.TraceInformation( "box enter" );
221 //Trace.TraceInformation( "Skin現在Current : " + CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
222 //Trace.TraceInformation( "Skin現在System : " + CSkin.strSystemSkinSubfolderFullName );
223 //Trace.TraceInformation( "Skin現在BoxDef : " + CSkin.strBoxDefSkinSubfolderFullName );
224 //Trace.TraceInformation( "Skin現在: " + CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) ) );
225 //Trace.TraceInformation( "Skin現pt: " + CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
226 //Trace.TraceInformation( "Skin指定: " + CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) );
227 //Trace.TraceInformation( "Skinpath: " + this.r現在選択中の曲.strSkinPath );
228 bool ret = false;
229 if ( CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName( false ) ) != CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath )
230 && CSkin.bUseBoxDefSkin )
231 {
232 ret = true;
233 // BOXに入るときは、スキン変更発生時のみboxdefスキン設定の更新を行う
234 CDTXMania.Skin.SetCurrentSkinSubfolderFullName(
235 CDTXMania.Skin.GetSkinSubfolderFullNameFromSkinName( CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) ), false );
236 }
237
238 //Trace.TraceInformation( "Skin変更: " + CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) ) );
239 //Trace.TraceInformation( "Skin変更Current : "+ CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
240 //Trace.TraceInformation( "Skin変更System : "+ CSkin.strSystemSkinSubfolderFullName );
241 //Trace.TraceInformation( "Skin変更BoxDef : "+ CSkin.strBoxDefSkinSubfolderFullName );
242 if( this.tx選択されている曲の曲名 != null )
243 {
244 this.tx選択されている曲の曲名.Dispose();
245 this.tx選択されている曲の曲名 = null;
246 }
247 if( this.tx選択されている曲のアティスト名 != null )
248 {
249 this.tx選択されている曲のアティスト名.Dispose();
250 this.tx選択されている曲のアティスト名 = null;
251 }
252 if( ( this.r現在選択中の曲.list子リスト != null ) && ( this.r現在選択中の曲.list子リスト.Count > 0 ) )
253 {
254 this.r現在選択中の曲 = this.r現在選択中の曲.list子リスト[ 0 ];
255 this.t現在選択中の曲を元に曲バを再構成する();
256 this.t選択曲が変更された(false); // #27648 項目数変更を反映させる
257 }
258 return ret;
259 }
260 public bool tBOXを出る()
261 {
262 //Trace.TraceInformation( "box exit" );
263 //Trace.TraceInformation( "Skin現在Current : " + CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
264 //Trace.TraceInformation( "Skin現在System : " + CSkin.strSystemSkinSubfolderFullName );
265 //Trace.TraceInformation( "Skin現在BoxDef : " + CSkin.strBoxDefSkinSubfolderFullName );
266 //Trace.TraceInformation( "Skin現在: " + CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) ) );
267 //Trace.TraceInformation( "Skin現pt: " + CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
268 //Trace.TraceInformation( "Skin指定: " + CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) );
269 //Trace.TraceInformation( "Skinpath: " + this.r現在選択中の曲.strSkinPath );
270 bool ret = false;
271 if ( CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName( false ) ) != CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath )
272 && CSkin.bUseBoxDefSkin )
273 {
274 ret = true;
275 }
276 // スキン変更が発生しなくても、boxdef圏外に出る場合は、boxdefスキン設定の更新が必要
277 // (ユーザーがboxdefスキンをConfig指定している場合への対応のために必要)
278 // tBoxに入る()とは処理が微妙に異なるので注意
279 CDTXMania.Skin.SetCurrentSkinSubfolderFullName(
280 ( this.r現在選択中の曲.strSkinPath == "" ) ? "" : CDTXMania.Skin.GetSkinSubfolderFullNameFromSkinName( CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) ), false );
281 //Trace.TraceInformation( "SKIN変更: " + CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) ) );
282 //Trace.TraceInformation( "SKIN変更Current : "+ CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
283 //Trace.TraceInformation( "SKIN変更System : "+ CSkin.strSystemSkinSubfolderFullName );
284 //Trace.TraceInformation( "SKIN変更BoxDef : "+ CSkin.strBoxDefSkinSubfolderFullName );
285 if( this.tx選択されている曲の曲名 != null )
286 {
287 this.tx選択されている曲の曲名.Dispose();
288 this.tx選択されている曲の曲名 = null;
289 }
290 if( this.tx選択されている曲のアティスト名 != null )
291 {
292 this.tx選択されている曲のアティスト名.Dispose();
293 this.tx選択されている曲のアティスト名 = null;
294 }
295 if ( this.r現在選択中の曲.r親ノ != null )
296 {
297 this.r現在選択中の曲 = this.r現在選択中の曲.r親ノ;
298 this.t現在選択中の曲を元に曲バを再構成する();
299 this.t選択曲が変更された(false); // #27648 項目数変更を反映させる
300 }
301 return ret;
302 }
303 public void t現在選択中の曲を元に曲バを再構成する()
304 {
305 this.tの初期化();
306 for( int i = 0; i < 13; i++ )
307 {
308 this.t曲名バの生成( i, this.st情報[ i ].strタイトル文字列, this.st情報[ i ].col文字色 );
309 this.tティスト名テクスチャの生成( i, this.st情報[ i ].strティスト名 );
310 this.tパネルの生成( i, this.st情報[ i ].strタイトル文字列, this.st情報[ i ].strティスト名, this.st情報[ i ].col文字色 );
311 if( !this.dicThumbnail.ContainsKey( this.st情報[ i ].strPreimageのパス ) )
312 {
313 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
314 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strPreimageのパス, this.st情報[ i ].e種別 );
315 this.dicThumbnail.Add( this.st情報[ i ].strPreimageのパス, this.txTumbnail[ i ] );
316 }
317 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strPreimageのパス ];
318 }
319 }
320 public void t次に移動()
321 {
322 if( this.r現在選択中の曲 != null )
323 {
324 this.n目標のスクロルカウンタ += 100;
325 }
326 }
327 public void t前に移動()
328 {
329 if( this.r現在選択中の曲 != null )
330 {
331 this.n目標のスクロルカウンタ -= 100;
332 }
333 }
334 public void t難易度レベルをひとつ進める()
335 {
336 if( ( this.r現在選択中の曲 == null ) || ( this.r現在選択中の曲.nスコア数 <= 1 ) )
337 return; // 曲にスコアが0~1個しかないなら進める意味なし。
338
339
340 // 難易度レベルを+1し、現在選曲中のスコアを変更する。
341
342 this.n現在のアンカ難易度レベル = this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( this.r現在選択中の曲 );
343
344 for( int i = 0; i < 5; i++ )
345 {
346 this.n現在のアンカ難易度レベル = ( this.n現在のアンカ難易度レベル + 1 ) % 5; // 5以上になったら0に戻る。
347 if( this.r現在選択中の曲.arスコア[ this.n現在のアンカ難易度レベル ] != null ) // 曲が存在してるならここで終了。存在してないなら次のレベルへGo。
348 break;
349 }
350
351
352 // 曲毎に表示しているスキル値を、新しい難易度レベルに合わせて取得し直す。(表示されている13曲全部。)
353
354 C曲リストノ song = this.r現在選択中の曲;
355 for( int i = 0; i < 5; i++ )
356 song = this.r前の曲( song );
357
358 for( int i = this.n現在の選択行 - 5; i < ( ( this.n現在の選択行 - 5 ) + 13 ); i++ )
359 {
360 int index = ( i + 13 ) % 13;
361 for( int m = 0; m < 3; m++ )
362 {
363 this.st情報[ index ].nスキル値[ m ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ m ];
364 }
365 song = this.r次の曲( song );
366 }
367
368 this.tラベル名からステタスパネルを決定する( this.r現在選択中の曲.ar難易度ラベル[ this.n現在選択中の曲の現在の難易度レベル ] );
369
370 switch( this.nIndex )
371 {
372 case 2:
373 CDTXMania.Skin.soundNovice.t再生する();
374 string strnov = CSkin.Path( @"Sounds\Novice.ogg" );
375 if( !File.Exists( strnov ) )
376 CDTXMania.Skin.sound変更音.t再生する();
377 break;
378
379 case 3:
380 CDTXMania.Skin.soundRegular.t再生する();
381 string strreg = CSkin.Path( @"Sounds\Regular.ogg" );
382 if( !File.Exists( strreg ) )
383 CDTXMania.Skin.sound変更音.t再生する();
384 break;
385
386 case 4:
387 CDTXMania.Skin.soundExpert.t再生する();
388 string strexp = CSkin.Path( @"Sounds\Expert.ogg" );
389 if( !File.Exists( strexp ) )
390 CDTXMania.Skin.sound変更音.t再生する();
391 break;
392
393 case 5:
394 CDTXMania.Skin.soundMaster.t再生する();
395 string strmas = CSkin.Path( @"Sounds\Master.ogg" );
396 if( !File.Exists( strmas ) )
397 CDTXMania.Skin.sound変更音.t再生する();
398 break;
399
400 case 6:
401 CDTXMania.Skin.soundBasic.t再生する();
402 string strbsc = CSkin.Path( @"Sounds\Basic.ogg" );
403 if( !File.Exists( strbsc ) )
404 CDTXMania.Skin.sound変更音.t再生する();
405 break;
406
407 case 7:
408 CDTXMania.Skin.soundAdvanced.t再生する();
409 string stradv = CSkin.Path( @"Sounds\Advanced.ogg" );
410 if( !File.Exists( stradv ) )
411 CDTXMania.Skin.sound変更音.t再生する();
412 break;
413
414 case 8:
415 CDTXMania.Skin.soundExtreme.t再生する();
416 string strext = CSkin.Path( @"Sounds\Extreme.ogg" );
417 if( !File.Exists( strext ) )
418 CDTXMania.Skin.sound変更音.t再生する();
419 break;
420
421 default:
422 CDTXMania.Skin.sound変更音.t再生する();
423 break;
424 }
425
426 // 選曲ステージに変更通知を発出し、関係Activityの対応を行ってもらう。
427
428 CDTXMania.stage選曲.t選択曲変更通知();
429 }
430
431
432 public void tラベル名からステタスパネルを決定する(string strラベル名)
433 {
434 if (string.IsNullOrEmpty(strラベル名))
435 {
436 this.nIndex = 0;
437 }
438 else
439 {
440 STATUSPANEL[] array = this.stパネルマップ;
441 for (int i = 0; i < array.Length; i++)
442 {
443 STATUSPANEL sTATUSPANEL = array[i];
444 if (strラベル名.Equals(sTATUSPANEL.label, StringComparison.CurrentCultureIgnoreCase))
445 {
446 this.nIndex = sTATUSPANEL.status;
447 return;
448 }
449 this.nIndex++;
450 }
451 }
452 }
453
454 /// <summary>
455 /// 曲リストをリセットする
456 /// </summary>
457 /// <param name="cs"></param>
458 public void Refresh(CSongs管理 cs, bool bRemakeSongTitleBar ) // #26070 2012.2.28 yyagi
459 {
460 // this.On非活性化();
461
462 if ( cs != null && cs.list曲ル.Count > 0 ) // 新しい曲リストを検索して、1曲以上あった
463 {
464 CDTXMania.Songs管理 = cs;
465
466 if ( this.r現在選択中の曲 != null ) // r現在選択中の曲==null とは、「最初songlist.dbが無かった or 検索したが1曲もない」
467 {
468 this.r現在選択中の曲 = searchCurrentBreadcrumbsPosition( CDTXMania.Songs管理.list曲ル, this.r現在選択中の曲.strBreadcrumbs );
469 if ( bRemakeSongTitleBar ) // 選曲画面以外に居るときには再構成しない (非活性化しているときに実行すると例外となる)
470 {
471 this.t現在選択中の曲を元に曲バを再構成する();
472 }
473 #if false // list子リストの中まではmatchしてくれないので、検索ロジックは手書きで実装 (searchCurrentBreadcrumbs())
474 string bc = this.r現在選択中の曲.strBreadcrumbs;
475 Predicate<C曲リストノ> match = delegate( C曲リストノ c )
476 {
477 return ( c.strBreadcrumbs.Equals( bc ) );
478 };
479 int nMatched = CDTXMania.Songs管理.list曲ル.FindIndex( match );
480
481 this.r現在選択中の曲 = ( nMatched == -1 ) ? null : CDTXMania.Songs管理.list曲ル[ nMatched ];
482 this.t現在選択中の曲を元に曲バを再構成する();
483 #endif
484 return;
485 }
486 }
487 this.On非活性化();
488 this.r現在選択中の曲 = null;
489 this.On活性化();
490 }
491
492
493 /// <summary>
494 /// 現在選曲している位置を検索する
495 /// (曲一覧クラスを新しいものに入れ替える際に用いる)
496 /// </summary>
497 /// <param name="ln">検索対象のList</param>
498 /// <param name="bc">検索するパンくずリスト(文字列)</param>
499 /// <returns></returns>
500 private C曲リストノ searchCurrentBreadcrumbsPosition( List<C曲リストノ> ln, string bc )
501 {
502 foreach (C曲リストノ n in ln)
503 {
504 if ( n.strBreadcrumbs == bc )
505 {
506 return n;
507 }
508 else if ( n.list子リスト != null && n.list子リスト.Count > 0 ) // 子リストが存在するなら、再帰で探す
509 {
510 C曲リストノ r = searchCurrentBreadcrumbsPosition( n.list子リスト, bc );
511 if ( r != null ) return r;
512 }
513 }
514 return null;
515 }
516
517 /// <summary>
518 /// BOXのアイテム数と、今何番目を選択しているかをセットする
519 /// </summary>
520 public void t選択曲が変更された( bool bForce ) // #27648
521 {
522 C曲リストノ song = CDTXMania.stage選曲.r現在選択中の曲;
523 if ( song == null )
524 return;
525 if ( song == song_last && bForce == false )
526 return;
527
528 song_last = song;
529 List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
530 int index = list.IndexOf( song ) + 1;
531 if ( index <= 0 )
532 {
533 nCurrentPosition = nNumOfItems = 0;
534 }
535 else
536 {
537 nCurrentPosition = index;
538 nNumOfItems = list.Count;
539 }
540
541 if( this.tx選択されている曲の曲名 != null )
542 {
543 this.tx選択されている曲の曲名.Dispose();
544 this.tx選択されている曲の曲名 = null;
545 }
546 if( this.tx選択されている曲のアティスト名 != null )
547 {
548 this.tx選択されている曲のアティスト名.Dispose();
549 this.tx選択されている曲のアティスト名 = null;
550 }
551 }
552
553 // CActivity 実装
554
555 public override void On活性化()
556 {
557 if( this.b活性化してる )
558 return;
559
560 this.b登場アニメ全部完了 = false;
561 this.n目標のスクロルカウンタ = 0;
562 this.n現在のスクロルカウンタ = 0;
563 this.nスクロルタイマ = -1;
564
565 // フォント作成。
566 // 曲リスト文字は2倍(面積4倍)でテクスチャに描画してから縮小表示するので、フォントサイズは2倍とする。
567
568 FontStyle regular = FontStyle.Regular;
569 if( CDTXMania.ConfigIni.b選曲リストフォントを斜体にする ) regular |= FontStyle.Italic;
570 if( CDTXMania.ConfigIni.b選曲リストフォントを太字にする ) regular |= FontStyle.Bold;
571 this.ft曲リスト用フォント = new Font( CDTXMania.ConfigIni.str選曲リストフォント, (float) ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot * 2 ), regular, GraphicsUnit.Pixel );
572 //this.prvFont = new CPrivateFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );
573
574 // 現在選択中の曲がない(=はじめての活性化)なら、現在選択中の曲をルートの先頭ノードに設定する。
575
576 if( ( this.r現在選択中の曲 == null ) && ( CDTXMania.Songs管理.list曲ル.Count > 0 ) )
577 this.r現在選択中の曲 = CDTXMania.Songs管理.list曲ル[ 0 ];
578
579
580 // バー情報を初期化する。
581
582 this.tの初期化();
583
584 base.On活性化();
585
586 this.t選択曲が変更された(true); // #27648 2012.3.31 yyagi 選曲画面に入った直後の 現在位置/全アイテム数 の表示を正しく行うため
587 }
588 public override void On非活性化()
589 {
590 if( this.b活性化してない )
591 return;
592
593 CDTXMania.t安全にDisposeする( ref this.ft曲リスト用フォント );
594 if( this.prvFont != null )
595 this.prvFont.Dispose();
596
597 for( int i = 0; i < 13; i++ )
598 this.ct登場アニメ用[ i ] = null;
599
600 base.On非活性化();
601 }
602 public override void OnManagedリソスの作成()
603 {
604 if( this.b活性化してない )
605 return;
606
607 this.txスキル数字 = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\ScreenSelect skill number on list.png" ), false );
608 this.tx選曲パネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_image_panel_guitar.png"));
609
610 if ( this.tx選曲パネル == null || CDTXMania.ConfigIni.bDrums有効 )
611 this.tx選曲パネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_image_panel.png"));
612
613 this.txパネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_music panel.png"));
614 this.tx = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\5_backpanel.png" ) );
615 this.tx色帯 = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\5_ColorBar.png" ) );
616 this.txランプ用帯 = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_lamppanel.png" ));
617
618 this.txクリアランプ = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_Clearlamp.png") );
619 #region[ テクスチャの復元 ]
620 int nKeys = this.dicThumbnail.Count;
621 string[] keys = new string[ nKeys ];
622 this.dicThumbnail.Keys.CopyTo( keys, 0 );
623 foreach (var key in keys)
624 this.dicThumbnail[ key ] = this.tパスを指定してサムネイル画像を生成して返す( 0, key, this.st情報[ 0 ].e種別 );;
625
626 //ここは最初に表示される画像の復元に必要。
627 for (int i = 0; i < 13; i++)
628 {
629 this.t曲名バの生成(i, this.st情報[i].strタイトル文字列, this.st情報[i].col文字色);
630 this.tティスト名テクスチャの生成( i, this.st情報[ i ].strティスト名 );
631 this.tパネルの生成( i, this.st情報[ i ].strタイトル文字列, this.st情報[ i ].strティスト名, this.st情報[ i ].col文字色 );
632 //this.tパスを指定してサムネイル画像を生成する(i, this.stバー情報[i].strDTXフォルダのパス, this.stバー情報[i].eバー種別);
633 if( this.st情報[ i ].strPreimageのパス != null )
634 {
635 if( !this.dicThumbnail.ContainsKey( this.st情報[ i ].strPreimageのパス ) )
636 {
637 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
638 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strPreimageのパス, this.st情報[ i ].e種別 );
639 this.dicThumbnail.Add( this.st情報[ i ].strPreimageのパス, this.txTumbnail[ i ] );
640 }
641 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strPreimageのパス ];
642 }
643 }
644 #endregion
645
646
647 int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1;
648 #region [ Songs not found画像 ]
649 try
650 {
651 using( Bitmap image = new Bitmap( 640, 128 ) )
652 using( Graphics graphics = Graphics.FromImage( image ) )
653 {
654 string[] s1 = { "曲データが見つかりません。", "Songs not found." };
655 string[] s2 = { "曲データをDTXManiaGR.exe以下の", "You need to install songs." };
656 string[] s3 = { "フォルダにインストールして下さい。", "" };
657 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 2f );
658 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 0f );
659 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 44f );
660 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 42f );
661 graphics.DrawString( s3[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 86f );
662 graphics.DrawString( s3[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 84f );
663
664 this.txSongNotFound = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
665
666 this.txSongNotFound.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); // 半分のサイズで表示する。
667 }
668 }
669 catch( CTextureCreateFailedException )
670 {
671 Trace.TraceError( "SoungNotFoundテクスチャの作成に失敗しました。" );
672 this.txSongNotFound = null;
673 }
674 #endregion
675 #region [ "曲データを検索しています"画像 ]
676 try
677 {
678 using ( Bitmap image = new Bitmap( 640, 96 ) )
679 using ( Graphics graphics = Graphics.FromImage( image ) )
680 {
681 string[] s1 = { "曲データを検索しています。", "Now enumerating songs." };
682 string[] s2 = { "そのまましばらくお待ち下さい。", "Please wait..." };
683 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 2f );
684 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 0f );
685 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 44f );
686 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 42f );
687
688 this.txEnumeratingSongs = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
689
690 this.txEnumeratingSongs.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); // 半分のサイズで表示する。
691 }
692 }
693 catch ( CTextureCreateFailedException )
694 {
695 Trace.TraceError( "txEnumeratingSongsテクスチャの作成に失敗しました。" );
696 this.txEnumeratingSongs = null;
697 }
698 #endregion
699 #region [ 曲数表示 ]
700 this.txアイテム数数字 = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_skill number on gauge etc.png"), false);
701 #endregion
702
703 base.OnManagedリソスの作成();
704 }
705 public override void OnManagedリソスの解放()
706 {
707 if( this.b活性化してない )
708 return;
709
710 CDTXMania.t安全にDisposeする( ref this.txアイテム数数字 );
711
712 for ( int i = 0; i < 13; i++ )
713 {
714 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txタイトル名 );
715 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txティスト名 );
716 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txカスタム曲名テクスチャ );
717 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txカスタムアティスト名テクスチャ );
718 }
719
720 if( this.tx選択されている曲の曲名 != null )
721 {
722 this.tx選択されている曲の曲名.Dispose();
723 this.tx選択されている曲の曲名 = null;
724 }
725 if( this.tx選択されている曲のアティスト名 != null )
726 {
727 this.tx選択されている曲のアティスト名.Dispose();
728 this.tx選択されている曲のアティスト名 = null;
729 }
730 #region[ ジャケット画像の解放 ]
731 int nKeys = this.dicThumbnail.Count;
732 string[] keys = new string[ nKeys ];
733 this.dicThumbnail.Keys.CopyTo( keys, 0 );
734 foreach( var key in keys )
735 {
736 C共通.tDisposeする( this.dicThumbnail[ key ] );
737 this.dicThumbnail[ key ] = null;
738 }
739 #endregion
740
741 CDTXMania.t安全にDisposeする( ref this.txスキル数字 );
742 CDTXMania.t安全にDisposeする( ref this.txEnumeratingSongs );
743 CDTXMania.t安全にDisposeする( ref this.txSongNotFound );
744 CDTXMania.t安全にDisposeする( ref this.tx選曲パネル );
745 CDTXMania.t安全にDisposeする( ref this.txパネル );
746 CDTXMania.t安全にDisposeする( ref this.txクリアランプ );
747 CDTXMania.t安全にDisposeする( ref this.tx );
748 CDTXMania.t安全にDisposeする( ref this.tx色帯 );
749 CDTXMania.t安全にDisposeする( ref this.txランプ用帯 );
750
751 base.OnManagedリソスの解放();
752 }
753 public override int On進行描画()
754 {
755 if( this.b活性化してない )
756 return 0;
757
758 #region [ 初めての進行描画 ]
759 //-----------------
760 if( this.b初めての進行描画 )
761 {
762 for( int i = 0; i < 13; i++ )
763 this.ct登場アニメ用[ i ] = new CCounter( -i * 10, 100, 3, CDTXMania.Timer );
764
765 this.nスクロルタイマ = CSound管理.rc演奏用タイマ.n現在時刻;
766 CDTXMania.stage選曲.t選択曲変更通知();
767
768 base.b初めての進行描画 = false;
769 }
770 //-----------------
771 #endregion
772
773
774 // まだ選択中の曲が決まってなければ、曲ツリールートの最初の曲にセットする。
775
776 if( ( this.r現在選択中の曲 == null ) && ( CDTXMania.Songs管理.list曲ル.Count > 0 ) )
777 this.r現在選択中の曲 = CDTXMania.Songs管理.list曲ル[ 0 ];
778
779
780 // 本ステージは、(1)登場アニメフェーズ → (2)通常フェーズ と二段階にわけて進む。
781 // 2つしかフェーズがないので CStage.eフェーズID を使ってないところがまた本末転倒。
782
783
784 // 進行。
785
786 if( !this.b登場アニメ全部完了 )
787 {
788 #region [ (1) 登場アニメフェーズの進行。]
789 //-----------------
790 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
791 {
792 this.ct登場アニメ用[ i ].t進行();
793
794 if( this.ct登場アニメ用[ i ].b終了値に達した )
795 this.ct登場アニメ用[ i ].t停止();
796 }
797
798 // 全部の進行が終わったら、this.b登場アニメ全部完了 を true にする。
799
800 this.b登場アニメ全部完了 = true;
801 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
802 {
803 if( this.ct登場アニメ用[ i ].b進行中 )
804 {
805 this.b登場アニメ全部完了 = false; // まだ進行中のアニメがあるなら false のまま。
806 break;
807 }
808 }
809 //-----------------
810 #endregion
811 }
812 else
813 {
814 #region [ (2) 通常フェーズの進行。]
815 //-----------------
816 long n現在時刻 = CSound管理.rc演奏用タイマ.n現在時刻;
817
818 if( n現在時刻 < this.nスクロルタイマ ) // 念のため
819 this.nスクロルタイマ = n現在時刻;
820
821 const int nアニメ間隔 = 2;
822 while( ( n現在時刻 - this.nスクロルタイマ ) >= nアニメ間隔 )
823 {
824 int n加速度 = 1;
825 int n残距離 = Math.Abs( (int) ( this.n目標のスクロルカウンタ - this.n現在のスクロルカウンタ ) );
826
827 #region [ 残距離が遠いほどスクロールを速くする(=n加速度を多くする)。]
828 //-----------------
829 if( n残距離 <= 100 )
830 {
831 n加速度 = 2;
832 }
833 else if( n残距離 <= 300 )
834 {
835 n加速度 = 3;
836 }
837 else if( n残距離 <= 500 )
838 {
839 n加速度 = 4;
840 }
841 else
842 {
843 n加速度 = 8;
844 }
845 //-----------------
846 #endregion
847
848 #region [ 加速度を加算し、現在のスクロールカウンタを目標のスクロールカウンタまで近づける。 ]
849 //-----------------
850 if( this.n現在のスクロルカウンタ < this.n目標のスクロルカウンタ ) // (A) 正の方向に未達の場合:
851 {
852 this.n現在のスクロルカウンタ += n加速度; // カウンタを正方向に移動する。
853
854 if( this.n現在のスクロルカウンタ > this.n目標のスクロルカウンタ )
855 this.n現在のスクロルカウンタ = this.n目標のスクロルカウンタ; // 到着!スクロール停止!
856 }
857
858 else if( this.n現在のスクロルカウンタ > this.n目標のスクロルカウンタ ) // (B) 負の方向に未達の場合:
859 {
860 this.n現在のスクロルカウンタ -= n加速度; // カウンタを負方向に移動する。
861
862 if( this.n現在のスクロルカウンタ < this.n目標のスクロルカウンタ ) // 到着!スクロール停止!
863 this.n現在のスクロルカウンタ = this.n目標のスクロルカウンタ;
864 }
865 //-----------------
866 #endregion
867
868 if( this.n現在のスクロルカウンタ >= 100 ) // 1行=100カウント。
869 {
870 #region [ パネルを1行上にシフトする。]
871 //-----------------
872
873 // 選択曲と選択行を1つ下の行に移動。
874
875 this.r現在選択中の曲 = this.r次の曲( this.r現在選択中の曲 );
876 this.n現在の選択行 = ( this.n現在の選択行 + 1 ) % 13;
877
878 // 選択曲から7つ下のパネル(=新しく最下部に表示されるパネル。消えてしまう一番上のパネルを再利用する)に、新しい曲の情報を記載する。
879
880 C曲リストノ song = this.r現在選択中の曲;
881 for( int i = 0; i < 7; i++ )
882 song = this.r次の曲( song );
883
884 int index = ( this.n現在の選択行 + 7 ) % 13; // 新しく最下部に表示されるパネルのインデックス(0~12)。
885 this.st情報[ index ].strタイトル文字列 = song.strタイトル;
886 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.ティスト名;
887 this.st情報[ index ].col文字色 = song.col文字色;
888 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス;
889 this.st情報[ index ].strPreimageのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
890 this.t曲名バの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].col文字色 );
891 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
892 this.tパネルの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].strティスト名, this.st情報[ index ].col文字色 );
893
894 if( !this.dicThumbnail.ContainsKey( this.st情報[ index ].strPreimageのパス ) )
895 {
896 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
897 this.tパスを指定してサムネイル画像を生成する( index, this.st情報[ index ].strPreimageのパス, this.st情報[ index ].e種別 );
898 this.dicThumbnail.Add( this.st情報[ index ].strPreimageのパス, this.txTumbnail[ index ] );
899 }
900 txTumbnail[ index ] = this.dicThumbnail[ this.st情報[ index ].strPreimageのパス ];
901
902
903 // stバー情報[] の内容を1行ずつずらす。
904
905 C曲リストノ song2 = this.r現在選択中の曲;
906 for( int i = 0; i < 5; i++ )
907 song2 = this.r前の曲( song2 );
908
909 for( int i = 0; i < 13; i++ )
910 {
911 int n = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
912 this.st情報[ n ].e種別 = this.e曲のバ種別を返す( song2 );
913 song2 = this.r次の曲( song2 );
914 }
915
916
917 // 新しく最下部に表示されるパネル用のスキル値を取得。
918
919 for( int i = 0; i < 3; i++ )
920 this.st情報[ index ].nスキル値[ i ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ i ];
921
922 // 1行(100カウント)移動完了。
923
924 this.n現在のスクロルカウンタ -= 100;
925 this.n目標のスクロルカウンタ -= 100;
926
927 this.t選択曲が変更された( false ); // スクロールバー用に今何番目を選択しているかを更新
928 if( this.tx選択されている曲の曲名 != null )
929 {
930 this.tx選択されている曲の曲名.Dispose();
931 this.tx選択されている曲の曲名 = null;
932 }
933 if( this.tx選択されている曲のアティスト名 != null )
934 {
935 this.tx選択されている曲のアティスト名.Dispose();
936 this.tx選択されている曲のアティスト名 = null;
937 }
938
939 if( this.n目標のスクロルカウンタ == 0 )
940 CDTXMania.stage選曲.t選択曲変更通知(); // スクロール完了=選択曲変更!
941
942 //-----------------
943 #endregion
944 }
945 else if( this.n現在のスクロルカウンタ <= -100 )
946 {
947 #region [ パネルを1行下にシフトする。]
948 //-----------------
949
950 // 選択曲と選択行を1つ上の行に移動。
951
952 this.r現在選択中の曲 = this.r前の曲( this.r現在選択中の曲 );
953 this.n現在の選択行 = ( ( this.n現在の選択行 - 1 ) + 13 ) % 13;
954
955 // 選択曲から5つ上のパネル(=新しく最上部に表示されるパネル。消えてしまう一番下のパネルを再利用する)に、新しい曲の情報を記載する。
956
957 C曲リストノ song = this.r現在選択中の曲;
958 for( int i = 0; i < 5; i++ )
959 song = this.r前の曲( song );
960
961 int index = ( ( this.n現在の選択行 - 5 ) + 13 ) % 13; // 新しく最上部に表示されるパネルのインデックス(0~12)。
962 this.st情報[ index ].strタイトル文字列 = song.strタイトル;
963 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song) ].譜面情報.ティスト名;
964 this.st情報[ index ].col文字色 = song.col文字色;
965 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス;
966 this.st情報[ index ].strPreimageのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
967 this.t曲名バの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].col文字色 );
968 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
969 this.tパネルの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].strティスト名, this.st情報[ index ].col文字色 );
970
971 if( !this.dicThumbnail.ContainsKey( this.st情報[ index ].strPreimageのパス ) )
972 {
973 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
974 this.tパスを指定してサムネイル画像を生成する( index, this.st情報[ index ].strPreimageのパス, this.st情報[ index ].e種別 );
975 this.dicThumbnail.Add( this.st情報[ index ].strPreimageのパス, this.txTumbnail[ index ] );
976 }
977 txTumbnail[ index ] = this.dicThumbnail[ this.st情報[ index ].strPreimageのパス ];
978
979
980 // stバー情報[] の内容を1行ずつずらす。
981
982 C曲リストノ song2 = this.r現在選択中の曲;
983 for( int i = 0; i < 5; i++ )
984 song2 = this.r前の曲( song2 );
985
986 for( int i = 0; i < 13; i++ )
987 {
988 int n = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
989 this.st情報[ n ].e種別 = this.e曲のバ種別を返す( song2 );
990 song2 = this.r次の曲( song2 );
991 }
992
993
994 // 新しく最上部に表示されるパネル用のスキル値を取得。
995
996 for( int i = 0; i < 3; i++ )
997 this.st情報[ index ].nスキル値[ i ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ i ];
998
999
1000 // 1行(100カウント)移動完了。
1001
1002 this.n現在のスクロルカウンタ += 100;
1003 this.n目標のスクロルカウンタ += 100;
1004
1005
1006 this.t選択曲が変更された( false ); // スクロールバー用に今何番目を選択しているかを更新
1007 if( this.tx選択されている曲の曲名 != null )
1008 {
1009 this.tx選択されている曲の曲名.Dispose();
1010 this.tx選択されている曲の曲名 = null;
1011 }
1012 if( this.tx選択されている曲のアティスト名 != null )
1013 {
1014 this.tx選択されている曲のアティスト名.Dispose();
1015 this.tx選択されている曲のアティスト名 = null;
1016 }
1017
1018 if( this.n目標のスクロルカウンタ == 0 )
1019 CDTXMania.stage選曲.t選択曲変更通知(); // スクロール完了=選択曲変更!
1020 //-----------------
1021 #endregion
1022 }
1023
1024 this.nスクロルタイマ += nアニメ間隔;
1025 }
1026 //-----------------
1027 #endregion
1028 }
1029
1030
1031 // 描画。
1032
1033 if( this.r現在選択中の曲 == null )
1034 {
1035 #region [ 曲が1つもないなら「Songs not found.」を表示してここで帰れ。]
1036 //-----------------
1037 if ( bIsEnumeratingSongs )
1038 {
1039 if ( this.txEnumeratingSongs != null )
1040 {
1041 this.txEnumeratingSongs.t2D描画( CDTXMania.app.Device, 530, 240 );
1042 }
1043 }
1044 else
1045 {
1046 if ( this.txSongNotFound != null )
1047 this.txSongNotFound.t2D描画( CDTXMania.app.Device, 500, 190 );
1048 }
1049 //-----------------
1050 #endregion
1051
1052 return 0;
1053 }
1054 var bar = SlimDX.Matrix.Identity;
1055 var barL = SlimDX.Matrix.Identity;
1056 bar *= SlimDX.Matrix.RotationY(-0.415f);
1057 barL *= SlimDX.Matrix.RotationY(0.415f);
1058 bar *= SlimDX.Matrix.Translation(540f, 20f, -24f);
1059 barL *= SlimDX.Matrix.Translation(-540f, 20f, -24f);
1060 bar *= SlimDX.Matrix.Scaling(1.0f, 0.65f, 1.0f);
1061 barL *= SlimDX.Matrix.Scaling(1.0f, 0.65f, 1.0f);
1062
1063 this.tx.t3D描画(CDTXMania.app.Device, bar); //右の帯。
1064 this.tx.t3D描画(CDTXMania.app.Device, barL); //右の帯。
1065 this.tx色帯.n透明度 = 155 + this.ct登場アニメ用[10].n現在の値;
1066 this.tx色帯.t3D描画( CDTXMania.app.Device, bar );
1067 this.tx色帯.t3D描画( CDTXMania.app.Device, barL );
1068
1069 #region [ デバッグ補助 ]
1070 //-----------------
1071 /*
1072 stマトリックス座標 = new ST中心点[] {
1073 new ST中心点() { x = -980.0000f, y = 4f, z = 350f, rotY = 0.4000f },
1074 new ST中心点() { x = -780.0000f, y = 4f, z = 264f, rotY = 0.4000f },
1075 new ST中心点() { x = -590.0000f, y = 4f, z = 174f, rotY = 0.4000f },
1076 new ST中心点() { x = -400.0000f, y = 4f, z = 92f, rotY = 0.4000f },
1077 new ST中心点() { x = -210.0000f, y = 4f, z = 10f, rotY = 0.4000f },
1078 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1079 new ST中心点() { x = 210.0000f, y = 2f, z = 10f, rotY = -0.4000f },
1080 new ST中心点() { x = 400.0000f, y = 2f, z = 92f, rotY = -0.4f },
1081 new ST中心点() { x = 590.0000f, y = 2f, z = 174f, rotY = -0.4f },
1082 new ST中心点() { x = 780.0000f, y = 2f, z = 264f, rotY = -0.4f },
1083 new ST中心点() { x = 980.0000f, y = 2f, z = 350f, rotY = -0.4f },
1084 new ST中心点() { x = 1200.0000f, y = 2f, z = 450f, rotY = -0.4f },
1085 new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1086 new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1087 };
1088 */
1089 //-----------------
1090 #endregion
1091
1092
1093 if( !this.b登場アニメ全部完了 )
1094 {
1095 #region [ (1) 登場アニメフェーズの描画。]
1096 //-----------------
1097 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
1098 {
1099 if( this.ct登場アニメ用[ i ].n現在の値 >= 0 )
1100 {
1101 int nパネル番号 = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
1102
1103 if( i == 6 )
1104 {
1105 #region [ ジャケット画像の描画 ]
1106 //-----------------
1107 if( this.st情報[ nパネル番号 ].txパネル != null )
1108 {
1109 var mat = SlimDX.Matrix.Identity;
1110 mat *= SlimDX.Matrix.Scaling( 0.62f, 0.88f, 1.0f );
1111 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[ i ].rotY + (this.stマトリックス座標[ i ].rotY - this.stマトリックス座標[i].rotY));
1112 mat *= SlimDX.Matrix.Translation(
1113 ( this.stマトリックス座標[ i ].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1114 ( this.stマトリックス座標[ i ].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1115 ( this.stマトリックス座標[ i ].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1116 this.st情報[nパネル番号].txパネル.t3D描画(CDTXMania.app.Device, mat);
1117 }
1118 if( this.txTumbnail[nパネル番号] != null )
1119 {
1120 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1121 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1122 var mat = SlimDX.Matrix.Identity;
1123 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1124 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1125 mat *= SlimDX.Matrix.Translation(
1126 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1127 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率 - 1f,
1128 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1129 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1130 }
1131 //-----------------
1132 #endregion
1133 #region [ タイトル名テクスチャを描画。]
1134 //-----------------
1135 if( this.st情報[nパネル番号].txタイトル名 != null )
1136 {
1137 //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1138 var mat = SlimDX.Matrix.Identity;
1139 mat *= SlimDX.Matrix.Scaling( 0.35f, 0.45f, 1.0f );
1140 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[ i ].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1141 mat *= SlimDX.Matrix.Translation(
1142 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1143 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1144 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1145 //this.stバー情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1146 }
1147 if (this.st情報[nパネル番号].txティスト名 != null)
1148 {
1149 var mat = SlimDX.Matrix.Identity;
1150 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1151 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1152 mat *= SlimDX.Matrix.Translation(
1153 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1154 (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1155 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1156 //this.stバー情報[nパネル番号].txアーティスト名.t3D描画(CDTXMania.app.Device, mat);
1157 }
1158 //-----------------
1159 #endregion
1160 if( this.tx選曲パネル != null )
1161 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1162 }
1163 else if( i == 5 )
1164 {
1165 // (A) 選択曲パネルを描画。
1166 if( this.tx選曲パネル != null )
1167 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 531, 243, new Rectangle( 74, 80, 230, 230 ) ); //真ん中の部分は別々に描画。
1168 if( this.txランプ用帯 != null )
1169 {
1170 this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1171 this.txランプ用帯.t3D描画( CDTXMania.app.Device, barL ); //右の帯。
1172 }
1173 #region [ バーテクスチャを描画。]
1174 //-----------------
1175 if( this.txパネル != null )
1176 {
1177 var mat = SlimDX.Matrix.Identity;
1178 mat *= SlimDX.Matrix.Scaling(0.8f, 0.8f, 1.0f);
1179 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1180 mat *= SlimDX.Matrix.Translation(
1181 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1182 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1183 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1184 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1185 }
1186 if( this.tx選曲パネル != null )
1187 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 457, 163, new Rectangle( 0, 0, 363, 368 ) );
1188 //-----------------
1189 #endregion
1190 #region [ ジャケット画像の描画 ]
1191 //-----------------
1192 for( int la = 0; la < 5 ; la++ )
1193 {
1194 if( this.txクリアランプ != null && CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null && CDTXMania.stage選曲.r現在選択中の曲.arスコア[ la ] != null )
1195 this.txクリアランプ.t2D描画(CDTXMania.app.Device, 506, 292 - la * 13, new Rectangle((CDTXMania.stage選曲.r現在選択中の曲.arスコア[la].譜面情報.最大スキル.Drums != 0 ? 11 + la * 11 : 0), ( CDTXMania.stage選曲.r現在選択中の曲.arスコア[la].譜面情報.フルコンボ.Drums ? 10 : 0), 11, 10));
1196 }
1197 if( this.txTumbnail[ nパネル番号 ] != null )
1198 {
1199 float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1200 float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1201 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1202 this.txTumbnail[ nパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1203 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1204 }
1205 //-----------------
1206 #endregion
1207 #region [ タイトル名テクスチャを描画。]
1208 //-----------------
1209 if( File.Exists( this.st情報[ nパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )
1210 {
1211 this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( nパネル番号 );
1212 }
1213 else
1214 {
1215 if( this.st情報[ nパネル番号 ].strタイトル文字列 != "" && this.st情報[ nパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )
1216 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1217 }
1218 if( File.Exists( this.st情報[ nパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) && this.tx選択されている曲のアティスト名 == null )
1219 {
1220 this.tx選択されている曲のアティスト名 = this.tカスタムアティスト名テクスチャの生成( nパネル番号 );
1221
1222 this.tx選択されている曲のアティスト名.t2D描画(CDTXMania.app.Device, 552, 470);
1223 }
1224 else
1225 {
1226 if( this.st情報[ nパネル番号 ].strティスト名 != "" && this.st情報[ nパネル番号 ].strティスト名 != null && this.tx選択されている曲のアティスト名 == null )
1227 this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1228
1229 if( this.tx選択されている曲のアティスト名 != null )
1230 this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470);
1231 }
1232
1233 if( this.tx選択されている曲の曲名 != null )
1234 this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1235
1236 //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1237 // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1238 //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1239 // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1240 //-----------------
1241 #endregion
1242 }
1243 else
1244 {
1245 // (B) その他のパネルの描画。
1246 #region [ ジャケット画像の描画 ]
1247 //-----------------
1248 if( this.st情報[ nパネル番号 ].txパネル != null )
1249 {
1250 var mat = SlimDX.Matrix.Identity;
1251 mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1252 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1253 mat *= SlimDX.Matrix.Translation(
1254 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1255 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1256 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1257 this.st情報[nパネル番号].txパネル.t3D描画(CDTXMania.app.Device, mat);
1258 }
1259 if( this.txTumbnail[ nパネル番号 ] != null )
1260 {
1261 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1262 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1263 var mat = SlimDX.Matrix.Identity;
1264 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1265 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1266 mat *= SlimDX.Matrix.Translation(
1267 (this.stマトリックス座標[ i ].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1268 (this.stマトリックス座標[ i ].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1269 (this.stマトリックス座標[ i ].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1270 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1271 }
1272 //-----------------
1273 #endregion
1274 #region [ タイトル名テクスチャを描画。]
1275 //-----------------
1276 if( this.txランプ用帯 != null )
1277 this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1278 if( this.tx選曲パネル != null )
1279 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1280 if (this.st情報[ nパネル番号 ].txタイトル名 != null)
1281 {
1282 var mat = SlimDX.Matrix.Identity;
1283 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1284 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1285 mat *= SlimDX.Matrix.Translation(
1286 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1287 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1288 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1289 //this.stバー情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1290 }
1291 if (this.st情報[nパネル番号].txティスト名 != null)
1292 {
1293 var mat = SlimDX.Matrix.Identity;
1294 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1295 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1296 mat *= SlimDX.Matrix.Translation(
1297 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1298 (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1299 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1300 //this.stバー情報[nパネル番号].txアーティスト名.t3D描画(CDTXMania.app.Device, mat);
1301 }
1302 //-----------------
1303 #endregion
1304 }
1305 }
1306 }
1307 //-----------------
1308 #endregion
1309
1310 }
1311 else
1312 {
1313
1314 #region [ (2) 通常フェーズの描画。]
1315 //-----------------
1316 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
1317 {
1318 int nパネル番号 = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
1319 int n見た目の行番号 = i;
1320 int n次のパネル番号 = ( this.n現在のスクロルカウンタ <= 0 ) ? ( ( i + 1 ) % 13 ) : ( ( ( i - 1 ) + 13 ) % 13 );
1321 int x = this.ptの基本座標[ n見た目の行番号 ].X + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].X - this.ptの基本座標[ n見た目の行番号 ].X ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1322 int y = this.ptの基本座標[ n見た目の行番号 ].Y + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].Y - this.ptの基本座標[ n見た目の行番号 ].Y ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1323 float fX = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x - this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1324 this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x + this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1325
1326 float fY = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1327 this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1328
1329 float fZ = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z - this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1330 this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z + this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1331
1332 if (i == 6)
1333 {
1334 #region [ ジャケット画像の描画 ]
1335 //-----------------
1336 if( this.st情報[ nパネル番号 ].txパネル != null )
1337 {
1338 var mat = SlimDX.Matrix.Identity;
1339 mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1340 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1341 mat *= SlimDX.Matrix.Translation(
1342 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1343 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1344 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1345 this.st情報[ nパネル番号 ].txパネル.t3D描画(CDTXMania.app.Device, mat);
1346 }
1347 if (this.txTumbnail[nパネル番号] != null)
1348 {
1349 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1350 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1351 var mat = SlimDX.Matrix.Identity;
1352 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1353 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1354 mat *= SlimDX.Matrix.Translation(
1355 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1356 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率 - 1f,
1357 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1358 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1359 }
1360 //-----------------
1361 #endregion
1362 #region [ タイトル名テクスチャを描画。]
1363 //-----------------
1364 if (this.st情報[nパネル番号].txタイトル名 != null)
1365 {
1366 //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1367 var mat = SlimDX.Matrix.Identity;
1368 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1369 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1370 mat *= SlimDX.Matrix.Translation(
1371 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1372 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1373 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1374 //this.stバー情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1375 }
1376 if (this.st情報[nパネル番号].txティスト名 != null)
1377 {
1378 var mat = SlimDX.Matrix.Identity;
1379 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1380 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1381 mat *= SlimDX.Matrix.Translation(
1382 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1383 (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1384 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1385 //this.stバー情報[nパネル番号].txアーティスト名.t3D描画(CDTXMania.app.Device, mat);
1386 }
1387 //-----------------
1388 #endregion
1389 }
1390 else if( ( i == 5 ) )
1391 {
1392
1393 if( this.txランプ用帯 != null )
1394 this.txランプ用帯.t3D描画( CDTXMania.app.Device, barL ); //右の帯。
1395 //for (int la = 0; la < 5; la++)
1396 {
1397 //if( this.stバー情報[ 6 ].ar難易度ラベル[ la ] != null )
1398 {
1399 //var lamp = SlimDX.Matrix.Identity;
1400 //lamp *= SlimDX.Matrix.Translation(
1401 //( this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x ) )) * CTexture.f画面比率,
1402 //( this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y ) ) ) * CTexture.f画面比率 - 1f - la * 13f,
1403 //( this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z ) ) ) * CTexture.f画面比率);
1404
1405 //this.txクリアランプ.t3D描画( CDTXMania.app.Device, lamp, new Rectangle((CDTXMania.stage選曲.r現在選択中の曲.arスコア[la].譜面情報.最大スキル.Drums != 0 ? 11 + la * 11 : 0), (CDTXMania.stage選曲.r現在選択中の曲.arスコア[la].譜面情報.フルコンボ.Drums ? 10 : 0), 11, 10));
1406 }
1407 }
1408 if( this.tx選曲パネル != null )
1409 this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 531, 243, new Rectangle(74, 80, 230, 230)); //真ん中の部分は別々に描画。
1410 // (A) スクロールが停止しているときの選択曲バーの描画。
1411 #region [ ジャケット画像の描画 ]
1412 //-----------------
1413 if( this.st情報[ nパネル番号 ].txパネル != null )
1414 {
1415 var mat = SlimDX.Matrix.Identity;
1416 mat *= SlimDX.Matrix.Scaling(CTexture.f画面比率, CTexture.f画面比率, 1.0f);
1417 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1418 mat *= SlimDX.Matrix.Translation(
1419 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1420 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1421 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1422 this.st情報[nパネル番号].txパネル.t3D描画(CDTXMania.app.Device, mat);
1423 }
1424 if( this.tx選曲パネル != null )
1425 this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 457, 163, new Rectangle(0, 0, 363, 368));
1426
1427 for( int la = 0; la < 5 ; la++ )
1428 {
1429 if( this.txクリアランプ != null && CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null && CDTXMania.stage選曲.r現在選択中の曲.arスコア[ la ] != null )
1430 this.txクリアランプ.t2D描画(CDTXMania.app.Device, 506, 292 - la * 13, new Rectangle((CDTXMania.stage選曲.r現在選択中の曲.arスコア[la].譜面情報.最大スキル.Drums != 0 ? 11 + la * 11 : 0), ( CDTXMania.stage選曲.r現在選択中の曲.arスコア[la].譜面情報.フルコンボ.Drums ? 10 : 0), 11, 10));
1431 }
1432 if( this.txTumbnail[ nパネル番号 ] != null )
1433 {
1434 float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1435 float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1436 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1437 this.txTumbnail[ nパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1438 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1439 }
1440 //-----------------
1441 #endregion
1442 #region [ タイトル名テクスチャを描画。]
1443 //-----------------
1444
1445 if( File.Exists( this.st情報[ nパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )
1446 {
1447 this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( nパネル番号 );
1448 }
1449 else
1450 {
1451 if( this.st情報[ nパネル番号 ].strタイトル文字列 != "" && this.st情報[ nパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )
1452 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1453 }
1454 if( File.Exists( this.st情報[ nパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) && this.tx選択されている曲のアティスト名 == null )
1455 {
1456 this.tx選択されている曲のアティスト名 = this.tカスタムアティスト名テクスチャの生成( nパネル番号 );
1457
1458 if (this.tx選択されている曲のアティスト名 != null)
1459 this.tx選択されている曲のアティスト名.t2D描画(CDTXMania.app.Device, 552, 470);
1460 }
1461 else
1462 {
1463 if( this.st情報[ nパネル番号 ].strティスト名 != "" && this.st情報[ nパネル番号 ].strティスト名 != null && this.tx選択されている曲のアティスト名 == null )
1464 this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1465
1466
1467 }
1468
1469 if( this.tx選択されている曲の曲名 != null )
1470 this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1471 if( this.tx選択されている曲のアティスト名 != null )
1472 this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470 );
1473
1474 //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1475 // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1476 //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1477 // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1478 //-----------------
1479 #endregion
1480 }
1481 else if (i >= 12)
1482 {
1483 }
1484 else
1485 {
1486 // (B) スクロール中の選択曲バー、またはその他のバーの描画。
1487 if( this.txランプ用帯 != null )
1488 this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1489 if( this.tx選曲パネル != null )
1490 this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 761, 233, new Rectangle(304, 70, 59, 242));
1491
1492 #region [ ジャケット画像の描画 ]
1493 //-----------------
1494 if( this.st情報[ nパネル番号 ].txパネル != null )
1495 {
1496 var mat = SlimDX.Matrix.Identity;
1497 mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1498 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1499 mat *= SlimDX.Matrix.Translation(
1500 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1501 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1502 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1503 this.st情報[nパネル番号].txパネル.t3D描画(CDTXMania.app.Device, mat);
1504 }
1505 if( this.txTumbnail[nパネル番号] != null )
1506 {
1507 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width ;
1508 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1509 var mat = SlimDX.Matrix.Identity;
1510 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1511 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1512 mat *= SlimDX.Matrix.Translation(
1513 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1514 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1515 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1516 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1517 }
1518 //-----------------
1519 #endregion
1520 #region [ タイトル名テクスチャを描画。]
1521 //-----------------
1522 if( this.st情報[nパネル番号].txタイトル名 != null )
1523 {
1524 //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1525 var mat = SlimDX.Matrix.Identity;
1526 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1527 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1528 mat *= SlimDX.Matrix.Translation(
1529 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1530 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1531 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1532 //this.stバー情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1533 }
1534 if( this.st情報[nパネル番号].txティスト名 != null )
1535 {
1536 var mat = SlimDX.Matrix.Identity;
1537 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1538 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1539 mat *= SlimDX.Matrix.Translation(
1540 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1541 (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1542 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1543 //this.stバー情報[nパネル番号].txアーティスト名.t3D描画(CDTXMania.app.Device, mat);
1544 }
1545 //-----------------
1546 #endregion
1547
1548 #region [ スキル値を描画。]
1549 //-----------------
1550 //if( ( this.stバー情報[ nパネル番号 ].eバー種別 == Eバー種別.Score ) && ( this.e楽器パート != E楽器パート.UNKNOWN ) )
1551 //this.tスキル値の描画( x + 34, y + 18, this.stバー情報[ nパネル番号 ].nスキル値[ (int) this.e楽器パート ] );
1552 //-----------------
1553 #endregion
1554 }
1555 }
1556 //-----------------
1557 #endregion
1558
1559 }
1560 #region [ スクロール地点の計算(描画はCActSelectShowCurrentPositionにて行う) #27648 ]
1561 int py;
1562 double d = 0;
1563 if ( nNumOfItems > 1 )
1564 {
1565 d = ( 336 - 8 ) / (double) ( nNumOfItems - 1 );
1566 py = (int) ( d * ( nCurrentPosition - 1 ) );
1567 }
1568 else
1569 {
1570 d = 0;
1571 py = 0;
1572 }
1573 int delta = (int) ( d * this.n現在のスクロルカウンタ / 100 );
1574 if ( py + delta <= 336 - 8 )
1575 {
1576 this.nスクロルバ相対y座標 = py + delta;
1577 }
1578 #endregion
1579
1580 #region [ アイテム数の描画 #27648 ]
1581 tアイテム数の描画();
1582 #endregion
1583 return 0;
1584 }
1585
1586
1587 // その他
1588
1589 #region [ private ]
1590 //-----------------
1591 private enum E種別 { Score, Box, Other, Random, BackBox }
1592
1593 private struct ST
1594 {
1595 public CTexture Score;
1596 public CTexture Box;
1597 public CTexture Other;
1598 public CTexture Random;
1599 public CTexture BackBox;
1600 public CTexture this[ int index ]
1601 {
1602 get
1603 {
1604 switch( index )
1605 {
1606 case 0:
1607 return this.Score;
1608
1609 case 1:
1610 return this.Box;
1611
1612 case 2:
1613 return this.Other;
1614
1615 case 3:
1616 return this.Random;
1617
1618 case 4:
1619 return this.BackBox;
1620 }
1621 throw new IndexOutOfRangeException();
1622 }
1623 set
1624 {
1625 switch( index )
1626 {
1627 case 0:
1628 this.Score = value;
1629 return;
1630
1631 case 1:
1632 this.Box = value;
1633 return;
1634
1635 case 2:
1636 this.Other = value;
1637 return;
1638
1639 case 3:
1640 this.Random = value;
1641 return;
1642
1643 case 4:
1644 this.BackBox = value;
1645 return;
1646 }
1647 throw new IndexOutOfRangeException();
1648 }
1649 }
1650 }
1651
1652 private struct ST情報
1653 {
1654 public CActSelect曲リスト.E種別 e種別;
1655 public string strタイトル文字列;
1656 public string strティスト名;
1657 public CTexture txタイトル名;
1658 public CTexture txティスト名;
1659 public CTexture txパネル;
1660 public CTexture txカスタム曲名テクスチャ;
1661 public CTexture txカスタムアティスト名テクスチャ;
1662 public int nティスト名テクスチャの長さdot;
1663 public int nタイトル名テクスチャの長さdot;
1664 public STDGBVALUE<int> nスキル値;
1665 public Color col文字色;
1666 public string strDTXフォルダのパス;
1667 public string strPreimageのパス;
1668 public Cスコア.ST譜面情報 ar譜面情報;
1669 }
1670
1671 private struct ST選曲バ
1672 {
1673 public CTexture Score;
1674 public CTexture Box;
1675 public CTexture Other;
1676 public CTexture this[ int index ]
1677 {
1678 get
1679 {
1680 switch( index )
1681 {
1682 case 0:
1683 return this.Score;
1684
1685 case 1:
1686 return this.Box;
1687
1688 case 2:
1689 return this.Other;
1690 }
1691 throw new IndexOutOfRangeException();
1692 }
1693 set
1694 {
1695 switch( index )
1696 {
1697 case 0:
1698 this.Score = value;
1699 return;
1700
1701 case 1:
1702 this.Box = value;
1703 return;
1704
1705 case 2:
1706 this.Other = value;
1707 return;
1708 }
1709 throw new IndexOutOfRangeException();
1710 }
1711 }
1712 }
1713
1714 protected struct ST中心点
1715 {
1716 public float x;
1717 public float y;
1718 public float z;
1719 public float rotY;
1720 }
1721 /// <summary>
1722 /// <para>SSTFファイル絶対パス(key)とサムネイル画像(value)との辞書。</para>
1723 /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1724 /// </summary>
1725 protected Dictionary<string, CTexture> dicThumbnail = new Dictionary<string, CTexture>();
1726
1727 /// <summary>
1728 /// <para>SSTFファイル絶対パス(key)とプロパティ画像(value)との辞書。</para>
1729 /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1730 /// </summary>
1731 protected Dictionary<string, CTexture> dicProperty = new Dictionary<string, CTexture>();
1732
1733 protected ST中心点[] stマトリックス座標 = new ST中心点[] {
1734 #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1735 //-----------------
1736 new ST中心点() { x = -940.0000f, y = 4f, z = 320f, rotY = 0.4150f },
1737 new ST中心点() { x = -740.0000f, y = 4f, z = 230f, rotY = 0.4150f },
1738 new ST中心点() { x = -550.0000f, y = 4f, z = 150f, rotY = 0.4150f },
1739 new ST中心点() { x = -370.0000f, y = 4f, z = 70f, rotY = 0.4150f },
1740 new ST中心点() { x = -194.0000f, y = 4f, z = -6f, rotY = 0.4150f },
1741 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1742 new ST中心点() { x = 204.0000f, y = 4f, z = 0f, rotY = -0.4150f },
1743 new ST中心点() { x = 362.0000f, y = 4f, z = 70f, rotY = -0.4150f },
1744 new ST中心点() { x = 528.0000f, y = 4f, z = 146f, rotY = -0.4150f },
1745 new ST中心点() { x = 686.0000f, y = 4f, z = 212f, rotY = -0.4150f },
1746 new ST中心点() { x = 848.0000f, y = 4f, z = 282f, rotY = -0.4150f },
1747 new ST中心点() { x = 1200.0000f, y = 4f, z = 450f, rotY = -0.4150f },
1748 new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1749 new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1750 //-----------------
1751 #endregion
1752 };
1753
1754 protected readonly ST中心点[] stマトリックス曲名座標 = new ST中心点[] {
1755 #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1756 //-----------------
1757 new ST中心点() { x = -980.0000f, y = 4f, z = 350f, rotY = 0.4000f },
1758 new ST中心点() { x = -780.0000f, y = 4f, z = 264f, rotY = 0.4000f },
1759 new ST中心点() { x = -590.0000f, y = 4f, z = 174f, rotY = 0.4000f },
1760 new ST中心点() { x = -400.0000f, y = 4f, z = 92f, rotY = 0.4000f },
1761 new ST中心点() { x = -210.0000f, y = 4f, z = 10f, rotY = 0.4000f },
1762 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1763 new ST中心点() { x = 210.0000f, y = 2f, z = 10f, rotY = -0.4000f },
1764 new ST中心点() { x = 400.0000f, y = 2f, z = 92f, rotY = -0.4f },
1765 new ST中心点() { x = 590.0000f, y = 2f, z = 174f, rotY = -0.4f },
1766 new ST中心点() { x = 780.0000f, y = 2f, z = 264f, rotY = -0.4f },
1767 new ST中心点() { x = 980.0000f, y = 2f, z = 350f, rotY = -0.4f },
1768 new ST中心点() { x = 1200.0000f, y = 2f, z = 450f, rotY = -0.4f },
1769 new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1770 new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1771 //-----------------
1772 #endregion
1773 };
1774 [StructLayout(LayoutKind.Sequential)]
1775 public struct STATUSPANEL
1776 {
1777 public string label;
1778 public int status;
1779 }
1780 public int nIndex;
1781 public STATUSPANEL[] stパネルマップ;
1782
1783 public bool b登場アニメ全部完了;
1784 private Color color文字影 = Color.FromArgb( 0x40, 10, 10, 10 );
1785 public CCounter[] ct登場アニメ用 = new CCounter[ 13 ];
1786 private Font ft曲リスト用フォント;
1787 private long nスクロルタイマ;
1788 private int n現在のスクロルカウンタ;
1789 private int n現在の選択行;
1790 private int n目標のスクロルカウンタ;
1791 private readonly Point[] ptの基本座標 = new Point[] { new Point(0x2c4, 30), new Point(0x272, 0x51), new Point(0x242, 0x84), new Point(0x222, 0xb7), new Point(0x210, 0xea), new Point(0x1d0, 0x127), new Point(0x224, 0x183), new Point(0x242, 0x1b6), new Point(0x270, 0x1e9), new Point(0x2ae, 540), new Point(0x314, 0x24f), new Point(0x3e4, 0x282), new Point(0x500, 0x2b5) };
1792 private ST情報[] st情報 = new ST情報[ 13 ];
1793 private CTexture txSongNotFound, txEnumeratingSongs;
1794 private CTexture txスキル数字;
1795 private CTexture txアイテム数数字;
1796 private CTexture[] txTumbnail = new CTexture[13];
1797 private CTexture tx選曲パネル;
1798 private CTexture txパネル;
1799 private CTextureAf tx;
1800 private CTextureAf tx色帯;
1801 private CTexture txランプ用帯;
1802 private CTexture tx選択されている曲の曲名;
1803 private CTexture tx選択されている曲のアティスト名;
1804 private CTexture txクリアランプ;
1805 //CPrivateFont prvFont;
1806 private CPrivateFastFont prvFont;
1807
1808 private int nCurrentPosition = 0;
1809 private int nNumOfItems = 0;
1810
1811 //private string strBoxDefSkinPath = "";
1812 private E種別 e曲のバ種別を返す( C曲リストノ song )
1813 {
1814 if( song != null )
1815 {
1816 switch( song.eド種別 )
1817 {
1818 case C曲リストノ.Eド種別.SCORE:
1819 case C曲リストノ.Eド種別.SCORE_MIDI:
1820 return E種別.Score;
1821
1822 case C曲リストノ.Eド種別.BOX:
1823 return E種別.Box;
1824
1825 case C曲リストノ.Eド種別.BACKBOX:
1826 return E種別.BackBox;
1827
1828 case C曲リストノ.Eド種別.RANDOM:
1829 return E種別.Random;
1830 }
1831 }
1832 return E種別.Other;
1833 }
1834 private C曲リストノ r次の曲( C曲リストノ song )
1835 {
1836 if( song == null )
1837 return null;
1838
1839 List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
1840
1841 int index = list.IndexOf( song );
1842
1843 if( index < 0 )
1844 return null;
1845
1846 if( index == ( list.Count - 1 ) )
1847 return list[ 0 ];
1848
1849 return list[ index + 1 ];
1850 }
1851 private C曲リストノ r前の曲( C曲リストノ song )
1852 {
1853 if( song == null )
1854 return null;
1855
1856 List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
1857
1858 int index = list.IndexOf( song );
1859
1860 if( index < 0 )
1861 return null;
1862
1863 if( index == 0 )
1864 return list[ list.Count - 1 ];
1865
1866 return list[ index - 1 ];
1867 }
1868 private void tスキル値の描画( int x, int y, int nスキル値 )
1869 {
1870 if( nスキル値 <= 0 || nスキル値 > 100 ) // スキル値 0 = 未プレイ なので表示しない。
1871 return;
1872
1873 int color = ( nスキル値 == 100 ) ? 3 : ( nスキル値 / 25 );
1874
1875 int n百の位 = nスキル値 / 100;
1876 int n十の位 = ( nスキル値 % 100 ) / 10;
1877 int n一の位 = ( nスキル値 % 100 ) % 10;
1878
1879
1880 // 百の位の描画。
1881
1882 if( n百の位 > 0 )
1883 this.tスキル値の描画・1桁描画( x, y, n百の位, color );
1884
1885
1886 // 十の位の描画。
1887
1888 if( n百の位 != 0 || n十の位 != 0 )
1889 this.tスキル値の描画・1桁描画( x + 14, y, n十の位, color );
1890
1891
1892 // 一の位の描画。
1893
1894 this.tスキル値の描画・1桁描画( x + 0x1c, y, n一の位, color );
1895 }
1896 private void tスキル値の描画・1桁描画( int x, int y, int n数値, int color )
1897 {
1898 int dx = ( n数値 % 5 ) * 9;
1899 int dy = ( n数値 / 5 ) * 12;
1900
1901 switch( color )
1902 {
1903 case 0:
1904 if( this.txスキル数字 != null )
1905 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 45 + dx, 24 + dy, 9, 12 ) );
1906 break;
1907
1908 case 1:
1909 if( this.txスキル数字 != null )
1910 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 45 + dx, dy, 9, 12 ) );
1911 break;
1912
1913 case 2:
1914 if( this.txスキル数字 != null )
1915 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( dx, 24 + dy, 9, 12 ) );
1916 break;
1917
1918 case 3:
1919 if( this.txスキル数字 != null )
1920 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( dx, dy, 9, 12 ) );
1921 break;
1922 }
1923 }
1924 private void tの初期化()
1925 {
1926 C曲リストノ song = this.r現在選択中の曲;
1927
1928 if( song == null )
1929 return;
1930
1931 for( int i = 0; i < 5; i++ )
1932 song = this.r前の曲( song );
1933
1934 for( int i = 0; i < 13; i++ )
1935 {
1936 this.st情報[ i ].strタイトル文字列 = song.strタイトル;
1937 this.st情報[ i ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.ティスト名;
1938 this.st情報[ i ].col文字色 = song.col文字色;
1939 this.st情報[ i ].e種別 = this.e曲のバ種別を返す( song );
1940 this.st情報[ i ].ar譜面情報 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報;
1941
1942 //for( int n = 0; n < 5; n++ )
1943 {
1944 //this.stバー情報[ i ].ar難易度ラベル[ n ];
1945
1946 //if( this.stバー情報[ i ].ar難易度ラベル[ n ] != null )
1947 //this.stバー情報[ i ].ar難易度ラベル[ n ] = song.ar難易度ラベル[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ];
1948 }
1949
1950 this.st情報[ i ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス;
1951 this.st情報[ i ].strPreimageのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
1952 this.tパネルの生成(i, song.strタイトル, this.st情報[ i ].strティスト名, song.col文字色);
1953 if( this.st情報[ i ].strPreimageのパス != null )
1954 {
1955 if( !this.dicThumbnail.ContainsKey( this.st情報[ i ].strPreimageのパス ) )
1956 {
1957 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
1958 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strPreimageのパス, this.st情報[ i ].e種別 );
1959 this.dicThumbnail.Add( this.st情報[ i ].strPreimageのパス, this.txTumbnail[ i ] );
1960 }
1961 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strPreimageのパス ];
1962 }
1963
1964 for( int j = 0; j < 3; j++ )
1965 this.st情報[ i ].nスキル値[ j ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ j ];
1966
1967 song = this.r次の曲( song );
1968 }
1969
1970 this.n現在の選択行 = 5;
1971 }
1972 private void tパスを指定してサムネイル画像を生成する( int n番号, string strDTXPath, E種別 eType )
1973 {
1974 if( n番号 < 0 || n番号 > 12 )
1975 return;
1976
1977 //try
1978 {
1979 //if ( this.stバー情報[ nバー番号 ].eバー種別 == Eバー種別.Score || this.stバー情報[ nバー番号 ].eバー種別 == Eバー種別.Box)
1980 {
1981 if (!File.Exists(strDTXPath))
1982 {
1983 this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage default.png"), false);
1984 }
1985 else
1986 {
1987 this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(strDTXPath);
1988 }
1989 }
1990 //else if( this.stバー情報[ nバー番号 ].eバー種別 == Eバー種別.Random)
1991 //{
1992 // if( this.txジャケットランダム != null )
1993 // this.txTumbnail[ nバー番号 ] = this.txジャケットランダム;
1994 //}
1995 //else if( this.stバー情報[ nバー番号 ].eバー種別 == Eバー種別.BackBox)
1996 //{
1997 // if( this.txジャケットボックスクローズ != null )
1998 // this.txTumbnail[ nバー番号 ] = this.txジャケットボックスクローズ;
1999 //}
2000 }
2001 /*
2002 catch( CTextureCreateFailedException )
2003 {
2004 if ( this.txジャケット指定が無い場合の画像 != null )
2005 {
2006 this.txTumbnail[ nバー番号 ] = this.txジャケット指定が無い場合の画像;
2007 }
2008 else
2009 {
2010 this.txTumbnail[ nバー番号 ] = null;
2011 }
2012 }
2013 */
2014 }
2015 private CTexture tパスを指定してサムネイル画像を生成して返す( int n番号, string strDTXPath, E種別 eType )
2016 {
2017 if (n番号 < 0 || n番号 > 12)
2018 return this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage default.png"), false);
2019
2020 //try
2021 {
2022 //if (eType == Eバー種別.Score || eType == Eバー種別.Box)
2023 {
2024 if (!File.Exists(strDTXPath))
2025 {
2026 return this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage default.png"), false);
2027 }
2028 else
2029 {
2030 return this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(strDTXPath);
2031 }
2032 }
2033 //else if (eType == Eバー種別.Random)
2034 {
2035 // if(this.txジャケットランダム != null)
2036 // this.txTumbnail[nバー番号] = this.txジャケットランダム;
2037 }
2038 //else if (eType == Eバー種別.BackBox)
2039 {
2040 // if(this.txジャケットボックスクローズ != null)
2041 // this.txTumbnail[nバー番号] = this.txジャケットボックスクローズ;
2042 }
2043 }
2044 /*
2045 catch( CTextureCreateFailedException )
2046 {
2047 if ( this.txジャケット指定が無い場合の画像 != null )
2048 {
2049 this.txTumbnail[ nバー番号 ] = this.txジャケット指定が無い場合の画像;
2050 }
2051 else
2052 {
2053 this.txTumbnail[ nバー番号 ] = null;
2054 }
2055 }
2056 */
2057 }
2058 private CTexture t指定された文字テクスチャを生成する( string str文字 )
2059 {
2060 //2013.09.05.kairera0467 中央にしか使用することはないので、色は黒固定。
2061 //現在は機能しない(面倒なので実装してない)が、そのうち使用する予定。
2062 //PrivateFontの試験運転も兼ねて。
2063 //CPrivateFastFont
2064 prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );
2065 Bitmap bmp;
2066
2067 bmp = prvFont.DrawPrivateFont( str文字, Color.Black, Color.Transparent );
2068
2069 SizeF sz曲名;
2070
2071 #region [ 曲名表示に必要となるサイズを取得する。]
2072 //-----------------
2073 using( var bmpDummy = new Bitmap(1, 1) )
2074 {
2075 var g = Graphics.FromImage( bmpDummy );
2076 g.PageUnit = GraphicsUnit.Pixel;
2077 sz曲名 = g.MeasureString( str文字, this.ft曲リスト用フォント);
2078 //this.stバー情報[ nバー番号 ].nタイトル名テクスチャの長さdot = (int)g.MeasureString(str文字, this.ft曲リスト用フォント).Width;
2079 }
2080 //-----------------
2081 #endregion
2082 int n最大幅px = 200;
2083 int height = 25;
2084 int width = (int)((sz曲名.Width + 2) * 0.5f);
2085 if (width > (CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2))
2086 width = CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2; // 右端断ち切れ仕方ないよね
2087
2088 float f拡大率X = (width <= n最大幅px) ? 0.5f : (((float)n最大幅px / (float)width) * 0.5f); // 長い文字列は横方向に圧縮。
2089
2090 CTexture tx文字テクスチャ = CDTXMania.tテクスチャの生成( bmp, false );
2091
2092 if( tx文字テクスチャ != null )
2093 tx文字テクスチャ.vc拡大縮小倍率 = new Vector3( f拡大率X, 0.5f, 1f );
2094
2095 //prvFont.Dispose();
2096 bmp.Dispose();
2097
2098 return tx文字テクスチャ;
2099 }
2100 private void tパネルの生成( int n番号, string str曲名, string strティスト名, Color color )
2101 {
2102 //t3D描画の仕様上左詰や右詰が面倒になってしまうので、
2103 //パネルにあらかじめ曲名とアーティスト名を埋め込んでおく。
2104
2105 if( n番号 < 0 || n番号 > 12 )
2106 return;
2107 try
2108 {
2109 Bitmap b4font;
2110 Bitmap bSongPanel;
2111 Image imgSongPanel;
2112 Image imgCustomSongNameTexture;
2113 Image imgCuttomArtistNameTexture;
2114 SizeF sz曲名;
2115 SizeF szティスト名;
2116
2117 bool bFoundTitleTexture = false;
2118 bool bFoundArtistTexture = false;
2119
2120 b4font = new Bitmap( 1, 1 );
2121 Graphics graphics = Graphics.FromImage( b4font );
2122 graphics.PageUnit = GraphicsUnit.Pixel;
2123 imgSongPanel = Image.FromFile( CSkin.Path( @"Graphics\5_music panel.png" ) );
2124
2125 bSongPanel = new Bitmap( 223, 279 );
2126
2127 graphics = Graphics.FromImage( bSongPanel );
2128 graphics.DrawImage( imgSongPanel, 0, 0, 223, 279 );
2129
2130 string strPassBefore = "";
2131 string strPassAfter = "";
2132 try
2133 {
2134 strPassBefore = this.st情報[ n番号 ].strDTXフォルダのパス;
2135 strPassAfter = strPassBefore.Replace( this.st情報[ n番号 ].ar譜面情報.Preimage, "" );
2136 }
2137 catch
2138 {
2139 //Replaceでエラーが出たらここで適切な処理ができるようにしたい。
2140 strPassBefore = "";
2141 strPassAfter = "";
2142
2143 }
2144 string strPath = (strPassAfter + "TitleTexture.png");
2145 if (File.Exists((strPath)))
2146 {
2147 imgCustomSongNameTexture = Image.FromFile(strPath);
2148 graphics.DrawImage(imgCustomSongNameTexture, 4, -1, 223, 33);
2149 bFoundTitleTexture = true;
2150 }
2151 if (File.Exists((strPassAfter + "ArtistTexture.png")))
2152 {
2153 imgCuttomArtistNameTexture = Image.FromFile(strPassAfter + "ArtistTexture.png");
2154 graphics.DrawImage(imgCuttomArtistNameTexture, 0, 252, 223, 26);
2155 bFoundArtistTexture = true;
2156 }
2157
2158
2159 #region [ 曲名表示に必要となるサイズを取得する。]
2160 //-----------------
2161 using( var bmpDummy = new Bitmap( 1, 1 ) )
2162 {
2163 var g = Graphics.FromImage( bmpDummy );
2164 g.PageUnit = GraphicsUnit.Pixel;
2165 sz曲名 = g.MeasureString( str曲名, this.ft曲リスト用フォント );
2166 szティスト名 = g.MeasureString( strティスト名, this.ft曲リスト用フォント );
2167 this.st情報[ n番号 ].nタイトル名テクスチャの長さdot = (int) g.MeasureString( strティスト名, new Font( CDTXMania.ConfigIni.str選曲リストフォント, 16 ) ).Width;
2168 }
2169 //-----------------
2170 #endregion
2171
2172 int n最大幅px = 200;
2173 int height = 25;
2174 int width = (int) ( ( sz曲名.Width + 2 ) );
2175 if( width > ( CDTXMania.app.Device.Capabilities.MaxTextureWidth ) )
2176 width = CDTXMania.app.Device.Capabilities.MaxTextureWidth; // 右端断ち切れ仕方ないよね
2177
2178 float f拡大率X = ( width <= n最大幅px ) ? 1 : ( ( (float) n最大幅px / (float) width ) ); // 長い文字列は横方向に圧縮。
2179
2180 using( var bmp = new Bitmap( width, height, PixelFormat.Format32bppArgb ) ) // 2倍(面積4倍)のBitmapを確保。(0.5倍で表示する前提。)
2181 using( var g = Graphics.FromImage( bmp ) )
2182 {
2183 graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
2184 float y = ( ( ( float ) bmp.Height ) ) - ( ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot ) );
2185 //graphics.DrawString( str曲名, this.ft曲リスト用フォント, new SolidBrush( this.color文字影 ), (float) 2f, (float) ( y + 2f ) );
2186 if( bFoundTitleTexture == false )
2187 graphics.DrawString( str曲名, new Font( CDTXMania.ConfigIni.str選曲リストフォント, 16 ), new SolidBrush( color ), 5f, y - 2 );
2188 if( bFoundArtistTexture == false )
2189 graphics.DrawString( strティスト名, new Font( CDTXMania.ConfigIni.str選曲リストフォント, 16 ), new SolidBrush( Color.White ), (float)218f - this.st情報[ n番号 ].nタイトル名テクスチャの長さdot, 255f);
2190 //graphics.DrawString( strアーティスト名, this.ft曲リスト用フォント, new SolidBrush( Color.White ), 234f, 258f );
2191
2192 CDTXMania.t安全にDisposeする( ref this.st情報[ n番号 ].txパネル );
2193
2194 this.st情報[ n番号 ].txパネル = new CTexture( CDTXMania.app.Device, bSongPanel, CDTXMania.TextureFormat, false );
2195 }
2196
2197
2198 }
2199 catch( CTextureCreateFailedException )
2200 {
2201 Trace.TraceError( "曲名テクスチャの作成に失敗しました。[{0}]", str曲名 );
2202 this.st情報[ n番号 ].txパネル = null;
2203 }
2204
2205 }
2206
2207 private CTexture tカスタム曲名の生成( int n番号 )
2208 {
2209 //t3D描画の仕様上左詰や右詰が面倒になってしまうので、
2210 //パネルにあらかじめ曲名とアーティスト名を埋め込んでおく。
2211
2212 Bitmap b4font;
2213 Bitmap bCustomSongNameTexture;
2214 Image imgCustomSongNameTexture;
2215
2216 b4font = new Bitmap( 1, 1 );
2217 Graphics graphicsA = Graphics.FromImage( b4font );
2218
2219 graphicsA.PageUnit = GraphicsUnit.Pixel;
2220
2221 imgCustomSongNameTexture = Image.FromFile( CSkin.Path( @"Graphics\7_Dummy.png" ) );
2222
2223
2224 bCustomSongNameTexture = new Bitmap( 240, 40 );
2225
2226 graphicsA = Graphics.FromImage( bCustomSongNameTexture );
2227 graphicsA.DrawImage( bCustomSongNameTexture, 0, 0, 180, 25 );
2228
2229
2230 string strPassAfter = "";
2231 try
2232 {
2233 strPassAfter = this.st情報[ n番号 ].strDTXフォルダのパス;
2234 }
2235 catch
2236 {
2237 strPassAfter = "";
2238 }
2239
2240 string strPath = (strPassAfter + "TitleTexture.png");
2241 if (File.Exists((strPath)))
2242 {
2243 imgCustomSongNameTexture = Image.FromFile(strPath);
2244 imgCustomSongNameTexture = this.CreateNegativeImage( imgCustomSongNameTexture );
2245 graphicsA.DrawImage(imgCustomSongNameTexture, 6, 1, 180, 25);
2246 }
2247
2248
2249 //CDTXMania.t安全にDisposeする( ref this.stバー情報[ nバー番号 ].txカスタム曲名テクスチャ );
2250 //CDTXMania.t安全にDisposeする( ref this.stバー情報[ nバー番号 ].txカスタムアーティスト名テクスチャ );
2251 CTexture txTex = new CTexture( CDTXMania.app.Device, bCustomSongNameTexture, CDTXMania.TextureFormat, false );
2252 return txTex;
2253
2254 }
2255 private CTexture tカスタムアティスト名テクスチャの生成( int n番号 )
2256 {
2257 //t3D描画の仕様上左詰や右詰が面倒になってしまうので、
2258 //パネルにあらかじめ曲名とアーティスト名を埋め込んでおく。
2259
2260 Bitmap b4font;
2261 Bitmap bCustomArtistNameTexture;
2262 Image imgCustomArtistNameTexture;
2263
2264 b4font = new Bitmap( 1, 1 );
2265 Graphics graphics = Graphics.FromImage( b4font );
2266
2267 graphics.PageUnit = GraphicsUnit.Pixel;
2268
2269 imgCustomArtistNameTexture = Image.FromFile( CSkin.Path( @"Graphics\7_Dummy.png" ) );
2270
2271
2272 bCustomArtistNameTexture = new Bitmap( 210, 27 );
2273
2274 graphics = Graphics.FromImage( bCustomArtistNameTexture );
2275 graphics.DrawImage( bCustomArtistNameTexture, 0, 0, 196, 27 );
2276
2277
2278 string strPassAfter = "";
2279 try
2280 {
2281 strPassAfter = this.st情報[ n番号 ].strDTXフォルダのパス;
2282 }
2283 catch
2284 {
2285 strPassAfter = "";
2286 }
2287
2288 string strPath = (strPassAfter + "ArtistTexture.png");
2289 if (File.Exists((strPath)))
2290 {
2291 imgCustomArtistNameTexture = Image.FromFile(strPath);
2292 imgCustomArtistNameTexture = this.CreateNegativeImage( imgCustomArtistNameTexture );
2293 graphics.DrawImage(imgCustomArtistNameTexture, 16,<