2 using System.Collections.Generic;
5 using System.Diagnostics;
7 using SlimDX.Direct3D9;
11 internal class CStage結果 : CStage
15 public STDGBVALUE<bool> b新記録スキル;
16 public STDGBVALUE<bool> b新記録スコア;
17 public STDGBVALUE<bool> b新記録ランク;
18 public STDGBVALUE<float> fPerfect率;
19 public STDGBVALUE<float> fGreat率;
20 public STDGBVALUE<float> fGood率;
21 public STDGBVALUE<float> fPoor率;
22 public STDGBVALUE<float> fMiss率;
23 public STDGBVALUE<bool> bオート; // #23596 10.11.16 add ikanick
24 // 10.11.17 change (int to bool) ikanick
25 public STDGBVALUE<int> nランク値;
26 public STDGBVALUE<int> n演奏回数;
28 public CDTX.CChip[] r空うちドラムチップ;
29 public STDGBVALUE<CScoreIni.C演奏記録> st演奏記録;
30 public CScoreIni sc更新前Scoreini;
37 this.st演奏記録.Drums = new CScoreIni.C演奏記録();
38 this.st演奏記録.Guitar = new CScoreIni.C演奏記録();
39 this.st演奏記録.Bass = new CScoreIni.C演奏記録();
40 this.sc更新前Scoreini = new CScoreIni();
41 this.r空うちドラムチップ = new CDTX.CChip[ 11 ];
43 this.nチャンネル0Atoレーン07 = new int[] { 1, 2, 3, 4, 5, 7, 6, 1, 8, 0, 9 };
44 base.eステージID = CStage.Eステージ.結果;
45 base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
47 base.list子Activities.Add( this.actResultImage = new CActResultImage共通() );
48 base.list子Activities.Add( this.actParameterPanel = new CActResultParameterPanel() );
49 base.list子Activities.Add( this.actRank = new CActResultRank() );
50 base.list子Activities.Add( this.actSongBar = new CActResultSongBar() );
51 base.list子Activities.Add( this.actOption = new CActオプションパネル() );
52 base.list子Activities.Add( this.actFI = new CActFIFOWhite() );
53 base.list子Activities.Add( this.actFO = new CActFIFOBlack() );
54 base.list子Activities.Add( this.actAVI = new CAct演奏AVI() );
60 public override void On活性化()
62 Trace.TraceInformation( "結果ステージを活性化します。" );
67 //---------------------
68 this.eフェードアウト完了時の戻り値 = E戻り値.継続;
70 this.bIsCheckedWhetherResultScreenShouldSaveOrNot = false; // #24609 2011.3.14 yyagi
71 this.n最後に再生したHHのWAV番号 = -1;
72 this.n最後に再生したHHのチャンネル番号 = 0;
73 for( int i = 0; i < 3; i++ )
75 this.b新記録スキル[ i ] = false;
76 this.b新記録スコア[ i ] = false;
77 this.b新記録ランク[ i ] = false;
79 this.sc更新前Scoreini = new CScoreIni( CDTXMania.DTX.strファイル名の絶対パス + ".score.ini" ); //2016.03.07 kairera0467 記録更新前のScoreiniを格納する。
80 //---------------------
84 //---------------------
85 for( int i = 0; i < 3; i++ )
88 this.fPerfect率[ i ] = this.fGreat率[ i ] = this.fGood率[ i ] = this.fPoor率[ i ] = this.fMiss率[ i ] = 0.0f; // #28500 2011.5.24 yyagi
89 if ( ( ( ( i != 0 ) || ( CDTXMania.DTX.bチップがある.Drums && !CDTXMania.ConfigIni.bギタレボモード ) ) &&
90 ( ( i != 1 ) || CDTXMania.DTX.bチップがある.Guitar ) ) &&
91 ( ( i != 2 ) || CDTXMania.DTX.bチップがある.Bass ) )
93 CScoreIni.C演奏記録 part = this.st演奏記録[ i ];
94 bool bIsAutoPlay = true;
98 bIsAutoPlay = CDTXMania.ConfigIni.bドラムが全部オートプレイである || !CDTXMania.ConfigIni.bDrums有効; // #35411 chnmr0 add Drums が有効でない場合 AUTO 扱いとして LastPlay 更新しない
102 bIsAutoPlay = CDTXMania.ConfigIni.bギターが全部オートプレイである || !CDTXMania.ConfigIni.bGuitar有効; // #35411 chnmr0 add
106 bIsAutoPlay = CDTXMania.ConfigIni.bベースが全部オートプレイである || !CDTXMania.ConfigIni.bGuitar有効;
109 this.fPerfect率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nPerfect数 ) / ( (float) part.n全チップ数 ) );
110 this.fGreat率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nGreat数 ) / ( (float) part.n全チップ数 ) );
111 this.fGood率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nGood数 ) / ( (float) part.n全チップ数 ) );
112 this.fPoor率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nPoor数 ) / ( (float) part.n全チップ数 ) );
113 this.fMiss率[ i ] = bIsAutoPlay ? 0f : ( ( 100f * part.nMiss数 ) / ( (float) part.n全チップ数 ) );
114 this.bオート[ i ] = bIsAutoPlay; // #23596 10.11.16 add ikanick そのパートがオートなら1
115 // 10.11.17 change (int to bool) ikanick
116 if( CDTXMania.ConfigIni.eSkillMode == ESkillType.DTXMania )
117 this.nランク値[ i ] = CScoreIni.tランク値を計算して返す( part );
119 this.nランク値[ i ] = CScoreIni.tXGランク値を計算して返す( part, (E楽器パート)i );
122 this.n総合ランク値 = CScoreIni.t総合ランク値を計算して返す( this.st演奏記録.Drums, this.st演奏記録.Guitar, this.st演奏記録.Bass );
123 //---------------------
126 #region [ .score.ini の作成と出力 ]
127 //---------------------
128 string str = CDTXMania.DTX.strファイル名の絶対パス + ".score.ini";
129 CScoreIni ini = new CScoreIni( str );
131 bool[] b今までにフルコンボしたことがある = new bool[] { false, false, false };
133 for( int i = 0; i < 3; i++ )
135 // フルコンボチェックならびに新記録ランクチェックは、ini.Record[] が、スコアチェックや演奏型スキルチェックの IF 内で書き直されてしまうよりも前に行う。(2010.9.10)
137 b今までにフルコンボしたことがある[ i ] = ini.stセクション[ i * 2 ].bフルコンボである | ini.stセクション[ i * 2 + 1 ].bフルコンボである;
139 #region [deleted by #24459]
140 // if( this.nランク値[ i ] <= CScoreIni.tランク値を計算して返す( ini.stセクション[ ( i * 2 ) + 1 ] ) )
142 // this.b新記録ランク[ i ] = true;
145 // #24459 上記の条件だと[HiSkill.***]でのランクしかチェックしていないので、BestRankと比較するよう変更。
146 if ( this.nランク値[ i ] >= 0 && ini.stファイル.BestRank[ i ] > this.nランク値[ i ] ) // #24459 2011.3.1 yyagi update BestRank
148 this.b新記録ランク[ i ] = true;
149 ini.stファイル.BestRank[ i ] = this.nランク値[ i ];
153 if( ( this.st演奏記録[ i ].nスコア > ini.stセクション[ i * 2 ].nスコア ) && this.bオート[ i ] == false )
155 this.b新記録スコア[ i ] = true;
156 ini.stセクション[ i * 2 ] = this.st演奏記録[ i ];
157 this.SaveGhost( i * 2 ); // #35411 chnmr0 add
161 if (this.st演奏記録[i].db演奏型スキル値 > ini.stセクション[(i * 2) + 1].db演奏型スキル値)
163 this.b新記録スキル[ i ] = true;
164 ini.stセクション[(i * 2) + 1] = this.st演奏記録[ i ];
165 this.SaveGhost((i * 2) + 1); // #35411 chnmr0 add
168 // ラストプレイ #23595 2011.1.9 ikanick
169 // オートじゃなければプレイ結果を書き込む
170 if (this.bオート[ i ] == false) {
171 ini.stセクション[i + 6] = this.st演奏記録[ i ];
172 this.SaveGhost(i + 6); // #35411 chnmr0 add
175 // #23596 10.11.16 add ikanick オートじゃないならクリア回数を1増やす
176 // 11.02.05 bオート to t更新条件を取得する use ikanick
177 bool[] b更新が必要か否か = new bool[ 3 ];
178 CScoreIni.t更新条件を取得する( out b更新が必要か否か[ 0 ], out b更新が必要か否か[ 1 ], out b更新が必要か否か[ 2 ] );
185 ini.stファイル.ClearCountDrums++;
188 ini.stファイル.ClearCountGuitar++;
191 ini.stファイル.ClearCountBass++;
194 throw new Exception("クリア回数増加のk(0-2)が範囲外です。");
197 //---------------------------------------------------------------------/
199 if( CDTXMania.ConfigIni.bScoreIniを出力する )
201 //---------------------
204 #region [ リザルト画面への演奏回数の更新 #24281 2011.1.30 yyagi]
205 if( CDTXMania.ConfigIni.bScoreIniを出力する )
207 this.n演奏回数.Drums = ini.stファイル.PlayCountDrums;
208 this.n演奏回数.Guitar = ini.stファイル.PlayCountGuitar;
209 this.n演奏回数.Bass = ini.stファイル.PlayCountBass;
212 #region [ 選曲画面の譜面情報の更新 ]
213 //---------------------
214 if( !CDTXMania.bコンパクトモード )
216 Cスコア cスコア = CDTXMania.bXGRelease ? CDTXMania.stage選曲XG.r確定されたスコア : CDTXMania.stage選曲GITADORA.r確定されたスコア;
217 bool[] b更新が必要か否か = new bool[ 3 ];
218 CScoreIni.t更新条件を取得する( out b更新が必要か否か[ 0 ], out b更新が必要か否か[ 1 ], out b更新が必要か否か[ 2 ] );
219 for( int m = 0; m < 3; m++ )
223 // FullCombo した記録を FullCombo なしで超えた場合、FullCombo マークが消えてしまう。
224 // → FullCombo は、最新記録と関係なく、一度達成したらずっとつくようにする。(2010.9.11)
225 cスコア.譜面情報.フルコンボ[ m ] = this.st演奏記録[ m ].bフルコンボである | b今までにフルコンボしたことがある[ m ];
227 if( this.b新記録スキル[ m ] )
229 cスコア.譜面情報.最大スキル[ m ] = this.st演奏記録[ m ].db演奏型スキル値;
232 if (this.b新記録ランク[ m ])
234 cスコア.譜面情報.最大ランク[ m ] = this.nランク値[ m ];
239 //---------------------
242 #region [ #RESULTSOUND_xx の再生(あれば)]
243 //---------------------
244 int rank = CScoreIni.t総合ランク値を計算して返す( this.st演奏記録.Drums, this.st演奏記録.Guitar, this.st演奏記録.Bass );
246 if (rank == 99) // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす
251 if( string.IsNullOrEmpty( CDTXMania.DTX.RESULTSOUND[ rank ] ) )
253 CDTXMania.Skin.soundステージクリア音.t再生する();
254 this.rResultSound = null;
258 string str2 = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.RESULTSOUND[ rank ];
261 this.rResultSound = CDTXMania.Sound管理.tサウンドを生成する( str2 );
265 Trace.TraceError( "サウンドの生成に失敗しました。({0})", new object[] { str2 } );
266 this.rResultSound = null;
269 //---------------------
276 Trace.TraceInformation( "結果ステージの活性化を完了しました。" );
282 private void SaveGhost(int sectionIndex)
284 STDGBVALUE<bool> saveCond = new STDGBVALUE<bool>();
285 saveCond.Drums = true;
286 saveCond.Guitar = true;
287 saveCond.Bass = true;
289 foreach( CDTX.CChip chip in CDTXMania.DTX.listChip )
291 if( chip.bIsAutoPlayed )
293 if (chip.nチャンネル番号 != 0x28 && chip.nチャンネル番号 != 0xA8) // Guitar/Bass Wailing は OK
295 saveCond[(int)(chip.e楽器パート)] = false;
299 for(int instIndex = 0; instIndex < 3; ++instIndex)
301 saveCond[instIndex] &= CDTXMania.listAutoGhostLag.Drums == null;
304 string directory = CDTXMania.DTX.strフォルダ名;
305 string filename = CDTXMania.DTX.strファイル名 + ".";
306 E楽器パート inst = E楽器パート.UNKNOWN;
308 if ( sectionIndex == 0 )
310 filename += "hiscore.dr.ghost";
313 else if (sectionIndex == 1 )
315 filename += "hiskill.dr.ghost";
318 if (sectionIndex == 2 )
320 filename += "hiscore.gt.ghost";
321 inst = E楽器パート.GUITAR;
323 else if (sectionIndex == 3 )
325 filename += "hiskill.gt.ghost";
326 inst = E楽器パート.GUITAR;
328 if (sectionIndex == 4 )
330 filename += "hiscore.bs.ghost";
333 else if (sectionIndex == 5)
335 filename += "hiskill.bs.ghost";
338 else if (sectionIndex == 6)
340 filename += "lastplay.dr.ghost";
343 else if (sectionIndex == 7 )
345 filename += "lastplay.gt.ghost";
346 inst = E楽器パート.GUITAR;
348 else if (sectionIndex == 8)
350 filename += "lastplay.bs.ghost";
354 if (inst == E楽器パート.UNKNOWN)
360 foreach (DTXMania.CDTX.CChip chip in CDTXMania.DTX.listChip)
362 if (chip.e楽器パート == inst)
368 if( saveCond[(int)inst] )
370 using (FileStream fs = new FileStream(directory + "\\" + filename, FileMode.Create, FileAccess.Write))
372 using (BinaryWriter bw = new BinaryWriter(fs))
374 bw.Write((Int32)cnt);
375 foreach (DTXMania.CDTX.CChip chip in CDTXMania.DTX.listChip)
377 if (chip.e楽器パート == inst)
379 // -128 ms から 127 ms までのラグしか保存しない
381 // ラグデータの 上位8ビットでそのチップの前でギター空打ちBADがあったことを示す
391 byte lower = (byte)(lag + 128);
392 int upper = chip.nCurrentComboForGhost == 0 ? 1 : 0;
393 bw.Write((short)( (upper<<8) | lower));
399 CScoreIni.C演奏記録 cScoreData;
400 cScoreData = this.st演奏記録[ (int)inst ];
401 using (FileStream fs = new FileStream(directory + "\\" + filename + ".score", FileMode.Create, FileAccess.Write))
403 using (StreamWriter sw = new StreamWriter(fs))
405 sw.WriteLine( "Score=" + cScoreData.nスコア );
406 sw.WriteLine( "PlaySkill=" + cScoreData.db演奏型スキル値 );
407 sw.WriteLine( "Skill=" + cScoreData.dbゲーム型スキル値 );
408 sw.WriteLine( "Perfect=" + cScoreData.nPerfect数_Auto含まない );
409 sw.WriteLine( "Great=" + cScoreData.nGreat数_Auto含まない );
410 sw.WriteLine( "Good=" + cScoreData.nGood数_Auto含まない );
411 sw.WriteLine( "Poor=" + cScoreData.nPoor数_Auto含まない );
412 sw.WriteLine( "Miss=" + cScoreData.nMiss数_Auto含まない );
413 sw.WriteLine( "MaxCombo=" + cScoreData.n最大コンボ数 );
419 public override void On非活性化()
421 if( this.rResultSound != null )
423 CDTXMania.Sound管理.tサウンドを破棄する( this.rResultSound );
424 this.rResultSound = null;
428 public override void OnManagedリソースの作成()
432 this.tx背景 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\8_background.png" ) );
433 this.tx上部パネル = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\8_header panel.png" ) );
434 this.tx下部パネル = CDTXMania.tテクスチャの生成Af( CSkin.Path( @"Graphics\8_footer panel.png" ) );
435 base.OnManagedリソースの作成();
438 public override void OnManagedリソースの解放()
442 if( this.ct登場用 != null )
446 CDTXMania.tテクスチャの解放( ref this.tx背景 );
447 CDTXMania.tテクスチャの解放( ref this.tx上部パネル );
448 CDTXMania.tテクスチャの解放( ref this.tx下部パネル );
449 base.OnManagedリソースの解放();
452 public override int On進行描画()
459 this.ct登場用 = new CCounter( 0, 100, 5, CDTXMania.Timer );
460 this.actFI.tフェードイン開始();
461 base.eフェーズID = CStage.Eフェーズ.共通_フェードイン;
462 if( this.rResultSound != null )
464 this.rResultSound.t再生を開始する();
466 base.b初めての進行描画 = false;
469 if( this.ct登場用.b進行中 )
472 if( this.ct登場用.b終了値に達した )
478 this.bアニメが完了 = false;
484 if( this.tx背景 != null )
486 this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 );
488 if( this.ct登場用.b進行中 && ( this.tx上部パネル != null ) )
490 double num2 = ( (double) this.ct登場用.n現在の値 ) / 100.0;
491 double num3 = Math.Sin( Math.PI / 2 * num2 );
492 num = ( (int) ( this.tx上部パネル.sz画像サイズ.Height * num3 ) ) - this.tx上部パネル.sz画像サイズ.Height;
498 //if( this.tx上部パネル != null )
500 // this.tx上部パネル.t2D描画( CDTXMania.app.Device, 0, num * Scale.Y );
502 //if( this.tx下部パネル != null )
504 // this.tx下部パネル.t2D描画( CDTXMania.app.Device, 0, ( SampleFramework.GameWindowSize.Height - this.tx下部パネル.sz画像サイズ.Height) );
506 //this.actOption.On進行描画();
507 if( this.actResultImage.On進行描画() == 0 )
509 this.bアニメが完了 = false;
511 if ( this.actParameterPanel.On進行描画() == 0 )
513 this.bアニメが完了 = false;
515 if ( this.actRank.On進行描画() == 0 )
517 this.bアニメが完了 = false;
519 if( base.eフェーズID == CStage.Eフェーズ.共通_フェードイン )
521 if( this.actFI.On進行描画() != 0 )
523 base.eフェーズID = CStage.Eフェーズ.共通_通常状態;
526 else if( ( base.eフェーズID == CStage.Eフェーズ.共通_フェードアウト ) ) //&& ( this.actFO.On進行描画() != 0 ) )
528 return (int) this.eフェードアウト完了時の戻り値;
530 #region [ #24609 2011.3.14 yyagi ランク更新or演奏型スキル更新時、リザルト画像をpngで保存する ]
531 if ( this.bアニメが完了 == true && this.bIsCheckedWhetherResultScreenShouldSaveOrNot == false // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill.
532 && CDTXMania.ConfigIni.bScoreIniを出力する
533 && CDTXMania.ConfigIni.bIsAutoResultCapture) // #25399 2011.6.9 yyagi
535 CheckAndSaveResultScreen(true);
536 this.bIsCheckedWhetherResultScreenShouldSaveOrNot = true;
542 if( CDTXMania.act現在入力を占有中のプラグイン == null )
544 if( CDTXMania.ConfigIni.bドラム打音を発声する && CDTXMania.ConfigIni.bDrums有効 )
546 for( int i = 0; i < 11; i++ )
548 List<STInputEvent> events = CDTXMania.Pad.GetEvents( E楽器パート.DRUMS, (Eパッド) i );
549 if( ( events != null ) && ( events.Count > 0 ) )
551 foreach( STInputEvent event2 in events )
557 CDTX.CChip rChip = this.r空うちドラムチップ[ i ];
560 switch( ( (Eパッド) i ) )
563 rChip = this.r空うちドラムチップ[ 7 ];
566 rChip = this.r空うちドラムチップ[ 9 ];
571 rChip = this.r空うちドラムチップ[ 4 ];
575 rChip = this.r空うちドラムチップ[ 8 ];
579 rChip = this.r空うちドラムチップ[ 0 ];
582 rChip = this.r空うちドラムチップ[ 9 ];
587 rChip = this.r空うちドラムチップ[ 6 ];
591 rChip = this.r空うちドラムチップ[ 0 ];
594 rChip = this.r空うちドラムチップ[ 7 ];
600 if( ( ( rChip != null ) && ( rChip.nチャンネル番号 >= 0x11 ) ) && ( rChip.nチャンネル番号 <= 0x1C ) )
602 int nLane = this.nチャンネル0Atoレーン07[ rChip.nチャンネル番号 - 0x11 ];
603 if( ( nLane == 1 ) && ( ( rChip.nチャンネル番号 == 0x11 ) || ( ( rChip.nチャンネル番号 == 0x18 ) && ( this.n最後に再生したHHのチャンネル番号 != 0x18 ) ) ) )
605 CDTXMania.DTX.tWavの再生停止( this.n最後に再生したHHのWAV番号 );
606 this.n最後に再生したHHのWAV番号 = rChip.n整数値_内部番号;
607 this.n最後に再生したHHのチャンネル番号 = rChip.nチャンネル番号;
609 if( ( nLane == 9 ) && ( ( rChip.nチャンネル番号 == 0x1B ) || ( ( rChip.nチャンネル番号 == 0x1B ) && ( this.n最後に再生したHHのチャンネル番号 != 0x18 ) ) ) )
611 CDTXMania.DTX.tWavの再生停止( this.n最後に再生したHHのWAV番号 );
612 this.n最後に再生したHHのWAV番号 = rChip.n整数値_内部番号;
613 this.n最後に再生したHHのチャンネル番号 = rChip.nチャンネル番号;
615 CDTXMania.DTX.tチップの再生( rChip, CDTXMania.Timer.nシステム時刻, nLane, CDTXMania.ConfigIni.n手動再生音量, CDTXMania.ConfigIni.b演奏音を強調する.Drums );
621 if( ( ( CDTXMania.Pad.b押されたDGB( Eパッド.CY ) || CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) || ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || CDTXMania.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.Return ) ) ) && !this.bアニメが完了 )
623 this.actFI.tフェードイン完了(); // #25406 2011.6.9 yyagi
624 this.actResultImage.tアニメを完了させる();
625 this.actParameterPanel.tアニメを完了させる();
626 this.actRank.tアニメを完了させる();
629 #region [ #24609 2011.4.7 yyagi リザルト画面で[F12]を押下すると、リザルト画像をpngで保存する機能は、CDTXManiaに移管。 ]
630 // if ( CDTXMania.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.F12 ) &&
631 // CDTXMania.ConfigIni.bScoreIniを出力する )
633 // CheckAndSaveResultScreen(false);
634 // this.bIsCheckedWhetherResultScreenShouldSaveOrNot = true;
637 if ( base.eフェーズID == CStage.Eフェーズ.共通_通常状態 )
639 if ( CDTXMania.Input管理.Keyboard.bキーが押された( (int)SlimDX.DirectInput.Key.Escape ) )
641 CDTXMania.Skin.sound取消音.t再生する();
642 this.actFO.tフェードアウト開始();
643 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
644 this.eフェードアウト完了時の戻り値 = E戻り値.完了;
646 if ( ( ( CDTXMania.Pad.b押されたDGB( Eパッド.CY ) || CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.RD ) ) || ( CDTXMania.Pad.b押された( E楽器パート.DRUMS, Eパッド.LC ) || CDTXMania.Input管理.Keyboard.bキーが押された( (int) SlimDX.DirectInput.Key.Return ) ) ) && this.bアニメが完了 )
648 CDTXMania.Skin.sound取消音.t再生する();
649 // this.actFO.tフェードアウト開始();
650 base.eフェーズID = CStage.Eフェーズ.共通_フェードアウト;
651 this.eフェードアウト完了時の戻り値 = E戻り値.完了;
659 public enum E戻り値 : int
670 private CCounter ct登場用;
671 private E戻り値 eフェードアウト完了時の戻り値;
672 private CActFIFOWhite actFI;
673 private CActFIFOBlack actFO;
674 private CActオプションパネル actOption;
675 private CAct演奏AVI actAVI;
676 private CActResultParameterPanel actParameterPanel;
677 private CActResultRank actRank;
678 private CActResultImage共通 actResultImage;
679 private CActResultSongBar actSongBar;
680 private bool bアニメが完了;
681 private bool bIsCheckedWhetherResultScreenShouldSaveOrNot; // #24509 2011.3.14 yyagi
682 private readonly int[] nチャンネル0Atoレーン07;
683 private int n最後に再生したHHのWAV番号;
684 private int n最後に再生したHHのチャンネル番号;
685 private CSound rResultSound;
686 private CTextureAf tx下部パネル;
687 private CTextureAf tx上部パネル;
688 private CTexture tx背景;
690 #region [ #24609 リザルト画像をpngで保存する ] // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill.
693 /// 自動保存モード時は、ランク更新or演奏型スキル更新時に自動保存。
694 /// 手動保存モード時は、ランクに依らず保存。
696 /// <param name="bIsAutoSave">true=自動保存モード, false=手動保存モード</param>
697 private void CheckAndSaveResultScreen(bool bIsAutoSave)
699 string path = Path.GetDirectoryName( CDTXMania.DTX.strファイル名の絶対パス );
700 string datetime = DateTime.Now.ToString( "yyyyMMddHHmmss" );
703 // リザルト画像を自動保存するときは、dtxファイル名.yyMMddHHmmss_DRUMS_SS.png という形式で保存。
704 for ( int i = 0; i < 3; i++ )
706 if ( this.b新記録ランク[ i ] == true || this.b新記録スキル[ i ] == true )
708 string strPart = ( (E楽器パート) ( i ) ).ToString();
709 string strRank = ( (CScoreIni.ERANK) ( this.nランク値[ i ] ) ).ToString();
710 string strFullPath = CDTXMania.DTX.strファイル名の絶対パス + "." + datetime + "_" + strPart + "_" + strRank + ".png";
711 //Surface.ToFile( pSurface, strFullPath, ImageFileFormat.Png );
712 CDTXMania.app.SaveResultScreen( strFullPath );
716 #region [ #24609 2011.4.11 yyagi; リザルトの手動保存ロジックは、CDTXManiaに移管した。]
719 // // リザルト画像を手動保存するときは、dtxファイル名.yyMMddHHmmss_SS.png という形式で保存。(楽器名無し)
720 // string strRank = ( (CScoreIni.ERANK) ( CDTXMania.stage結果.n総合ランク値 ) ).ToString();
721 // string strSavePath = CDTXMania.strEXEのあるフォルダ + "\\" + "Capture_img";
722 // if ( !Directory.Exists( strSavePath ) )
726 // Directory.CreateDirectory( strSavePath );
732 // string strSetDefDifficulty = CDTXMania.stage選曲.r確定された曲.ar難易度ラベル[ CDTXMania.stage選曲.n確定された曲の難易度 ];
733 // if ( strSetDefDifficulty != null )
735 // strSetDefDifficulty = "(" + strSetDefDifficulty + ")";
737 // string strFullPath = strSavePath + "\\" + CDTXMania.DTX.TITLE + strSetDefDifficulty +
738 // "." + datetime + "_" + strRank + ".png";
739 // // Surface.ToFile( pSurface, strFullPath, ImageFileFormat.Png );
740 // CDTXMania.app.SaveResultScreen( strFullPath );