OSDN Git Service

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