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 197 - (show annotations) (download)
Sun Dec 29 00:29:57 2013 UTC (10 years, 3 months ago) by kairera0467
File size: 126393 byte(s)
β1
#32683 例外処理の追加。
#xxxxx アセンプリバージョンの更新。
#xxxxx FDKのサウンド関連を本家のものに更新。
#xxxxx ためしにアンチエイリアス処理をデフォルトで有効にしてみる。
#xxxxx ギター画面の重ね順を一部変更。コンボがゲージの上にくるようにした。
#xxxxx Bass側のステータスパネルの準備。
#xxxxx コミット漏れしていた画像の追加。

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 ].strDTXフォルダのパス ) )
312 {
313 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
314 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strDTXフォルダのパス, this.st情報[ i ].e種別 );
315 this.dicThumbnail.Add( this.st情報[ i ].strDTXフォルダのパス, this.txTumbnail[ i ] );
316 }
317 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strDTXフォルダのパス ];
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 CDTXMania.tテクスチャの解放( ref this.tx選択されている曲の曲名 );
541 CDTXMania.tテクスチャの解放( ref this.tx選択されている曲のアティスト名 );
542 }
543
544 // CActivity 実装
545
546 public override void On活性化()
547 {
548 if( this.b活性化してる )
549 return;
550
551 this.e楽器パ = E楽器パ.DRUMS;
552 this.b登場アニメ全部完了 = false;
553 this.n目標のスクロルカウンタ = 0;
554 this.n現在のスクロルカウンタ = 0;
555 this.nスクロルタイマ = -1;
556
557 // フォント作成。
558 // 曲リスト文字は2倍(面積4倍)でテクスチャに描画してから縮小表示するので、フォントサイズは2倍とする。
559
560 FontStyle regular = FontStyle.Regular;
561 if( CDTXMania.ConfigIni.b選曲リストフォントを斜体にする ) regular |= FontStyle.Italic;
562 if( CDTXMania.ConfigIni.b選曲リストフォントを太字にする ) regular |= FontStyle.Bold;
563 this.ft曲リスト用フォント = new Font( CDTXMania.ConfigIni.str選曲リストフォント, (float) ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot * 2 ), regular, GraphicsUnit.Pixel );
564 //this.prvFont = new CPrivateFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );
565
566 // 現在選択中の曲がない(=はじめての活性化)なら、現在選択中の曲をルートの先頭ノードに設定する。
567
568 if( ( this.r現在選択中の曲 == null ) && ( CDTXMania.Songs管理.list曲ル.Count > 0 ) )
569 this.r現在選択中の曲 = CDTXMania.Songs管理.list曲ル[ 0 ];
570
571
572 // バー情報を初期化する。
573
574 this.tの初期化();
575
576 base.On活性化();
577
578 this.t選択曲が変更された(true); // #27648 2012.3.31 yyagi 選曲画面に入った直後の 現在位置/全アイテム数 の表示を正しく行うため
579 }
580 public override void On非活性化()
581 {
582 if( this.b活性化してない )
583 return;
584
585 CDTXMania.t安全にDisposeする( ref this.ft曲リスト用フォント );
586 if( this.prvFont != null )
587 this.prvFont.Dispose();
588
589 for( int i = 0; i < 13; i++ )
590 this.ct登場アニメ用[ i ] = null;
591
592 base.On非活性化();
593 }
594 public override void OnManagedリソスの作成()
595 {
596 if( this.b活性化してない )
597 return;
598
599 this.tx曲名バ.Score = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_bar score.png" ), false );
600 this.tx曲名バ.Box = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_bar box.png" ), false );
601 this.tx曲名バ.Other = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_bar other.png" ), false );
602 this.tx選曲バ.Score = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_bar score selected.png" ), false );
603 this.tx選曲バ.Box = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_bar box selected.png" ), false );
604 this.tx選曲バ.Other = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_bar other selected.png" ), false );
605 this.txスキル数字 = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\ScreenSelect skill number on list.png" ), false );
606 this.tx選曲パネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_image_panel.png"));
607 this.txパネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_music panel.png"));
608 //this.txジャケットボックスクローズ = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_preimage backbox.png") );
609 //this.txジャケットランダム = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_preimage random.png") );
610 this.tx = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_backpanel.png" ) );
611 this.tx色帯 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_ColorBar.png" ) );
612 this.txランプ用帯 = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_lamppanel.png" ));
613
614 this.txクリアランプ = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_Clearlamp.png") );
615 #region[ テクスチャの復元 ]
616 int nKeys = this.dicThumbnail.Count;
617 string[] keys = new string[ nKeys ];
618 this.dicThumbnail.Keys.CopyTo( keys, 0 );
619 foreach (var key in keys)
620 this.dicThumbnail[ key ] = this.tパスを指定してサムネイル画像を生成して返す( 0, key, this.st情報[ 0 ].e種別 );;
621
622 //ここは最初に表示される画像の復元に必要。
623 for (int i = 0; i < 13; i++)
624 {
625 this.t曲名バの生成(i, this.st情報[i].strタイトル文字列, this.st情報[i].col文字色);
626 this.tティスト名テクスチャの生成( i, this.st情報[ i ].strティスト名 );
627 //this.tパネルの生成( i, this.stバー情報[ i ].strタイトル文字列, this.stバー情報[ i ].strアーティスト名, this.stバー情報[ i ].col文字色 );
628 //this.tパスを指定してサムネイル画像を生成する(i, this.stバー情報[i].strDTXフォルダのパス, this.stバー情報[i].eバー種別);
629 if( this.st情報[ i ].strDTXフォルダのパス != null )
630 {
631 if( !this.dicThumbnail.ContainsKey( this.st情報[ i ].strDTXフォルダのパス ) )
632 {
633 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
634 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strDTXフォルダのパス, this.st情報[ i ].e種別 );
635 this.dicThumbnail.Add( this.st情報[ i ].strDTXフォルダのパス, this.txTumbnail[ i ] );
636 }
637 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strDTXフォルダのパス ];
638 }
639 }
640 #endregion
641
642
643 int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1;
644 #region [ Songs not found画像 ]
645 try
646 {
647 using( Bitmap image = new Bitmap( 640, 128 ) )
648 using( Graphics graphics = Graphics.FromImage( image ) )
649 {
650 string[] s1 = { "曲データが見つかりません。", "Songs not found." };
651 string[] s2 = { "曲データをDTXManiaGR.exe以下の", "You need to install songs." };
652 string[] s3 = { "フォルダにインストールして下さい。", "" };
653 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 2f );
654 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 0f );
655 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 44f );
656 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 42f );
657 graphics.DrawString( s3[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 86f );
658 graphics.DrawString( s3[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 84f );
659
660 this.txSongNotFound = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
661
662 this.txSongNotFound.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); // 半分のサイズで表示する。
663 }
664 }
665 catch( CTextureCreateFailedException )
666 {
667 Trace.TraceError( "SoungNotFoundテクスチャの作成に失敗しました。" );
668 this.txSongNotFound = null;
669 }
670 #endregion
671 #region [ "曲データを検索しています"画像 ]
672 try
673 {
674 using ( Bitmap image = new Bitmap( 640, 96 ) )
675 using ( Graphics graphics = Graphics.FromImage( image ) )
676 {
677 string[] s1 = { "曲データを検索しています。", "Now enumerating songs." };
678 string[] s2 = { "そのまましばらくお待ち下さい。", "Please wait..." };
679 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 2f );
680 graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 0f );
681 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 44f );
682 graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 42f );
683
684 this.txEnumeratingSongs = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
685
686 this.txEnumeratingSongs.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); // 半分のサイズで表示する。
687 }
688 }
689 catch ( CTextureCreateFailedException )
690 {
691 Trace.TraceError( "txEnumeratingSongsテクスチャの作成に失敗しました。" );
692 this.txEnumeratingSongs = null;
693 }
694 #endregion
695 #region [ 曲数表示 ]
696 this.txアイテム数数字 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect skill number on gauge etc.png" ), false );
697 #endregion
698
699 base.OnManagedリソスの作成();
700 }
701 public override void OnManagedリソスの解放()
702 {
703 if( this.b活性化してない )
704 return;
705
706 CDTXMania.t安全にDisposeする( ref this.txアイテム数数字 );
707
708 for ( int i = 0; i < 13; i++ )
709 {
710 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txタイトル名 );
711 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txティスト名 );
712 }
713
714 if( this.tx選択されている曲の曲名 != null || this.tx選択されている曲のアティスト名 != null )
715 {
716 CDTXMania.tテクスチャの解放( ref this.tx選択されている曲の曲名 );
717 CDTXMania.tテクスチャの解放( ref this.tx選択されている曲のアティスト名 );
718 this.tx選択されている曲の曲名 = null;
719 this.tx選択されている曲のアティスト名 = null;
720 }
721 #region[ ジャケット画像の解放 ]
722 int nKeys = this.dicThumbnail.Count;
723 string[] keys = new string[ nKeys ];
724 this.dicThumbnail.Keys.CopyTo( keys, 0 );
725 foreach( var key in keys )
726 {
727 C共通.tDisposeする( this.dicThumbnail[ key ] );
728 this.dicThumbnail[ key ] = null;
729 }
730 #endregion
731
732 CDTXMania.t安全にDisposeする( ref this.txスキル数字 );
733 CDTXMania.t安全にDisposeする( ref this.txEnumeratingSongs );
734 CDTXMania.t安全にDisposeする( ref this.txSongNotFound );
735 CDTXMania.t安全にDisposeする( ref this.tx曲名バ.Score );
736 CDTXMania.t安全にDisposeする( ref this.tx曲名バ.Box );
737 CDTXMania.t安全にDisposeする( ref this.tx曲名バ.Other );
738 CDTXMania.t安全にDisposeする( ref this.tx選曲バ.Score );
739 CDTXMania.t安全にDisposeする( ref this.tx選曲バ.Box );
740 CDTXMania.t安全にDisposeする( ref this.tx選曲バ.Other );
741 CDTXMania.t安全にDisposeする( ref this.tx選曲パネル );
742 CDTXMania.t安全にDisposeする( ref this.txパネル );
743 CDTXMania.t安全にDisposeする( ref this.txクリアランプ );
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
750 base.OnManagedリソスの解放();
751 }
752 public override int On進行描画()
753 {
754 if( this.b活性化してない )
755 return 0;
756
757 #region [ 初めての進行描画 ]
758 //-----------------
759 if( this.b初めての進行描画 )
760 {
761 for( int i = 0; i < 13; i++ )
762 this.ct登場アニメ用[ i ] = new CCounter( -i * 10, 100, 3, CDTXMania.Timer );
763
764 this.nスクロルタイマ = CSound管理.rc演奏用タイマ.n現在時刻;
765 CDTXMania.stage選曲.t選択曲変更通知();
766
767 base.b初めての進行描画 = false;
768 }
769 //-----------------
770 #endregion
771
772
773 // まだ選択中の曲が決まってなければ、曲ツリールートの最初の曲にセットする。
774
775 if( ( this.r現在選択中の曲 == null ) && ( CDTXMania.Songs管理.list曲ル.Count > 0 ) )
776 this.r現在選択中の曲 = CDTXMania.Songs管理.list曲ル[ 0 ];
777
778
779 // 本ステージは、(1)登場アニメフェーズ → (2)通常フェーズ と二段階にわけて進む。
780 // 2つしかフェーズがないので CStage.eフェーズID を使ってないところがまた本末転倒。
781
782
783 // 進行。
784
785 if( !this.b登場アニメ全部完了 )
786 {
787 #region [ (1) 登場アニメフェーズの進行。]
788 //-----------------
789 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
790 {
791 this.ct登場アニメ用[ i ].t進行();
792
793 if( this.ct登場アニメ用[ i ].b終了値に達した )
794 this.ct登場アニメ用[ i ].t停止();
795 }
796
797 // 全部の進行が終わったら、this.b登場アニメ全部完了 を true にする。
798
799 this.b登場アニメ全部完了 = true;
800 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
801 {
802 if( this.ct登場アニメ用[ i ].b進行中 )
803 {
804 this.b登場アニメ全部完了 = false; // まだ進行中のアニメがあるなら false のまま。
805 break;
806 }
807 }
808 //-----------------
809 #endregion
810 }
811 else
812 {
813 #region [ (2) 通常フェーズの進行。]
814 //-----------------
815 long n現在時刻 = CSound管理.rc演奏用タイマ.n現在時刻;
816
817 if( n現在時刻 < this.nスクロルタイマ ) // 念のため
818 this.nスクロルタイマ = n現在時刻;
819
820 const int nアニメ間隔 = 2;
821 while( ( n現在時刻 - this.nスクロルタイマ ) >= nアニメ間隔 )
822 {
823 int n加速度 = 1;
824 int n残距離 = Math.Abs( (int) ( this.n目標のスクロルカウンタ - this.n現在のスクロルカウンタ ) );
825
826 #region [ 残距離が遠いほどスクロールを速くする(=n加速度を多くする)。]
827 //-----------------
828 if( n残距離 <= 100 )
829 {
830 n加速度 = 2;
831 }
832 else if( n残距離 <= 300 )
833 {
834 n加速度 = 3;
835 }
836 else if( n残距離 <= 500 )
837 {
838 n加速度 = 4;
839 }
840 else
841 {
842 n加速度 = 8;
843 }
844 //-----------------
845 #endregion
846
847 #region [ 加速度を加算し、現在のスクロールカウンタを目標のスクロールカウンタまで近づける。 ]
848 //-----------------
849 if( this.n現在のスクロルカウンタ < this.n目標のスクロルカウンタ ) // (A) 正の方向に未達の場合:
850 {
851 this.n現在のスクロルカウンタ += n加速度; // カウンタを正方向に移動する。
852
853 if( this.n現在のスクロルカウンタ > this.n目標のスクロルカウンタ )
854 this.n現在のスクロルカウンタ = this.n目標のスクロルカウンタ; // 到着!スクロール停止!
855 }
856
857 else if( this.n現在のスクロルカウンタ > this.n目標のスクロルカウンタ ) // (B) 負の方向に未達の場合:
858 {
859 this.n現在のスクロルカウンタ -= n加速度; // カウンタを負方向に移動する。
860
861 if( this.n現在のスクロルカウンタ < this.n目標のスクロルカウンタ ) // 到着!スクロール停止!
862 this.n現在のスクロルカウンタ = this.n目標のスクロルカウンタ;
863 }
864 //-----------------
865 #endregion
866
867 if( this.n現在のスクロルカウンタ >= 100 ) // 1行=100カウント。
868 {
869 #region [ パネルを1行上にシフトする。]
870 //-----------------
871
872 // 選択曲と選択行を1つ下の行に移動。
873
874 this.r現在選択中の曲 = this.r次の曲( this.r現在選択中の曲 );
875 this.n現在の選択行 = ( this.n現在の選択行 + 1 ) % 13;
876
877 // 選択曲から7つ下のパネル(=新しく最下部に表示されるパネル。消えてしまう一番上のパネルを再利用する)に、新しい曲の情報を記載する。
878
879 C曲リストノ song = this.r現在選択中の曲;
880 for( int i = 0; i < 7; i++ )
881 song = this.r次の曲( song );
882
883 int index = ( this.n現在の選択行 + 7 ) % 13; // 新しく最下部に表示されるパネルのインデックス(0~12)。
884 this.st情報[ index ].strタイトル文字列 = song.strタイトル;
885 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.ティスト名;
886 this.st情報[ index ].col文字色 = song.col文字色;
887 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
888 this.t曲名バの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].col文字色 );
889 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
890 //this.tパネルの生成( index, this.stバー情報[ index ].strタイトル文字列, this.stバー情報[ index ].strアーティスト名, this.stバー情報[ index ].col文字色 );
891
892 if( !this.dicThumbnail.ContainsKey( this.st情報[ index ].strDTXフォルダのパス ) )
893 {
894 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
895 this.tパスを指定してサムネイル画像を生成する( index, this.st情報[ index ].strDTXフォルダのパス, this.st情報[ index ].e種別 );
896 this.dicThumbnail.Add( this.st情報[ index ].strDTXフォルダのパス, this.txTumbnail[ index ] );
897 }
898 txTumbnail[ index ] = this.dicThumbnail[ this.st情報[ index ].strDTXフォルダのパス ];
899
900
901 // stバー情報[] の内容を1行ずつずらす。
902
903 C曲リストノ song2 = this.r現在選択中の曲;
904 for( int i = 0; i < 5; i++ )
905 song2 = this.r前の曲( song2 );
906
907 for( int i = 0; i < 13; i++ )
908 {
909 int n = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
910 this.st情報[ n ].e種別 = this.e曲のバ種別を返す( song2 );
911 song2 = this.r次の曲( song2 );
912 }
913
914
915 // 新しく最下部に表示されるパネル用のスキル値を取得。
916
917 for( int i = 0; i < 3; i++ )
918 this.st情報[ index ].nスキル値[ i ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ i ];
919
920 // 1行(100カウント)移動完了。
921
922 this.n現在のスクロルカウンタ -= 100;
923 this.n目標のスクロルカウンタ -= 100;
924
925 this.t選択曲が変更された(false); // スクロールバー用に今何番目を選択しているかを更新
926 if( this.tx選択されている曲の曲名 != null && this.tx選択されている曲のアティスト名 != null )
927 {
928 this.tx選択されている曲の曲名.Dispose();
929 this.tx選択されている曲のアティスト名.Dispose();
930 this.tx選択されている曲の曲名 = null;
931 this.tx選択されている曲のアティスト名 = null;
932 }
933
934 if( this.n目標のスクロルカウンタ == 0 )
935 CDTXMania.stage選曲.t選択曲変更通知(); // スクロール完了=選択曲変更!
936
937 //-----------------
938 #endregion
939 }
940 else if( this.n現在のスクロルカウンタ <= -100 )
941 {
942 #region [ パネルを1行下にシフトする。]
943 //-----------------
944
945 // 選択曲と選択行を1つ上の行に移動。
946
947 this.r現在選択中の曲 = this.r前の曲( this.r現在選択中の曲 );
948 this.n現在の選択行 = ( ( this.n現在の選択行 - 1 ) + 13 ) % 13;
949
950 // 選択曲から5つ上のパネル(=新しく最上部に表示されるパネル。消えてしまう一番下のパネルを再利用する)に、新しい曲の情報を記載する。
951
952 C曲リストノ song = this.r現在選択中の曲;
953 for( int i = 0; i < 5; i++ )
954 song = this.r前の曲( song );
955
956 int index = ( ( this.n現在の選択行 - 5 ) + 13 ) % 13; // 新しく最上部に表示されるパネルのインデックス(0~12)。
957 this.st情報[ index ].strタイトル文字列 = song.strタイトル;
958 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song) ].譜面情報.ティスト名;
959 this.st情報[ index ].col文字色 = song.col文字色;
960 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
961 this.t曲名バの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].col文字色 );
962 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
963 //this.tパネルの生成( index, this.stバー情報[ index ].strタイトル文字列, this.stバー情報[ index ].strアーティスト名, this.stバー情報[ index ].col文字色 );
964
965 if( !this.dicThumbnail.ContainsKey( this.st情報[ index ].strDTXフォルダのパス ) )
966 {
967 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
968 this.tパスを指定してサムネイル画像を生成する( index, this.st情報[ index ].strDTXフォルダのパス, this.st情報[ index ].e種別 );
969 this.dicThumbnail.Add( this.st情報[ index ].strDTXフォルダのパス, this.txTumbnail[ index ] );
970 }
971 txTumbnail[ index ] = this.dicThumbnail[ this.st情報[ index ].strDTXフォルダのパス ];
972
973
974 // stバー情報[] の内容を1行ずつずらす。
975
976 C曲リストノ song2 = this.r現在選択中の曲;
977 for( int i = 0; i < 5; i++ )
978 song2 = this.r前の曲( song2 );
979
980 for( int i = 0; i < 13; i++ )
981 {
982 int n = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
983 this.st情報[ n ].e種別 = this.e曲のバ種別を返す( song2 );
984 song2 = this.r次の曲( song2 );
985 }
986
987
988 // 新しく最上部に表示されるパネル用のスキル値を取得。
989
990 for( int i = 0; i < 3; i++ )
991 this.st情報[ index ].nスキル値[ i ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ i ];
992
993
994 // 1行(100カウント)移動完了。
995
996 this.n現在のスクロルカウンタ += 100;
997 this.n目標のスクロルカウンタ += 100;
998
999
1000 this.t選択曲が変更された( false ); // スクロールバー用に今何番目を選択しているかを更新
1001 if( this.tx選択されている曲の曲名 != null && this.tx選択されている曲のアティスト名 != null )
1002 {
1003 this.tx選択されている曲の曲名.Dispose();
1004 this.tx選択されている曲のアティスト名.Dispose();
1005 this.tx選択されている曲の曲名 = null;
1006 this.tx選択されている曲のアティスト名 = null;
1007 }
1008
1009 if( this.n目標のスクロルカウンタ == 0 )
1010 CDTXMania.stage選曲.t選択曲変更通知(); // スクロール完了=選択曲変更!
1011 //-----------------
1012 #endregion
1013 }
1014
1015 this.nスクロルタイマ += nアニメ間隔;
1016 }
1017 //-----------------
1018 #endregion
1019 }
1020
1021
1022 // 描画。
1023
1024 if( this.r現在選択中の曲 == null )
1025 {
1026 #region [ 曲が1つもないなら「Songs not found.」を表示してここで帰れ。]
1027 //-----------------
1028 if ( bIsEnumeratingSongs )
1029 {
1030 if ( this.txEnumeratingSongs != null )
1031 {
1032 this.txEnumeratingSongs.t2D描画( CDTXMania.app.Device, 320, 160 );
1033 }
1034 }
1035 else
1036 {
1037 if ( this.txSongNotFound != null )
1038 this.txSongNotFound.t2D描画( CDTXMania.app.Device, 320, 160 );
1039 }
1040 //-----------------
1041 #endregion
1042
1043 return 0;
1044 }
1045 var bar = SlimDX.Matrix.Identity;
1046 var barL = SlimDX.Matrix.Identity;
1047 bar *= SlimDX.Matrix.RotationY(-0.415f);
1048 barL *= SlimDX.Matrix.RotationY(0.415f);
1049 bar *= SlimDX.Matrix.Translation(540f, 20f, -24f);
1050 barL *= SlimDX.Matrix.Translation(-540f, 20f, -24f);
1051 bar *= SlimDX.Matrix.Scaling(1.0f, 0.65f, 1.0f);
1052 barL *= SlimDX.Matrix.Scaling(1.0f, 0.65f, 1.0f);
1053
1054 this.tx.t3D描画(CDTXMania.app.Device, bar); //右の帯。
1055 this.tx.t3D描画(CDTXMania.app.Device, barL); //右の帯。
1056 this.tx色帯.n透明度 = 155 + this.ct登場アニメ用[10].n現在の値;
1057 this.tx色帯.t3D描画( CDTXMania.app.Device, bar );
1058 this.tx色帯.t3D描画( CDTXMania.app.Device, barL );
1059
1060 #region [ デバッグ補助 ]
1061 //-----------------
1062 /*
1063 stマトリックス座標 = new ST中心点[] {
1064 new ST中心点() { x = -940.0000f, y = 4f, z = 320f, rotY = 0.4150f },
1065 new ST中心点() { x = -740.0000f, y = 4f, z = 230f, rotY = 0.4150f },
1066 new ST中心点() { x = -550.0000f, y = 4f, z = 150f, rotY = 0.4150f },
1067 new ST中心点() { x = -370.0000f, y = 4f, z = 70f, rotY = 0.4150f },
1068 new ST中心点() { x = -194.0000f, y = 4f, z = -6f, rotY = 0.4150f },
1069 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1070 new ST中心点() { x = 204.0000f, y = 4f, z = 0f, rotY = -0.4150f },
1071 new ST中心点() { x = 362.0000f, y = 4f, z = 70f, rotY = -0.4150f },
1072 new ST中心点() { x = 528.0000f, y = 4f, z = 146f, rotY = -0.4150f },
1073 new ST中心点() { x = 686.0000f, y = 4f, z = 212f, rotY = -0.4150f },
1074 new ST中心点() { x = 848.0000f, y = 4f, z = 282f, rotY = -0.4150f },
1075 new ST中心点() { x = 1200.0000f, y = 4f, z = 450f, rotY = -0.4150f },
1076 new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1077 new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1078 };
1079 */
1080 //-----------------
1081 #endregion
1082
1083
1084 if( !this.b登場アニメ全部完了 )
1085 {
1086 #region [ (1) 登場アニメフェーズの描画。]
1087 //-----------------
1088 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
1089 {
1090 if( this.ct登場アニメ用[ i ].n現在の値 >= 0 )
1091 {
1092 int nパネル番号 = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
1093
1094 if( i == 6 )
1095 {
1096 #region [ ジャケット画像の描画 ]
1097 //-----------------
1098 if( this.txパネル != null )
1099 {
1100 var mat = SlimDX.Matrix.Identity;
1101 mat *= SlimDX.Matrix.Scaling( 0.62f, 0.88f, 1.0f );
1102 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[ i ].rotY + (this.stマトリックス座標[ i ].rotY - this.stマトリックス座標[i].rotY));
1103 mat *= SlimDX.Matrix.Translation(
1104 ( this.stマトリックス座標[ i ].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1105 ( this.stマトリックス座標[ i ].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1106 ( this.stマトリックス座標[ i ].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1107 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1108 }
1109 if( this.txTumbnail[nパネル番号] != null )
1110 {
1111 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1112 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1113 var mat = SlimDX.Matrix.Identity;
1114 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1115 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1116 mat *= SlimDX.Matrix.Translation(
1117 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1118 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率 - 1f,
1119 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1120 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1121 }
1122 //-----------------
1123 #endregion
1124 #region [ タイトル名テクスチャを描画。]
1125 //-----------------
1126 if( this.st情報[nパネル番号].txタイトル名 != null )
1127 {
1128 //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1129 var mat = SlimDX.Matrix.Identity;
1130 mat *= SlimDX.Matrix.Scaling( 0.35f, 0.45f, 1.0f );
1131 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[ i ].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1132 mat *= SlimDX.Matrix.Translation(
1133 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1134 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1135 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1136 this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1137 }
1138 if (this.st情報[nパネル番号].txティスト名 != null)
1139 {
1140 var mat = SlimDX.Matrix.Identity;
1141 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1142 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1143 mat *= SlimDX.Matrix.Translation(
1144 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1145 (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1146 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1147 this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1148 }
1149 //-----------------
1150 #endregion
1151 if( this.tx選曲パネル != null )
1152 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1153 }
1154 else if( i == 5 )
1155 {
1156 // (A) 選択曲パネルを描画。
1157 if( this.tx選曲パネル != null )
1158 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 531, 243, new Rectangle( 74, 80, 230, 230 ) ); //真ん中の部分は別々に描画。
1159 if( this.txランプ用帯 != null )
1160 {
1161 this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1162 this.txランプ用帯.t3D描画( CDTXMania.app.Device, barL ); //右の帯。
1163 }
1164 #region [ バーテクスチャを描画。]
1165 //-----------------
1166 if( this.txパネル != null )
1167 {
1168 var mat = SlimDX.Matrix.Identity;
1169 mat *= SlimDX.Matrix.Scaling(0.8f, 0.8f, 1.0f);
1170 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1171 mat *= SlimDX.Matrix.Translation(
1172 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1173 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1174 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1175 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1176 }
1177 if( this.tx選曲パネル != null )
1178 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 457, 163, new Rectangle( 0, 0, 363, 368 ) );
1179 //-----------------
1180 #endregion
1181 #region [ ジャケット画像の描画 ]
1182 //-----------------
1183 for( int la = 0; la < 5 ; la++ )
1184 {
1185 if( this.txクリアランプ != null && CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null && CDTXMania.stage選曲.r現在選択中の曲.arスコア[ la ] != null )
1186 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));
1187 }
1188 if( this.txTumbnail[ nパネル番号 ] != null )
1189 {
1190 float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1191 float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1192 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1193 this.txTumbnail[ nパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1194 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1195 }
1196 //-----------------
1197 #endregion
1198 #region [ タイトル名テクスチャを描画。]
1199 //-----------------
1200 if( this.st情報[ nパネル番号 ].strタイトル文字列 != "" && this.st情報[ nパネル番号 ].strタイトル文字列 != null )
1201 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1202 if( this.st情報[ nパネル番号 ].strティスト名 != "" && this.st情報[ nパネル番号 ].strティスト名 != null )
1203 this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1204
1205 if( this.tx選択されている曲の曲名 != null )
1206 this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1207 if( this.tx選択されている曲のアティスト名 != null )
1208 this.tx選択されている曲のアティスト名.t2D描画(CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470);
1209 //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1210 // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1211 //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1212 // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1213 //-----------------
1214 #endregion
1215 }
1216 else
1217 {
1218 // (B) その他のパネルの描画。
1219 #region [ ジャケット画像の描画 ]
1220 //-----------------
1221 if( this.txパネル != null )
1222 {
1223 var mat = SlimDX.Matrix.Identity;
1224 mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1225 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1226 mat *= SlimDX.Matrix.Translation(
1227 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1228 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1229 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1230 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1231 }
1232 if( this.txTumbnail[ nパネル番号 ] != null )
1233 {
1234 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1235 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1236 var mat = SlimDX.Matrix.Identity;
1237 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1238 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1239 mat *= SlimDX.Matrix.Translation(
1240 (this.stマトリックス座標[ i ].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1241 (this.stマトリックス座標[ i ].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1242 (this.stマトリックス座標[ i ].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1243 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1244 }
1245 //-----------------
1246 #endregion
1247 #region [ タイトル名テクスチャを描画。]
1248 //-----------------
1249 if( this.txランプ用帯 != null )
1250 this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1251 if( this.tx選曲パネル != null )
1252 this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1253 if (this.st情報[ nパネル番号 ].txタイトル名 != null)
1254 {
1255 var mat = SlimDX.Matrix.Identity;
1256 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1257 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1258 mat *= SlimDX.Matrix.Translation(
1259 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1260 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1261 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1262 this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1263 }
1264 if (this.st情報[nパネル番号].txティスト名 != null)
1265 {
1266 var mat = SlimDX.Matrix.Identity;
1267 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1268 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1269 mat *= SlimDX.Matrix.Translation(
1270 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1271 (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1272 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1273 this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1274 }
1275 //-----------------
1276 #endregion
1277 }
1278 }
1279 }
1280 //-----------------
1281 #endregion
1282
1283 }
1284 else
1285 {
1286
1287 #region [ (2) 通常フェーズの描画。]
1288 //-----------------
1289 for( int i = 0; i < 13; i++ ) // パネルは全13枚。
1290 {
1291 int nパネル番号 = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
1292 int n見た目の行番号 = i;
1293 int n次のパネル番号 = ( this.n現在のスクロルカウンタ <= 0 ) ? ( ( i + 1 ) % 13 ) : ( ( ( i - 1 ) + 13 ) % 13 );
1294 int x = this.ptの基本座標[ n見た目の行番号 ].X + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].X - this.ptの基本座標[ n見た目の行番号 ].X ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1295 int y = this.ptの基本座標[ n見た目の行番号 ].Y + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].Y - this.ptの基本座標[ n見た目の行番号 ].Y ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1296 float fX = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x - this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1297 this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x + this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1298
1299 float fY = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1300 this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1301
1302 float fZ = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z - this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1303 this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z + this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1304
1305 if (i == 6)
1306 {
1307 #region [ ジャケット画像の描画 ]
1308 //-----------------
1309 if( this.txパネル != null )
1310 {
1311 var mat = SlimDX.Matrix.Identity;
1312 mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1313 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1314 mat *= SlimDX.Matrix.Translation(
1315 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1316 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1317 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1318 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1319 }
1320 if (this.txTumbnail[nパネル番号] != null)
1321 {
1322 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1323 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1324 var mat = SlimDX.Matrix.Identity;
1325 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1326 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1327 mat *= SlimDX.Matrix.Translation(
1328 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1329 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率 - 1f,
1330 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1331 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1332 }
1333 //-----------------
1334 #endregion
1335 #region [ タイトル名テクスチャを描画。]
1336 //-----------------
1337 if (this.st情報[nパネル番号].txタイトル名 != null)
1338 {
1339 //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1340 var mat = SlimDX.Matrix.Identity;
1341 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1342 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1343 mat *= SlimDX.Matrix.Translation(
1344 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1345 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1346 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1347 this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1348 }
1349 if (this.st情報[nパネル番号].txティスト名 != null)
1350 {
1351 var mat = SlimDX.Matrix.Identity;
1352 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 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 - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1357 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1358 this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1359 }
1360 //-----------------
1361 #endregion
1362 }
1363 else if( ( i == 5 ) )
1364 {
1365 if( this.txランプ用帯 != null )
1366 this.txランプ用帯.t3D描画( CDTXMania.app.Device, barL ); //右の帯。
1367 //for (int la = 0; la < 5; la++)
1368 {
1369 //if( this.stバー情報[ 6 ].ar難易度ラベル[ la ] != null )
1370 {
1371 //var lamp = SlimDX.Matrix.Identity;
1372 //lamp *= SlimDX.Matrix.Translation(
1373 //( this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x ) )) * CTexture.f画面比率,
1374 //( this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y ) ) ) * CTexture.f画面比率 - 1f - la * 13f,
1375 //( this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z ) ) ) * CTexture.f画面比率);
1376
1377 //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));
1378 }
1379 }
1380 if( this.tx選曲パネル != null )
1381 this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 531, 243, new Rectangle(74, 80, 230, 230)); //真ん中の部分は別々に描画。
1382 // (A) スクロールが停止しているときの選択曲バーの描画。
1383 #region [ ジャケット画像の描画 ]
1384 //-----------------
1385 if( this.txパネル != null )
1386 {
1387 var mat = SlimDX.Matrix.Identity;
1388 mat *= SlimDX.Matrix.Scaling(CTexture.f画面比率, CTexture.f画面比率, 1.0f);
1389 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1390 mat *= SlimDX.Matrix.Translation(
1391 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1392 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1393 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1394 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1395 }
1396 if( this.tx選曲パネル != null )
1397 this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 457, 163, new Rectangle(0, 0, 363, 368));
1398
1399 for( int la = 0; la < 5 ; la++ )
1400 {
1401 if( this.txクリアランプ != null && CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null && CDTXMania.stage選曲.r現在選択中の曲.arスコア[ la ] != null )
1402 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));
1403 }
1404 if( this.txTumbnail[ nパネル番号 ] != null )
1405 {
1406 float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1407 float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1408 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1409 this.txTumbnail[ nパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1410 this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1411 }
1412 //-----------------
1413 #endregion
1414 #region [ タイトル名テクスチャを描画。]
1415 //-----------------
1416 if( this.st情報[ nパネル番号 ].strタイトル文字列 != "" && this.st情報[ nパネル番号 ].strタイトル文字列 != null )
1417 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1418 if( this.st情報[ nパネル番号 ].strティスト名 != "" && this.st情報[ nパネル番号 ].strティスト名 != null )
1419 this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1420
1421 if( this.tx選択されている曲の曲名 != null )
1422 this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1423 if( this.tx選択されている曲のアティスト名 != null )
1424 this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470);
1425 //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1426 // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1427 //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1428 // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1429 //-----------------
1430 #endregion
1431 }
1432 else if (i >= 12)
1433 {
1434 }
1435 else
1436 {
1437 // (B) スクロール中の選択曲バー、またはその他のバーの描画。
1438 if( this.txランプ用帯 != null )
1439 this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1440 if( this.tx選曲パネル != null )
1441 this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 761, 233, new Rectangle(304, 70, 59, 242));
1442
1443 #region [ ジャケット画像の描画 ]
1444 //-----------------
1445 if( this.txパネル != null )
1446 {
1447 var mat = SlimDX.Matrix.Identity;
1448 mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1449 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1450 mat *= SlimDX.Matrix.Translation(
1451 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1452 (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1453 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1454 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1455 }
1456 if( this.txTumbnail[nパネル番号] != null )
1457 {
1458 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width ;
1459 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1460 var mat = SlimDX.Matrix.Identity;
1461 mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1462 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1463 mat *= SlimDX.Matrix.Translation(
1464 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1465 (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1466 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1467 this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1468 }
1469 //-----------------
1470 #endregion
1471 #region [ タイトル名テクスチャを描画。]
1472 //-----------------
1473 if( this.st情報[nパネル番号].txタイトル名 != null )
1474 {
1475 //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1476 var mat = SlimDX.Matrix.Identity;
1477 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1478 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1479 mat *= SlimDX.Matrix.Translation(
1480 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1481 (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1482 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1483 this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1484 }
1485 if( this.st情報[nパネル番号].txティスト名 != null )
1486 {
1487 var mat = SlimDX.Matrix.Identity;
1488 mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1489 mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1490 mat *= SlimDX.Matrix.Translation(
1491 (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1492 (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1493 (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1494 this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1495 }
1496 //-----------------
1497 #endregion
1498
1499 #region [ スキル値を描画。]
1500 //-----------------
1501 //if( ( this.stバー情報[ nパネル番号 ].eバー種別 == Eバー種別.Score ) && ( this.e楽器パート != E楽器パート.UNKNOWN ) )
1502 //this.tスキル値の描画( x + 34, y + 18, this.stバー情報[ nパネル番号 ].nスキル値[ (int) this.e楽器パート ] );
1503 //-----------------
1504 #endregion
1505 }
1506 }
1507 //-----------------
1508 #endregion
1509
1510 }
1511 #region [ スクロール地点の計算(描画はCActSelectShowCurrentPositionにて行う) #27648 ]
1512 int py;
1513 double d = 0;
1514 if ( nNumOfItems > 1 )
1515 {
1516 d = ( 336 - 8 ) / (double) ( nNumOfItems - 1 );
1517 py = (int) ( d * ( nCurrentPosition - 1 ) );
1518 }
1519 else
1520 {
1521 d = 0;
1522 py = 0;
1523 }
1524 int delta = (int) ( d * this.n現在のスクロルカウンタ / 100 );
1525 if ( py + delta <= 336 - 8 )
1526 {
1527 this.nスクロルバ相対y座標 = py + delta;
1528 }
1529 #endregion
1530
1531 #region [ アイテム数の描画 #27648 ]
1532 tアイテム数の描画();
1533 #endregion
1534 return 0;
1535 }
1536
1537
1538 // その他
1539
1540 #region [ private ]
1541 //-----------------
1542 private enum E種別 { Score, Box, Other, Random, BackBox }
1543
1544 private struct ST
1545 {
1546 public CTexture Score;
1547 public CTexture Box;
1548 public CTexture Other;
1549 public CTexture Random;
1550 public CTexture BackBox;
1551 public CTexture this[ int index ]
1552 {
1553 get
1554 {
1555 switch( index )
1556 {
1557 case 0:
1558 return this.Score;
1559
1560 case 1:
1561 return this.Box;
1562
1563 case 2:
1564 return this.Other;
1565
1566 case 3:
1567 return this.Random;
1568
1569 case 4:
1570 return this.BackBox;
1571 }
1572 throw new IndexOutOfRangeException();
1573 }
1574 set
1575 {
1576 switch( index )
1577 {
1578 case 0:
1579 this.Score = value;
1580 return;
1581
1582 case 1:
1583 this.Box = value;
1584 return;
1585
1586 case 2:
1587 this.Other = value;
1588 return;
1589
1590 case 3:
1591 this.Random = value;
1592 return;
1593
1594 case 4:
1595 this.BackBox = value;
1596 return;
1597 }
1598 throw new IndexOutOfRangeException();
1599 }
1600 }
1601 }
1602
1603 private struct ST情報
1604 {
1605 public CActSelect曲リスト.E種別 e種別;
1606 public string strタイトル文字列;
1607 public string strティスト名;
1608 public CTexture txタイトル名;
1609 public CTexture txティスト名;
1610 public CTexture txパネル;
1611 public int nティスト名テクスチャの長さdot;
1612 public int nタイトル名テクスチャの長さdot;
1613 public STDGBVALUE<int> nスキル値;
1614 public Color col文字色;
1615 public string strDTXフォルダのパス;
1616 public string[] ar難易度ラベル;
1617 public Cスコア.ST譜面情報 ar譜面情報;
1618 }
1619
1620 private struct ST選曲バ
1621 {
1622 public CTexture Score;
1623 public CTexture Box;
1624 public CTexture Other;
1625 public CTexture this[ int index ]
1626 {
1627 get
1628 {
1629 switch( index )
1630 {
1631 case 0:
1632 return this.Score;
1633
1634 case 1:
1635 return this.Box;
1636
1637 case 2:
1638 return this.Other;
1639 }
1640 throw new IndexOutOfRangeException();
1641 }
1642 set
1643 {
1644 switch( index )
1645 {
1646 case 0:
1647 this.Score = value;
1648 return;
1649
1650 case 1:
1651 this.Box = value;
1652 return;
1653
1654 case 2:
1655 this.Other = value;
1656 return;
1657 }
1658 throw new IndexOutOfRangeException();
1659 }
1660 }
1661 }
1662
1663 protected struct ST中心点
1664 {
1665 public float x;
1666 public float y;
1667 public float z;
1668 public float rotY;
1669 }
1670 /// <summary>
1671 /// <para>SSTFファイル絶対パス(key)とサムネイル画像(value)との辞書。</para>
1672 /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1673 /// </summary>
1674 protected Dictionary<string, CTexture> dicThumbnail = new Dictionary<string, CTexture>();
1675
1676 /// <summary>
1677 /// <para>SSTFファイル絶対パス(key)とプロパティ画像(value)との辞書。</para>
1678 /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1679 /// </summary>
1680 protected Dictionary<string, CTexture> dicProperty = new Dictionary<string, CTexture>();
1681
1682 protected ST中心点[] stマトリックス座標 = new ST中心点[] {
1683 #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1684 //-----------------
1685 new ST中心点() { x = -940.0000f, y = 4f, z = 320f, rotY = 0.4150f },
1686 new ST中心点() { x = -740.0000f, y = 4f, z = 230f, rotY = 0.4150f },
1687 new ST中心点() { x = -550.0000f, y = 4f, z = 150f, rotY = 0.4150f },
1688 new ST中心点() { x = -370.0000f, y = 4f, z = 70f, rotY = 0.4150f },
1689 new ST中心点() { x = -194.0000f, y = 4f, z = -6f, rotY = 0.4150f },
1690 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1691 new ST中心点() { x = 204.0000f, y = 4f, z = 0f, rotY = -0.4150f },
1692 new ST中心点() { x = 362.0000f, y = 4f, z = 70f, rotY = -0.4150f },
1693 new ST中心点() { x = 528.0000f, y = 4f, z = 146f, rotY = -0.4150f },
1694 new ST中心点() { x = 686.0000f, y = 4f, z = 212f, rotY = -0.4150f },
1695 new ST中心点() { x = 848.0000f, y = 4f, z = 282f, rotY = -0.4150f },
1696 new ST中心点() { x = 1200.0000f, y = 4f, z = 450f, rotY = -0.4150f },
1697 new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1698 new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1699 //-----------------
1700 #endregion
1701 };
1702
1703 protected readonly ST中心点[] stマトリックス曲名座標 = new ST中心点[] {
1704 #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1705 //-----------------
1706 new ST中心点() { x = -980.0000f, y = 2f, z = 360f, rotY = 0.4000f },
1707 new ST中心点() { x = -780.0000f, y = 2f, z = 270f, rotY = 0.4000f },
1708 new ST中心点() { x = -590.0000f, y = 2f, z = 180f, rotY = 0.4000f },
1709 new ST中心点() { x = -400.0000f, y = 2f, z = 90f, rotY = 0.4000f },
1710 new ST中心点() { x = -210.0000f, y = 2f, z = 0f, rotY = 0.4000f },
1711 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1712 new ST中心点() { x = 210.0000f, y = 2f, z = 0f, rotY = -0.4000f },
1713 new ST中心点() { x = 400.0000f, y = 2f, z = 90f, rotY = -0.4f },
1714 new ST中心点() { x = 590.0000f, y = 2f, z = 180f, rotY = -0.4f },
1715 new ST中心点() { x = 780.0000f, y = 2f, z = 270f, rotY = -0.4f },
1716 new ST中心点() { x = 980.0000f, y = 2f, z = 360f, rotY = -0.4f },
1717 new ST中心点() { x = 1200.0000f, y = 2f, z = 450f, rotY = -0.4f },
1718 new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1719 new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1720 //-----------------
1721 #endregion
1722 };
1723 [StructLayout(LayoutKind.Sequential)]
1724 public struct STATUSPANEL
1725 {
1726 public string label;
1727 public int status;
1728 }
1729 public int nIndex;
1730 public STATUSPANEL[] stパネルマップ;
1731
1732 public bool b登場アニメ全部完了;
1733 private Color color文字影 = Color.FromArgb( 0x40, 10, 10, 10 );
1734 public CCounter[] ct登場アニメ用 = new CCounter[ 13 ];
1735 private E楽器パ e楽器パ;
1736 private Font ft曲リスト用フォント;
1737 private long nスクロルタイマ;
1738 private int n現在のスクロルカウンタ;
1739 private int n現在の選択行;
1740 private int n目標のスクロルカウンタ;
1741 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) };
1742 private ST情報[] st情報 = new ST情報[ 13 ];
1743 private CTexture txSongNotFound, txEnumeratingSongs;
1744 private CTexture txスキル数字;
1745 private CTexture txアイテム数数字;
1746 private ST tx曲名バ;
1747 private ST選曲バ tx選曲バ;
1748 private CTexture[] txTumbnail = new CTexture[13];
1749 private CTexture tx選曲パネル;
1750 private CTexture txパネル;
1751 private CTexture txジャケットランダム;
1752 private CTexture txジャケットボックスクロ;
1753 private CTexture tx;
1754 private CTexture tx色帯;
1755 private CTexture txランプ用帯;
1756 private CTexture tx選択されている曲の曲名;
1757 private CTexture tx選択されている曲のアティスト名;
1758 private CTexture txクリアランプ;
1759 //CPrivateFont prvFont;
1760 CPrivateFastFont prvFont;
1761
1762 private int nCurrentPosition = 0;
1763 private int nNumOfItems = 0;
1764
1765 //private string strBoxDefSkinPath = "";
1766 private E種別 e曲のバ種別を返す( C曲リストノ song )
1767 {
1768 if( song != null )
1769 {
1770 switch( song.eド種別 )
1771 {
1772 case C曲リストノ.Eド種別.SCORE:
1773 case C曲リストノ.Eド種別.SCORE_MIDI:
1774 return E種別.Score;
1775
1776 case C曲リストノ.Eド種別.BOX:
1777 return E種別.Box;
1778
1779 case C曲リストノ.Eド種別.BACKBOX:
1780 return E種別.BackBox;
1781
1782 case C曲リストノ.Eド種別.RANDOM:
1783 return E種別.Random;
1784 }
1785 }
1786 return E種別.Other;
1787 }
1788 private C曲リストノ r次の曲( C曲リストノ song )
1789 {
1790 if( song == null )
1791 return null;
1792
1793 List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
1794
1795 int index = list.IndexOf( song );
1796
1797 if( index < 0 )
1798 return null;
1799
1800 if( index == ( list.Count - 1 ) )
1801 return list[ 0 ];
1802
1803 return list[ index + 1 ];
1804 }
1805 private C曲リストノ r前の曲( C曲リストノ song )
1806 {
1807 if( song == null )
1808 return null;
1809
1810 List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
1811
1812 int index = list.IndexOf( song );
1813
1814 if( index < 0 )
1815 return null;
1816
1817 if( index == 0 )
1818 return list[ list.Count - 1 ];
1819
1820 return list[ index - 1 ];
1821 }
1822 private void tスキル値の描画( int x, int y, int nスキル値 )
1823 {
1824 if( nスキル値 <= 0 || nスキル値 > 100 ) // スキル値 0 = 未プレイ なので表示しない。
1825 return;
1826
1827 int color = ( nスキル値 == 100 ) ? 3 : ( nスキル値 / 25 );
1828
1829 int n百の位 = nスキル値 / 100;
1830 int n十の位 = ( nスキル値 % 100 ) / 10;
1831 int n一の位 = ( nスキル値 % 100 ) % 10;
1832
1833
1834 // 百の位の描画。
1835
1836 if( n百の位 > 0 )
1837 this.tスキル値の描画・1桁描画( x, y, n百の位, color );
1838
1839
1840 // 十の位の描画。
1841
1842 if( n百の位 != 0 || n十の位 != 0 )
1843 this.tスキル値の描画・1桁描画( x + 14, y, n十の位, color );
1844
1845
1846 // 一の位の描画。
1847
1848 this.tスキル値の描画・1桁描画( x + 0x1c, y, n一の位, color );
1849 }
1850 private void tスキル値の描画・1桁描画( int x, int y, int n数値, int color )
1851 {
1852 int dx = ( n数値 % 5 ) * 9;
1853 int dy = ( n数値 / 5 ) * 12;
1854
1855 switch( color )
1856 {
1857 case 0:
1858 if( this.txスキル数字 != null )
1859 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 45 + dx, 24 + dy, 9, 12 ) );
1860 break;
1861
1862 case 1:
1863 if( this.txスキル数字 != null )
1864 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( 45 + dx, dy, 9, 12 ) );
1865 break;
1866
1867 case 2:
1868 if( this.txスキル数字 != null )
1869 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( dx, 24 + dy, 9, 12 ) );
1870 break;
1871
1872 case 3:
1873 if( this.txスキル数字 != null )
1874 this.txスキル数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( dx, dy, 9, 12 ) );
1875 break;
1876 }
1877 }
1878 private void tの初期化()
1879 {
1880 C曲リストノ song = this.r現在選択中の曲;
1881
1882 if( song == null )
1883 return;
1884
1885 for( int i = 0; i < 5; i++ )
1886 song = this.r前の曲( song );
1887
1888 for( int i = 0; i < 13; i++ )
1889 {
1890 this.st情報[ i ].strタイトル文字列 = song.strタイトル;
1891 this.st情報[ i ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.ティスト名;
1892 this.st情報[ i ].col文字色 = song.col文字色;
1893 this.st情報[ i ].e種別 = this.e曲のバ種別を返す( song );
1894 this.st情報[ i ].ar譜面情報 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報;
1895
1896 for( int n = 0; n < 5; n++ )
1897 {
1898 //this.stバー情報[ i ].ar難易度ラベル[ n ];
1899
1900 //if( this.stバー情報[ i ].ar難易度ラベル[ n ] != null )
1901 //this.stバー情報[ i ].ar難易度ラベル[ n ] = song.ar難易度ラベル[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ];
1902 }
1903
1904 this.st情報[ i ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
1905 //this.tパスを指定してサムネイル画像を生成する( i, this.stバー情報[ i ].strDTXフォルダのパス, this.stバー情報[ i ].eバー種別 );
1906 if( !this.dicThumbnail.ContainsKey( this.st情報[ i ].strDTXフォルダのパス ) )
1907 {
1908 //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
1909 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strDTXフォルダのパス, this.st情報[ i ].e種別 );
1910 this.dicThumbnail.Add( this.st情報[ i ].strDTXフォルダのパス, this.txTumbnail[ i ] );
1911 }
1912 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strDTXフォルダのパス ];
1913
1914 for( int j = 0; j < 3; j++ )
1915 this.st情報[ i ].nスキル値[ j ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ j ];
1916
1917 song = this.r次の曲( song );
1918 }
1919
1920 this.n現在の選択行 = 5;
1921 }
1922 private void tの描画( int x, int y, E種別 type, bool b選択曲 )
1923 {
1924 if( x >= SampleFramework.GameWindowSize.Width || y >= SampleFramework.GameWindowSize.Height )
1925 return;
1926
1927 if (b選択曲)
1928 {
1929 #region [ (A) 選択曲の場合 ]
1930 //-----------------
1931 if (this.tx選曲バ[(int)type] != null)
1932 this.tx選曲バ[(int)type].t2D描画(CDTXMania.app.Device, x, y, new Rectangle(0, 0, 128, 96)); // ヘサキ
1933 x += 128;
1934
1935 var rc = new Rectangle(128, 0, 128, 96);
1936 while (x < 1280)
1937 {
1938 if (this.tx選曲バ[(int)type] != null)
1939 this.tx選曲バ[(int)type].t2D描画(CDTXMania.app.Device, x, y, rc); // 胴体;64pxずつ横につなげていく。
1940 x += 128;
1941 }
1942 //-----------------
1943 #endregion
1944 }
1945 else
1946 {
1947 #region [ (B) その他の場合 ]
1948 //-----------------
1949 if (this.tx曲名バ[(int)type] != null)
1950 this.tx曲名バ[(int)type].t2D描画(CDTXMania.app.Device, x, y, new Rectangle(0, 0, 128, 48)); // ヘサキ
1951 x += 128;
1952
1953 var rc = new Rectangle(0, 48, 128, 48);
1954 while (x < 1280)
1955 {
1956 if (this.tx曲名バ[(int)type] != null)
1957 this.tx曲名バ[(int)type].t2D描画(CDTXMania.app.Device, x, y, rc); // 胴体;64pxずつ横につなげていく。
1958 x += 128;
1959 }
1960 //-----------------
1961 #endregion
1962 }
1963 }
1964 private void tパスを指定してサムネイル画像を生成する( int n番号, string strDTXPath, E種別 eType )
1965 {
1966 if (n番号 < 0 || n番号 > 12)
1967 return;
1968
1969 //try
1970 {
1971 //if (eType == Eバー種別.Score || eType == Eバー種別.Box)
1972 {
1973 if (!File.Exists(strDTXPath))
1974 {
1975 this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage default.png"), false);
1976 }
1977 else
1978 {
1979 this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(strDTXPath);
1980 }
1981 }
1982 //else if (eType == Eバー種別.Random)
1983 {
1984 //this.txTumbnail[ nバー番号 ] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage random.png"), false);
1985 }
1986 //else if (eType == Eバー種別.BackBox)
1987 {
1988 //if(this.txジャケットボックスクローズ != null)
1989 //this.txTumbnail[nバー番号] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage random.png"), false);
1990 }
1991 }
1992 /*
1993 catch( CTextureCreateFailedException )
1994 {
1995 if ( this.txジャケット指定が無い場合の画像 != null )
1996 {
1997 this.txTumbnail[ nバー番号 ] = this.txジャケット指定が無い場合の画像;
1998 }
1999 else
2000 {
2001 this.txTumbnail[ nバー番号 ] = null;
2002 }
2003 }
2004 */
2005 }
2006 private CTexture tパスを指定してサムネイル画像を生成して返す( int n番号, string strDTXPath, E種別 eType )
2007 {
2008 if (n番号 < 0 || n番号 > 12)
2009 return this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage default.png"), false);
2010
2011 //try
2012 {
2013 //if (eType == Eバー種別.Score || eType == Eバー種別.Box)
2014 {
2015 if (!File.Exists(strDTXPath))
2016 {
2017 return this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage default.png"), false);
2018 }
2019 else
2020 {
2021 return this.txTumbnail[n番号] = CDTXMania.tテクスチャの生成(strDTXPath);
2022 }
2023 }
2024 //else if (eType == Eバー種別.Random)
2025 {
2026 // if(this.txジャケットランダム != null)
2027 // this.txTumbnail[nバー番号] = this.txジャケットランダム;
2028 }
2029 //else if (eType == Eバー種別.BackBox)
2030 {
2031 // if(this.txジャケットボックスクローズ != null)
2032 // this.txTumbnail[nバー番号] = this.txジャケットボックスクローズ;
2033 }
2034 }
2035 /*
2036 catch( CTextureCreateFailedException )
2037 {
2038 if ( this.txジャケット指定が無い場合の画像 != null )
2039 {
2040 this.txTumbnail[ nバー番号 ] = this.txジャケット指定が無い場合の画像;
2041 }
2042 else
2043 {
2044 this.txTumbnail[ nバー番号 ] = null;
2045 }
2046 }
2047 */
2048 }
2049 private CTexture t指定された文字テクスチャを生成する( string str文字 )
2050 {
2051 //2013.09.05.kairera0467 中央にしか使用することはないので、色は黒固定。
2052 //現在は機能しない(面倒なので実装してない)が、そのうち使用する予定。
2053 //PrivateFontの試験運転も兼ねて。
2054 //CPrivateFastFont
2055 prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );
2056 Bitmap bmp;
2057
2058 bmp = prvFont.DrawPrivateFont( str文字, Color.Black, Color.Transparent );
2059
2060 SizeF sz曲名;
2061
2062 #region [ 曲名表示に必要となるサイズを取得する。]
2063 //-----------------
2064 using( var bmpDummy = new Bitmap(1, 1) )
2065 {
2066 var g = Graphics.FromImage( bmpDummy );
2067 g.PageUnit = GraphicsUnit.Pixel;
2068 sz曲名 = g.MeasureString( str文字, this.ft曲リスト用フォント);
2069 //this.stバー情報[ nバー番号 ].nタイトル名テクスチャの長さdot = (int)g.MeasureString(str文字, this.ft曲リスト用フォント).Width;
2070 }
2071 //-----------------
2072 #endregion
2073 int n最大幅px = 200;
2074 int height = 25;
2075 int width = (int)((sz曲名.Width + 2) * 0.5f);
2076 if (width > (CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2))
2077 width = CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2; // 右端断ち切れ仕方ないよね
2078
2079 float f拡大率X = (width <= n最大幅px) ? 0.5f : (((float)n最大幅px / (float)width) * 0.5f); // 長い文字列は横方向に圧縮。
2080
2081 CTexture tx文字テクスチャ = CDTXMania.tテクスチャの生成( bmp, false );
2082 tx文字テクスチャ.vc拡大縮小倍率 = new Vector3( f拡大率X, 0.5f, 1f );
2083
2084 //prvFont.Dispose();
2085 bmp.Dispose();
2086
2087 return tx文字テクスチャ;
2088 }
2089 private void tパネルの生成( int n番号, string str曲名, string strティスト名, Color color )
2090 {
2091 //t3D描画の仕様上左詰や右詰が面倒になってしまうので、
2092 //パネルにあらかじめ曲名とアーティスト名を埋め込んでおく。
2093 /*
2094 if( nバー番号 < 0 || nバー番号 > 12 )
2095 return;
2096 try
2097 {
2098 Bitmap b4font;
2099 Bitmap bSongPanel;
2100 Image imgSongPanel;
2101 SizeF sz曲名;
2102 SizeF szアーティスト名;
2103
2104 b4font = new Bitmap( 1, 1 );
2105 Graphics graphics = Graphics.FromImage( b4font );
2106 graphics.PageUnit = GraphicsUnit.Pixel;
2107 imgSongPanel= Image.FromFile( CSkin.Path( @"Graphics\5_music panel.png" ) );
2108 bSongPanel = new Bitmap( 223, 279 );
2109
2110 graphics = Graphics.FromImage( bSongPanel );
2111 graphics.DrawImage( imgSongPanel, 0, 0, 223, 279 );
2112
2113
2114 #region [ 曲名表示に必要となるサイズを取得する。]
2115 //-----------------
2116 using( var bmpDummy = new Bitmap( 1, 1 ) )
2117 {
2118 var g = Graphics.FromImage( bmpDummy );
2119 g.PageUnit = GraphicsUnit.Pixel;
2120 sz曲名 = g.MeasureString( str曲名, this.ft曲リスト用フォント );
2121 szアーティスト名 = g.MeasureString( strアーティスト名, this.ft曲リスト用フォント );
2122 this.stバー情報[ nバー番号 ].nタイトル名テクスチャの長さdot = (int) g.MeasureString( str曲名, this.ft曲リスト用フォント ).Width;
2123 }
2124 //-----------------
2125 #endregion
2126
2127 int n最大幅px = 200;
2128 int height = 25;
2129 int width = (int) ( ( sz曲名.Width + 2 ) );
2130 if( width > ( CDTXMania.app.Device.Capabilities.MaxTextureWidth ) )
2131 width = CDTXMania.app.Device.Capabilities.MaxTextureWidth; // 右端断ち切れ仕方ないよね
2132
2133 float f拡大率X = ( width <= n最大幅px ) ? 1 : ( ( (float) n最大幅px / (float) width ) ); // 長い文字列は横方向に圧縮。
2134
2135 using( var bmp = new Bitmap( width, height, PixelFormat.Format32bppArgb ) ) // 2倍(面積4倍)のBitmapを確保。(0.5倍で表示する前提。)
2136 using( var g = Graphics.FromImage( bmp ) )
2137 {
2138 graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
2139 float y = ( ( ( float ) bmp.Height ) ) - ( ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot ) );
2140 //graphics.DrawString( str曲名, this.ft曲リスト用フォント, new SolidBrush( this.color文字影 ), (float) 2f, (float) ( y + 2f ) );
2141 graphics.DrawString( str曲名, this.ft曲リスト用フォント, new SolidBrush( color ), 5f, y );
2142 graphics.DrawString( strアーティスト名, this.ft曲リスト用フォント, new SolidBrush( this.color文字影 ), (float)234f, 258f);
2143 graphics.DrawString( strアーティスト名, this.ft曲リスト用フォント, new SolidBrush( Color.White ), 234f, 258f );
2144
2145 CDTXMania.t安全にDisposeする( ref this.stバー情報[ nバー番号 ].txパネル );
2146
2147 this.stバー情報[ nバー番号 ].txパネル = new CTexture( CDTXMania.app.Device, bSongPanel, CDTXMania.TextureFormat, false );
2148 }
2149
2150
2151 }
2152 catch( CTextureCreateFailedException )
2153 {
2154 Trace.TraceError( "曲名テクスチャの作成に失敗しました。[{0}]", str曲名 );
2155 this.stバー情報[ nバー番号 ].txタイトル名 = null;
2156 }
2157 */
2158 }
2159 private void t曲名バの生成( int n番号, string str曲名, Color color )
2160 {
2161 if( n番号 < 0 || n番号 > 12 )
2162 return;
2163
2164 try
2165 {
2166 SizeF sz曲名;
2167
2168 #region [ 曲名表示に必要となるサイズを取得する。]
2169 //-----------------
2170 using( var bmpDummy = new Bitmap( 1, 1 ) )
2171 {
2172 var g = Graphics.FromImage( bmpDummy );
2173 g.PageUnit = GraphicsUnit.Pixel;
2174 sz曲名 = g.MeasureString( str曲名, this.ft曲リスト用フォント );
2175 this.st情報[ n番号 ].nタイトル名テクスチャの長さdot = (int) g.MeasureString( str曲名, this.ft曲リスト用フォント ).Width;
2176 }
2177 //-----------------
2178 #endregion
2179
2180 int n最大幅px = 200;
2181 int height = 25;
2182 int width = (int) ( ( sz曲名.Width + 2 ) * 0.5f );
2183 if( width > ( CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2 ) )
2184 width = CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2; // 右端断ち切れ仕方ないよね
2185
2186 float f拡大率X = ( width <= n最大幅px ) ? 0.5f : ( ( (float) n最大幅px / (float) width ) * 0.5f ); // 長い文字列は横方向に圧縮。
2187
2188 using( var bmp = new Bitmap( width * 2, height * 2, PixelFormat.Format32bppArgb ) ) // 2倍(面積4倍)のBitmapを確保。(0.5倍で表示する前提。)
2189 using( var g = Graphics.FromImage( bmp ) )
2190 {
2191 g.TextRenderingHint = TextRenderingHint.AntiAlias;
2192 float y = ( ( ( float ) bmp.Height ) / 2f ) - ( ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot * 2f ) / 2f );
2193 g.DrawString( str曲名, this.ft曲リスト用フォント, new SolidBrush( this.color文字影 ), (float) 2f, (float) ( y + 2f ) );
2194 g.DrawString( str曲名, this.ft曲リスト用フォント, new SolidBrush( color ), 0f, y );
2195
2196 CDTXMania.t安全にDisposeする( ref this.st情報[ n番号 ].txタイトル名 );
2197
2198 this.st情報[ n番号 ].txタイトル名 = new CTexture( CDTXMania.app.Device, bmp, CDTXMania.TextureFormat, false );
2199 this.st情報[ n番号 ].txタイトル名.vc拡大縮小倍率 = new Vector3( f拡大率X, 0.5f, 1f );
2200 }
2201 }
2202 catch( CTextureCreateFailedException )
2203 {
2204 Trace.TraceError( "曲名テクスチャの作成に失敗しました。[{0}]", str曲名 );
2205 this.st情報[ n番号 ].txタイトル名 = null;
2206 }
2207 }
2208 private void tティスト名テクスチャの生成( int n番号, string strティスト名 )
2209 {
2210 if( n番号 < 0 || n番号 > 12 )
2211 return;
2212
2213 try
2214 {
2215 SizeF szティスト名;
2216
2217 #region [ 曲名表示に必要となるサイズを取得する。]
2218 //-----------------
2219 using( var bmpDummy = new Bitmap( 1, 1 ) )
2220 {
2221 var g = Graphics.FromImage( bmpDummy );
2222 g.PageUnit = GraphicsUnit.Pixel;
2223 szティスト名 = g.MeasureString( strティスト名, this.ft曲リスト用フォント );
2224 }
2225 //-----------------
2226 #endregion
2227
2228 int n最大幅px = 210;
2229 int height = 25;
2230 int width = (int) ( ( szティスト名.Width + 2 ) * 0.5f );
2231 if( width > ( CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2 ) )
2232 width = CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2; // 右端断ち切れ仕方ないよね
2233
2234 float f拡大率X = ( width <= n最大幅px ) ? 0.5f : ( ( (float) n最大幅px / (float) width ) * 0.5f ); // 長い文字列は横方向に圧縮。
2235
2236 using( var bmp = new Bitmap( width * 2, height * 2, PixelFormat.Format32bppArgb ) ) // 2倍(面積4倍)のBitmapを確保。(0.5倍で表示する前提。)
2237 using( var g = Graphics.FromImage( bmp ) )
2238 {
2239 g.TextRenderingHint = TextRenderingHint.AntiAlias;
2240 float y = ( ( ( float ) bmp.Height ) / 2f ) - ( ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot * 2f ) / 2f );
2241 g.DrawString( strティスト名, this.ft曲リスト用フォント, new SolidBrush( this.color文字影 ), (float)2f, (float)(y + 2f));
2242 g.DrawString( strティスト名, this.ft曲リスト用フォント, new SolidBrush( Color.White ), 0f, y );
2243
2244 CDTXMania.t安全にDisposeする( ref this.st情報[ n番号 ].txティスト名 );
2245 this.st情報[ n番号 ].nティスト名テクスチャの長さdot = (int)((g.MeasureString(strティスト名, this.ft曲リスト用フォント).Width) * f拡大率X);
2246 this.st情報[ n番号 ].txティスト名 = new CTexture( CDTXMania.app.Device, bmp, CDTXMania.TextureFormat, false );
2247 this.st情報[ n番号 ].txティスト名.vc拡大縮小倍率 = new Vector3( f拡大率X, 0.5f, 1f );
2248 }
2249 }
2250 catch( CTextureCreateFailedException )
2251 {
2252 Trace.TraceError( "曲名テクスチャの作成に失敗しました。[{0}]", strティスト名 );
2253 this.st情報[ n番号 ].txティスト名 = null;
2254 }
2255 }
2256 private void tアイテム数の描画()
2257 {
2258 string s = nCurrentPosition.ToString() + "/" + nNumOfItems.ToString();
2259 int x = 1280 - 8 - 12;
2260 int y = 500;
2261
2262 for ( int p = s.Length - 1; p >= 0; p-- )
2263 {
2264 tアイテム数の描画・1桁描画( x, y, s[ p ] );
2265 x -= 10;
2266 }
2267 }
2268 private void tアイテム数の描画・1桁描画( int x, int y, char s数値 )
2269 {
2270 int dx, dy;
2271 if ( s数値 == '/' )
2272 {
2273 dx = 96;
2274 dy = 0;
2275 }
2276 else
2277 {
2278 int n = (int) s数値 - (int) '0';
2279 dx = ( n % 6 ) * 8;
2280 dy = ( n / 6 ) * 12;
2281 }
2282 if ( this.txアイテム数数字 != null )
2283 {
2284 this.txアイテム数数字.t2D描画( CDTXMania.app.Device, x, y, new Rectangle( dx, dy, 16, 16 ) );
2285 }
2286 }
2287 //-----------------
2288 #endregion
2289 }
2290 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26