2 using System.Collections.Generic;
\r
4 using System.Runtime.InteropServices;
\r
5 using System.Drawing;
\r
6 using System.Diagnostics;
\r
11 internal class CAct演奏ステータスパネル共通 : CActivity
\r
14 public CAct演奏ステータスパネル共通()
\r
16 this.stパネルマップ = new STATUSPANEL[12]; // yyagi: 以下、手抜きの初期化でスマン
\r
17 // { "DTXMANIA", 0 }, { "EXTREME", 1 }, ... みたいに書きたいが・・・
\r
18 string[] labels = new string[12]
\r
20 "DTXMANIA", "EXTREME", "ADVANCED", "ADVANCE", "BASIC", "RAW",
\r
21 "REAL", "EASY", "EX-REAL", "ExREAL", "ExpertReal", "NORMAL"
\r
23 int[] status = new int[12]
\r
25 0, 1, 2, 2, 3, 4, 5, 6, 7, 7, 7, 8
\r
28 for (int i = 0; i < 12; i++)
\r
30 this.stパネルマップ[i] = new STATUSPANEL();
\r
31 this.stパネルマップ[i].status = status[i];
\r
32 this.stパネルマップ[i].label = labels[i];
\r
35 base.b活性化してない = true;
\r
40 public void tラベル名からステータスパネルを決定する(string strラベル名)
\r
42 if (string.IsNullOrEmpty(strラベル名))
\r
48 foreach (STATUSPANEL statuspanel in this.stパネルマップ)
\r
50 if (strラベル名.Equals(statuspanel.label, StringComparison.CurrentCultureIgnoreCase)) // #24482 2011.2.17 yyagi ignore case
\r
52 this.nStatus = statuspanel.status;
\r
62 public override void On活性化()
\r
68 public override void OnManagedリソースの作成()
\r
72 if (!CDTXMania.Instance.ConfigIni.bギタレボモード)
\r
74 this.txStatusPanels = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay status panels right.png"));
\r
78 this.tx左パネル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay status panels left.png"));
\r
79 this.tx右パネル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenPlay status panels right.png"));
\r
81 base.OnManagedリソースの作成();
\r
84 public override void OnManagedリソースの解放()
\r
88 if (!CDTXMania.Instance.ConfigIni.bギタレボモード)
\r
90 TextureFactory.tテクスチャの解放(ref this.txStatusPanels);
\r
94 TextureFactory.tテクスチャの解放(ref this.tx左パネル);
\r
95 TextureFactory.tテクスチャの解放(ref this.tx右パネル);
\r
97 base.OnManagedリソースの解放();
\r
101 public override int On進行描画()
\r
103 if (!base.b活性化してない)
\r
105 if (!CDTXMania.Instance.ConfigIni.bギタレボモード)
\r
107 if ((this.txStatusPanels != null))
\r
109 this.txStatusPanels.t2D描画(
\r
110 CDTXMania.Instance.Device,
\r
114 (int)(this.nStatus * 15 * Scale.X),
\r
115 (int)(0xb7 * Scale.Y),
\r
116 (int)(15 * Scale.X),
\r
117 (int)(0x49 * Scale.Y)
\r
120 int drums = CDTXMania.Instance.ConfigIni.n譜面スクロール速度.Drums;
\r
129 this.txStatusPanels.t2D描画(CDTXMania.Instance.Device,
\r
133 (int)(drums * 15 * Scale.X),
\r
135 (int)(15 * Scale.X),
\r
136 (int)(0xac * Scale.Y)
\r
143 if (this.tx左パネル != null)
\r
146 CDTXMania.Instance.Device,
\r
150 (int)(this.nStatus * 15 * Scale.X),
\r
151 (int)(0xb7 * Scale.Y),
\r
152 (int)(15 * Scale.X),
\r
153 (int)(0x49 * Scale.Y)
\r
156 int guitar = CDTXMania.Instance.ConfigIni.n譜面スクロール速度.Guitar;
\r
166 CDTXMania.Instance.Device,
\r
170 (int)(guitar * 15 * Scale.X),
\r
172 (int)(15 * Scale.X),
\r
173 (int)(0xac * Scale.Y)
\r
177 if (this.tx右パネル != null)
\r
180 CDTXMania.Instance.Device,
\r
184 (int)(this.nStatus * 15 * Scale.X),
\r
185 (int)(0xb7 * Scale.Y),
\r
186 (int)(15 * Scale.X),
\r
187 (int)(0x49 * Scale.Y)
\r
190 int bass = CDTXMania.Instance.ConfigIni.n譜面スクロール速度.Bass;
\r
200 CDTXMania.Instance.Device,
\r
204 (int)(bass * 15 * Scale.X),
\r
206 (int)(15 * Scale.X),
\r
207 (int)(0xac * Scale.Y)
\r
216 [StructLayout(LayoutKind.Sequential)]
\r
217 protected struct STATUSPANEL
\r
219 public string label;
\r
223 private CTexture tx右パネル;
\r
224 private CTexture tx左パネル;
\r
225 private CTexture txStatusPanels;
\r
226 protected int nStatus;
\r
227 protected STATUSPANEL[] stパネルマップ = null;
\r