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

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