修訂 | 572 (tree) |
---|---|
時間 | 2018-07-30 23:06:49 |
作者 | ![]() |
@@ -3755,6 +3755,7 @@ | ||
3755 | 3755 | //Trace.TraceInformation( "発声時刻計算: {0}", span.ToString() ); |
3756 | 3756 | //timeBeginLoad = DateTime.Now; |
3757 | 3757 | this.nBGMAdjust = 0; |
3758 | + this.t各自動再生音チップの再生時刻を変更する( nBGMAdjust ); | |
3758 | 3759 | if( CDTXMania.ConfigIni.nCommonBGMAdjustMs != 0 ) |
3759 | 3760 | this.t各自動再生音チップの再生時刻を変更する( CDTXMania.ConfigIni.nCommonBGMAdjustMs, false, true ); |
3760 | 3761 | //span = (TimeSpan) ( DateTime.Now - timeBeginLoad ); |
@@ -119,7 +119,7 @@ | ||
119 | 119 | this.txMenuパネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_menu panel.png" ) ); |
120 | 120 | this.txItemBar = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_item bar.png" ) ); |
121 | 121 | |
122 | - prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 18 ); | |
122 | + this.prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 18 ); | |
123 | 123 | string[] strMenuItem = { "System", "Drums", "Guitar", "Bass", "Exit" }; |
124 | 124 | txMenuItemLeft = new CTexture[ strMenuItem.Length, 2 ]; |
125 | 125 | for ( int i = 0; i < strMenuItem.Length; i++ ) |
@@ -421,7 +421,8 @@ | ||
421 | 421 | } |
422 | 422 | this.On非活性化(); |
423 | 423 | this.r現在選択中の曲 = null; |
424 | - this.On活性化(); | |
424 | + if( CDTXMania.r現在のステージ.eステージID == CStage.Eステージ.選曲 ) | |
425 | + this.On活性化(); | |
425 | 426 | } |
426 | 427 | |
427 | 428 |
@@ -537,8 +538,8 @@ | ||
537 | 538 | this.tx上部パネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_header song list.png"), false); |
538 | 539 | this.tx下部パネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_footer song list.png"), false); |
539 | 540 | |
540 | - prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 30, FontStyle.Regular ); | |
541 | - prvFontSmall = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 15, FontStyle.Regular ); | |
541 | + this.prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 30, FontStyle.Regular ); | |
542 | + this.prvFontSmall = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 15, FontStyle.Regular ); | |
542 | 543 | |
543 | 544 | for( int i = 0; i < 13; i++ ) |
544 | 545 | this.t曲名バーの生成( i, this.stバー情報[ i ].strタイトル文字列, this.stバー情報[ i ].col文字色 ); |
@@ -621,8 +622,9 @@ | ||
621 | 622 | CDTXMania.t安全にDisposeする( ref this.tx選曲バー.Other ); |
622 | 623 | CDTXMania.t安全にDisposeする( ref this.tx上部パネル ); |
623 | 624 | CDTXMania.t安全にDisposeする( ref this.tx下部パネル ); |
624 | - prvFont.Dispose(); | |
625 | - prvFontSmall.Dispose(); | |
625 | + | |
626 | + CDTXMania.t安全にDisposeする( ref this.prvFont ); | |
627 | + CDTXMania.t安全にDisposeする( ref this.prvFontSmall ); | |
626 | 628 | if( this.tx選択中の曲名テクスチャ != null ) |
627 | 629 | { |
628 | 630 | this.tx選択中の曲名テクスチャ.Dispose(); |
@@ -314,11 +314,12 @@ | ||
314 | 314 | #region[ 曲名、アーティスト名テクスチャの生成 ] |
315 | 315 | if ((this.str曲タイトル != null) && (this.str曲タイトル.Length > 0)) |
316 | 316 | { |
317 | - pfタイトル = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 40, FontStyle.Regular); | |
317 | + this.pfタイトル = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 40, FontStyle.Regular); | |
318 | 318 | Bitmap bmpSongName = new Bitmap(1, 1); |
319 | - bmpSongName = pfタイトル.DrawPrivateFont(this.str曲タイトル, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); | |
319 | + bmpSongName = this.pfタイトル.DrawPrivateFont(this.str曲タイトル, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); | |
320 | 320 | this.txタイトル = CDTXMania.tテクスチャの生成(bmpSongName, false); |
321 | - bmpSongName.Dispose(); | |
321 | + CDTXMania.t安全にDisposeする( ref bmpSongName ); | |
322 | + CDTXMania.t安全にDisposeする( ref this.pfタイトル ); | |
322 | 323 | } |
323 | 324 | else |
324 | 325 | { |
@@ -331,7 +332,8 @@ | ||
331 | 332 | Bitmap bmpArtistName = new Bitmap(1, 1); |
332 | 333 | bmpArtistName = pfアーティスト.DrawPrivateFont(this.strアーティスト名, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
333 | 334 | this.txアーティスト = CDTXMania.tテクスチャの生成(bmpArtistName, false); |
334 | - bmpArtistName.Dispose(); | |
335 | + CDTXMania.t安全にDisposeする( ref bmpArtistName ); | |
336 | + CDTXMania.t安全にDisposeする( ref this.pfアーティスト ); | |
335 | 337 | } |
336 | 338 | else |
337 | 339 | { |
@@ -354,6 +356,7 @@ | ||
354 | 356 | if( !base.b活性化してない ) |
355 | 357 | { |
356 | 358 | //テクスチャ11枚 |
359 | + //2018.03.15 kairera0467 PrivateFontが抜けていた&フォント生成直後に解放するようにしてみる | |
357 | 360 | CDTXMania.tテクスチャの解放( ref this.tx背景 ); |
358 | 361 | CDTXMania.tテクスチャの解放( ref this.txジャケット ); |
359 | 362 | CDTXMania.tテクスチャの解放( ref this.txタイトル ); |
@@ -72,8 +72,6 @@ | ||
72 | 72 | } |
73 | 73 | public override void On非活性化() |
74 | 74 | { |
75 | - CDTXMania.t安全にDisposeする( ref this.pfタイトル ); | |
76 | - CDTXMania.t安全にDisposeする( ref this.pfアーティスト ); | |
77 | 75 | // CDTXMania.tテクスチャの解放(ref this.txPanel); |
78 | 76 | this.ct進行用 = null; |
79 | 77 | base.On非活性化(); |
@@ -126,6 +124,8 @@ | ||
126 | 124 | CDTXMania.tテクスチャの解放( ref this.txArtistName ); |
127 | 125 | CDTXMania.tテクスチャの解放( ref this.txジャケットパネル ); |
128 | 126 | CDTXMania.tテクスチャの解放( ref this.txジャケット画像 ); |
127 | + CDTXMania.t安全にDisposeする( ref this.pfタイトル ); | |
128 | + CDTXMania.t安全にDisposeする( ref this.pfアーティスト ); | |
129 | 129 | base.OnManagedリソースの解放(); |
130 | 130 | } |
131 | 131 | } |
@@ -71,13 +71,13 @@ | ||
71 | 71 | else |
72 | 72 | this.strSongName = CDTXMania.DTX.TITLE; |
73 | 73 | |
74 | - pfタイトル = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 20, FontStyle.Regular); | |
74 | + this.pfタイトル = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 20, FontStyle.Regular); | |
75 | 75 | Bitmap bmpSongName = new Bitmap(1, 1); |
76 | 76 | bmpSongName = pfタイトル.DrawPrivateFont(this.strSongName, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
77 | 77 | this.txSongName = CDTXMania.tテクスチャの生成(bmpSongName, false); |
78 | 78 | bmpSongName.Dispose(); |
79 | 79 | |
80 | - pfアーティスト = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 15, FontStyle.Regular); | |
80 | + this.pfアーティスト = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 15, FontStyle.Regular); | |
81 | 81 | Bitmap bmpArtistName = new Bitmap(1, 1); |
82 | 82 | bmpArtistName = pfアーティスト.DrawPrivateFont(CDTXMania.DTX.ARTIST, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
83 | 83 | this.txArtistName = CDTXMania.tテクスチャの生成(bmpArtistName, false); |
@@ -143,6 +143,9 @@ | ||
143 | 143 | CDTXMania.tテクスチャの解放(ref this.txSongLevel); |
144 | 144 | CDTXMania.tテクスチャの解放(ref this.txSongDifficulty); |
145 | 145 | CDTXMania.tテクスチャの解放(ref this.txDrumSpeed); |
146 | + | |
147 | + CDTXMania.t安全にDisposeする( ref this.pfタイトル ); | |
148 | + CDTXMania.t安全にDisposeする( ref this.pfアーティスト ); | |
146 | 149 | base.OnManagedリソースの解放(); |
147 | 150 | } |
148 | 151 | } |
@@ -411,12 +411,12 @@ | ||
411 | 411 | graネームプレート用.DrawImage( bmpCardName, -2f, 26f ); |
412 | 412 | graネームプレート用.DrawImage( bmpTitleName, 6f, 8f ); |
413 | 413 | #endregion |
414 | - bmpCardName.Dispose(); | |
415 | - bmpTitleName.Dispose(); | |
414 | + CDTXMania.t安全にDisposeする( ref bmpCardName ); | |
415 | + CDTXMania.t安全にDisposeする( ref bmpTitleName ); | |
416 | 416 | this.txネームプレート用文字[ i ] = new CTexture( CDTXMania.app.Device, image2, CDTXMania.TextureFormat, false ); |
417 | 417 | CDTXMania.t安全にDisposeする( ref image2 ); |
418 | 418 | |
419 | - graネームプレート用.Dispose(); | |
419 | + CDTXMania.t安全にDisposeする( ref graネームプレート用 ); | |
420 | 420 | } |
421 | 421 | this.prv表示用フォント.Dispose(); |
422 | 422 | this.prv称号フォント.Dispose(); |
@@ -730,73 +730,77 @@ | ||
730 | 730 | case CStage.Eステージ.タイトル: |
731 | 731 | #region [ *** ] |
732 | 732 | //----------------------------- |
733 | - switch (this.n進行描画の戻り値) | |
733 | + if( this.n進行描画の戻り値 != 0 ) | |
734 | 734 | { |
735 | - case (int)CStageタイトル.E戻り値.GAMESTART: | |
736 | - #region [ 選曲処理へ ] | |
737 | - //----------------------------- | |
738 | - r現在のステージ.On非活性化(); | |
739 | - Trace.TraceInformation("----------------------"); | |
740 | - Trace.TraceInformation("■ 選曲"); | |
741 | - stage選曲.On活性化(); | |
742 | - r直前のステージ = r現在のステージ; | |
743 | - r現在のステージ = stage選曲; | |
744 | - //----------------------------- | |
735 | + switch (this.n進行描画の戻り値) | |
736 | + { | |
737 | + case (int)CStageタイトル.E戻り値.GAMESTART: | |
738 | + #region [ 選曲処理へ ] | |
739 | + //----------------------------- | |
740 | + r現在のステージ.On非活性化(); | |
741 | + Trace.TraceInformation("----------------------"); | |
742 | + Trace.TraceInformation("■ 選曲"); | |
743 | + stage選曲.On活性化(); | |
744 | + r直前のステージ = r現在のステージ; | |
745 | + r現在のステージ = stage選曲; | |
746 | + //----------------------------- | |
747 | + #endregion | |
748 | + break; | |
749 | + | |
750 | + #region [ OPTION: 廃止済 ] | |
751 | + /* | |
752 | + case 2: // #24525 OPTIONとCONFIGの統合に伴い、OPTIONは廃止 | |
753 | + #region [ *** ] | |
754 | + //----------------------------- | |
755 | + r現在のステージ.On非活性化(); | |
756 | + Trace.TraceInformation( "----------------------" ); | |
757 | + Trace.TraceInformation( "■ オプション" ); | |
758 | + stageオプション.On活性化(); | |
759 | + r直前のステージ = r現在のステージ; | |
760 | + r現在のステージ = stageオプション; | |
761 | + //----------------------------- | |
762 | + #endregion | |
763 | + break; | |
764 | + */ | |
745 | 765 | #endregion |
746 | - break; | |
747 | 766 | |
748 | - #region [ OPTION: 廃止済 ] | |
749 | - /* | |
750 | - case 2: // #24525 OPTIONとCONFIGの統合に伴い、OPTIONは廃止 | |
751 | - #region [ *** ] | |
752 | - //----------------------------- | |
753 | - r現在のステージ.On非活性化(); | |
754 | - Trace.TraceInformation( "----------------------" ); | |
755 | - Trace.TraceInformation( "■ オプション" ); | |
756 | - stageオプション.On活性化(); | |
757 | - r直前のステージ = r現在のステージ; | |
758 | - r現在のステージ = stageオプション; | |
759 | - //----------------------------- | |
760 | - #endregion | |
761 | - break; | |
762 | - */ | |
763 | - #endregion | |
767 | + case (int)CStageタイトル.E戻り値.CONFIG: | |
768 | + #region [ *** ] | |
769 | + //----------------------------- | |
770 | + r現在のステージ.On非活性化(); | |
771 | + Trace.TraceInformation("----------------------"); | |
772 | + Trace.TraceInformation("■ コンフィグ"); | |
773 | + stageコンフィグ.On活性化(); | |
774 | + r直前のステージ = r現在のステージ; | |
775 | + r現在のステージ = stageコンフィグ; | |
776 | + //----------------------------- | |
777 | + #endregion | |
778 | + break; | |
764 | 779 | |
765 | - case (int)CStageタイトル.E戻り値.CONFIG: | |
766 | - #region [ *** ] | |
767 | - //----------------------------- | |
768 | - r現在のステージ.On非活性化(); | |
769 | - Trace.TraceInformation("----------------------"); | |
770 | - Trace.TraceInformation("■ コンフィグ"); | |
771 | - stageコンフィグ.On活性化(); | |
772 | - r直前のステージ = r現在のステージ; | |
773 | - r現在のステージ = stageコンフィグ; | |
774 | - //----------------------------- | |
775 | - #endregion | |
776 | - break; | |
780 | + case (int)CStageタイトル.E戻り値.EXIT: | |
781 | + #region [ *** ] | |
782 | + //----------------------------- | |
783 | + r現在のステージ.On非活性化(); | |
784 | + Trace.TraceInformation("----------------------"); | |
785 | + Trace.TraceInformation("■ 終了"); | |
786 | + stage終了.On活性化(); | |
787 | + r直前のステージ = r現在のステージ; | |
788 | + r現在のステージ = stage終了; | |
789 | + //----------------------------- | |
790 | + #endregion | |
791 | + break; | |
792 | + } | |
777 | 793 | |
778 | - case (int)CStageタイトル.E戻り値.EXIT: | |
779 | - #region [ *** ] | |
780 | - //----------------------------- | |
781 | - r現在のステージ.On非活性化(); | |
782 | - Trace.TraceInformation("----------------------"); | |
783 | - Trace.TraceInformation("■ 終了"); | |
784 | - stage終了.On活性化(); | |
785 | - r直前のステージ = r現在のステージ; | |
786 | - r現在のステージ = stage終了; | |
787 | - //----------------------------- | |
788 | - #endregion | |
789 | - break; | |
790 | - } | |
794 | + foreach (STPlugin pg in this.listプラグイン) | |
795 | + { | |
796 | + Directory.SetCurrentDirectory(pg.strプラグインフォルダ); | |
797 | + pg.plugin.Onステージ変更(); | |
798 | + Directory.SetCurrentDirectory(CDTXMania.strEXEのあるフォルダ); | |
799 | + } | |
791 | 800 | |
792 | - foreach (STPlugin pg in this.listプラグイン) | |
793 | - { | |
794 | - Directory.SetCurrentDirectory(pg.strプラグインフォルダ); | |
795 | - pg.plugin.Onステージ変更(); | |
796 | - Directory.SetCurrentDirectory(CDTXMania.strEXEのあるフォルダ); | |
801 | + this.tガベージコレクションを実行する(); // #31980 2013.9.3 yyagi タイトル画面でだけ、毎フレームGCを実行して重くなっていた問題の修正 | |
797 | 802 | } |
798 | 803 | |
799 | - //this.tガベージコレクションを実行する(); // #31980 2013.9.3 yyagi タイトル画面でだけ、毎フレームGCを実行して重くなっていた問題の修正 | |
800 | 804 | //----------------------------- |
801 | 805 | #endregion |
802 | 806 | break; |
@@ -1454,6 +1458,7 @@ | ||
1454 | 1458 | } |
1455 | 1459 | try |
1456 | 1460 | { |
1461 | + Trace.WriteLine("CTextureをFileから生成 + Filename:" + fileName); | |
1457 | 1462 | return new CTexture( app.Device, fileName, TextureFormat, b黒を透過する ); |
1458 | 1463 | } |
1459 | 1464 | catch ( CTextureCreateFailedException ) |
@@ -1469,8 +1474,10 @@ | ||
1469 | 1474 | } |
1470 | 1475 | public static void tテクスチャの解放( ref CTexture tx ) |
1471 | 1476 | { |
1472 | - if( tx != null ) | |
1477 | + if (tx != null) { | |
1478 | + Trace.WriteLine( "CTextureを解放 Size W:" + tx.sz画像サイズ.Width + " H:" + tx.sz画像サイズ.Height ); | |
1473 | 1479 | CDTXMania.t安全にDisposeする( ref tx ); |
1480 | + } | |
1474 | 1481 | } |
1475 | 1482 | public static void tテクスチャの解放( ref CTextureAf tx ) |
1476 | 1483 | { |
@@ -1509,6 +1516,7 @@ | ||
1509 | 1516 | } |
1510 | 1517 | try |
1511 | 1518 | { |
1519 | + Trace.WriteLine( "CTextureをBitmapから生成" ); | |
1512 | 1520 | return new CTexture( app.Device, bitmap, TextureFormat, b黒を透過する ); |
1513 | 1521 | } |
1514 | 1522 | catch ( CTextureCreateFailedException ) |