2 using System.Collections.Generic;
5 using System.Runtime.Serialization;
9 namespace DTXMania.Coordinates
36 public CXY(int x, int y)
49 public CXW(int x, int w)
59 public class CXYW : CXY
61 public CXYW(int x, int y, int w)
73 public CRange(int min, int max)
98 public CWH(int w, int h)
109 public class CRect : CXY
111 public System.Drawing.Rectangle rc;
112 public System.Drawing.Rectangle rcTmp;
114 public CRect(int x, int y, int w, int h)
119 rc = new System.Drawing.Rectangle(X, Y, W, H);
120 rcTmp = new System.Drawing.Rectangle(X, Y, W, H);
123 public static implicit operator System.Drawing.Rectangle(CRect x)
128 public System.Drawing.Rectangle ApplyCounterY(int counter, int overlap)
130 rcTmp.Y = rc.Y + (rc.Height - overlap) * counter;
133 public System.Drawing.Rectangle ApplyCounterX(int counter, int overlap)
135 rcTmp.X = rc.X + (rc.Width - overlap) * counter;
138 public System.Drawing.Rectangle ApplyCounterXY(int counterX, int counterY, int overlapX, int overlapY)
140 rcTmp.X = rc.X + (rc.Width - overlapX) * counterX;
141 rcTmp.Y = rc.Y + (rc.Height - overlapY) * counterY;
149 // Deserialize後、WとHは初期化されるが、rc, rcTmpが初期化されない問題への対処。
151 private void OnDeserializedMethod(StreamingContext context)
153 rc = new System.Drawing.Rectangle( X, Y, W, H );
154 rcTmp = new System.Drawing.Rectangle( X, Y, W, H );
158 public class CCoordinates
162 public STDGBSValue<CWH> Graph;
163 public CRange Danger;
164 public STDGBSValue<CW> Instrument;
165 public STDGBSValue<CY> Score;
166 public CW StatusPanel;
169 public STDGBSValue<CY> LaneFlash;
172 public STPadValue<CY> DrPadOffset;
174 public CRect ImgGtChipOpen;
175 public int ImgGtCountOpenChip;
176 public CRect ImgGtRGBButton;
177 public int ImgGtCountRGBChip;
178 public int ImgGtCountWailingChip;
179 public CRect ImgGtWailingBonus;
180 public CRect ImgGtLaneFlash;
181 public CRect ImgGtWailingChip;
182 public CRect ImgGtWailingFrame;
183 public CRect ImgGtButtonR;
184 public CRect ImgGtButtonG;
185 public CRect ImgGtButtonB;
186 public CRect ImgGtPressingButtonR;
187 public CRect ImgGtPressingButtonG;
188 public CRect ImgGtPressingButtonB;
189 public CRect ImgDrLaneFlash;
191 public STPadValue<CRect> ImgDrChip;
192 public CRect ImgDrChipCYDeco;
193 public CRect ImgDrChipHHODeco;
194 public int ImgDrCountChip;
196 public STPadValue<CRect> ImgDrPad;
197 public CRect ImgJudgeLine;
198 public CRect ImgBarLine;
199 public CRect ImgBeatLine;
200 public CRect ImgComboCombo;
201 public CRect ImgComboOneDigit;
202 public CRect ImgGaugeOrange;
203 public CRect ImgGaugeNormal;
204 public CRect ImgGaugeLight;
205 public CRect ImgGaugeTopLight;
206 public CRect ImgGaugeStar;
207 public CRect ImgScoreOneDigit;
208 public CRect ImgSpeedPanel;
209 public CRect ImgConsoleFont;
210 public CRect ImgJudgeString;
211 public CRect ImgDanger;
213 public CWH ImgOptionPanel;
215 public STDGBSValue<CY>[] OffsetGuitarBassSwap;
216 public STDGBSValue<CXY> PointFullCombo;
218 public STDGBSValue<CXY> OptionPanelSelect;
221 /// シリアル化対象メンバはここで初期値を与えます。XMLが存在しない場合一度これらの値が書きだされ、
222 /// もう一度デシリアライズされます。XMLが存在する場合、これらの値は全て無効になります。
224 public CCoordinates()
226 ImgJudgeLine = new CRect(0, 0, 64, 16);
228 ImgGtChipOpen = new CRect(72 * 3, 0, 72 * 3, 14);
229 ImgGtRGBButton = new CRect(0, 0, 72, 14);
230 ImgGtWailingChip = new CRect(0, 590, 70, 120);
231 ImgGtCountWailingChip = 5;
232 ImgGtCountRGBChip = 48;
233 ImgGtCountOpenChip = 48;
235 ImgDanger = new CRect(0, 0, 64, 256);
237 ImgGtButtonR = new CRect(0, 0, 72, 72);
238 ImgGtButtonG = new CRect(72, 0, 72, 72);
239 ImgGtButtonB = new CRect(144, 0, 72, 72);
240 ImgGtPressingButtonR = new CRect(0, 72, 72, 72);
241 ImgGtPressingButtonG = new CRect(72, 72, 72, 72);
242 ImgGtPressingButtonB = new CRect(144, 72, 72, 72);
243 ImgGtWailingBonus = new CRect(0, 0, 78, 549);
245 ImgComboCombo = new CRect(100, 140, 110, 30);
246 ImgComboOneDigit = new CRect(0, 0, 50, 70);
248 ImgGtWailingFrame = new CRect(0, 0, 70, 120);
249 ImgSpeedPanel = new CRect(0, 0, 45, 164);
251 ImgConsoleFont = new CRect(0, 0, 16, 32);
252 ImgJudgeString = new CRect(0, 0, 256, 36);
255 ImgDrChip = new STPadValue<CRect>();
256 ImgDrChip.LC = new CRect(99 + 72 * 5, 16, 85, 18);
257 ImgDrChip.BD = new CRect(0, 20, 99, 22);
258 ImgDrChip.HH = new CRect(99, 16, 72, 18);
259 ImgDrChip.SD = new CRect(99 + 72, 16, 72, 18);
260 ImgDrChip.HT = new CRect(99 + 72 * 2, 16, 72, 18);
261 ImgDrChip.LT = new CRect(99 + 72 * 3, 16, 72, 18);
262 ImgDrChip.FT = new CRect(99 + 72 * 4, 16, 72, 18);
263 ImgDrChip.CY = new CRect(99 + 72 * 5, 16, 85, 18);
264 ImgDrChipCYDeco = new CRect(99 + 72 * 5, 786, 85, 64);
265 ImgDrChip.RD = new CRect(99 + 72 * 5 + 85, 16, 58, 18);
266 ImgDrChip.HHO = new CRect(99 + 72 * 5 + 85, 16, 58, 18);
267 ImgDrChipHHODeco = new CRect(99 + 72 * 5 + 85, 791, 58, 30);
269 ImgDrPad = new STPadValue<CRect>();
270 ImgDrPad.LC = new CRect(0, 0, 170, 130);
271 ImgDrPad.HH = new CRect(170, 0, 170, 130);
272 ImgDrPad.SD = new CRect(340, 0, 170, 130);
273 ImgDrPad.BD = new CRect(0, 130, 170, 130);
274 ImgDrPad.HT = new CRect(170, 130, 170, 130);
275 ImgDrPad.LT = new CRect(340, 130, 170, 130);
276 ImgDrPad.FT = new CRect(0, 260, 170, 130);
277 ImgDrPad.CY = new CRect(170, 260, 170, 130);
278 ImgDrPad.RD = new CRect(340, 260, 170, 130);
280 ImgBarLine = new CRect(0, 982, 480, 3);
281 ImgBeatLine = new CRect(0, 985, 480, 2);
283 ImgGaugeOrange = new CRect(48, 0, 48, 61);
284 ImgGaugeNormal = new CRect(0, 0, 48, 61);
285 ImgGaugeLight = new CRect(0, 0, 48, 576);
286 ImgGaugeTopLight = new CRect(144, 0, 48, 36);
287 ImgGaugeStar = new CRect(0, 72, 96, 72);
289 ImgScoreOneDigit = new CRect(0, 0, 30, 38);
292 ImgGtLaneFlash = new CRect(0, 0, -1, 512);
294 ImgDrLaneFlash = new CRect(0, 0, -1, 768);
296 ImgOptionPanel = new CWH(72, 27);
298 // #24063 2011.1.27 yyagi
299 OffsetGuitarBassSwap = new STDGBSValue<CY>[2];
300 OffsetGuitarBassSwap[0] = new STDGBSValue<CY>();
301 OffsetGuitarBassSwap[0].Drums = new CY(0);
302 OffsetGuitarBassSwap[0].Guitar = new CY((int)(21 * Scale.Y));
303 OffsetGuitarBassSwap[0].Bass = new CY((int)(42 * Scale.Y));
304 OffsetGuitarBassSwap[1].Drums = new CY(0);
305 OffsetGuitarBassSwap[1].Guitar = new CY((int)(42 * Scale.Y));
306 OffsetGuitarBassSwap[1].Bass = new CY((int)(21 * Scale.Y));
308 PointFullCombo = new STDGBSValue<CXY>();
309 PointFullCombo.Drums = new CXY((int)(0x80 * Scale.X), (int)(0xed * Scale.Y));
310 PointFullCombo.Guitar = new CXY((int)(0xdf * Scale.X), (int)(0xed * Scale.Y));
311 PointFullCombo.Bass = new CXY((int)(0x141 * Scale.X), (int)(0xed * Scale.Y));
313 DrPadOffset = new STPadValue<CY>();
315 DrPadOffset.LC = new CY(0); // <- 非対象化
316 DrPadOffset.HH = new CY(10);
317 DrPadOffset.HHO = new CY(10);
318 DrPadOffset.SD = new CY(22);
319 DrPadOffset.BD = new CY(30);
320 DrPadOffset.HT = new CY(0);
321 DrPadOffset.LT = new CY(15);
322 DrPadOffset.FT = new CY(30);
323 DrPadOffset.CY = new CY(15);
324 DrPadOffset.RD = new CY(50);
327 Instrument = new STDGBSValue<CW>();
328 Instrument.Drums = new CW(72 * 5 + 85 * 2 + 99);
329 Instrument.Guitar = new CW(72 * 4);
330 Instrument.Bass = new CW(72 * 4);
332 Gauge = new CXY(0, 1080); // <- 左固定
334 Danger = new CRange(0, SampleFramework.GameWindowSize.Width - 64);
335 StatusPanel = new CW(45);
336 Score = new STDGBSValue<CY>();
337 Score.Drums = new CY(30);
338 Score.Guitar = new CY(30);
339 Score.Bass = new CY(30);
341 Panel = new CXY(SampleFramework.GameWindowSize.Width, 0);
342 Movie = new CWH(556, 710);
344 LaneFlash = new STDGBSValue<CY>();
345 LaneFlash.Drums = new CY(SampleFramework.GameWindowSize.Height - 768);
346 LaneFlash.Guitar = new CY(0);
347 LaneFlash.Bass = new CY(0);
349 OptionPanelSelect = new STDGBSValue<CXY>();
350 OptionPanelSelect.Drums = new CXY(1107, 23);
351 OptionPanelSelect.Guitar = new CXY(1107, 50);
352 OptionPanelSelect.Bass = new CXY(1107, 77);
354 Graph.Drums = new CWH(62, 1080);
355 Graph.Guitar = new CWH(62, 1080);
356 Graph.Bass = new CWH(62, 1080);