OSDN Git Service

リポジトリの中間ファイルをすべて削除し、再構築。
[dtxmania/dtxmania.git] / DTXManiaプロジェクト / コード / ステージ / CActオプションパネル.cs
1 using System;\r
2 using System.Collections.Generic;\r
3 using System.Text;\r
4 using System.Drawing;\r
5 using SlimDX.Direct3D9;\r
6 using FDK;\r
7 \r
8 namespace DTXMania\r
9 {\r
10         internal class CActオプションパネル : CActivity\r
11         {\r
12                 // CActivity 実装\r
13 \r
14                 public override void On非活性化()\r
15                 {\r
16                         if( !base.b活性化してない )\r
17                         {\r
18                                 CDTXMania.tテクスチャの解放( ref this.txオプションパネル );\r
19                                 base.On非活性化();\r
20                         }\r
21                 }\r
22                 public override void OnManagedリソースの作成()\r
23                 {\r
24                         if( !base.b活性化してない )\r
25                         {\r
26                                 this.txオプションパネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\Screen option panels.png" ), false );\r
27                                 base.OnManagedリソースの作成();\r
28                         }\r
29                 }\r
30                 public override int On進行描画()\r
31                 {\r
32                         if( !base.b活性化してない )\r
33                         {\r
34                                 Device device = CDTXMania.app.Device;\r
35                                 CConfigIni configIni = CDTXMania.ConfigIni;\r
36                                 if( this.txオプションパネル != null )\r
37                                 {\r
38                                         int drums = configIni.n譜面スクロール速度.Drums;\r
39                                         if( drums > 15 )\r
40                                         {\r
41                                                 drums = 15;\r
42                                         }\r
43                                         this.txオプションパネル.t2D描画( device, 0x171, 12, this.rc譜面スピード[ drums ] );\r
44                                         drums = configIni.n譜面スクロール速度.Guitar;\r
45                                         if( drums > 15 )\r
46                                         {\r
47                                                 drums = 15;\r
48                                         }\r
49                                         this.txオプションパネル.t2D描画( device, 0x171, 0x18, this.rc譜面スピード[ drums ] );\r
50                                         drums = configIni.n譜面スクロール速度.Bass;\r
51                                         if( drums > 15 )\r
52                                         {\r
53                                                 drums = 15;\r
54                                         }\r
55                                         this.txオプションパネル.t2D描画( device, 0x171, 0x24, this.rc譜面スピード[ drums ] );\r
56                                         this.txオプションパネル.t2D描画( device, 0x189, 12, this.rcHS[ ( configIni.bHidden.Drums ? 1 : 0 ) + ( configIni.bSudden.Drums ? 2 : 0 ) ] );\r
57                                         this.txオプションパネル.t2D描画( device, 0x189, 0x18, this.rcHS[ ( configIni.bHidden.Guitar ? 1 : 0 ) + ( configIni.bSudden.Guitar ? 2 : 0 ) ] );\r
58                                         this.txオプションパネル.t2D描画( device, 0x189, 0x24, this.rcHS[ ( configIni.bHidden.Bass ? 1 : 0 ) + ( configIni.bSudden.Bass ? 2 : 0 ) ] );\r
59                                         this.txオプションパネル.t2D描画( device, 0x1a1, 12, this.rcDark[ (int) configIni.eDark ] );\r
60                                         this.txオプションパネル.t2D描画( device, 0x1a1, 0x18, this.rcDark[ (int) configIni.eDark ] );\r
61                                         this.txオプションパネル.t2D描画( device, 0x1a1, 0x24, this.rcDark[ (int) configIni.eDark ] );\r
62                                         this.txオプションパネル.t2D描画( device, 0x1b9, 12, this.rcReverse[ configIni.bReverse.Drums ? 1 : 0 ] );\r
63                                         this.txオプションパネル.t2D描画( device, 0x1b9, 0x18, this.rcReverse[ configIni.bReverse.Guitar ? 1 : 0 ] );\r
64                                         this.txオプションパネル.t2D描画( device, 0x1b9, 0x24, this.rcReverse[ configIni.bReverse.Bass ? 1 : 0 ] );\r
65                                         this.txオプションパネル.t2D描画( device, 0x1d1, 12, this.rcPosition[ (int) configIni.判定文字表示位置.Drums ] );\r
66                                         this.txオプションパネル.t2D描画( device, 0x1d1, 0x18, this.rcPosition[ (int) configIni.判定文字表示位置.Guitar ] );\r
67                                         this.txオプションパネル.t2D描画( device, 0x1d1, 0x24, this.rcPosition[ (int) configIni.判定文字表示位置.Bass ] );\r
68                                         this.txオプションパネル.t2D描画( device, 0x1e9, 12, this.rcTight[ configIni.bTight ? 1 : 0 ] );\r
69                                         this.txオプションパネル.t2D描画( device, 0x1e9, 0x18, this.rcRandom[ (int) configIni.eRandom.Guitar ] );\r
70                                         this.txオプションパネル.t2D描画( device, 0x1e9, 0x24, this.rcRandom[ (int) configIni.eRandom.Bass ] );\r
71                                         this.txオプションパネル.t2D描画( device, 0x201, 12, this.rcComboPos[ (int) configIni.ドラムコンボ文字の表示位置 ] );\r
72                                         this.txオプションパネル.t2D描画( device, 0x201, 0x18, this.rcLight[ configIni.bLight.Guitar ? 1 : 0 ] );\r
73                                         this.txオプションパネル.t2D描画( device, 0x201, 0x24, this.rcLight[ configIni.bLight.Bass ? 1 : 0 ] );\r
74                                         this.txオプションパネル.t2D描画( device, 0x219, 0x18, this.rcLeft[ configIni.bLeft.Guitar ? 1 : 0 ] );\r
75                                         this.txオプションパネル.t2D描画( device, 0x219, 0x24, this.rcLeft[ configIni.bLeft.Bass ? 1 : 0 ] );\r
76                                 }\r
77                         }\r
78                         return 0;\r
79                 }\r
80 \r
81                 \r
82                 // その他\r
83 \r
84                 #region [ private ]\r
85                 //-----------------\r
86                 private readonly Rectangle[] rcComboPos = new Rectangle[] { new Rectangle( 0x30, 0x48, 0x18, 12 ), new Rectangle( 0x30, 60, 0x18, 12 ), new Rectangle( 0x30, 0x30, 0x18, 12 ), new Rectangle( 0x18, 0x48, 0x18, 12 ) };\r
87                 private readonly Rectangle[] rcDark = new Rectangle[] { new Rectangle( 0x18, 0, 0x18, 12 ), new Rectangle( 0x18, 12, 0x18, 12 ), new Rectangle( 0x18, 0x54, 0x18, 12 ) };\r
88                 private readonly Rectangle[] rcHS = new Rectangle[] { new Rectangle( 0, 0, 0x18, 12 ), new Rectangle( 0, 12, 0x18, 12 ), new Rectangle( 0, 0x18, 0x18, 12 ), new Rectangle( 0, 0x24, 0x18, 12 ) };\r
89                 private readonly Rectangle[] rcLeft = new Rectangle[] { new Rectangle( 0x60, 0x48, 0x18, 12 ), new Rectangle( 120, 0x48, 0x18, 12 ) };\r
90                 private readonly Rectangle[] rcLight = new Rectangle[] { new Rectangle( 120, 0x30, 0x18, 12 ), new Rectangle( 120, 60, 0x18, 12 ) };\r
91                 private readonly Rectangle[] rcPosition = new Rectangle[] { new Rectangle( 0, 0x30, 0x18, 12 ), new Rectangle( 0, 60, 0x18, 12 ), new Rectangle( 0, 0x48, 0x18, 12 ) };\r
92                 private readonly Rectangle[] rcRandom = new Rectangle[] { new Rectangle( 0x48, 0x30, 0x18, 12 ), new Rectangle( 0x48, 60, 0x18, 12 ), new Rectangle( 0x48, 0x48, 0x18, 12 ), new Rectangle( 0x48, 0x54, 0x18, 12 ) };\r
93                 private readonly Rectangle[] rcReverse = new Rectangle[] { new Rectangle( 0x18, 0x18, 0x18, 12 ), new Rectangle( 0x18, 0x24, 0x18, 12 ) };\r
94                 private readonly Rectangle[] rcTight = new Rectangle[] { new Rectangle( 0x60, 0x30, 0x18, 12 ), new Rectangle( 0x60, 60, 0x18, 12 ) };\r
95                 private readonly Rectangle[] rc譜面スピード = new Rectangle[] { new Rectangle( 0x30, 0, 0x18, 12 ), new Rectangle( 0x30, 12, 0x18, 12 ), new Rectangle( 0x30, 0x18, 0x18, 12 ), new Rectangle( 0x30, 0x24, 0x18, 12 ), new Rectangle( 0x48, 0, 0x18, 12 ), new Rectangle( 0x48, 12, 0x18, 12 ), new Rectangle( 0x48, 0x18, 0x18, 12 ), new Rectangle( 0x48, 0x24, 0x18, 12 ), new Rectangle( 0x60, 0, 0x18, 12 ), new Rectangle( 0x60, 12, 0x18, 12 ), new Rectangle( 0x60, 0x18, 0x18, 12 ), new Rectangle( 0x60, 0x24, 0x18, 12 ), new Rectangle( 120, 0, 0x18, 12 ), new Rectangle( 120, 12, 0x18, 12 ), new Rectangle( 120, 0x18, 0x18, 12 ), new Rectangle( 120, 0x24, 0x18, 12 ) };\r
96                 private CTexture txオプションパネル;\r
97                 //-----------------\r
98                 #endregion\r
99         }\r
100 }\r