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

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