OSDN Git Service

#37961 PCとMIDI機器をつなぐケーブルとして「MIDI2.0-USB」を使用している場合に警告を表示する機能を追加。このケーブルを通すと、PCからのMIDI出力...
[dtxmania/dtxmania.git] / DTXMania / コード / ステージ / CActFIFOWhite.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Drawing;
5 using FDK;
6
7 namespace DTXMania
8 {
9         internal class CActFIFOWhite : CActivity
10         {
11                 private CCounter counter;
12                 private EFIFOMode mode;
13                 private CTexture tx白タイル64x64;
14
15                 public void tフェードアウト開始()
16                 {
17                         this.mode = EFIFOMode.フェードアウト;
18                         this.counter = new CCounter(0, 100, 5, CDTXMania.Instance.Timer);
19                 }
20
21                 public void tフェードイン開始()
22                 {
23                         this.mode = EFIFOMode.フェードイン;
24                         this.counter = new CCounter(0, 100, 5, CDTXMania.Instance.Timer);
25                 }
26
27                 // #25406 2011.6.9 yyagi
28                 public void tフェードイン完了()
29                 {
30                         this.counter.n現在の値 = this.counter.n終了値;
31                 }
32
33                 public override void On非活性化()
34                 {
35                         if (base.b活性化してる)
36                         {
37                                 TextureFactory.tテクスチャの解放(ref this.tx白タイル64x64);
38                                 base.On非活性化();
39                         }
40                 }
41                 public override void OnManagedリソースの作成()
42                 {
43                         if (base.b活性化してる)
44                         {
45                                 this.tx白タイル64x64 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\Tile white 64x64.png"), false);
46                                 base.OnManagedリソースの作成();
47                         }
48                 }
49                 public override int On進行描画()
50                 {
51                         if (base.b活性化してる && this.counter != null)
52                         {
53                                 this.counter.t進行();
54
55                                 // Size clientSize = CDTXMania.Instance.app.Window.ClientSize;  // #23510 2010.10.31 yyagi: delete as of no one use this any longer.
56                                 if (this.tx白タイル64x64 != null)
57                                 {
58                                         this.tx白タイル64x64.n透明度 = (this.mode == EFIFOMode.フェードイン) ? (((100 - this.counter.n現在の値) * 0xff) / 100) : ((this.counter.n現在の値 * 0xff) / 100);
59                                         for (int i = 0; i <= (SampleFramework.GameWindowSize.Width / 64); i++)    // #23510 2010.10.31 yyagi: change "clientSize.Width" to "640" to fix FIFO drawing size
60                                         {
61                                                 for (int j = 0; j <= (SampleFramework.GameWindowSize.Height / 64); j++) // #23510 2010.10.31 yyagi: change "clientSize.Height" to "480" to fix FIFO drawing size
62                                                 {
63                                                         this.tx白タイル64x64.t2D描画(CDTXMania.Instance.Device, i * 64, j * 64);
64                                                 }
65                                         }
66                                 }
67                                 if (this.counter.n現在の値 != 100)
68                                 {
69                                         return 0;
70                                 }
71                                 return 1;
72                         }
73                         return 0;
74                 }
75         }
76 }