修订版 | 4cc83f7ae1f357744bd14dfc9a3f2d6d871dd551 (tree) |
---|---|
时间 | 2016-08-14 20:25:41 |
作者 | ikanick <ikanick@16f4...> |
Commiter | ikanick |
#36546 グラフで落ちる:グラフの初期値を入れておくことで暫定処置 画像もうまく表示されなかったため差し替え
git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@1030 16f42ceb-6dc6-49c8-ba94-f2d53467949d
@@ -99,117 +99,97 @@ namespace DTXMania | ||
99 | 99 | + CDTXMania.Instance.Coordinates.Instrument[inst].W; |
100 | 100 | int gy = 0; |
101 | 101 | |
102 | - // 背景暗幕 | |
103 | 102 | if (this.txグラフ != null) |
104 | 103 | { |
104 | + // 背景暗幕 | |
105 | + this.txグラフ.n透明度 = 128; | |
105 | 106 | this.txグラフ.vc拡大縮小倍率.X = CDTXMania.Instance.Coordinates.Graph[inst].W; |
106 | 107 | this.txグラフ.vc拡大縮小倍率.Y = CDTXMania.Instance.Coordinates.Graph[inst].H; |
107 | - | |
108 | - this.txグラフ.n透明度 = 128; | |
109 | 108 | this.txグラフ.t2D描画(CDTXMania.Instance.Device, gx, gy, new Rectangle(62, 0, 1, 1)); |
110 | 109 | |
111 | 110 | // 基準線 |
112 | - | |
113 | - this.txグラフ.n透明度 = 128; | |
114 | 111 | this.txグラフ.vc拡大縮小倍率.X = CDTXMania.Instance.Coordinates.Graph[inst].W; |
115 | 112 | this.txグラフ.vc拡大縮小倍率.Y = 1f; |
116 | 113 | |
117 | 114 | for (int i = 0; i < slices; i++) |
118 | 115 | { |
119 | - this.txグラフ.t2D描画(CDTXMania.Instance.Device, | |
120 | - gx, gy + CDTXMania.Instance.Coordinates.Graph[inst].H * i / slices, new Rectangle(60, 0, 1, 1)); | |
121 | - } | |
122 | - | |
123 | - for (int i = 0; i < 5; i++) | |
124 | - { | |
125 | - Rectangle rectangle; | |
126 | - // 基準線を越えたら線が黄色くなる | |
127 | - if (this.dbCurrent[inst] >= (100 - i * slices)) | |
116 | + if (this.dbCurrent[inst] < (100 - i * slices)) | |
128 | 117 | { |
129 | - rectangle = new Rectangle(61, 0, 1, 1); //黄色 | |
130 | - if (this.txグラフ != null) | |
131 | - { | |
132 | - this.txグラフ.n透明度 = 224; | |
133 | - } | |
118 | + // 通常の基準線(白) | |
119 | + this.txグラフ.n透明度 = 128; | |
120 | + this.txグラフ.t2D描画(CDTXMania.Instance.Device, | |
121 | + gx, gy + CDTXMania.Instance.Coordinates.Graph[inst].H * i / slices, new Rectangle(60, 0, 1, 1)); | |
134 | 122 | } |
135 | 123 | else |
136 | 124 | { |
137 | - rectangle = new Rectangle(60, 0, 1, 1); | |
138 | - if (this.txグラフ != null) | |
139 | - { | |
140 | - this.txグラフ.n透明度 = 160; | |
141 | - } | |
142 | - } | |
143 | - | |
144 | - if (this.txグラフ != null) | |
145 | - { | |
146 | - this.txグラフ.t2D描画( | |
147 | - CDTXMania.Instance.Device, | |
148 | - gx, gy + i * CDTXMania.Instance.Coordinates.Graph[inst].H / slices, | |
149 | - rectangle | |
150 | - ); | |
125 | + // 基準線を越えたら線が黄色くなる | |
126 | + this.txグラフ.n透明度 = 224; | |
127 | + this.txグラフ.t2D描画(CDTXMania.Instance.Device, | |
128 | + gx, gy + CDTXMania.Instance.Coordinates.Graph[inst].H * i / slices, new Rectangle(61, 0, 1, 1)); | |
151 | 129 | } |
152 | 130 | } |
153 | 131 | |
154 | - // グラフ | |
132 | + // グラフのゲージ部分 | |
133 | + | |
155 | 134 | // --現在値 |
135 | + this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); | |
136 | + | |
156 | 137 | if (this.dbCurrentDisp[inst] < this.dbCurrent[inst]) |
157 | 138 | { |
158 | 139 | this.dbCurrentDisp[inst] += (this.dbCurrent[inst] - this.dbCurrentDisp[inst]) / 5 + 0.01; |
159 | 140 | } |
160 | - if (this.dbCurrentDisp[inst] >= this.dbCurrent[inst]) | |
141 | + else | |
161 | 142 | { |
162 | 143 | this.dbCurrentDisp[inst] = this.dbCurrent[inst]; |
163 | 144 | } |
164 | 145 | int ar = (int)(CDTXMania.Instance.Coordinates.Graph[inst].H * this.dbCurrentDisp[inst] / 100.0); |
165 | 146 | |
166 | - this.txグラフ.vc拡大縮小倍率 = new Vector3(1f, 1f, 1f); | |
167 | - this.txグラフ.n透明度 = 255; | |
147 | + this.txグラフ.n透明度 = 224; | |
168 | 148 | this.txグラフ.t2D描画( |
169 | 149 | CDTXMania.Instance.Device, |
170 | 150 | gx, gy + CDTXMania.Instance.Coordinates.Graph[inst].H - ar, |
171 | 151 | new Rectangle(0, 5 + stYposInImg, 30, ar) |
172 | - ); | |
152 | + ); | |
173 | 153 | this.txグラフ.t2D描画( // 上部白いバー |
174 | 154 | CDTXMania.Instance.Device, |
175 | 155 | gx, gy + CDTXMania.Instance.Coordinates.Graph[inst].H - ar, |
176 | - new Rectangle(0, 0, 30, 5) | |
156 | + new Rectangle(63 + 0, 0, 30, 5) | |
177 | 157 | ); |
178 | 158 | |
179 | - // --現在値_目標越 | |
159 | + // 目標を超えた時に発光?させる | |
180 | 160 | if ((dbCurrent[inst] >= dbTarget[inst])) |
181 | 161 | { |
182 | - // this.txグラフ.vc拡大縮小倍率 = new Vector3(1.4f, 1f, 1f); | |
183 | 162 | this.txグラフ.n透明度 = 128; |
184 | 163 | this.txグラフ.b加算合成 = true; |
185 | 164 | this.txグラフ.t2D描画( |
186 | 165 | CDTXMania.Instance.Device, |
187 | 166 | gx, gy + CDTXMania.Instance.Coordinates.Graph[inst].H - ar, |
188 | 167 | new Rectangle(0, 5 + stYposInImg, 30, ar) |
189 | - ); | |
168 | + ); | |
190 | 169 | this.txグラフ.b加算合成 = false; |
191 | 170 | } |
171 | + | |
192 | 172 | // --目標値 |
193 | 173 | if (this.dbTargetDisp[inst] < this.dbTarget[inst]) |
194 | 174 | { |
195 | 175 | this.dbTargetDisp[inst] += (this.dbTarget[inst] - this.dbTargetDisp[inst]) / 5 + 0.01; |
196 | 176 | } |
197 | - if (this.dbTargetDisp[inst] >= this.dbTarget[inst]) | |
177 | + else | |
198 | 178 | { |
199 | 179 | this.dbTargetDisp[inst] = this.dbTarget[inst]; |
200 | 180 | } |
201 | 181 | ar = (int)(CDTXMania.Instance.Coordinates.Graph[inst].H * this.dbTargetDisp[inst] / 100.0); |
202 | - | |
182 | + | |
183 | + this.txグラフ.n透明度 = 224; | |
203 | 184 | this.txグラフ.t2D描画( |
204 | 185 | CDTXMania.Instance.Device, |
205 | 186 | gx + 30, |
206 | 187 | gy + CDTXMania.Instance.Coordinates.Graph[inst].H - ar, |
207 | 188 | new Rectangle(30, 5 + stYposInImg, 30, ar) |
208 | - ); | |
209 | - this.txグラフ.n透明度 = 255; | |
189 | + ); | |
210 | 190 | this.txグラフ.t2D描画( // 上部白いバー |
211 | 191 | CDTXMania.Instance.Device, gx + 30, gy + CDTXMania.Instance.Coordinates.Graph[inst].H - ar, |
212 | - new Rectangle(30, 0, 30, 5) | |
192 | + new Rectangle(63 + 30, 0, 30, 5) | |
213 | 193 | ); |
214 | 194 | } |
215 | 195 | } |
@@ -342,6 +342,10 @@ namespace DTXMania.Coordinates | ||
342 | 342 | OptionPanelSelect.Drums = new CXY(1107, 23); |
343 | 343 | OptionPanelSelect.Guitar = new CXY(1107, 50); |
344 | 344 | OptionPanelSelect.Bass = new CXY(1107, 77); |
345 | + | |
346 | + Graph.Drums = new CWH(62, 1080); | |
347 | + Graph.Guitar = new CWH(62, 1080); | |
348 | + Graph.Bass = new CWH(62, 1080); | |
345 | 349 | |
346 | 350 | } |
347 | 351 | } |