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

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