Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 186 - (hide annotations) (download)
Sun Dec 15 11:02:39 2013 UTC (10 years, 3 months ago) by kairera0467
File size: 124759 byte(s)
#xxxxx CSongDBにギターベース側のレベルDecを追加。
#30763 XG選曲画面のものをコミット。(手元に別々にデータはあるので戻すこともできます。)
変更点は、
・パネルの大きさ等変更。
・スクロールバーを作り直した。
・BPMの表示方法を新しくした。
・パネルの構成を一部変更。
#32604 STAGEFILEがある曲だけ6_background.mp4を使わないようにして一時的な対策。
#xxxxx 8_background.mp4がうまく再生されないバグの修正。
#xxxxx 終了時のアニメーションを実装。
#xxxxx 難易度変更をした時のボイス機能を追加。rev185と同じ。(Novice、Regular、Expert、Master、Basic、Advanced、Extreme)
1 kairera0467 2 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 kairera0467 186 using System.IO;
11 kairera0467 2 using SlimDX;
12     using FDK;
13    
14     namespace DTXMania
15     {
16 kairera0467 186 //ここをXG風にする際に使ったコードはSSTから拝借、改造している。
17 kairera0467 2 internal class CActSelect曲リスト : CActivity
18     {
19 kairera0467 186
20 kairera0467 2 // プロパティ
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 kairera0467 186
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 kairera0467 2 }
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 kairera0467 186 /// <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 kairera0467 2 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 kairera0467 186 // 何もしない;
208 kairera0467 2 }
209     else
210     {
211 kairera0467 186 // CDTXMania.Songs管理.t曲リストのソート3_演奏回数の多い順( songList, eInst, order );
212 kairera0467 2 sf( songList, eInst, order, p );
213 kairera0467 186 // this.r現在選択中の曲 = CDTXMania
214 kairera0467 2 this.t現在選択中の曲を元に曲バを再構成する();
215     }
216     }
217    
218     public bool tBOXに入る()
219     {
220 kairera0467 186 //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 kairera0467 2 bool ret = false;
229     if ( CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName( false ) ) != CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath )
230     && CSkin.bUseBoxDefSkin )
231     {
232     ret = true;
233 kairera0467 186 // BOXに入るときは、スキン変更発生時のみboxdefスキン設定の更新を行う
234     CDTXMania.Skin.SetCurrentSkinSubfolderFullName(
235     CDTXMania.Skin.GetSkinSubfolderFullNameFromSkinName( CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) ), false );
236 kairera0467 2 }
237    
238 kairera0467 186 //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 kairera0467 2 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 kairera0467 186 //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 kairera0467 2 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 kairera0467 186 // スキン変更が発生しなくても、boxdef圏外に出る場合は、boxdefスキン設定の更新が必要
274     // (ユーザーがboxdefスキンをConfig指定している場合への対応のために必要)
275     // tBoxに入る()とは処理が微妙に異なるので注意
276 kairera0467 2 CDTXMania.Skin.SetCurrentSkinSubfolderFullName(
277     ( this.r現在選択中の曲.strSkinPath == "" ) ? "" : CDTXMania.Skin.GetSkinSubfolderFullNameFromSkinName( CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) ), false );
278 kairera0467 186 //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 kairera0467 2 {
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 kairera0467 186 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 kairera0467 2 }
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 kairera0467 186 this.tラベル名からステタスパネルを決定する( this.r現在選択中の曲.ar難易度ラベル[ this.n現在選択中の曲の現在の難易度レベル ] );
363 kairera0467 2
364 kairera0467 186 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 kairera0467 2 // 選曲ステージに変更通知を発出し、関係Activityの対応を行ってもらう。
421    
422     CDTXMania.stage選曲.t選択曲変更通知();
423     }
424    
425 kairera0467 186
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 kairera0467 2
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 kairera0467 186 //this.prvFont = new CPrivateFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );
557 kairera0467 2
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 kairera0467 186 this.prvFont.Dispose();
579 kairera0467 2
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 kairera0467 186 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 kairera0467 2
612 kairera0467 186 //ここは最初に表示される画像の復元に必要。
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 kairera0467 2 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 kairera0467 186 using ( Bitmap image = new Bitmap( 640, 96 ) )
665 kairera0467 2 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 kairera0467 186 this.txアイテム数数字 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect skill number on gauge etc.png" ), false );
687 kairera0467 2 #endregion
688 kairera0467 186
689     base.OnManagedリソスの作成();
690 kairera0467 2 }
691     public override void OnManagedリソスの解放()
692     {
693     if( this.b活性化してない )
694     return;
695    
696     CDTXMania.t安全にDisposeする( ref this.txアイテム数数字 );
697    
698 kairera0467 186 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 kairera0467 2
704 kairera0467 186 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 kairera0467 2 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 kairera0467 186 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 kairera0467 2
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 kairera0467 186 long n現在時刻 = CSound管理.rc演奏用タイマ.n現在時刻;
806 kairera0467 2
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 kairera0467 186 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.ティスト名;
876 kairera0467 2 this.st情報[ index ].col文字色 = song.col文字色;
877 kairera0467 186 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
878 kairera0467 2 this.t曲名バの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].col文字色 );
879 kairera0467 186 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
880     //this.tパネルの生成( index, this.stバー情報[ index ].strタイトル文字列, this.stバー情報[ index ].strアーティスト名, this.stバー情報[ index ].col文字色 );
881 kairera0467 2
882 kairera0467 186 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 kairera0467 2
890 kairera0467 186
891 kairera0467 2 // 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 kairera0467 186 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 kairera0467 2
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 kairera0467 186 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song) ].譜面情報.ティスト名;
949 kairera0467 2 this.st情報[ index ].col文字色 = song.col文字色;
950 kairera0467 186 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
951 kairera0467 2 this.t曲名バの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].col文字色 );
952 kairera0467 186 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
953     //this.tパネルの生成( index, this.stバー情報[ index ].strタイトル文字列, this.stバー情報[ index ].strアーティスト名, this.stバー情報[ index ].col文字色 );
954 kairera0467 2
955 kairera0467 186 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 kairera0467 2
963 kairera0467 186
964 kairera0467 2 // 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 kairera0467 186
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 kairera0467 2
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 kairera0467 186 this.txSongNotFound.t2D描画( CDTXMania.app.Device, 320, 160 );
1029 kairera0467 2 }
1030     //-----------------
1031     #endregion
1032    
1033     return 0;
1034     }
1035 kairera0467 186 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 kairera0467 2
1044 kairera0467 186 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 kairera0467 2 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 kairera0467 186
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 kairera0467 2 {
1145     // (A) 選択曲パネルを描画。
1146 kairera0467 186 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 kairera0467 2 //-----------------
1151 kairera0467 186 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 kairera0467 2 //-----------------
1164     #endregion
1165 kairera0467 186 #region [ ジャケット画像の描画 ]
1166     //-----------------
1167     if( this.txTumbnail[nパネル番号] != null )
1168     {
1169     float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1170     float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1171     var mat = SlimDX.Matrix.Identity;
1172     mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率, f拡大率2 * CTexture.f画面比率, 1.0f);
1173     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1174     mat *= SlimDX.Matrix.Translation(
1175     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1176     (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1177     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1178     this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1179     }
1180     for( int la = 0; la < 5 ; la++ )
1181     {
1182     if( CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null )
1183     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));
1184     }
1185     //-----------------
1186     #endregion
1187 kairera0467 2 #region [ タイトル名テクスチャを描画。]
1188     //-----------------
1189 kairera0467 186 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1190     this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1191     if( this.tx選択されている曲の曲名 != null )
1192     this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1193     if (this.tx選択されている曲のアティスト名 != null)
1194     this.tx選択されている曲のアティスト名.t2D描画(CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470);
1195     //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1196     // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1197     //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1198     // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1199 kairera0467 2 //-----------------
1200     #endregion
1201     }
1202     else
1203     {
1204     // (B) その他のパネルの描画。
1205 kairera0467 186 #region [ ジャケット画像の描画 ]
1206     //-----------------
1207     if (this.txパネル != null)
1208     {
1209     var mat = SlimDX.Matrix.Identity;
1210     mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1211     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1212     mat *= SlimDX.Matrix.Translation(
1213     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1214     (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1215     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1216     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1217     }
1218     if (this.txTumbnail[ nパネル番号 ] != null)
1219     {
1220     float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1221     float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1222     var mat = SlimDX.Matrix.Identity;
1223     mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1224     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1225     mat *= SlimDX.Matrix.Translation(
1226     (this.stマトリックス座標[ i ].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1227     (this.stマトリックス座標[ i ].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1228     (this.stマトリックス座標[ i ].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1229     this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1230     }
1231     //-----------------
1232     #endregion
1233 kairera0467 2 #region [ タイトル名テクスチャを描画。]
1234     //-----------------
1235 kairera0467 186 this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1236     this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1237     if (this.st情報[ nパネル番号 ].txタイトル名 != null)
1238     {
1239     var mat = SlimDX.Matrix.Identity;
1240     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1241     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1242     mat *= SlimDX.Matrix.Translation(
1243     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1244     (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1245     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1246     this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1247     }
1248     if (this.st情報[nパネル番号].txティスト名 != null)
1249     {
1250     var mat = SlimDX.Matrix.Identity;
1251     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1252     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1253     mat *= SlimDX.Matrix.Translation(
1254     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1255     (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1256     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1257     this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1258     }
1259 kairera0467 2 //-----------------
1260     #endregion
1261     }
1262     }
1263     }
1264     //-----------------
1265     #endregion
1266 kairera0467 186
1267 kairera0467 2 }
1268     else
1269     {
1270 kairera0467 186
1271 kairera0467 2 #region [ (2) 通常フェーズの描画。]
1272     //-----------------
1273     for( int i = 0; i < 13; i++ ) // パネルは全13枚。
1274     {
1275     int nパネル番号 = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
1276     int n見た目の行番号 = i;
1277     int n次のパネル番号 = ( this.n現在のスクロルカウンタ <= 0 ) ? ( ( i + 1 ) % 13 ) : ( ( ( i - 1 ) + 13 ) % 13 );
1278     int x = this.ptの基本座標[ n見た目の行番号 ].X + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].X - this.ptの基本座標[ n見た目の行番号 ].X ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1279     int y = this.ptの基本座標[ n見た目の行番号 ].Y + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].Y - this.ptの基本座標[ n見た目の行番号 ].Y ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1280 kairera0467 186 float fX = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x - this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1281     this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x + this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1282    
1283     float fY = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1284     this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1285    
1286     float fZ = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z - this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1287     this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z + this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1288    
1289     if (i == 6)
1290     {
1291     #region [ ジャケット画像の描画 ]
1292     //-----------------
1293     if( this.txパネル != null )
1294     {
1295     var mat = SlimDX.Matrix.Identity;
1296     mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1297     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1298     mat *= SlimDX.Matrix.Translation(
1299     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1300     (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1301     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1302     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1303     }
1304     if (this.txTumbnail[nパネル番号] != null)
1305     {
1306     float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1307     float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1308     var mat = SlimDX.Matrix.Identity;
1309     mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1310     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1311     mat *= SlimDX.Matrix.Translation(
1312     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1313     (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率 - 1f,
1314     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1315     this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1316     }
1317     //-----------------
1318     #endregion
1319     #region [ タイトル名テクスチャを描画。]
1320     //-----------------
1321     if (this.st情報[nパネル番号].txタイトル名 != null)
1322     {
1323     //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1324     var mat = SlimDX.Matrix.Identity;
1325     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1326     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1327     mat *= SlimDX.Matrix.Translation(
1328     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1329     (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1330     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1331     this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1332     }
1333     if (this.st情報[nパネル番号].txティスト名 != null)
1334     {
1335     var mat = SlimDX.Matrix.Identity;
1336     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1337     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1338     mat *= SlimDX.Matrix.Translation(
1339     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1340     (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1341     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1342     this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1343     }
1344     //-----------------
1345     #endregion
1346     }
1347     else if( ( i == 5 ) )
1348     {
1349     this.txランプ用帯.t3D描画( CDTXMania.app.Device, barL ); //右の帯。
1350     for (int la = 0; la < 5; la++)
1351     {
1352     //if( this.stバー情報[ 6 ].ar難易度ラベル[ la ] != null )
1353     {
1354     var lamp = SlimDX.Matrix.Identity;
1355     lamp *= SlimDX.Matrix.Translation(
1356     ( this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x ) )) * CTexture.f画面比率,
1357     ( this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y ) ) ) * CTexture.f画面比率 - 1f - la * 13f,
1358     ( this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z ) ) ) * CTexture.f画面比率);
1359    
1360     //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));
1361     }
1362     }
1363     this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 531, 243, new Rectangle(74, 80, 230, 230)); //真ん中の部分は別々に描画。
1364 kairera0467 2 // (A) スクロールが停止しているときの選択曲バーの描画。
1365 kairera0467 186 #region [ ジャケット画像の描画 ]
1366     //-----------------
1367     if (this.txパネル != null)
1368     {
1369     var mat = SlimDX.Matrix.Identity;
1370     mat *= SlimDX.Matrix.Scaling(CTexture.f画面比率, CTexture.f画面比率, 1.0f);
1371     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1372     mat *= SlimDX.Matrix.Translation(
1373     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1374     (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1375     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1376     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1377     }
1378     this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 457, 163, new Rectangle(0, 0, 363, 368));
1379 kairera0467 2
1380 kairera0467 186 for( int la = 0; la < 5 ; la++ )
1381     {
1382     if( CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null )
1383     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));
1384     }
1385     if( this.txTumbnail[ nパネル番号 ] != null )
1386     {
1387     float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1388     float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1389     this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1390     this.txTumbnail[ nパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1391     this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1392     }
1393     //-----------------
1394     #endregion
1395 kairera0467 2 #region [ タイトル名テクスチャを描画。]
1396     //-----------------
1397 kairera0467 186 if( this.tx選択されている曲の曲名 == null )
1398     {
1399     this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1400     this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1401     }
1402     if( this.tx選択されている曲の曲名 != null )
1403     this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1404     if( this.tx選択されている曲のアティスト名 != null )
1405     this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470);
1406     //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1407     // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1408     //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1409     // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1410 kairera0467 2 //-----------------
1411     #endregion
1412     }
1413 kairera0467 186 else if (i >= 12)
1414     {
1415     }
1416     else
1417     {
1418     // (B) スクロール中の選択曲バー、またはその他のバーの描画。
1419     this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1420     this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 761, 233, new Rectangle(304, 70, 59, 242));
1421     #region [ ジャケット画像の描画 ]
1422     //-----------------
1423     if (this.txパネル != null)
1424     {
1425     var mat = SlimDX.Matrix.Identity;
1426     mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1427     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1428     mat *= SlimDX.Matrix.Translation(
1429     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1430     (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1431     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1432     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1433     }
1434     if (this.txTumbnail[nパネル番号] != null)
1435     {
1436     float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width ;
1437     float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1438     var mat = SlimDX.Matrix.Identity;
1439     mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1440     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1441     mat *= SlimDX.Matrix.Translation(
1442     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1443     (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1444     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1445     this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1446     }
1447     //-----------------
1448     #endregion
1449     #region [ タイトル名テクスチャを描画。]
1450     //-----------------
1451     if (this.st情報[nパネル番号].txタイトル名 != null)
1452     {
1453     //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1454     var mat = SlimDX.Matrix.Identity;
1455     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 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 + 110 + (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.st情報[nパネル番号].txティスト名 != null)
1464     {
1465     var mat = SlimDX.Matrix.Identity;
1466     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1467     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1468     mat *= SlimDX.Matrix.Translation(
1469     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1470     (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1471     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1472     this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1473     }
1474     //-----------------
1475     #endregion
1476 kairera0467 2
1477 kairera0467 186 #region [ スキル値を描画。]
1478     //-----------------
1479     //if( ( this.stバー情報[ nパネル番号 ].eバー種別 == Eバー種別.Score ) && ( this.e楽器パート != E楽器パート.UNKNOWN ) )
1480     //this.tスキル値の描画( x + 34, y + 18, this.stバー情報[ nパネル番号 ].nスキル値[ (int) this.e楽器パート ] );
1481     //-----------------
1482     #endregion
1483     }
1484 kairera0467 2 }
1485     //-----------------
1486     #endregion
1487 kairera0467 186
1488 kairera0467 2 }
1489     #region [ スクロール地点の計算(描画はCActSelectShowCurrentPositionにて行う) #27648 ]
1490     int py;
1491     double d = 0;
1492     if ( nNumOfItems > 1 )
1493     {
1494 kairera0467 186 d = ( 336 - 8 ) / (double) ( nNumOfItems - 1 );
1495 kairera0467 2 py = (int) ( d * ( nCurrentPosition - 1 ) );
1496     }
1497     else
1498     {
1499     d = 0;
1500     py = 0;
1501     }
1502     int delta = (int) ( d * this.n現在のスクロルカウンタ / 100 );
1503 kairera0467 186 if ( py + delta <= 336 - 8 )
1504 kairera0467 2 {
1505     this.nスクロルバ相対y座標 = py + delta;
1506     }
1507     #endregion
1508    
1509     #region [ アイテム数の描画 #27648 ]
1510     tアイテム数の描画();
1511     #endregion
1512     return 0;
1513     }
1514    
1515    
1516     // その他
1517    
1518     #region [ private ]
1519     //-----------------
1520 kairera0467 186 private enum E種別 { Score, Box, Other, Random, BackBox }
1521 kairera0467 2
1522     private struct ST
1523     {
1524     public CTexture Score;
1525     public CTexture Box;
1526     public CTexture Other;
1527 kairera0467 186 public CTexture Random;
1528     public CTexture BackBox;
1529 kairera0467 2 public CTexture this[ int index ]
1530     {
1531     get
1532     {
1533     switch( index )
1534     {
1535     case 0:
1536     return this.Score;
1537    
1538     case 1:
1539     return this.Box;
1540    
1541     case 2:
1542     return this.Other;
1543 kairera0467 186
1544     case 3:
1545     return this.Random;
1546    
1547     case 4:
1548     return this.BackBox;
1549 kairera0467 2 }
1550     throw new IndexOutOfRangeException();
1551     }
1552     set
1553     {
1554     switch( index )
1555     {
1556     case 0:
1557     this.Score = value;
1558     return;
1559    
1560     case 1:
1561     this.Box = value;
1562     return;
1563    
1564     case 2:
1565     this.Other = value;
1566     return;
1567 kairera0467 186
1568     case 3:
1569     this.Random = value;
1570     return;
1571    
1572     case 4:
1573     this.BackBox = value;
1574     return;
1575 kairera0467 2 }
1576     throw new IndexOutOfRangeException();
1577     }
1578     }
1579     }
1580    
1581     private struct ST情報
1582     {
1583     public CActSelect曲リスト.E種別 e種別;
1584     public string strタイトル文字列;
1585 kairera0467 186 public string strティスト名;
1586 kairera0467 2 public CTexture txタイトル名;
1587 kairera0467 186 public CTexture txティスト名;
1588     public CTexture txパネル;
1589     public int nティスト名テクスチャの長さdot;
1590     public int nタイトル名テクスチャの長さdot;
1591 kairera0467 2 public STDGBVALUE<int> nスキル値;
1592     public Color col文字色;
1593 kairera0467 186 public string strDTXフォルダのパス;
1594     public string[] ar難易度ラベル;
1595     public Cスコア.ST譜面情報 ar譜面情報;
1596 kairera0467 2 }
1597    
1598     private struct ST選曲バ
1599     {
1600     public CTexture Score;
1601     public CTexture Box;
1602     public CTexture Other;
1603     public CTexture this[ int index ]
1604     {
1605     get
1606     {
1607     switch( index )
1608     {
1609     case 0:
1610     return this.Score;
1611    
1612     case 1:
1613     return this.Box;
1614    
1615     case 2:
1616     return this.Other;
1617     }
1618     throw new IndexOutOfRangeException();
1619     }
1620     set
1621     {
1622     switch( index )
1623     {
1624     case 0:
1625     this.Score = value;
1626     return;
1627    
1628     case 1:
1629     this.Box = value;
1630     return;
1631    
1632     case 2:
1633     this.Other = value;
1634     return;
1635     }
1636     throw new IndexOutOfRangeException();
1637     }
1638     }
1639     }
1640    
1641 kairera0467 186 protected struct ST中心点
1642     {
1643     public float x;
1644     public float y;
1645     public float z;
1646     public float rotY;
1647     }
1648     /// <summary>
1649     /// <para>SSTFファイル絶対パス(key)とサムネイル画像(value)との辞書。</para>
1650     /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1651     /// </summary>
1652     protected Dictionary<string, CTexture> dicThumbnail = new Dictionary<string, CTexture>();
1653    
1654     /// <summary>
1655     /// <para>SSTFファイル絶対パス(key)とプロパティ画像(value)との辞書。</para>
1656     /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1657     /// </summary>
1658     protected Dictionary<string, CTexture> dicProperty = new Dictionary<string, CTexture>();
1659    
1660     protected ST中心点[] stマトリックス座標 = new ST中心点[] {
1661     #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1662     //-----------------
1663     new ST中心点() { x = -940.0000f, y = 4f, z = 320f, rotY = 0.4150f },
1664     new ST中心点() { x = -740.0000f, y = 4f, z = 230f, rotY = 0.4150f },
1665     new ST中心点() { x = -550.0000f, y = 4f, z = 150f, rotY = 0.4150f },
1666     new ST中心点() { x = -370.0000f, y = 4f, z = 70f, rotY = 0.4150f },
1667     new ST中心点() { x = -194.0000f, y = 4f, z = -6f, rotY = 0.4150f },
1668     new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1669     new ST中心点() { x = 204.0000f, y = 4f, z = 0f, rotY = -0.4150f },
1670     new ST中心点() { x = 362.0000f, y = 4f, z = 70f, rotY = -0.4150f },
1671     new ST中心点() { x = 528.0000f, y = 4f, z = 146f, rotY = -0.4150f },
1672     new ST中心点() { x = 686.0000f, y = 4f, z = 212f, rotY = -0.4150f },
1673     new ST中心点() { x = 848.0000f, y = 4f, z = 282f, rotY = -0.4150f },
1674     new ST中心点() { x = 1200.0000f, y = 4f, z = 450f, rotY = -0.4150f },
1675     new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1676     new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1677     //-----------------
1678     #endregion
1679     };
1680    
1681     protected readonly ST中心点[] stマトリックス曲名座標 = new ST中心点[] {
1682     #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1683     //-----------------
1684     new ST中心点() { x = -980.0000f, y = 2f, z = 360f, rotY = 0.4000f },
1685     new ST中心点() { x = -780.0000f, y = 2f, z = 270f, rotY = 0.4000f },
1686     new ST中心点() { x = -590.0000f, y = 2f, z = 180f, rotY = 0.4000f },
1687     new ST中心点() { x = -400.0000f, y = 2f, z = 90f, rotY = 0.4000f },
1688     new ST中心点() { x = -210.0000f, y = 2f, z = 0f, rotY = 0.4000f },
1689     new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1690     new ST中心点() { x = 210.0000f, y = 2f, z = 0f, rotY = -0.4000f },
1691     new ST中心点() { x = 400.0000f, y = 2f, z = 90f, rotY = -0.4f },
1692     new ST中心点() { x = 590.0000f, y = 2f, z = 180f, rotY = -0.4f },
1693     new ST中心点() { x = 780.0000f, y = 2f, z = 270f, rotY = -0.4f },
1694     new ST中心点() { x = 980.0000f, y = 2f, z = 360f, rotY = -0.4f },
1695     new ST中心点() { x = 1200.0000f, y = 2f, z = 450f, rotY = -0.4f },
1696     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1697     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1698     //-----------------
1699     #endregion
1700     };
1701     [StructLayout(LayoutKind.Sequential)]
1702     public struct STATUSPANEL
1703     {
1704     public string label;
1705     public int status;
1706     }
1707     public int nIndex;
1708     public STATUSPANEL[] stパネルマップ;
1709    
1710     public bool b登場アニメ全部完了;
1711 kairera0467 2 private Color color文字影 = Color.FromArgb( 0x40, 10, 10, 10 );
1712 kairera0467 186 public CCounter[] ct登場アニメ用 = new CCounter[ 13 ];
1713 kairera0467 2 private E楽器パ e楽器パ;
1714     private Font ft曲リスト用フォント;
1715     private long nスクロルタイマ;
1716     private int n現在のスクロルカウンタ;
1717     private int n現在の選択行;
1718     private int n目標のスクロルカウンタ;
1719 kairera0467 186 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) };
1720 kairera0467 2 private ST情報[] st情報 = new ST情報[ 13 ];
1721     private CTexture txSongNotFound, txEnumeratingSongs;
1722     private CTexture txスキル数字;
1723     private CTexture txアイテム数数字;
1724     private ST tx曲名バ;
1725     private ST選曲バ tx選曲バ;
1726 kairera0467 186 private CTexture[] txTumbnail = new CTexture[13];
1727     private CTexture tx選曲パネル;
1728     private CTexture txパネル;
1729     private CTexture txジャケットランダム;
1730     private CTexture txジャケットボックスクロ;
1731     private CTexture tx;
1732     private CTexture tx色帯;
1733     private CTexture txランプ用帯;
1734     private CTexture tx選択されている曲の曲名;
1735     private CTexture tx選択されている曲のアティスト名;
1736     private CTexture txクリアランプ;
1737     //CPrivateFont prvFont;
1738     CPrivateFastFont prvFont;
1739 kairera0467 2
1740     private int nCurrentPosition = 0;
1741     private int nNumOfItems = 0;
1742    
1743     //private string strBoxDefSkinPath = "";
1744     private E種別 e曲のバ種別を返す( C曲リストノ song )
1745     {
1746     if( song != null )
1747     {
1748     switch( song.eド種別 )
1749     {
1750     case C曲リストノ.Eド種別.SCORE:
1751     case C曲リストノ.Eド種別.SCORE_MIDI:
1752     return E種別.Score;
1753    
1754     case C曲リストノ.Eド種別.BOX:
1755     return E種別.Box;
1756 kairera0467 186
1757     case C曲リストノ.Eド種別.BACKBOX:
1758     return E種別.BackBox;
1759    
1760     case C曲リストノ.Eド種別.RANDOM:
1761     return E種別.Random;
1762 kairera0467 2 }
1763     }
1764     return E種別.Other;
1765     }
1766     private C曲リストノ r次の曲( C曲リストノ song )
1767     {
1768     if( song == null )
1769     return null;
1770    
1771     List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
1772    
1773     int index = list.IndexOf( song );
1774    
1775     if( index < 0 )
1776     return null;
1777    
1778     if( index == ( list.Count - 1 ) )
1779     return list[ 0 ];
1780    
1781     return list[ index + 1 ];
1782     }
1783     private C曲リストノ r前の曲( C曲リストノ song )
1784     {
1785     if( song == null )
1786     return null;
1787    
1788     List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
1789    
1790     int index = list.IndexOf( song );
1791    
1792     if( index < 0 )
1793     return null;
1794    
1795     if( index == 0 )
1796     return list[ list.Count - 1 ];
1797    
1798     return list[ index - 1 ];
1799     }
1800     private void tスキル値の描画( int x, int y, int nスキル値 )
1801     {
1802     if( nスキル値 <= 0 || nスキル値 > 100 ) // スキル値 0 = 未プレイ なので表示しない。
1803     return;
1804    
1805     int color = ( nスキル値 == 100 ) ? 3 : ( nスキル値 / 25 );
1806    
1807     int n百の位 = nスキル値 / 100;
1808     int n十の位 = (