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 194 - (hide annotations) (download)
Tue Dec 24 07:07:14 2013 UTC (10 years, 3 months ago) by kairera0467
File size: 124868 byte(s)
#xxxxx E楽器パートの判定にBassOpenが含まれていなかったのを修正。
#xxxxx 「CActSelect曲リスト」の例外処理の対応。
#xxxxx Guitar画面のステータスパネルにジャケットが表示されるようにした。
#xxxxx ランク判定処理を一部変更。
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 kairera0467 194 if( i == 6 )
1085 kairera0467 186 {
1086     #region [ ジャケット画像の描画 ]
1087     //-----------------
1088     if( this.txパネル != null )
1089     {
1090     var mat = SlimDX.Matrix.Identity;
1091 kairera0467 194 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 kairera0467 186 mat *= SlimDX.Matrix.Translation(
1094 kairera0467 194 ( 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 kairera0467 186 this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1098     }
1099 kairera0467 194 if( this.txTumbnail[nパネル番号] != null )
1100 kairera0467 186 {
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 kairera0467 194 if( this.st情報[nパネル番号].txタイトル名 != null )
1117 kairera0467 186 {
1118     //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1119     var mat = SlimDX.Matrix.Identity;
1120 kairera0467 194 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 kairera0467 186 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 kairera0467 194 if( this.tx選曲パネル != null )
1142     this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1143 kairera0467 186 }
1144     else if( i == 5 )
1145 kairera0467 2 {
1146     // (A) 選択曲パネルを描画。
1147 kairera0467 194 if( this.tx選曲パネル != null )
1148     this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 531, 243, new Rectangle( 74, 80, 230, 230 ) ); //真ん中の部分は別々に描画。
1149     if( this.txランプ用帯 != null )
1150     {
1151     this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1152     this.txランプ用帯.t3D描画( CDTXMania.app.Device, barL ); //右の帯。
1153     }
1154 kairera0467 186 #region [ バーテクスチャを描画。]
1155 kairera0467 2 //-----------------
1156 kairera0467 194 if( this.txパネル != null )
1157 kairera0467 186 {
1158     var mat = SlimDX.Matrix.Identity;
1159     mat *= SlimDX.Matrix.Scaling(0.8f, 0.8f, 1.0f);
1160     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1161     mat *= SlimDX.Matrix.Translation(
1162     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1163     (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1164     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1165     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1166     }
1167 kairera0467 194 if( this.tx選曲パネル != null )
1168     this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 457, 163, new Rectangle( 0, 0, 363, 368 ) );
1169 kairera0467 2 //-----------------
1170     #endregion
1171 kairera0467 186 #region [ ジャケット画像の描画 ]
1172     //-----------------
1173     for( int la = 0; la < 5 ; la++ )
1174     {
1175     if( CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null )
1176     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));
1177     }
1178 kairera0467 193 if( this.txTumbnail[ nパネル番号 ] != null )
1179     {
1180     float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1181     float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1182     this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1183     this.txTumbnail[ nパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1184     this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1185     }
1186 kairera0467 186 //-----------------
1187     #endregion
1188 kairera0467 2 #region [ タイトル名テクスチャを描画。]
1189     //-----------------
1190 kairera0467 186 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1191     this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1192     if( this.tx選択されている曲の曲名 != null )
1193     this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1194     if (this.tx選択されている曲のアティスト名 != null)
1195     this.tx選択されている曲のアティスト名.t2D描画(CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470);
1196     //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1197     // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1198     //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1199     // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1200 kairera0467 2 //-----------------
1201     #endregion
1202     }
1203     else
1204     {
1205     // (B) その他のパネルの描画。
1206 kairera0467 186 #region [ ジャケット画像の描画 ]
1207     //-----------------
1208 kairera0467 194 if( this.txパネル != null )
1209 kairera0467 186 {
1210     var mat = SlimDX.Matrix.Identity;
1211     mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1212     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1213     mat *= SlimDX.Matrix.Translation(
1214     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1215     (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1216     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1217     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1218     }
1219 kairera0467 194 if( this.txTumbnail[ nパネル番号 ] != null )
1220 kairera0467 186 {
1221     float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1222     float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1223     var mat = SlimDX.Matrix.Identity;
1224     mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1225     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1226     mat *= SlimDX.Matrix.Translation(
1227     (this.stマトリックス座標[ i ].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1228     (this.stマトリックス座標[ i ].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1229     (this.stマトリックス座標[ i ].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1230     this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1231     }
1232     //-----------------
1233     #endregion
1234 kairera0467 2 #region [ タイトル名テクスチャを描画。]
1235     //-----------------
1236 kairera0467 194 if( this.txランプ用帯 != null )
1237     this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1238     if( this.tx選曲パネル != null )
1239     this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1240 kairera0467 186 if (this.st情報[ nパネル番号 ].txタイトル名 != null)
1241     {
1242     var mat = SlimDX.Matrix.Identity;
1243     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1244     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1245     mat *= SlimDX.Matrix.Translation(
1246     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1247     (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1248     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1249     this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1250     }
1251     if (this.st情報[nパネル番号].txティスト名 != null)
1252     {
1253     var mat = SlimDX.Matrix.Identity;
1254     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1255     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1256     mat *= SlimDX.Matrix.Translation(
1257     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1258     (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1259     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1260     this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1261     }
1262 kairera0467 2 //-----------------
1263     #endregion
1264     }
1265     }
1266     }
1267     //-----------------
1268     #endregion
1269 kairera0467 186
1270 kairera0467 2 }
1271     else
1272     {
1273 kairera0467 186
1274 kairera0467 2 #region [ (2) 通常フェーズの描画。]
1275     //-----------------
1276     for( int i = 0; i < 13; i++ ) // パネルは全13枚。
1277     {
1278     int nパネル番号 = ( ( ( this.n現在の選択行 - 5 ) + i ) + 13 ) % 13;
1279     int n見た目の行番号 = i;
1280     int n次のパネル番号 = ( this.n現在のスクロルカウンタ <= 0 ) ? ( ( i + 1 ) % 13 ) : ( ( ( i - 1 ) + 13 ) % 13 );
1281     int x = this.ptの基本座標[ n見た目の行番号 ].X + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].X - this.ptの基本座標[ n見た目の行番号 ].X ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1282     int y = this.ptの基本座標[ n見た目の行番号 ].Y + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].Y - this.ptの基本座標[ n見た目の行番号 ].Y ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1283 kairera0467 186 float fX = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x - this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1284     this.stマトリックス座標[ n見た目の行番号 ].x + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].x + this.stマトリックス座標[ n見た目の行番号 ].x ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1285    
1286     float fY = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1287     this.stマトリックス座標[ n見た目の行番号 ].y + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].y - this.stマトリックス座標[ n見た目の行番号 ].y ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1288    
1289     float fZ = this.n現在のスクロルカウンタ <= 0 ? this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z - this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1290     this.stマトリックス座標[ n見た目の行番号 ].z + ( ( ( this.stマトリックス座標[ n次のパネル番号 ].z + this.stマトリックス座標[ n見た目の行番号 ].z ) * ( ( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1291    
1292     if (i == 6)
1293     {
1294     #region [ ジャケット画像の描画 ]
1295     //-----------------
1296     if( this.txパネル != null )
1297     {
1298     var mat = SlimDX.Matrix.Identity;
1299     mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1300     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1301     mat *= SlimDX.Matrix.Translation(
1302     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1303     (this.stマトリックス座標[i].y + 2 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1304     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1305     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1306     }
1307     if (this.txTumbnail[nパネル番号] != null)
1308     {
1309     float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1310     float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1311     var mat = SlimDX.Matrix.Identity;
1312     mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1313     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1314     mat *= SlimDX.Matrix.Translation(
1315     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1316     (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率 - 1f,
1317     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1318     this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1319     }
1320     //-----------------
1321     #endregion
1322     #region [ タイトル名テクスチャを描画。]
1323     //-----------------
1324     if (this.st情報[nパネル番号].txタイトル名 != null)
1325     {
1326     //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1327     var mat = SlimDX.Matrix.Identity;
1328     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1329     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1330     mat *= SlimDX.Matrix.Translation(
1331     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1332     (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1333     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1334     this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1335     }
1336     if (this.st情報[nパネル番号].txティスト名 != null)
1337     {
1338     var mat = SlimDX.Matrix.Identity;
1339     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1340     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1341     mat *= SlimDX.Matrix.Translation(
1342     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1343     (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1344     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1345     this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1346     }
1347     //-----------------
1348     #endregion
1349     }
1350     else if( ( i == 5 ) )
1351     {
1352 kairera0467 194 if( this.txランプ用帯 != null )
1353     this.txランプ用帯.t3D描画( CDTXMania.app.Device, barL ); //右の帯。
1354 kairera0467 186 for (int la = 0; la < 5; la++)
1355     {
1356     //if( this.stバー情報[ 6 ].ar難易度ラベル[ la ] != null )
1357     {
1358     var lamp = SlimDX.Matrix.Identity;
1359     lamp *= SlimDX.Matrix.Translation(
1360     ( this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x ) )) * CTexture.f画面比率,
1361     ( this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y ) ) ) * CTexture.f画面比率 - 1f - la * 13f,
1362     ( this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z ) ) ) * CTexture.f画面比率);
1363    
1364     //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));
1365     }
1366     }
1367 kairera0467 194 if( this.tx選曲パネル != null )
1368     this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 531, 243, new Rectangle(74, 80, 230, 230)); //真ん中の部分は別々に描画。
1369 kairera0467 2 // (A) スクロールが停止しているときの選択曲バーの描画。
1370 kairera0467 186 #region [ ジャケット画像の描画 ]
1371     //-----------------
1372 kairera0467 194 if( this.txパネル != null )
1373 kairera0467 186 {
1374     var mat = SlimDX.Matrix.Identity;
1375     mat *= SlimDX.Matrix.Scaling(CTexture.f画面比率, CTexture.f画面比率, 1.0f);
1376     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1377     mat *= SlimDX.Matrix.Translation(
1378     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1379     (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1380     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1381     this.txパネル.t3D描画(CDTXMania.app.Device, mat);
1382     }
1383 kairera0467 194 if( this.tx選曲パネル != null )
1384     this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 457, 163, new Rectangle(0, 0, 363, 368));
1385 kairera0467 2
1386 kairera0467 186 for( int la = 0; la < 5 ; la++ )
1387     {
1388     if( CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null )
1389     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));
1390     }
1391     if( this.txTumbnail[ nパネル番号 ] != null )
1392     {
1393     float f拡大率 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1394     float f拡大率2 = (float)218.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1395     this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1396     this.txTumbnail[ nパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1397     this.txTumbnail[ nパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1398     }
1399     //-----------------
1400     #endregion
1401 kairera0467 2 #region [ タイトル名テクスチャを描画。]
1402     //-----------------
1403 kairera0467 186 if( this.tx選択されている曲の曲名 == null )
1404     {
1405     this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strタイトル文字列 );
1406     this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ nパネル番号 ].strティスト名 );
1407     }
1408     if( this.tx選択されている曲の曲名 != null )
1409     this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1410     if( this.tx選択されている曲のアティスト名 != null )
1411     this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, 770 - this.st情報[ nパネル番号 ].nティスト名テクスチャの長さdot, 470);
1412     //if( this.stバー情報[ nパネル番号 ].txタイトル名 != null )
1413     // this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, 556, 210 );
1414     //if (this.stバー情報[ nパネル番号 ].txアーティスト名 != null)
1415     // this.stバー情報[ nパネル番号 ].txアーティスト名.t2D描画(CDTXMania.app.Device, 560 - 770 - this.stバー情報[ nパネル番号 ].nアーティスト名テクスチャの長さdot, 402);
1416 kairera0467 2 //-----------------
1417     #endregion
1418     }
1419 kairera0467 186 else if (i >= 12)
1420     {
1421     }
1422     else
1423     {
1424     // (B) スクロール中の選択曲バー、またはその他のバーの描画。
1425 kairera0467 194 if( this.txランプ用帯 != null )
1426     this.txランプ用帯.t3D描画( CDTXMania.app.Device, bar ); //右の帯。
1427     if( this.tx選曲パネル != null )
1428     this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 761, 233, new Rectangle(304, 70, 59, 242));
1429 kairera0467 186 #region [ ジャケット画像の描画 ]
1430     //-----------------
1431 kairera0467 194 if( this.txパネル != null )
1432 kairera0467 186 {
1433     var mat = SlimDX.Matrix.Identity;
1434     mat *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 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 + 2 + (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.txパネル.t3D描画(CDTXMania.app.Device, mat);
1441     }
1442 kairera0467 194 if( this.txTumbnail[nパネル番号] != null )
1443 kairera0467 186 {
1444     float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width ;
1445     float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1446     var mat = SlimDX.Matrix.Identity;
1447     mat *= SlimDX.Matrix.Scaling(f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f);
1448     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1449     mat *= SlimDX.Matrix.Translation(
1450     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1451     (this.stマトリックス座標[i].y + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1452     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1453     this.txTumbnail[nパネル番号].t3D描画(CDTXMania.app.Device, mat);
1454     }
1455     //-----------------
1456     #endregion
1457     #region [ タイトル名テクスチャを描画。]
1458     //-----------------
1459 kairera0467 194 if( this.st情報[nパネル番号].txタイトル名 != null )
1460 kairera0467 186 {
1461     //this.stバー情報[ nパネル番号 ].txタイトル名.t2D描画( CDTXMania.app.Device, x + 0x58, y + 8 );
1462     var mat = SlimDX.Matrix.Identity;
1463     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1464     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1465     mat *= SlimDX.Matrix.Translation(
1466     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1467     (this.stマトリックス座標[i].y + 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1468     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1469     this.st情報[nパネル番号].txタイトル名.t3D描画(CDTXMania.app.Device, mat);
1470     }
1471 kairera0467 194 if( this.st情報[nパネル番号].txティスト名 != null )
1472 kairera0467 186 {
1473     var mat = SlimDX.Matrix.Identity;
1474     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1475     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1476     mat *= SlimDX.Matrix.Translation(
1477     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1478     (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1479     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1480     this.st情報[nパネル番号].txティスト名.t3D描画(CDTXMania.app.Device, mat);
1481     }
1482     //-----------------
1483     #endregion
1484 kairera0467 2
1485 kairera0467 186 #region [ スキル値を描画。]
1486     //-----------------
1487     //if( ( this.stバー情報[ nパネル番号 ].eバー種別 == Eバー種別.Score ) && ( this.e楽器パート != E楽器パート.UNKNOWN ) )
1488     //this.tスキル値の描画( x + 34, y + 18, this.stバー情報[ nパネル番号 ].nスキル値[ (int) this.e楽器パート ] );
1489     //-----------------
1490     #endregion
1491     }
1492 kairera0467 2 }
1493     //-----------------
1494     #endregion
1495 kairera0467 186
1496 kairera0467 2 }
1497     #region [ スクロール地点の計算(描画はCActSelectShowCurrentPositionにて行う) #27648 ]
1498     int py;
1499     double d = 0;
1500     if ( nNumOfItems > 1 )
1501     {
1502 kairera0467 186 d = ( 336 - 8 ) / (double) ( nNumOfItems - 1 );
1503 kairera0467 2 py = (int) ( d * ( nCurrentPosition - 1 ) );
1504     }
1505     else
1506     {
1507     d = 0;
1508     py = 0;
1509     }
1510     int delta = (int) ( d * this.n現在のスクロルカウンタ / 100 );
1511 kairera0467 186 if ( py + delta <= 336 - 8 )
1512 kairera0467 2 {
1513     this.nスクロルバ相対y座標 = py + delta;
1514     }
1515     #endregion
1516    
1517     #region [ アイテム数の描画 #27648 ]
1518     tアイテム数の描画();
1519     #endregion
1520     return 0;
1521     }
1522    
1523    
1524     // その他
1525    
1526     #region [ private ]
1527     //-----------------
1528 kairera0467 186 private enum E種別 { Score, Box, Other, Random, BackBox }
1529 kairera0467 2
1530     private struct ST
1531     {
1532     public CTexture Score;
1533     public CTexture Box;
1534     public CTexture Other;
1535 kairera0467 186 public CTexture Random;
1536     public CTexture BackBox;
1537 kairera0467 2 public CTexture this[ int index ]
1538     {
1539     get
1540     {
1541     switch( index )
1542     {
1543     case 0:
1544     return this.Score;
1545    
1546     case 1:
1547     return this.Box;
1548    
1549     case 2:
1550     return this.Other;
1551 kairera0467 186
1552     case 3:
1553     return this.Random;
1554    
1555     case 4:
1556     return this.BackBox;
1557 kairera0467 2 }
1558     throw new IndexOutOfRangeException();
1559     }
1560     set
1561     {
1562     switch( index )
1563     {
1564     case 0:
1565     this.Score = value;
1566     return;
1567    
1568     case 1:
1569     this.Box = value;
1570     return;
1571    
1572     case 2:
1573     this.Other = value;
1574     return;
1575 kairera0467 186
1576     case 3:
1577     this.Random = value;
1578     return;
1579    
1580     case 4:
1581     this.BackBox = value;
1582     return;
1583 kairera0467 2 }
1584     throw new IndexOutOfRangeException();
1585     }
1586     }
1587     }
1588    
1589     private struct ST情報
1590     {
1591     public CActSelect曲リスト.E種別 e種別;
1592     public string strタイトル文字列;
1593 kairera0467 186 public string strティスト名;
1594 kairera0467 2 public CTexture txタイトル名;
1595 kairera0467 186 public CTexture txティスト名;
1596     public CTexture txパネル;
1597     public int nティスト名テクスチャの長さdot;
1598     public int nタイトル名テクスチャの長さdot;
1599 kairera0467 2 public STDGBVALUE<int> nスキル値;
1600     public Color col文字色;
1601 kairera0467 186 public string strDTXフォルダのパス;
1602     public string[] ar難易度ラベル;
1603     public Cスコア.ST譜面情報 ar譜面情報;
1604 kairera0467 2 }
1605    
1606     private struct ST選曲バ
1607     {
1608     public CTexture Score;
1609     public CTexture Box;
1610     public CTexture Other;
1611     public CTexture this[ int index ]
1612     {
1613     get
1614     {
1615     switch( index )
1616     {
1617     case 0:
1618     return this.Score;
1619    
1620     case 1:
1621     return this.Box;
1622    
1623     case 2:
1624     return this.Other;
1625     }
1626     throw new IndexOutOfRangeException();
1627     }
1628     set
1629     {
1630     switch( index )
1631     {
1632     case 0:
1633     this.Score = value;
1634     return;
1635    
1636     case 1:
1637     this.Box = value;
1638     return;
1639    
1640     case 2:
1641     this.Other = value;
1642     return;
1643     }
1644     throw new IndexOutOfRangeException();
1645     }
1646     }
1647     }
1648    
1649 kairera0467 186 protected struct ST中心点
1650     {
1651     public float x;
1652     public float y;
1653     public float z;
1654     public float rotY;
1655     }
1656     /// <summary>
1657     /// <para>SSTFファイル絶対パス(key)とサムネイル画像(value)との辞書。</para>
1658     /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1659     /// </summary>
1660     protected Dictionary<string, CTexture> dicThumbnail = new Dictionary<string, CTexture>();
1661    
1662     /// <summary>
1663     /// <para>SSTFファイル絶対パス(key)とプロパティ画像(value)との辞書。</para>
1664     /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1665     /// </summary>
1666     protected Dictionary<string, CTexture> dicProperty = new Dictionary<string, CTexture>();
1667    
1668     protected ST中心点[] stマトリックス座標 = new ST中心点[] {
1669     #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1670     //-----------------
1671     new ST中心点() { x = -940.0000f, y = 4f, z = 320f, rotY = 0.4150f },
1672     new ST中心点() { x = -740.0000f, y = 4f, z = 230f, rotY = 0.4150f },
1673     new ST中心点() { x = -550.0000f, y = 4f, z = 150f, rotY = 0.4150f },
1674     new ST中心点() { x = -370.0000f, y = 4f, z = 70f, rotY = 0.4150f },
1675     new ST中心点() { x = -194.0000f, y = 4f, z = -6f, rotY = 0.4150f },
1676     new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1677     new ST中心点() { x = 204.0000f, y = 4f, z = 0f, rotY = -0.4150f },
1678     new ST中心点() { x = 362.0000f, y = 4f, z = 70f, rotY = -0.4150f },
1679     new ST中心点() { x = 528.0000f, y = 4f, z = 146f, rotY = -0.4150f },
1680     new ST中心点() { x = 686.0000f, y = 4f, z = 212f, rotY = -0.4150f },
1681     new ST中心点() { x = 848.0000f, y = 4f, z = 282f, rotY = -0.4150f },
1682     new ST中心点() { x = 1200.0000f, y = 4f, z = 450f, rotY = -0.4150f },
1683     new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1684     new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1685     //-----------------
1686     #endregion
1687     };
1688    
1689     protected readonly ST中心点[] stマトリックス曲名座標 = new ST中心点[] {
1690     #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1691     //-----------------
1692     new ST中心点() { x = -980.0000f, y = 2f, z = 360f, rotY = 0.4000f },
1693     new ST中心点() { x = -780.0000f, y = 2f, z = 270f, rotY = 0.4000f },
1694     new ST中心点() { x = -590.0000f, y = 2f, z = 180f, rotY = 0.4000f },
1695     new ST中心点() { x = -400.0000f, y = 2f, z = 90f, rotY = 0.4000f },
1696     new ST中心点() { x = -210.0000f, y = 2f, z = 0f, rotY = 0.4000f },
1697     new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1698     new ST中心点() { x = 210.0000f, y = 2f, z = 0f, rotY = -0.4000f },
1699     new ST中心点() { x = 400.0000f, y = 2f, z = 90f, rotY = -0.4f },
1700     new ST中心点() { x = 590.0000f, y = 2f, z = 180f, rotY = -0.4f },
1701     new ST中心点() { x = 780.0000f, y = 2f, z = 270f, rotY = -0.4f },
1702     new ST中心点() { x = 980.0000f, y = 2f, z = 360f, rotY = -0.4f },
1703     new ST中心点() { x = 1200.0000f, y = 2f, z = 450f, rotY = -0.4f },
1704     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1705     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1706     //-----------------
1707     #endregion
1708     };
1709     [StructLayout(LayoutKind.Sequential)]
1710     public struct STATUSPANEL
1711     {
1712     public string label;
1713     public int status;
1714     }
1715     public int nIndex;
1716     public STATUSPANEL[] stパネルマップ;
1717    
1718     public bool b登場アニメ全部完了;
1719 kairera0467 2 private Color color文字影 = Color.FromArgb( 0x40, 10, 10, 10 );
1720 kairera0467 186 public CCounter[] ct登場アニメ用 = new CCounter[ 13 ];
1721 kairera0467 2 private E楽器パ e楽器パ;
1722     private Font ft曲リスト用フォント;
1723     private long nスクロルタイマ;
1724     private int n現在のスクロルカウンタ;
1725     private int n現在の選択行;
1726     private int n目標のスクロルカウンタ;
1727 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) };
1728 kairera0467 2 private ST情報[] st情報 = new ST情報[ 13 ];
1729     private CTexture txSongNotFound, txEnumeratingSongs;
1730     private CTexture txスキル数字;
1731     private CTexture txアイテム数数字;
1732     private ST tx曲名バ;
1733     private ST選曲バ tx選曲バ;
1734 kairera0467 186 private CTexture[] txTumbnail = new CTexture[13];
1735     private CTexture tx選曲パネル;
1736     private CTexture txパネル;
1737     private CTexture txジャケットランダム;
1738     private CTexture txジャケットボックスクロ;
1739     private CTexture tx;
1740     private CTexture tx色帯;
1741     private CTexture txランプ用帯;
1742     private CTexture tx選択されている曲の曲名;
1743     private CTexture tx選択されている曲のアティスト名;
1744     private CTexture txクリアランプ;
1745     //CPrivateFont prvFont;
1746     CPrivateFastFont prvFont;
1747 kairera0467 2
1748     private int nCurrentPosition = 0;
1749     private int nNumOfItems = 0;
1750    
1751     //private string strBoxDefSkinPath = "";
1752     private E種別 e曲のバ種別を返す( C曲リストノ song )
1753     {
1754     if( song != null )
1755     {
1756     switch( song.eド種別 )
1757     {
1758     case C曲リストノ.Eド種別.SCORE:
1759     case C曲リストノ.Eド種別.SCORE_MIDI:
1760     return E種別.Score;
1761    
1762     case C曲リストノ.Eド種別.BOX:
1763     return E種別.Box;
1764 kairera0467 186
1765     case C曲リストノ.Eド種別.BACKBOX:
1766     return E種別.BackBox;
1767    
1768     case C曲リストノ.Eド種別.RANDOM:
1769     return E種別.Random;
1770 kairera0467 2 }
1771     }
1772     return E種別.Other;
1773     }
1774     private C曲リストノ r次の曲( C曲リストノ song )
1775     {
1776     if( song == null )
1777     return null;
1778    
1779     List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
1780    
1781     int index = list.IndexOf( song );
1782    
1783     if( index < 0 )
1784     return null;
1785    
1786     if( index == ( list.Count - 1 ) )
1787     return list[ 0 ];
1788    
1789     return list[ index + 1 ];
1790     }
1791     private C曲リストノ r前の曲( C曲リストノ song )
1792     {
1793     if( song == null )
1794     return null;
1795    
1796     List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r<