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 580 - (hide annotations) (download)
Fri Jan 17 15:52:38 2020 UTC (4 years, 2 months ago) by kairera0467
File size: 122289 byte(s)
#xxxxx trunkのみVisualStudio2019でのビルドに対応
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 kairera0467 197 this.tx選択されている曲の曲名 = null;
246     }
247     if( this.tx選択されている曲のアティスト名 != null )
248     {
249 kairera0467 186 this.tx選択されている曲のアティスト名.Dispose();
250     this.tx選択されている曲のアティスト名 = null;
251     }
252 kairera0467 2 if( ( this.r現在選択中の曲.list子リスト != null ) && ( this.r現在選択中の曲.list子リスト.Count > 0 ) )
253     {
254     this.r現在選択中の曲 = this.r現在選択中の曲.list子リスト[ 0 ];
255     this.t現在選択中の曲を元に曲バを再構成する();
256     this.t選択曲が変更された(false); // #27648 項目数変更を反映させる
257     }
258     return ret;
259     }
260     public bool tBOXを出る()
261     {
262 kairera0467 186 //Trace.TraceInformation( "box exit" );
263     //Trace.TraceInformation( "Skin現在Current : " + CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
264     //Trace.TraceInformation( "Skin現在System : " + CSkin.strSystemSkinSubfolderFullName );
265     //Trace.TraceInformation( "Skin現在BoxDef : " + CSkin.strBoxDefSkinSubfolderFullName );
266     //Trace.TraceInformation( "Skin現在: " + CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) ) );
267     //Trace.TraceInformation( "Skin現pt: " + CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
268     //Trace.TraceInformation( "Skin指定: " + CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) );
269     //Trace.TraceInformation( "Skinpath: " + this.r現在選択中の曲.strSkinPath );
270 kairera0467 2 bool ret = false;
271     if ( CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName( false ) ) != CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath )
272     && CSkin.bUseBoxDefSkin )
273     {
274     ret = true;
275     }
276 kairera0467 186 // スキン変更が発生しなくても、boxdef圏外に出る場合は、boxdefスキン設定の更新が必要
277     // (ユーザーがboxdefスキンをConfig指定している場合への対応のために必要)
278     // tBoxに入る()とは処理が微妙に異なるので注意
279 kairera0467 2 CDTXMania.Skin.SetCurrentSkinSubfolderFullName(
280     ( this.r現在選択中の曲.strSkinPath == "" ) ? "" : CDTXMania.Skin.GetSkinSubfolderFullNameFromSkinName( CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) ), false );
281 kairera0467 186 //Trace.TraceInformation( "SKIN変更: " + CSkin.GetSkinName( CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) ) );
282     //Trace.TraceInformation( "SKIN変更Current : "+ CDTXMania.Skin.GetCurrentSkinSubfolderFullName(false) );
283     //Trace.TraceInformation( "SKIN変更System : "+ CSkin.strSystemSkinSubfolderFullName );
284     //Trace.TraceInformation( "SKIN変更BoxDef : "+ CSkin.strBoxDefSkinSubfolderFullName );
285     if( this.tx選択されている曲の曲名 != null )
286     {
287     this.tx選択されている曲の曲名.Dispose();
288 kairera0467 197 this.tx選択されている曲の曲名 = null;
289     }
290     if( this.tx選択されている曲のアティスト名 != null )
291     {
292 kairera0467 186 this.tx選択されている曲のアティスト名.Dispose();
293     this.tx選択されている曲のアティスト名 = null;
294     }
295     if ( this.r現在選択中の曲.r親ノ != null )
296 kairera0467 2 {
297     this.r現在選択中の曲 = this.r現在選択中の曲.r親ノ;
298     this.t現在選択中の曲を元に曲バを再構成する();
299     this.t選択曲が変更された(false); // #27648 項目数変更を反映させる
300     }
301     return ret;
302     }
303     public void t現在選択中の曲を元に曲バを再構成する()
304     {
305     this.tの初期化();
306 kairera0467 510 for( int i = 0; i < 15; i++ )
307 kairera0467 2 {
308 kairera0467 529 //this.t曲名バーの生成( i, this.stバー情報[ i ].strタイトル文字列, this.stバー情報[ i ].col文字色 );
309 kairera0467 186 this.tティスト名テクスチャの生成( i, this.st情報[ i ].strティスト名 );
310 kairera0467 223 this.tパネルの生成( i, this.st情報[ i ].strタイトル文字列, this.st情報[ i ].strティスト名, this.st情報[ i ].col文字色 );
311 kairera0467 411 if( !this.dicThumbnail.ContainsKey( this.st情報[ i ].strPreimageのパス ) )
312 kairera0467 186 {
313     //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
314 kairera0467 411 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strPreimageのパス, this.st情報[ i ].e種別 );
315     this.dicThumbnail.Add( this.st情報[ i ].strPreimageのパス, this.txTumbnail[ i ] );
316 kairera0467 186 }
317 kairera0467 411 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strPreimageのパス ];
318 kairera0467 2 }
319     }
320     public void t次に移動()
321     {
322     if( this.r現在選択中の曲 != null )
323     {
324     this.n目標のスクロルカウンタ += 100;
325     }
326     }
327     public void t前に移動()
328     {
329     if( this.r現在選択中の曲 != null )
330     {
331     this.n目標のスクロルカウンタ -= 100;
332     }
333     }
334     public void t難易度レベルをひとつ進める()
335     {
336     if( ( this.r現在選択中の曲 == null ) || ( this.r現在選択中の曲.nスコア数 <= 1 ) )
337     return; // 曲にスコアが0~1個しかないなら進める意味なし。
338    
339    
340     // 難易度レベルを+1し、現在選曲中のスコアを変更する。
341    
342     this.n現在のアンカ難易度レベル = this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( this.r現在選択中の曲 );
343    
344     for( int i = 0; i < 5; i++ )
345     {
346     this.n現在のアンカ難易度レベル = ( this.n現在のアンカ難易度レベル + 1 ) % 5; // 5以上になったら0に戻る。
347     if( this.r現在選択中の曲.arスコア[ this.n現在のアンカ難易度レベル ] != null ) // 曲が存在してるならここで終了。存在してないなら次のレベルへGo。
348     break;
349     }
350    
351    
352     // 曲毎に表示しているスキル値を、新しい難易度レベルに合わせて取得し直す。(表示されている13曲全部。)
353    
354     C曲リストノ song = this.r現在選択中の曲;
355     for( int i = 0; i < 5; i++ )
356     song = this.r前の曲( song );
357    
358 kairera0467 510 for( int i = this.n現在の選択行 - 7; i < ( ( this.n現在の選択行 - 7 ) + 15 ); i++ )
359 kairera0467 2 {
360 kairera0467 510 int index = ( i + 15 ) % 15;
361 kairera0467 2 for( int m = 0; m < 3; m++ )
362     {
363     this.st情報[ index ].nスキル値[ m ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ m ];
364     }
365     song = this.r次の曲( song );
366     }
367    
368 kairera0467 186 this.tラベル名からステタスパネルを決定する( this.r現在選択中の曲.ar難易度ラベル[ this.n現在選択中の曲の現在の難易度レベル ] );
369 kairera0467 2
370 kairera0467 186 switch( this.nIndex )
371     {
372     case 2:
373     CDTXMania.Skin.soundNovice.t再生する();
374     string strnov = CSkin.Path( @"Sounds\Novice.ogg" );
375     if( !File.Exists( strnov ) )
376     CDTXMania.Skin.sound変更音.t再生する();
377     break;
378    
379     case 3:
380     CDTXMania.Skin.soundRegular.t再生する();
381     string strreg = CSkin.Path( @"Sounds\Regular.ogg" );
382     if( !File.Exists( strreg ) )
383     CDTXMania.Skin.sound変更音.t再生する();
384     break;
385    
386     case 4:
387     CDTXMania.Skin.soundExpert.t再生する();
388     string strexp = CSkin.Path( @"Sounds\Expert.ogg" );
389     if( !File.Exists( strexp ) )
390     CDTXMania.Skin.sound変更音.t再生する();
391     break;
392    
393     case 5:
394     CDTXMania.Skin.soundMaster.t再生する();
395     string strmas = CSkin.Path( @"Sounds\Master.ogg" );
396     if( !File.Exists( strmas ) )
397     CDTXMania.Skin.sound変更音.t再生する();
398     break;
399    
400     case 6:
401     CDTXMania.Skin.soundBasic.t再生する();
402     string strbsc = CSkin.Path( @"Sounds\Basic.ogg" );
403     if( !File.Exists( strbsc ) )
404     CDTXMania.Skin.sound変更音.t再生する();
405     break;
406    
407     case 7:
408     CDTXMania.Skin.soundAdvanced.t再生する();
409     string stradv = CSkin.Path( @"Sounds\Advanced.ogg" );
410     if( !File.Exists( stradv ) )
411     CDTXMania.Skin.sound変更音.t再生する();
412     break;
413    
414     case 8:
415     CDTXMania.Skin.soundExtreme.t再生する();
416     string strext = CSkin.Path( @"Sounds\Extreme.ogg" );
417     if( !File.Exists( strext ) )
418     CDTXMania.Skin.sound変更音.t再生する();
419     break;
420    
421     default:
422     CDTXMania.Skin.sound変更音.t再生する();
423     break;
424     }
425    
426 kairera0467 2 // 選曲ステージに変更通知を発出し、関係Activityの対応を行ってもらう。
427    
428     CDTXMania.stage選曲.t選択曲変更通知();
429     }
430    
431 kairera0467 186
432     public void tラベル名からステタスパネルを決定する(string strラベル名)
433     {
434     if (string.IsNullOrEmpty(strラベル名))
435     {
436     this.nIndex = 0;
437     }
438     else
439     {
440     STATUSPANEL[] array = this.stパネルマップ;
441     for (int i = 0; i < array.Length; i++)
442     {
443     STATUSPANEL sTATUSPANEL = array[i];
444     if (strラベル名.Equals(sTATUSPANEL.label, StringComparison.CurrentCultureIgnoreCase))
445     {
446     this.nIndex = sTATUSPANEL.status;
447     return;
448     }
449     this.nIndex++;
450     }
451     }
452     }
453 kairera0467 2
454     /// <summary>
455     /// 曲リストをリセットする
456     /// </summary>
457     /// <param name="cs"></param>
458     public void Refresh(CSongs管理 cs, bool bRemakeSongTitleBar ) // #26070 2012.2.28 yyagi
459     {
460     // this.On非活性化();
461    
462     if ( cs != null && cs.list曲ル.Count > 0 ) // 新しい曲リストを検索して、1曲以上あった
463     {
464     CDTXMania.Songs管理 = cs;
465    
466     if ( this.r現在選択中の曲 != null ) // r現在選択中の曲==null とは、「最初songlist.dbが無かった or 検索したが1曲もない」
467     {
468     this.r現在選択中の曲 = searchCurrentBreadcrumbsPosition( CDTXMania.Songs管理.list曲ル, this.r現在選択中の曲.strBreadcrumbs );
469     if ( bRemakeSongTitleBar ) // 選曲画面以外に居るときには再構成しない (非活性化しているときに実行すると例外となる)
470     {
471     this.t現在選択中の曲を元に曲バを再構成する();
472     }
473     #if false // list子リストの中まではmatchしてくれないので、検索ロジックは手書きで実装 (searchCurrentBreadcrumbs())
474     string bc = this.r現在選択中の曲.strBreadcrumbs;
475     Predicate<C曲リストノ> match = delegate( C曲リストノ c )
476     {
477     return ( c.strBreadcrumbs.Equals( bc ) );
478     };
479     int nMatched = CDTXMania.Songs管理.list曲ル.FindIndex( match );
480    
481     this.r現在選択中の曲 = ( nMatched == -1 ) ? null : CDTXMania.Songs管理.list曲ル[ nMatched ];
482     this.t現在選択中の曲を元に曲バを再構成する();
483     #endif
484     return;
485     }
486     }
487     this.On非活性化();
488     this.r現在選択中の曲 = null;
489 kairera0467 574 //this.On活性化();
490     #region[ 再度活性化処理を行う ]
491     this.b登場アニメ全部完了 = false;
492     this.n目標のスクロルカウンタ = 0;
493     this.n現在のスクロルカウンタ = 0;
494     this.nスクロルタイマ = -1;
495 kairera0467 2
496 kairera0467 574 // フォント作成。
497     // 曲リスト文字は2倍(面積4倍)でテクスチャに描画してから縮小表示するので、フォントサイズは2倍とする。
498     if( this.ft曲リスト用フォント == null )
499     {
500     FontStyle regular = FontStyle.Regular;
501     if( CDTXMania.ConfigIni.b選曲リストフォントを太字にする ) regular |= FontStyle.Bold;
502     this.ft曲リスト用フォント = new Font( CDTXMania.ConfigIni.str選曲リストフォント, (float) ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot * 2 ), regular, GraphicsUnit.Pixel );
503     //this.prvFont = new CPrivateFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );
504     }
505 kairera0467 2
506 kairera0467 574 if( ( this.r現在選択中の曲 == null ) && ( CDTXMania.Songs管理.list曲ル.Count > 0 ) )
507     this.r現在選択中の曲 = CDTXMania.Songs管理.list曲ル[ 0 ];
508     if( CDTXMania.r現在のステ.eステID == CStage.Eステ.選曲 )
509     this.tの初期化();
510    
511     //base.On活性化();
512    
513     this.t選択曲が変更された(true); // #27648 2012.3.31 yyagi 選曲画面に入った直後の 現在位置/全アイテム数 の表示を正しく行うため
514     #endregion
515     }
516    
517    
518 kairera0467 2 /// <summary>
519     /// 現在選曲している位置を検索する
520     /// (曲一覧クラスを新しいものに入れ替える際に用いる)
521     /// </summary>
522     /// <param name="ln">検索対象のList</param>
523     /// <param name="bc">検索するパンくずリスト(文字列)</param>
524     /// <returns></returns>
525     private C曲リストノ searchCurrentBreadcrumbsPosition( List<C曲リストノ> ln, string bc )
526     {
527     foreach (C曲リストノ n in ln)
528     {
529     if ( n.strBreadcrumbs == bc )
530     {
531     return n;
532     }
533     else if ( n.list子リスト != null && n.list子リスト.Count > 0 ) // 子リストが存在するなら、再帰で探す
534     {
535     C曲リストノ r = searchCurrentBreadcrumbsPosition( n.list子リスト, bc );
536     if ( r != null ) return r;
537     }
538     }
539     return null;
540     }
541    
542     /// <summary>
543     /// BOXのアイテム数と、今何番目を選択しているかをセットする
544     /// </summary>
545     public void t選択曲が変更された( bool bForce ) // #27648
546     {
547     C曲リストノ song = CDTXMania.stage選曲.r現在選択中の曲;
548     if ( song == null )
549     return;
550     if ( song == song_last && bForce == false )
551     return;
552    
553     song_last = song;
554     List<C曲リストノ> list = ( song.r親ノ != null ) ? song.r親ノ.list子リスト : CDTXMania.Songs管理.list曲ル;
555     int index = list.IndexOf( song ) + 1;
556     if ( index <= 0 )
557     {
558     nCurrentPosition = nNumOfItems = 0;
559     }
560     else
561     {
562     nCurrentPosition = index;
563     nNumOfItems = list.Count;
564     }
565 kairera0467 199
566     if( this.tx選択されている曲の曲名 != null )
567     {
568     this.tx選択されている曲の曲名.Dispose();
569     this.tx選択されている曲の曲名 = null;
570     }
571     if( this.tx選択されている曲のアティスト名 != null )
572     {
573     this.tx選択されている曲のアティスト名.Dispose();
574     this.tx選択されている曲のアティスト名 = null;
575     }
576 kairera0467 2 }
577    
578     // CActivity 実装
579    
580     public override void On活性化()
581     {
582     if( this.b活性化してる )
583     return;
584    
585     this.b登場アニメ全部完了 = false;
586     this.n目標のスクロルカウンタ = 0;
587     this.n現在のスクロルカウンタ = 0;
588     this.nスクロルタイマ = -1;
589    
590     // フォント作成。
591     // 曲リスト文字は2倍(面積4倍)でテクスチャに描画してから縮小表示するので、フォントサイズは2倍とする。
592 kairera0467 574 if( this.ft曲リスト用フォント == null )
593     {
594     FontStyle regular = FontStyle.Regular;
595     if( CDTXMania.ConfigIni.b選曲リストフォントを太字にする ) regular |= FontStyle.Bold;
596     this.ft曲リスト用フォント = new Font( CDTXMania.ConfigIni.str選曲リストフォント, (float) ( CDTXMania.ConfigIni.n選曲リストフォントのサイズdot * 2 ), regular, GraphicsUnit.Pixel );
597     //this.prvFont = new CPrivateFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );
598     }
599 kairera0467 2
600     // 現在選択中の曲がない(=はじめての活性化)なら、現在選択中の曲をルートの先頭ノードに設定する。
601    
602     if( ( this.r現在選択中の曲 == null ) && ( CDTXMania.Songs管理.list曲ル.Count > 0 ) )
603     this.r現在選択中の曲 = CDTXMania.Songs管理.list曲ル[ 0 ];
604    
605    
606     // バー情報を初期化する。
607    
608     this.tの初期化();
609    
610     base.On活性化();
611    
612     this.t選択曲が変更された(true); // #27648 2012.3.31 yyagi 選曲画面に入った直後の 現在位置/全アイテム数 の表示を正しく行うため
613     }
614     public override void On非活性化()
615     {
616     if( this.b活性化してない )
617     return;
618    
619     CDTXMania.t安全にDisposeする( ref this.ft曲リスト用フォント );
620 kairera0467 197 if( this.prvFont != null )
621     this.prvFont.Dispose();
622 kairera0467 2
623 kairera0467 510 for( int i = 0; i < 15; i++ )
624 kairera0467 2 this.ct登場アニメ用[ i ] = null;
625    
626     base.On非活性化();
627     }
628     public override void OnManagedリソスの作成()
629     {
630     if( this.b活性化してない )
631     return;
632    
633 kairera0467 574 if ( this.tx選曲パネル == null && CDTXMania.ConfigIni.bDrums有効 )
634     this.tx選曲パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_image_panel.png" ) );
635     else if( this.tx選曲パネル == null && CDTXMania.ConfigIni.bGuitar有効 )
636     this.tx選曲パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_image_panel_guitar.png" ) );
637 ron1120 248
638 kairera0467 186 this.txパネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_music panel.png"));
639 kairera0467 494 //this.tx帯 = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\5_backpanel.png" ) );
640     this.txパネル帯 = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\5_Backbar.png" ) );
641     //this.tx色帯 = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\5_ColorBar.png" ) );
642     //this.txランプ用帯 = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_lamppanel.png" ));
643 kairera0467 197
644 kairera0467 186 this.txクリアランプ = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\5_Clearlamp.png") );
645     #region[ テクスチャの復元 ]
646     int nKeys = this.dicThumbnail.Count;
647     string[] keys = new string[ nKeys ];
648     this.dicThumbnail.Keys.CopyTo( keys, 0 );
649     foreach (var key in keys)
650     this.dicThumbnail[ key ] = this.tパスを指定してサムネイル画像を生成して返す( 0, key, this.st情報[ 0 ].e種別 );;
651 kairera0467 2
652 kairera0467 186 //ここは最初に表示される画像の復元に必要。
653 kairera0467 510 for (int i = 0; i < 15; i++)
654 kairera0467 186 {
655 kairera0467 529 //this.t曲名バーの生成(i, this.stバー情報[i].strタイトル文字列, this.stバー情報[i].col文字色);
656 kairera0467 186 this.tティスト名テクスチャの生成( i, this.st情報[ i ].strティスト名 );
657 kairera0467 574 //this.tパネルの生成( i, this.stバー情報[ i ].strタイトル文字列, this.stバー情報[ i ].strアーティスト名, this.stバー情報[ i ].col文字色 );
658 kairera0467 186 //this.tパスを指定してサムネイル画像を生成する(i, this.stバー情報[i].strDTXフォルダのパス, this.stバー情報[i].eバー種別);
659 kairera0467 411 if( this.st情報[ i ].strPreimageのパス != null )
660 kairera0467 186 {
661 kairera0467 411 if( !this.dicThumbnail.ContainsKey( this.st情報[ i ].strPreimageのパス ) )
662 kairera0467 186 {
663     //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
664 kairera0467 411 this.tパスを指定してサムネイル画像を生成する( i, this.st情報[ i ].strPreimageのパス, this.st情報[ i ].e種別 );
665     this.dicThumbnail.Add( this.st情報[ i ].strPreimageのパス, this.txTumbnail[ i ] );
666 kairera0467 186 }
667 kairera0467 411 txTumbnail[ i ] = this.dicThumbnail[ this.st情報[ i ].strPreimageのパス ];
668 kairera0467 186 }
669     }
670     #endregion
671    
672    
673 kairera0467 2 int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1;
674     #region [ Songs not found画像 ]
675     try
676     {
677     using( Bitmap image = new Bitmap( 640, 128 ) )
678     using( Graphics graphics = Graphics.FromImage( image ) )
679     {
680     string[] s1 = { "曲データが見つかりません。", "Songs not found." };
681     string[] s2 = { "曲データをDTXManiaGR.exe以下の", "You need to install songs." };
682     string[] s3 = { "フォルダにインストールして下さい。", "" };
683     graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 2f );
684     graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 0f );
685     graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 44f );
686     graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 42f );
687     graphics.DrawString( s3[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 86f );
688     graphics.DrawString( s3[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 84f );
689    
690     this.txSongNotFound = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
691    
692     this.txSongNotFound.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); // 半分のサイズで表示する。
693     }
694     }
695     catch( CTextureCreateFailedException )
696     {
697     Trace.TraceError( "SoungNotFoundテクスチャの作成に失敗しました。" );
698     this.txSongNotFound = null;
699     }
700     #endregion
701     #region [ "曲データを検索しています"画像 ]
702     try
703     {
704 kairera0467 186 using ( Bitmap image = new Bitmap( 640, 96 ) )
705 kairera0467 2 using ( Graphics graphics = Graphics.FromImage( image ) )
706     {
707     string[] s1 = { "曲データを検索しています。", "Now enumerating songs." };
708     string[] s2 = { "そのまましばらくお待ち下さい。", "Please wait..." };
709     graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 2f );
710     graphics.DrawString( s1[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 0f );
711     graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.DarkGray, (float) 2f, (float) 44f );
712     graphics.DrawString( s2[c], this.ft曲リスト用フォント, Brushes.White, (float) 0f, (float) 42f );
713    
714     this.txEnumeratingSongs = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
715    
716     this.txEnumeratingSongs.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f ); // 半分のサイズで表示する。
717     }
718     }
719     catch ( CTextureCreateFailedException )
720     {
721     Trace.TraceError( "txEnumeratingSongsテクスチャの作成に失敗しました。" );
722     this.txEnumeratingSongs = null;
723     }
724     #endregion
725     #region [ 曲数表示 ]
726 ron1120 351 this.txアイテム数数字 = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_skill number on gauge etc.png"), false);
727 kairera0467 2 #endregion
728 kairera0467 186
729     base.OnManagedリソスの作成();
730 kairera0467 2 }
731     public override void OnManagedリソスの解放()
732     {
733     if( this.b活性化してない )
734     return;
735    
736     CDTXMania.t安全にDisposeする( ref this.txアイテム数数字 );
737    
738 kairera0467 510 for ( int i = 0; i < 15; i++ )
739 kairera0467 186 {
740 kairera0467 574 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txパネル );
741 kairera0467 186 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txタイトル名 );
742     CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txティスト名 );
743 kairera0467 412 CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txカスタム曲名テクスチャ );
744     CDTXMania.t安全にDisposeする( ref this.st情報[ i ].txカスタムアティスト名テクスチャ );
745 kairera0467 186 }
746 kairera0467 2
747 kairera0467 569 CDTXMania.tテクスチャの解放( ref this.tx選択されている曲の曲名 );
748     CDTXMania.tテクスチャの解放( ref this.tx選択されている曲のアティスト名 );
749 kairera0467 186 #region[ ジャケット画像の解放 ]
750     int nKeys = this.dicThumbnail.Count;
751     string[] keys = new string[ nKeys ];
752     this.dicThumbnail.Keys.CopyTo( keys, 0 );
753     foreach( var key in keys )
754     {
755 kairera0467 569 C共通.tDisposeする( this.dicThumbnail[ key ] );
756 kairera0467 186 this.dicThumbnail[ key ] = null;
757     }
758 kairera0467 569 if( CDTXMania.ConfigIni.bJacketDicClear )
759     this.dicThumbnail.Clear();
760 kairera0467 186 #endregion
761    
762 kairera0467 2 CDTXMania.t安全にDisposeする( ref this.txEnumeratingSongs );
763     CDTXMania.t安全にDisposeする( ref this.txSongNotFound );
764 kairera0467 186 CDTXMania.t安全にDisposeする( ref this.tx選曲パネル );
765     CDTXMania.t安全にDisposeする( ref this.txパネル );
766     CDTXMania.t安全にDisposeする( ref this.txクリアランプ );
767 kairera0467 494 //CDTXMania.t安全にDisposeする( ref this.tx帯 );
768     CDTXMania.t安全にDisposeする( ref this.txパネル帯 );
769     //CDTXMania.t安全にDisposeする( ref this.tx色帯 );
770     //CDTXMania.t安全にDisposeする( ref this.txランプ用帯 );
771 kairera0467 2
772     base.OnManagedリソスの解放();
773     }
774     public override int On進行描画()
775     {
776     if( this.b活性化してない )
777     return 0;
778    
779     #region [ 初めての進行描画 ]
780     //-----------------
781     if( this.b初めての進行描画 )
782     {
783 kairera0467 510 for( int i = 0; i < 15; i++ )
784 kairera0467 2 this.ct登場アニメ用[ i ] = new CCounter( -i * 10, 100, 3, CDTXMania.Timer );
785    
786     this.nスクロルタイマ = CSound管理.rc演奏用タイマ.n現在時刻;
787     CDTXMania.stage選曲.t選択曲変更通知();
788    
789     base.b初めての進行描画 = false;
790     }
791     //-----------------
792     #endregion
793    
794    
795     // まだ選択中の曲が決まってなければ、曲ツリールートの最初の曲にセットする。
796    
797     if( ( this.r現在選択中の曲 == null ) && ( CDTXMania.Songs管理.list曲ル.Count > 0 ) )
798     this.r現在選択中の曲 = CDTXMania.Songs管理.list曲ル[ 0 ];
799    
800    
801     // 本ステージは、(1)登場アニメフェーズ → (2)通常フェーズ と二段階にわけて進む。
802     // 2つしかフェーズがないので CStage.eフェーズID を使ってないところがまた本末転倒。
803    
804    
805     // 進行。
806    
807     if( !this.b登場アニメ全部完了 )
808     {
809     #region [ (1) 登場アニメフェーズの進行。]
810     //-----------------
811 kairera0467 510 for( int i = 0; i < 15; i++ ) // パネルは全13枚。
812 kairera0467 2 {
813     this.ct登場アニメ用[ i ].t進行();
814    
815     if( this.ct登場アニメ用[ i ].b終了値に達した )
816     this.ct登場アニメ用[ i ].t停止();
817     }
818    
819     // 全部の進行が終わったら、this.b登場アニメ全部完了 を true にする。
820    
821     this.b登場アニメ全部完了 = true;
822 kairera0467 510 for( int i = 0; i < 15; i++ ) // パネルは全13枚。
823 kairera0467 2 {
824     if( this.ct登場アニメ用[ i ].b進行中 )
825     {
826     this.b登場アニメ全部完了 = false; // まだ進行中のアニメがあるなら false のまま。
827     break;
828     }
829     }
830     //-----------------
831     #endregion
832     }
833     else
834     {
835     #region [ (2) 通常フェーズの進行。]
836     //-----------------
837 kairera0467 186 long n現在時刻 = CSound管理.rc演奏用タイマ.n現在時刻;
838 kairera0467 2
839     if( n現在時刻 < this.nスクロルタイマ ) // 念のため
840     this.nスクロルタイマ = n現在時刻;
841    
842     const int nアニメ間隔 = 2;
843     while( ( n現在時刻 - this.nスクロルタイマ ) >= nアニメ間隔 )
844     {
845     int n加速度 = 1;
846     int n残距離 = Math.Abs( (int) ( this.n目標のスクロルカウンタ - this.n現在のスクロルカウンタ ) );
847    
848     #region [ 残距離が遠いほどスクロールを速くする(=n加速度を多くする)。]
849     //-----------------
850     if( n残距離 <= 100 )
851     {
852     n加速度 = 2;
853     }
854     else if( n残距離 <= 300 )
855     {
856     n加速度 = 3;
857     }
858     else if( n残距離 <= 500 )
859     {
860     n加速度 = 4;
861     }
862     else
863     {
864     n加速度 = 8;
865     }
866     //-----------------
867     #endregion
868    
869     #region [ 加速度を加算し、現在のスクロールカウンタを目標のスクロールカウンタまで近づける。 ]
870     //-----------------
871     if( this.n現在のスクロルカウンタ < this.n目標のスクロルカウンタ ) // (A) 正の方向に未達の場合:
872     {
873     this.n現在のスクロルカウンタ += n加速度; // カウンタを正方向に移動する。
874    
875     if( this.n現在のスクロルカウンタ > this.n目標のスクロルカウンタ )
876     this.n現在のスクロルカウンタ = this.n目標のスクロルカウンタ; // 到着!スクロール停止!
877     }
878    
879     else if( this.n現在のスクロルカウンタ > this.n目標のスクロルカウンタ ) // (B) 負の方向に未達の場合:
880     {
881     this.n現在のスクロルカウンタ -= n加速度; // カウンタを負方向に移動する。
882    
883     if( this.n現在のスクロルカウンタ < this.n目標のスクロルカウンタ ) // 到着!スクロール停止!
884     this.n現在のスクロルカウンタ = this.n目標のスクロルカウンタ;
885     }
886     //-----------------
887     #endregion
888    
889     if( this.n現在のスクロルカウンタ >= 100 ) // 1行=100カウント。
890     {
891     #region [ パネルを1行上にシフトする。]
892     //-----------------
893    
894     // 選択曲と選択行を1つ下の行に移動。
895    
896     this.r現在選択中の曲 = this.r次の曲( this.r現在選択中の曲 );
897 kairera0467 510 this.n現在の選択行 = ( this.n現在の選択行 + 1 ) % 15;
898 kairera0467 2
899     // 選択曲から7つ下のパネル(=新しく最下部に表示されるパネル。消えてしまう一番上のパネルを再利用する)に、新しい曲の情報を記載する。
900    
901     C曲リストノ song = this.r現在選択中の曲;
902     for( int i = 0; i < 7; i++ )
903     song = this.r次の曲( song );
904    
905 kairera0467 510 int index = ( this.n現在の選択行 + 7 ) % 15; // 新しく最下部に表示されるパネルのインデックス(0~12)。
906 kairera0467 2 this.st情報[ index ].strタイトル文字列 = song.strタイトル;
907 kairera0467 186 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.ティスト名;
908 kairera0467 2 this.st情報[ index ].col文字色 = song.col文字色;
909 kairera0467 411 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス;
910     this.st情報[ index ].strPreimageのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
911 kairera0467 529 //this.t曲名バーの生成( index, this.stバー情報[ index ].strタイトル文字列, this.stバー情報[ index ].col文字色 );
912 kairera0467 186 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
913 kairera0467 223 this.tパネルの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].strティスト名, this.st情報[ index ].col文字色 );
914 kairera0467 2
915 kairera0467 411 if( !this.dicThumbnail.ContainsKey( this.st情報[ index ].strPreimageのパス ) )
916 kairera0467 186 {
917     //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
918 kairera0467 411 this.tパスを指定してサムネイル画像を生成する( index, this.st情報[ index ].strPreimageのパス, this.st情報[ index ].e種別 );
919     this.dicThumbnail.Add( this.st情報[ index ].strPreimageのパス, this.txTumbnail[ index ] );
920 kairera0467 186 }
921 kairera0467 411 txTumbnail[ index ] = this.dicThumbnail[ this.st情報[ index ].strPreimageのパス ];
922 kairera0467 2
923 kairera0467 186
924 kairera0467 2 // stバー情報[] の内容を1行ずつずらす。
925    
926     C曲リストノ song2 = this.r現在選択中の曲;
927 kairera0467 510 for( int i = 0; i < 7; i++ )
928 kairera0467 2 song2 = this.r前の曲( song2 );
929    
930 kairera0467 510 for( int i = 0; i < 15; i++ )
931 kairera0467 2 {
932 kairera0467 510 int n = ( ( ( this.n現在の選択行 - 7 ) + i ) + 15 ) % 15;
933 kairera0467 2 this.st情報[ n ].e種別 = this.e曲のバ種別を返す( song2 );
934     song2 = this.r次の曲( song2 );
935     }
936    
937    
938     // 新しく最下部に表示されるパネル用のスキル値を取得。
939    
940     for( int i = 0; i < 3; i++ )
941     this.st情報[ index ].nスキル値[ i ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ i ];
942    
943     // 1行(100カウント)移動完了。
944    
945     this.n現在のスクロルカウンタ -= 100;
946     this.n目標のスクロルカウンタ -= 100;
947    
948 kairera0467 199 this.t選択曲が変更された( false ); // スクロールバー用に今何番目を選択しているかを更新
949 kairera0467 574 CDTXMania.t安全にDisposeする( ref this.tx選択されている曲の曲名 );
950     CDTXMania.t安全にDisposeする( ref this.tx選択されている曲のアティスト名 );
951 kairera0467 2
952     if( this.n目標のスクロルカウンタ == 0 )
953     CDTXMania.stage選曲.t選択曲変更通知(); // スクロール完了=選択曲変更!
954    
955     //-----------------
956     #endregion
957     }
958     else if( this.n現在のスクロルカウンタ <= -100 )
959     {
960     #region [ パネルを1行下にシフトする。]
961     //-----------------
962    
963     // 選択曲と選択行を1つ上の行に移動。
964    
965     this.r現在選択中の曲 = this.r前の曲( this.r現在選択中の曲 );
966 kairera0467 510 this.n現在の選択行 = ( ( this.n現在の選択行 - 1 ) + 15 ) % 15;
967 kairera0467 2
968     // 選択曲から5つ上のパネル(=新しく最上部に表示されるパネル。消えてしまう一番下のパネルを再利用する)に、新しい曲の情報を記載する。
969    
970     C曲リストノ song = this.r現在選択中の曲;
971 kairera0467 510 for( int i = 0; i < 7; i++ )
972 kairera0467 2 song = this.r前の曲( song );
973    
974 kairera0467 510 int index = ( ( this.n現在の選択行 - 7 ) + 15 ) % 15; // 新しく最上部に表示されるパネルのインデックス(0~12)。
975 kairera0467 2 this.st情報[ index ].strタイトル文字列 = song.strタイトル;
976 kairera0467 186 this.st情報[ index ].strティスト名 = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(song) ].譜面情報.ティスト名;
977 kairera0467 2 this.st情報[ index ].col文字色 = song.col文字色;
978 kairera0467 411 this.st情報[ index ].strDTXフォルダのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス;
979     this.st情報[ index ].strPreimageのパス = song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].ファイル情報.フォルダの絶対パス + song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.Preimage;
980 kairera0467 529 //this.t曲名バーの生成( index, this.stバー情報[ index ].strタイトル文字列, this.stバー情報[ index ].col文字色 );
981 kairera0467 186 this.tティスト名テクスチャの生成( index, this.st情報[ index ].strティスト名 );
982 kairera0467 223 this.tパネルの生成( index, this.st情報[ index ].strタイトル文字列, this.st情報[ index ].strティスト名, this.st情報[ index ].col文字色 );
983 kairera0467 2
984 kairera0467 411 if( !this.dicThumbnail.ContainsKey( this.st情報[ index ].strPreimageのパス ) )
985 kairera0467 186 {
986     //txTumbnail = this.tサムネイルテクスチャを作成する( Path.GetDirectoryName( song.ScoreFile ) );
987 kairera0467 411 this.tパスを指定してサムネイル画像を生成する( index, this.st情報[ index ].strPreimageのパス, this.st情報[ index ].e種別 );
988     this.dicThumbnail.Add( this.st情報[ index ].strPreimageのパス, this.txTumbnail[ index ] );
989 kairera0467 186 }
990 kairera0467 411 txTumbnail[ index ] = this.dicThumbnail[ this.st情報[ index ].strPreimageのパス ];
991 kairera0467 2
992 kairera0467 186
993 kairera0467 2 // stバー情報[] の内容を1行ずつずらす。
994    
995     C曲リストノ song2 = this.r現在選択中の曲;
996 kairera0467 510 for( int i = 0; i < 7; i++ )
997 kairera0467 2 song2 = this.r前の曲( song2 );
998    
999 kairera0467 510 for( int i = 0; i < 15; i++ )
1000 kairera0467 2 {
1001 kairera0467 510 int n = ( ( ( this.n現在の選択行 - 7 ) + i ) + 15 ) % 15;
1002 kairera0467 2 this.st情報[ n ].e種別 = this.e曲のバ種別を返す( song2 );
1003     song2 = this.r次の曲( song2 );
1004     }
1005    
1006    
1007     // 新しく最上部に表示されるパネル用のスキル値を取得。
1008    
1009     for( int i = 0; i < 3; i++ )
1010     this.st情報[ index ].nスキル値[ i ] = (int) song.arスコア[ this.n現在のアンカ難易度レベルに最も近い難易度レベルを返す( song ) ].譜面情報.最大スキル[ i ];
1011    
1012    
1013     // 1行(100カウント)移動完了。
1014    
1015     this.n現在のスクロルカウンタ += 100;
1016     this.n目標のスクロルカウンタ += 100;
1017    
1018 kairera0467 186
1019     this.t選択曲が変更された( false ); // スクロールバー用に今何番目を選択しているかを更新
1020 kairera0467 574 CDTXMania.t安全にDisposeする( ref this.tx選択されている曲の曲名 );
1021     CDTXMania.t安全にDisposeする( ref this.tx選択されている曲のアティスト名 );
1022 kairera0467 2
1023     if( this.n目標のスクロルカウンタ == 0 )
1024     CDTXMania.stage選曲.t選択曲変更通知(); // スクロール完了=選択曲変更!
1025     //-----------------
1026     #endregion
1027     }
1028    
1029     this.nスクロルタイマ += nアニメ間隔;
1030     }
1031     //-----------------
1032     #endregion
1033     }
1034    
1035    
1036     // 描画。
1037    
1038     if( this.r現在選択中の曲 == null )
1039     {
1040     #region [ 曲が1つもないなら「Songs not found.」を表示してここで帰れ。]
1041     //-----------------
1042     if ( bIsEnumeratingSongs )
1043     {
1044     if ( this.txEnumeratingSongs != null )
1045     {
1046 kairera0467 203 this.txEnumeratingSongs.t2D描画( CDTXMania.app.Device, 530, 240 );
1047 kairera0467 2 }
1048     }
1049     else
1050     {
1051     if ( this.txSongNotFound != null )
1052 kairera0467 203 this.txSongNotFound.t2D描画( CDTXMania.app.Device, 500, 190 );
1053 kairera0467 2 }
1054     //-----------------
1055     #endregion
1056    
1057     return 0;
1058     }
1059 kairera0467 186 var bar = SlimDX.Matrix.Identity;
1060 kairera0467 494
1061 kairera0467 186 var barL = SlimDX.Matrix.Identity;
1062 kairera0467 2
1063 kairera0467 494 Matrix[] barC = new Matrix[2];
1064     Matrix[] barLa = new Matrix[2];
1065     Matrix[] barU = new Matrix[2];
1066 kairera0467 186
1067 kairera0467 494 #region[ビルボードの実験コード。「ここでするなよ...」とか言わないであげて...]
1068     //Z座標はプラス方向にすると動かなくなるので注意。
1069    
1070     //共通
1071     Vector3 VecCam = new Vector3( 0.0f, 0.0f, -1.0f ); //Zをマイナス方向にしないと描画されない(?)
1072     Vector3 VecTarg = new Vector3( 0.0f, 0.0f, 0.0f );
1073     Vector3 VecUp = new Vector3( 0.0f, 1.0f, 0.0f );
1074    
1075     bar *= SlimDX.Matrix.LookAtLH( VecCam, VecTarg, VecUp );
1076     barL *= SlimDX.Matrix.LookAtLH( VecCam, VecTarg, VecUp );
1077    
1078     bar *= SlimDX.Matrix.RotationYawPitchRoll( -0.40f, 0.0f, 0.0f ); ////通常のRotationと何が違うのかわからない(Axisから倍率を抜いただけ?)
1079     barL *= SlimDX.Matrix.RotationYawPitchRoll( 0.40f, 0.0f, 0.0f );
1080    
1081    
1082     //bar *= SlimDX.Matrix.PerspectiveFovLH( C変換.DegreeToRadian(45), 1280.0f/720.0f, 1.0f, 500000.0f ); //カメラの視野角など調整
1083    
1084     //ワールド変換とか意味ワカンネ
1085     #endregion
1086    
1087     //bar *= SlimDX.Matrix.RotationY(-0.415f);
1088     //barL *= SlimDX.Matrix.RotationY(0.415f);
1089     //bar *= SlimDX.Matrix.Translation(540f, 20f, -24f);
1090     bar *= SlimDX.Matrix.Translation(600f, 121f, 190f);
1091     barL *= SlimDX.Matrix.Translation(-600f, 121f, 190f);
1092     //barL *= SlimDX.Matrix.Translation(-540f, 20f, -24f);
1093     //bar *= SlimDX.Matrix.Scaling(1.0f, 0.65f, 1.0f);
1094     //bar *= SlimDX.Matrix.Scaling( 1.0f, 1.0f, 1.0f );
1095     //barL *= SlimDX.Matrix.Scaling(1.0f, 0.65f, 1.0f);
1096    
1097     //bar *= SlimDX.Matrix.RotationAxis( new Vector3( 0f, -0.415f, 0f ), 0.5f );
1098    
1099     for( int i = 0; i < 2; i++ )
1100     {
1101     float fRate = 1.0f;
1102     if( i == 0 ) fRate = -1.0f;
1103    
1104     barC[ i ] = Matrix.Identity;
1105     barC[ i ] *= SlimDX.Matrix.LookAtLH( VecCam, VecTarg, VecUp );
1106     barC[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( -0.41f * fRate, 0.0f, 0.0f );
1107     barC[ i ] *= SlimDX.Matrix.Translation( 592f * fRate, 148f, 186f);
1108    
1109     barLa[ i ] = Matrix.Identity;
1110     barLa[ i ] *= SlimDX.Matrix.LookAtLH( VecCam, VecTarg, VecUp );
1111     barLa[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( -0.41f * fRate, 0.0f, 0.0f );
1112     barLa[ i ] *= SlimDX.Matrix.Translation( 592f * fRate, 100f, 186f);
1113    
1114     barU[ i ] = Matrix.Identity;
1115     barU[ i ] *= SlimDX.Matrix.LookAtLH( VecCam, VecTarg, VecUp );
1116     barU[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( -0.41f * fRate, 0.0f, 0.0f );
1117     barU[ i ] *= SlimDX.Matrix.Translation( 592f * fRate, -106f, 186f);
1118     }
1119    
1120 kairera0467 526 if( this.txパネル帯 != null )
1121     {
1122     this.txパネル帯.t3D描画( CDTXMania.app.Device, barU[ 0 ], new Rectangle( 2, 74, 1000, 30 ) );
1123     this.txパネル帯.t3D描画( CDTXMania.app.Device, barU[ 1 ], new Rectangle( 2, 74, 1000, 30 ) );
1124     this.txパネル帯.t3D描画( CDTXMania.app.Device, bar, new Rectangle( 2, 38, 1000, 30 ) ); //右の帯。
1125     this.txパネル帯.t3D描画( CDTXMania.app.Device, barL, new Rectangle( 2, 38, 1000, 30 ) ); //左の帯。
1126     //this.tx帯.t3D描画(CDTXMania.app.Device, barL); //左の帯。
1127     //this.txパネル帯.n透明度 = 155 + this.ct登場アニメ用[10].n現在の値;
1128     this.txパネル帯.t3D描画( CDTXMania.app.Device, barC[ 0 ], new Rectangle( 2, 2, 1000, 30 ) );
1129     this.txパネル帯.t3D描画( CDTXMania.app.Device, barC[ 1 ], new Rectangle( 2, 2, 1000, 30 ) );
1130     }
1131 kairera0467 494
1132 kairera0467 186 #region [ デバッグ補助 ]
1133     //-----------------
1134     /*
1135     stマトリックス座標 = new ST中心点[] {
1136 kairera0467 431 new ST中心点() { x = -980.0000f, y = 4f, z = 350f, rotY = 0.4000f },
1137     new ST中心点() { x = -780.0000f, y = 4f, z = 264f, rotY = 0.4000f },
1138     new ST中心点() { x = -590.0000f, y = 4f, z = 174f, rotY = 0.4000f },
1139     new ST中心点() { x = -400.0000f, y = 4f, z = 92f, rotY = 0.4000f },
1140     new ST中心点() { x = -210.0000f, y = 4f, z = 10f, rotY = 0.4000f },
1141 kairera0467 186 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1142 kairera0467 431 new ST中心点() { x = 210.0000f, y = 2f, z = 10f, rotY = -0.4000f },
1143     new ST中心点() { x = 400.0000f, y = 2f, z = 92f, rotY = -0.4f },
1144     new ST中心点() { x = 590.0000f, y = 2f, z = 174f, rotY = -0.4f },
1145     new ST中心点() { x = 780.0000f, y = 2f, z = 264f, rotY = -0.4f },
1146     new ST中心点() { x = 980.0000f, y = 2f, z = 350f, rotY = -0.4f },
1147     new ST中心点() { x = 1200.0000f, y = 2f, z = 450f, rotY = -0.4f },
1148     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1149     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1150 kairera0467 186 };
1151     */
1152     //-----------------
1153     #endregion
1154    
1155 kairera0467 494 #region[ ジャケット画像のMatrix配列 ]
1156     //パネル1枚1枚にMatrixを割り当ててみる。
1157     //とりあえず構造の最適化無しで地味に作ってみる。
1158 kairera0467 510 Matrix[] matSongPanel = new SlimDX.Matrix[ 15 ];
1159     Matrix[] matJacket = new SlimDX.Matrix[ 15 ];
1160 kairera0467 494 ST中心点[] st3D座標 = new ST中心点[] {
1161     #region [ 計算なんてしていない。 ]
1162 kairera0467 510 //-----------------
1163     //new ST中心点() { x = -1100.0000f, y = 8f, z = 400.0f, rotY = 0.410f },
1164     new ST中心点() { x = -2000.0000f, y = 8f, z = 400.0f, rotY = 0.410f },
1165     new ST中心点() { x = -990.0000f, y = 8f, z = 344.0f, rotY = 0.410f },
1166 kairera0467 494 new ST中心点() { x = -820.0000f, y = 8f, z = 264f, rotY = 0.410f },
1167     new ST中心点() { x = -666.0000f, y = 8f, z = 198f, rotY = 0.410f },
1168     new ST中心点() { x = -506.0000f, y = 8f, z = 127f, rotY = 0.410f },
1169     new ST中心点() { x = -350.0000f, y = 8f, z = 60f, rotY = 0.410f },
1170     new ST中心点() { x = -194.0000f, y = 8f, z = -6f, rotY = 0.410f },
1171 kairera0467 510 new ST中心点() { x = 6.00002622683f, y = 8f, z = 0f, rotY = 0.0f }, //7
1172 kairera0467 494 new ST中心点() { x = 208.0000f, y = 8f, z = 0f, rotY = -0.410f },
1173     new ST中心点() { x = 362.0000f, y = 8f, z = 66f, rotY = -0.410f },
1174     new ST中心点() { x = 518.0000f, y = 8f, z = 132f, rotY = -0.410f },
1175     new ST中心点() { x = 676.0000f, y = 8f, z = 200.0f, rotY = -0.410f },
1176     new ST中心点() { x = 837.0000f, y = 8f, z = 270.0f, rotY = -0.410f },
1177 kairera0467 510 new ST中心点() { x = 1010.0000f, y = 8f, z = 350.0f, rotY = -0.410f },
1178     new ST中心点() { x = 2000.0000f, y = 8f, z = 450.0f, rotY = -0.410f }
1179     //new ST中心点() { x = 1190.0000f, y = 8f, z = 450.0f, rotY = -0.410f }
1180    
1181 kairera0467 494 //-----------------
1182     #endregion
1183     };
1184 kairera0467 186
1185 kairera0467 510 for( int i = 0; i < 15; i++ )
1186 kairera0467 494 {
1187     matSongPanel[ i ] = Matrix.Identity;
1188     matSongPanel[ i ] *= SlimDX.Matrix.LookAtLH( VecCam, VecTarg, VecUp );
1189     matSongPanel[ i ] *= SlimDX.Matrix.Scaling(0.62f, 0.88f, 1.0f);
1190 kairera0467 497 //matSongPanel[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f );
1191     //matSongPanel[ i ] *= SlimDX.Matrix.Translation( st3D座標[ i ].x, st3D座標[ i ].y, st3D座標[ i ].z );
1192 kairera0467 494
1193    
1194     matJacket[ i ] = Matrix.Identity;
1195     matJacket[ i ] *= SlimDX.Matrix.LookAtLH( VecCam, VecTarg, VecUp );
1196     //matJacket[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f ); //ジャケット画像は計算順序を変える。
1197    
1198     //matJacket[ i ] *= SlimDX.Matrix.Translation( st3D座標[ i ].x, 0f, st3D座標[ i ].z );
1199     }
1200     #endregion
1201    
1202 kairera0467 2 if( !this.b登場アニメ全部完了 )
1203     {
1204     #region [ (1) 登場アニメフェーズの描画。]
1205     //-----------------
1206 kairera0467 510 for( int i = 0; i < 15; i++ ) // パネルは全13枚。
1207 kairera0467 2 {
1208     if( this.ct登場アニメ用[ i ].n現在の値 >= 0 )
1209     {
1210 kairera0467 510 int nパネル番号 = ( ( ( this.n現在の選択行 - 7 ) + i ) + 15 ) % 15;
1211 kairera0467 186
1212 kairera0467 510 if( i == 8 )
1213 kairera0467 186 {
1214     #region [ ジャケット画像の描画 ]
1215     //-----------------
1216 kairera0467 412 if( this.st情報[ nパネル番号 ].txパネル != null )
1217 kairera0467 186 {
1218 kairera0467 497 matSongPanel[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f );
1219     matSongPanel[ i ] *= SlimDX.Matrix.Translation( st3D座標[ i ].x, st3D座標[ i ].y, st3D座標[ i ].z );
1220 kairera0467 494 this.st情報[ nパネル番号 ].txパネル.t3D描画( CDTXMania.app.Device, matSongPanel[ i ] );
1221 kairera0467 186 }
1222 kairera0467 194 if( this.txTumbnail[nパネル番号] != null )
1223 kairera0467 186 {
1224 kairera0467 510 float f拡大率 = (float)172.0 / this.txTumbnail[ nパネル番号 ].szテクスチャサイズ.Width;
1225     float f拡大率2 = (float)172.0 / this.txTumbnail[ nパネル番号 ].szテクスチャサイズ.Height;
1226    
1227 kairera0467 494 matJacket[ i ] *= SlimDX.Matrix.Scaling( f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f );
1228     matJacket[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f );
1229 kairera0467 497 matJacket[ i ] *= SlimDX.Matrix.Translation( st3D座標[ i ].x, st3D座標[ i ].y - 1.5f, st3D座標[ i ].z );
1230 kairera0467 494
1231     this.txTumbnail[ nパネル番号 ].t3D描画(CDTXMania.app.Device, matJacket[ i ] );
1232 kairera0467 186 }
1233     //-----------------
1234     #endregion
1235     #region [ タイトル名テクスチャを描画。]
1236     //-----------------
1237 kairera0467 194 if( this.st情報[nパネル番号].txタイトル名 != null )
1238 kairera0467 186 {
1239     var mat = SlimDX.Matrix.Identity;
1240 kairera0467 194 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 kairera0467 186 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     }
1247     if (this.st情報[nパネル番号].txティスト名 != null)
1248     {
1249     var mat = SlimDX.Matrix.Identity;
1250     mat *= SlimDX.Matrix.Scaling(0.35f, 0.45f, 1.0f);
1251     mat *= SlimDX.Matrix.RotationY(this.stマトリックス座標[i].rotY + (this.stマトリックス座標[i].rotY - this.stマトリックス座標[i].rotY));
1252     mat *= SlimDX.Matrix.Translation(
1253     (this.stマトリックス座標[i].x + (int)((this.stマトリックス座標[i].x - this.stマトリックス座標[i].x))) * CTexture.f画面比率,
1254     (this.stマトリックス座標[i].y - 110 + (int)((this.stマトリックス座標[i].y - this.stマトリックス座標[i].y))) * CTexture.f画面比率,
1255     (this.stマトリックス座標[i].z + (int)((this.stマトリックス座標[i].z - this.stマトリックス座標[i].z))) * CTexture.f画面比率);
1256     }
1257     //-----------------
1258     #endregion
1259 kairera0467 194 if( this.tx選曲パネル != null )
1260     this.tx選曲パネル.t2D描画( CDTXMania.app.Device, 761, 233, new Rectangle( 304, 70, 59, 242 ) );
1261 kairera0467 186 }
1262 kairera0467 510 else if( i == 7 )
1263 kairera0467 2 {
1264     }
1265     else
1266     {
1267     // (B) その他のパネルの描画。
1268 kairera0467 186 #region [ ジャケット画像の描画 ]
1269     //-----------------
1270 kairera0467 412 if( this.st情報[ nパネル番号 ].txパネル != null )
1271 kairera0467 186 {
1272 kairera0467 497 matSongPanel[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f );
1273     matSongPanel[ i ] *= SlimDX.Matrix.Translation( st3D座標[ i ].x, st3D座標[ i ].y, st3D座標[ i ].z );
1274     this.st情報[ nパネル番号 ].txパネル.t3D描画( CDTXMania.app.Device, matSongPanel[ i ] );
1275 kairera0467 186 }
1276 kairera0467 494 if( this.txTumbnail[nパネル番号] != null )
1277 kairera0467 186 {
1278 kairera0467 494 float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width ;
1279 kairera0467 186 float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1280 kairera0467 494
1281     matJacket[ i ] *= SlimDX.Matrix.Scaling( f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f );
1282     matJacket[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f );
1283 kairera0467 497 matJacket[ i ] *= SlimDX.Matrix.Translation( st3D座標[ i ].x, st3D座標[ i ].y - 1.5f, st3D座標[ i ].z );
1284 kairera0467 494
1285     this.txTumbnail[nパネル番号].t3D描画( CDTXMania.app.Device, matJacket[ i ] );
1286 kairera0467 186 }
1287     //-----------------
1288     #endregion
1289 kairera0467 2 }
1290     }
1291     }
1292 kairera0467 510
1293     int n選択曲のパネル番号 = ( ( ( this.n現在の選択行 - 7 ) + 7 ) + 15 ) % 15;
1294     #region[ ランプ帯 ]
1295     if( this.txパネル帯 != null )
1296     {
1297     this.txパネル帯.t3D描画( CDTXMania.app.Device, barLa[ 0 ], new Rectangle( 2, 110, 1000, 20 ) );
1298     this.txパネル帯.t3D描画( CDTXMania.app.Device, barLa[ 1 ], new Rectangle( 2, 110, 1000, 20 ) );
1299     }
1300     #endregion
1301     #region[ 中央パネル ]
1302     if( this.tx選曲パネル != null )
1303     this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 457, 163, new Rectangle( 0, 0, 363, 368 ) );
1304     #endregion
1305     #region[ クリアランプ ]
1306     for( int la = 0; la < 5 ; la++ )
1307     {
1308     if( this.txクリアランプ != null && CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null && CDTXMania.stage選曲.r現在選択中の曲.arスコア[ la ] != null )
1309     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 ));
1310     }
1311     #endregion
1312     #region[ ジャケット画像 ]
1313     if ( this.txTumbnail[ n選択曲のパネル番号 ] != null )
1314     {
1315     float f拡大率 = (float)218.0 / this.txTumbnail[ n選択曲のパネル番号 ].szテクスチャサイズ.Width;
1316     float f拡大率2 = (float)218.0 / this.txTumbnail[ n選択曲のパネル番号 ].szテクスチャサイズ.Height;
1317     this.txTumbnail[ n選択曲のパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1318     this.txTumbnail[ n選択曲のパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1319     this.txTumbnail[ n選択曲のパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1320     }
1321     #endregion
1322     #region[ タイトル・アーティスト名 ]
1323 kairera0467 530 //曲名テクスチャ 生成
1324 kairera0467 510 if( File.Exists( this.st情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )
1325     {
1326     this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( n選択曲のパネル番号 );
1327     }
1328     else
1329     {
1330     if( this.st情報[ n選択曲のパネル番号 ].strタイトル文字列 != "" && this.st情報[ n選択曲のパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )
1331 kairera0467 554 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ n選択曲のパネル番号 ].strタイトル文字列, this.st情報[ n選択曲のパネル番号 ].col文字色 );
1332 kairera0467 510 }
1333 kairera0467 530 //曲名テクスチャ 描画
1334     if( this.tx選択されている曲の曲名 != null )
1335     this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1336    
1337     //アーティスト名テクスチャ 生成と描画
1338    
1339     if( File.Exists( this.st情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1340 kairera0467 510 {
1341 kairera0467 530 if( this.tx選択されている曲のアティスト名 == null )
1342 kairera0467 510 this.tx選択されている曲のアティスト名 = this.tカスタムアティスト名テクスチャの生成( n選択曲のパネル番号 );
1343 kairera0467 530
1344     if( this.tx選択されている曲のアティスト名 != null )
1345     this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, 552, 470 );
1346 kairera0467 510 }
1347 kairera0467 530 else if( !File.Exists( this.st情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1348 kairera0467 510 {
1349     if( this.st情報[ n選択曲のパネル番号 ].strティスト名 != "" && this.st情報[ n選択曲のパネル番号 ].strティスト名 != null && this.tx選択されている曲のアティスト名 == null )
1350 kairera0467 554 this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ n選択曲のパネル番号 ].strティスト名, Color.Black );
1351 kairera0467 530
1352     if( this.tx選択されている曲のアティスト名 != null )
1353     {
1354 kairera0467 531 int nティスト名X座標 = 763 - (int)( this.tx選択されている曲のアティスト名.szテクスチャサイズ.Width * 0.75f );
1355 kairera0467 530 this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, nティスト名X座標, 470 );
1356     }
1357 kairera0467 510 }
1358     #endregion
1359 kairera0467 2 //-----------------
1360     #endregion
1361 kairera0467 186
1362 kairera0467 2 }
1363     else
1364     {
1365 kairera0467 497 //CDTXMania.act文字コンソール.tPrint( 0, 0, C文字コンソール.Eフォント種別.白, this.n現在のスクロールカウンタ.ToString() );
1366 kairera0467 2 #region [ (2) 通常フェーズの描画。]
1367     //-----------------
1368 kairera0467 510 for( int i = 0; i < 15; i++ ) // パネルは全13枚。
1369 kairera0467 2 {
1370 kairera0467 510 int nパネル番号 = ( ( ( this.n現在の選択行 - 7 ) + i ) + 15 ) % 15;
1371 kairera0467 2 int n見た目の行番号 = i;
1372 kairera0467 510 int n次のパネル番号 = ( this.n現在のスクロルカウンタ <= 0 ) ? ( ( i + 1 ) % 15 ) : ( ( ( i - 1 ) + 15 ) % 15 );
1373 kairera0467 2 int x = this.ptの基本座標[ n見た目の行番号 ].X + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].X - this.ptの基本座標[ n見た目の行番号 ].X ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1374     int y = this.ptの基本座標[ n見た目の行番号 ].Y + ( (int) ( ( this.ptの基本座標[ n次のパネル番号 ].Y - this.ptの基本座標[ n見た目の行番号 ].Y ) * ( ( (double) Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0 ) ) );
1375 kairera0467 497 float fX = this.n現在のスクロルカウンタ <= 0 ? st3D座標[ n見た目の行番号 ].x + ( ( ( st3D座標[ n次のパネル番号 ].x - st3D座標[ n見た目の行番号 ].x ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1376     st3D座標[ n見た目の行番号 ].x + ( ( ( st3D座標[ n次のパネル番号 ].x - st3D座標[ n見た目の行番号 ].x ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1377 kairera0467 186
1378 kairera0467 497 float fY = this.n現在のスクロルカウンタ <= 0 ? st3D座標[ n見た目の行番号 ].y + ( ( ( st3D座標[ n次のパネル番号 ].y + st3D座標[ n見た目の行番号 ].y ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1379     st3D座標[ n見た目の行番号 ].y + ( ( ( st3D座標[ n次のパネル番号 ].y + st3D座標[ n見た目の行番号 ].y ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1380 kairera0467 494
1381 kairera0467 497 float fZ = this.n現在のスクロルカウンタ <= 0 ? st3D座標[ n見た目の行番号 ].z + ( ( ( st3D座標[ n次のパネル番号 ].z - st3D座標[ n見た目の行番号 ].z ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1382     st3D座標[ n見た目の行番号 ].z + ( ( ( st3D座標[ n次のパネル番号 ].z - st3D座標[ n見た目の行番号 ].z ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1383 kairera0467 494
1384 kairera0467 497 float fR = this.n現在のスクロルカウンタ <= 0 ? st3D座標[ n見た目の行番号 ].rotY + ( ( ( st3D座標[ n次のパネル番号 ].rotY - st3D座標[ n見た目の行番号 ].rotY ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) ) :
1385     st3D座標[ n見た目の行番号 ].rotY + ( ( ( st3D座標[ n次のパネル番号 ].rotY - st3D座標[ n見た目の行番号 ].rotY ) * ( Math.Abs( this.n現在のスクロルカウンタ ) ) / 100.0f ) );
1386    
1387 kairera0467 510 //デバッグ用
1388     //if( i == 7 ){
1389     // CDTXMania.act文字コンソール.tPrint( 0, 16 * i, C文字コンソール.Eフォント種別.赤, i.ToString() + " " + this.stバー情報[ nパネル番号 ].strタイトル文字列.ToString() );
1390     //}else{
1391     // CDTXMania.act文字コンソール.tPrint( 0, 16 * i, C文字コンソール.Eフォント種別.白, i.ToString() + " " + this.stバー情報[ nパネル番号 ].strタイトル文字列.ToString() );
1392     //}
1393 kairera0467 497
1394 kairera0467 510
1395    
1396     if( i == 8 )
1397 kairera0467 186 {
1398     #region [ ジャケット画像の描画 ]
1399     //-----------------
1400 kairera0467 412 if( this.st情報[ nパネル番号 ].txパネル != null )
1401 kairera0467 186 {
1402 kairera0467 497 matSongPanel[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( fR, 0.0f, 0.0f );
1403     matSongPanel[ i ] *= SlimDX.Matrix.Translation( fX, st3D座標[ i ].y, fZ );
1404 kairera0467 494 this.st情報[ nパネル番号 ].txパネル.t3D描画( CDTXMania.app.Device, matSongPanel[ i ] );
1405 kairera0467 186 }
1406 kairera0467 494 if (this.txTumbnail[ nパネル番号 ] != null)
1407 kairera0467 186 {
1408     float f拡大率 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Width;
1409     float f拡大率2 = (float)172.0 / this.txTumbnail[nパネル番号].szテクスチャサイズ.Height;
1410 kairera0467 494
1411     matJacket[ i ] *= SlimDX.Matrix.Scaling( f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f );
1412 kairera0467 497 matJacket[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( fR, 0.0f, 0.0f );
1413     matJacket[ i ] *= SlimDX.Matrix.Translation( fX, st3D座標[ i ].y - 1.5f, fZ );
1414 kairera0467 494
1415     this.txTumbnail[ nパネル番号 ].t3D描画(CDTXMania.app.Device, matJacket[ i ] );
1416 kairera0467 186 }
1417     //-----------------
1418     #endregion
1419     }
1420 kairera0467 510 else if( i == 7 || i == 0 || i == 14)
1421 kairera0467 186 {
1422 kairera0467 510 //選択曲、画面外の曲のジャケット画像は表示しない。
1423 kairera0467 2 }
1424 kairera0467 186 else
1425     {
1426     #region [ ジャケット画像の描画 ]
1427     //-----------------
1428 kairera0467 412 if( this.st情報[ nパネル番号 ].txパネル != null )
1429 kairera0467 186 {
1430 kairera0467 497 matSongPanel[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f );
1431     matSongPanel[ i ] *= SlimDX.Matrix.Translation( fX, st3D座標[ i ].y, fZ );
1432 kairera0467 510 this.st情報[ nパネル番号 ].txパネル.t3D描画( CDTXMania.app.Device, matSongPanel[ i ] );
1433 kairera0467 186 }
1434 kairera0467 510 if( this.txTumbnail[ nパネル番号 ] != null )
1435 kairera0467 186 {
1436 kairera0467 510 float f拡大率 = (float)172.0 / this.txTumbnail[ nパネル番号 ].szテクスチャサイズ.Width ;
1437     float f拡大率2 = (float)172.0 / this.txTumbnail[ nパネル番号 ].szテクスチャサイズ.Height;
1438 kairera0467 494
1439     matJacket[ i ] *= SlimDX.Matrix.Scaling( f拡大率 * CTexture.f画面比率 - 0.084f, f拡大率2 * CTexture.f画面比率 + 0.05f, 1.0f );
1440     matJacket[ i ] *= SlimDX.Matrix.RotationYawPitchRoll( st3D座標[ i ].rotY, 0.0f, 0.0f );
1441 kairera0467 497 matJacket[ i ] *= SlimDX.Matrix.Translation( fX, st3D座標[ i ].y - 1.5f, fZ );
1442 kairera0467 494
1443 kairera0467 510 this.txTumbnail[ nパネル番号 ].t3D描画( CDTXMania.app.Device, matJacket[ i ] );
1444 kairera0467 186 }
1445     //-----------------
1446     #endregion
1447     }
1448 kairera0467 2 }
1449 kairera0467 497
1450     //選択中の曲
1451 kairera0467 510 int n選択曲のパネル番号 = ( ( ( this.n現在の選択行 - 7 ) + 7 ) + 15 ) % 15;
1452     #region[ ランプ帯 ]
1453     if( this.txパネル帯 != null )
1454     {
1455     this.txパネル帯.t3D描画( CDTXMania.app.Device, barLa[ 0 ], new Rectangle( 2, 110, 1000, 20 ) );
1456     this.txパネル帯.t3D描画( CDTXMania.app.Device, barLa[ 1 ], new Rectangle( 2, 110, 1000, 20 ) );
1457     }
1458     #endregion
1459 kairera0467 497 #region[ 中央パネル ]
1460     if( this.tx選曲パネル != null )
1461 kairera0467 510 this.tx選曲パネル.t2D描画(CDTXMania.app.Device, 457, 163, new Rectangle( 0, 0, 363, 368 ) );
1462 kairera0467 497 #endregion
1463     #region[ クリアランプ ]
1464     for( int la = 0; la < 5 ; la++ )
1465     {
1466     if( this.txクリアランプ != null && CDTXMania.stage選曲.r現在選択中の曲.ar難易度ラベル[ la ] != null && CDTXMania.stage選曲.r現在選択中の曲.arスコア[ la ] != null )
1467 kairera0467 510 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 ));
1468 kairera0467 497 }
1469     #endregion
1470     #region[ ジャケット画像 ]
1471     if ( this.txTumbnail[ n選択曲のパネル番号 ] != null )
1472     {
1473     float f拡大率 = (float)218.0 / this.txTumbnail[ n選択曲のパネル番号 ].szテクスチャサイズ.Width;
1474     float f拡大率2 = (float)218.0 / this.txTumbnail[ n選択曲のパネル番号 ].szテクスチャサイズ.Height;
1475     this.txTumbnail[ n選択曲のパネル番号 ].vc拡大縮小倍率 = new Vector3( f拡大率, f拡大率2, 1.0f );
1476     this.txTumbnail[ n選択曲のパネル番号 ].t2D描画(CDTXMania.app.Device, 537, 249 );
1477     this.txTumbnail[ n選択曲のパネル番号 ].vc拡大縮小倍率 = new Vector3( 1.0f, 1.0f, 1.0f );
1478     }
1479     #endregion
1480     #region[ タイトル・アーティスト名 ]
1481 kairera0467 530 //曲名テクスチャ 生成
1482 kairera0467 497 if( File.Exists( this.st情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )
1483     {
1484     this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( n選択曲のパネル番号 );
1485     }
1486     else
1487     {
1488     if( this.st情報[ n選択曲のパネル番号 ].strタイトル文字列 != "" && this.st情報[ n選択曲のパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )
1489 kairera0467 554 this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.st情報[ n選択曲のパネル番号 ].strタイトル文字列, this.st情報[ n選択曲のパネル番号 ].col文字色 );
1490 kairera0467 497 }
1491 kairera0467 530 //曲名テクスチャ 描画
1492     if( this.tx選択されている曲の曲名 != null )
1493     this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1494    
1495     //アーティスト名テクスチャ 生成と描画
1496    
1497     if( File.Exists( this.st情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1498 kairera0467 497 {
1499 kairera0467 530 if( this.tx選択されている曲のアティスト名 == null )
1500 kairera0467 497 this.tx選択されている曲のアティスト名 = this.tカスタムアティスト名テクスチャの生成( n選択曲のパネル番号 );
1501 kairera0467 530
1502     if( this.tx選択されている曲のアティスト名 != null )
1503     this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, 552, 470 );
1504 kairera0467 497 }
1505 kairera0467 530 else if( !File.Exists( this.st情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1506 kairera0467 497 {
1507     if( this.st情報[ n選択曲のパネル番号 ].strティスト名 != "" && this.st情報[ n選択曲のパネル番号 ].strティスト名 != null && this.tx選択されている曲のアティスト名 == null )
1508 kairera0467 554 this.tx選択されている曲のアティスト名 = this.t指定された文字テクスチャを生成する( this.st情報[ n選択曲のパネル番号 ].strティスト名, Color.Black );
1509 kairera0467 530
1510     if( this.tx選択されている曲のアティスト名 != null )
1511     {
1512 kairera0467 531 int nティスト名X座標 = 763 - (int)( this.tx選択されている曲のアティスト名.szテクスチャサイズ.Width * 0.75f );
1513 kairera0467 530 this.tx選択されている曲のアティスト名.t2D描画( CDTXMania.app.Device, nティスト名X座標, 470 );
1514     }
1515 kairera0467 497 }
1516     #endregion
1517     //-----------------
1518 kairera0467 2 #endregion
1519 kairera0467 186
1520 kairera0467 2 }
1521     #region [ スクロール地点の計算(描画はCActSelectShowCurrentPositionにて行う) #27648 ]
1522     int py;
1523     double d = 0;
1524     if ( nNumOfItems > 1 )
1525     {
1526 kairera0467 186 d = ( 336 - 8 ) / (double) ( nNumOfItems - 1 );
1527 kairera0467 2 py = (int) ( d * ( nCurrentPosition - 1 ) );
1528     }
1529     else
1530     {
1531     d = 0;
1532     py = 0;
1533     }
1534     int delta = (int) ( d * this.n現在のスクロルカウンタ / 100 );
1535 kairera0467 186 if ( py + delta <= 336 - 8 )
1536 kairera0467 2 {
1537     this.nスクロルバ相対y座標 = py + delta;
1538     }
1539     #endregion
1540    
1541     #region [ アイテム数の描画 #27648 ]
1542     tアイテム数の描画();
1543     #endregion
1544     return 0;
1545     }
1546    
1547    
1548     // その他
1549    
1550     #region [ private ]
1551     //-----------------
1552 kairera0467 186 private enum E種別 { Score, Box, Other, Random, BackBox }
1553 kairera0467 2
1554     private struct ST
1555     {
1556     public CTexture Score;
1557     public CTexture Box;
1558     public CTexture Other;
1559 kairera0467 186 public CTexture Random;
1560     public CTexture BackBox;
1561 kairera0467 2 public CTexture this[ int index ]
1562     {
1563     get
1564     {
1565     switch( index )
1566     {
1567     case 0:
1568     return this.Score;
1569    
1570     case 1:
1571     return this.Box;
1572    
1573     case 2:
1574     return this.Other;
1575 kairera0467 186
1576     case 3:
1577     return this.Random;
1578    
1579     case 4:
1580     return this.BackBox;
1581 kairera0467 2 }
1582     throw new IndexOutOfRangeException();
1583     }
1584     set
1585     {
1586     switch( index )
1587     {
1588     case 0:
1589     this.Score = value;
1590     return;
1591    
1592     case 1:
1593     this.Box = value;
1594     return;
1595    
1596     case 2:
1597     this.Other = value;
1598     return;
1599 kairera0467 186
1600     case 3:
1601     this.Random = value;
1602     return;
1603    
1604     case 4:
1605     this.BackBox = value;
1606     return;
1607 kairera0467 2 }
1608     throw new IndexOutOfRangeException();
1609     }
1610     }
1611     }
1612    
1613     private struct ST情報
1614     {
1615     public CActSelect曲リスト.E種別 e種別;
1616     public string strタイトル文字列;
1617 kairera0467 186 public string strティスト名;
1618 kairera0467 2 public CTexture txタイトル名;
1619 kairera0467 186 public CTexture txティスト名;
1620     public CTexture txパネル;
1621 kairera0467 409 public CTexture txカスタム曲名テクスチャ;
1622 kairera0467 412 public CTexture txカスタムアティスト名テクスチャ;
1623 kairera0467 186 public int nティスト名テクスチャの長さdot;
1624     public int nタイトル名テクスチャの長さdot;
1625 kairera0467 2 public STDGBVALUE<int> nスキル値;
1626     public Color col文字色;
1627 kairera0467 186 public string strDTXフォルダのパス;
1628 kairera0467 411 public string strPreimageのパス;
1629 kairera0467 186 public Cスコア.ST譜面情報 ar譜面情報;
1630 kairera0467 2 }
1631    
1632     private struct ST選曲バ
1633     {
1634     public CTexture Score;
1635     public CTexture Box;
1636     public CTexture Other;
1637     public CTexture this[ int index ]
1638     {
1639     get
1640     {
1641     switch( index )
1642     {
1643     case 0:
1644     return this.Score;
1645    
1646     case 1:
1647     return this.Box;
1648    
1649     case 2:
1650     return this.Other;
1651     }
1652     throw new IndexOutOfRangeException();
1653     }
1654     set
1655     {
1656     switch( index )
1657     {
1658     case 0:
1659     this.Score = value;
1660     return;
1661    
1662     case 1:
1663     this.Box = value;
1664     return;
1665    
1666     case 2:
1667     this.Other = value;
1668     return;
1669     }
1670     throw new IndexOutOfRangeException();
1671     }
1672     }
1673     }
1674    
1675 kairera0467 186 protected struct ST中心点
1676     {
1677     public float x;
1678     public float y;
1679     public float z;
1680     public float rotY;
1681     }
1682     /// <summary>
1683     /// <para>SSTFファイル絶対パス(key)とサムネイル画像(value)との辞書。</para>
1684     /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1685     /// </summary>
1686     protected Dictionary<string, CTexture> dicThumbnail = new Dictionary<string, CTexture>();
1687    
1688     /// <summary>
1689     /// <para>SSTFファイル絶対パス(key)とプロパティ画像(value)との辞書。</para>
1690     /// <para>アプリの起動から終了まで単純に増加を続け、要素が減ることはない。</para>
1691     /// </summary>
1692     protected Dictionary<string, CTexture> dicProperty = new Dictionary<string, CTexture>();
1693    
1694     protected ST中心点[] stマトリックス座標 = new ST中心点[] {
1695     #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1696     //-----------------
1697     new ST中心点() { x = -940.0000f, y = 4f, z = 320f, rotY = 0.4150f },
1698     new ST中心点() { x = -740.0000f, y = 4f, z = 230f, rotY = 0.4150f },
1699     new ST中心点() { x = -550.0000f, y = 4f, z = 150f, rotY = 0.4150f },
1700     new ST中心点() { x = -370.0000f, y = 4f, z = 70f, rotY = 0.4150f },
1701     new ST中心点() { x = -194.0000f, y = 4f, z = -6f, rotY = 0.4150f },
1702     new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1703     new ST中心点() { x = 204.0000f, y = 4f, z = 0f, rotY = -0.4150f },
1704     new ST中心点() { x = 362.0000f, y = 4f, z = 70f, rotY = -0.4150f },
1705     new ST中心点() { x = 528.0000f, y = 4f, z = 146f, rotY = -0.4150f },
1706     new ST中心点() { x = 686.0000f, y = 4f, z = 212f, rotY = -0.4150f },
1707     new ST中心点() { x = 848.0000f, y = 4f, z = 282f, rotY = -0.4150f },
1708     new ST中心点() { x = 1200.0000f, y = 4f, z = 450f, rotY = -0.4150f },
1709     new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1710     new ST中心点() { x = 1500.0000f, y = 4f, z = -289.5575f, rotY = -0.9279888f },
1711     //-----------------
1712     #endregion
1713     };
1714    
1715     protected readonly ST中心点[] stマトリックス曲名座標 = new ST中心点[] {
1716     #region [ 実は円弧配置になってない。射影行列間違ってるよスターレインボウ見せる気かよ… ]
1717     //-----------------
1718 kairera0467 431 new ST中心点() { x = -980.0000f, y = 4f, z = 350f, rotY = 0.4000f },
1719     new ST中心点() { x = -780.0000f, y = 4f, z = 264f, rotY = 0.4000f },
1720     new ST中心点() { x = -590.0000f, y = 4f, z = 174f, rotY = 0.4000f },
1721     new ST中心点() { x = -400.0000f, y = 4f, z = 92f, rotY = 0.4000f },
1722     new ST中心点() { x = -210.0000f, y = 4f, z = 10f, rotY = 0.4000f },
1723 kairera0467 186 new ST中心点() { x = 6.00002622683f, y = 2f, z = 0f, rotY = 0f },
1724 kairera0467 431 new ST中心点() { x = 210.0000f, y = 2f, z = 10f, rotY = -0.4000f },
1725     new ST中心点() { x = 400.0000f, y = 2f, z = 92f, rotY = -0.4f },
1726     new ST中心点() { x = 590.0000f, y = 2f, z = 174f, rotY = -0.4f },
1727     new ST中心点() { x = 780.0000f, y = 2f, z = 264f, rotY = -0.4f },
1728     new ST中心点() { x = 980.0000f, y = 2f, z = 350f, rotY = -0.4f },
1729 kairera0467 186 new ST中心点() { x = 1200.0000f, y = 2f, z = 450f, rotY = -0.4f },
1730     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1731     new ST中心点() { x = 1500.0000f, y = 2f, z = -289.5575f, rotY = -0.9279888f },
1732     //-----------------
1733     #endregion
1734     };
1735     [StructLayout(LayoutKind.Sequential)]
1736     public struct STATUSPANEL
1737     {
1738     public string label;
1739     public int status;
1740     }
1741     public int nIndex;
1742     public STATUSPANEL[] stパネルマップ;
1743    
1744     public bool b登場アニメ全部完了;
1745 kairera0467 2 private Color color文字影 = Color.FromArgb( 0x40, 10, 10, 10 );
1746 kairera0467 510 public CCounter[] ct登場アニメ用 = new CCounter[ 15 ];
1747 kairera0467 2 private Font ft曲リスト用フォント;
1748     private long nスクロルタイマ;
1749     private int n現在のスクロルカウンタ;
1750     private int n現在の選択行;
1751     private int n目標のスクロルカウンタ;
1752 kairera0467 510 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), new Point(0x3e4, 0x282), new Point(0x500, 0x2b5) };
1753     private ST情報[] st情報 = new ST情報[ 15 ];
1754 kairera0467 2 private CTexture txSongNotFound, txEnumeratingSongs;
1755     private CTexture txアイテム数数字;
1756 kairera0467 510 private CTexture[] txTumbnail = new CTexture[15];
1757 kairera0467 186 private CTexture tx選曲パネル;
1758     private CTexture txパネル;
1759 kairera0467 494 private CTexture txパネル帯;
1760 kairera0467 186 private CTexture tx選択されている曲の曲名;
1761     private CTexture tx選択されている曲のアティスト名;
1762     private CTexture txクリアランプ;
1763     //CPrivateFont prvFont;
1764 kairera0467 223 private CPrivateFastFont prvFont;
1765 kairera0467 2
1766     private int nCurrentPosition = 0;
1767     private int nNumOfItems = 0;
1768    
1769     //private string strBoxDefSkinPath = "";
1770     private E種別 e曲のバ種別を返す( C曲リストノ song )
1771     {
1772     if( song != null )
1773     {
1774     switch( song.eド種別 )
1775     {
1776     case C曲リストノ.Eド種別.SCORE:
1777     case C曲リストノ.Eド種別.SCORE_MIDI:
1778     return E種別.Score;
1779    
1780     case C曲リストノ.Eド種別.BOX:
1781     return E種別.Box;
1782 kairera0467 186
1783     case C曲リストノ.Eド種別.BACKBOX:
1784     return E種別.BackBox;
1785    
1786     case C曲リストノ.Eド種別.RANDOM:
1787     return E種別.Random;
1788 kairera0467 2 }
1789     }
1790     return E種別.Other;
1791     }
1792