+++ /dev/null
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Runtime.Serialization;\r
-using System.Xml;\r
-using DTXMania;\r
-\r
-namespace DTXMania.Coordinates\r
-{\r
- [DataContract]\r
- public class CX\r
- {\r
- public CX(int x)\r
- {\r
- X = x;\r
- }\r
- [DataMember]\r
- public int X;\r
- }\r
-\r
- [DataContract]\r
- public class CY\r
- {\r
- public CY(int y)\r
- {\r
- Y = y;\r
- }\r
- [DataMember]\r
- public int Y;\r
- }\r
-\r
- [DataContract]\r
- public class CXY : CX\r
- {\r
- public CXY(int x, int y)\r
- : base(x)\r
- {\r
- Y = y;\r
- }\r
-\r
- [DataMember]\r
- public int Y;\r
- }\r
-\r
- [DataContract]\r
- public class CXW : CX\r
- {\r
- public CXW(int x, int w)\r
- : base(x)\r
- {\r
- W = w;\r
- }\r
- [DataMember]\r
- public int W;\r
- }\r
-\r
- [DataContract]\r
- public class CXYW : CXY\r
- {\r
- public CXYW(int x, int y, int w)\r
- : base(x, y)\r
- {\r
- W = w;\r
- }\r
- [DataMember]\r
- public int W;\r
- }\r
-\r
- [DataContract]\r
- public class CRange\r
- {\r
- public CRange(int min, int max)\r
- {\r
- Min = min;\r
- Max = max;\r
- }\r
- [DataMember]\r
- public int Min;\r
- [DataMember]\r
- public int Max;\r
- }\r
-\r
- [DataContract]\r
- public class CW\r
- {\r
- public CW(int w)\r
- {\r
- W = w;\r
- }\r
- [DataMember]\r
- public int W;\r
- }\r
-\r
- [DataContract]\r
- public class CWH : CW\r
- {\r
- public CWH(int w, int h)\r
- : base(w)\r
- {\r
- H = h;\r
- }\r
-\r
- [DataMember]\r
- public int H;\r
- }\r
-\r
- [DataContract]\r
- public class CRect : CXY\r
- {\r
- public System.Drawing.Rectangle rc;\r
- public System.Drawing.Rectangle rcTmp;\r
-\r
- public CRect(int x, int y, int w, int h)\r
- : base(x, y)\r
- {\r
- W = w;\r
- H = h;\r
- rc = new System.Drawing.Rectangle(X, Y, W, H);\r
- rcTmp = new System.Drawing.Rectangle(X, Y, W, H);\r
- }\r
-\r
- public static implicit operator System.Drawing.Rectangle(CRect x)\r
- {\r
- return x.rcTmp;\r
- }\r
-\r
- public System.Drawing.Rectangle ApplyCounterY(int counter, int overlap)\r
- {\r
- rcTmp.Y = rc.Y + (rc.Height - overlap) * counter;\r
- return rcTmp;\r
- }\r
- public System.Drawing.Rectangle ApplyCounterX(int counter, int overlap)\r
- {\r
- rcTmp.X = rc.X + (rc.Width - overlap) * counter;\r
- return rcTmp;\r
- }\r
- public System.Drawing.Rectangle ApplyCounterXY(int counterX, int counterY, int overlapX, int overlapY)\r
- {\r
- rcTmp.X = rc.X + (rc.Width - overlapX) * counterX;\r
- rcTmp.Y = rc.Y + (rc.Height - overlapY) * counterY;\r
- return rcTmp;\r
- }\r
- [DataMember]\r
- public int W;\r
- [DataMember]\r
- public int H;\r
-\r
- // Deserialize後、WとHは初期化されるが、rc, rcTmpが初期化されない問題への対処。\r
- [OnDeserialized()]\r
- private void OnDeserializedMethod(StreamingContext context)\r
- {\r
- rc = new System.Drawing.Rectangle( X, Y, W, H );\r
- rcTmp = new System.Drawing.Rectangle( X, Y, W, H );\r
- }\r
- }\r
-\r
- public class CCoordinates\r
- {\r
- public CXY Gauge;\r
- public int GaugeMax;\r
- public STDGBSValue<CWH> Graph;\r
- public CRange Danger;\r
- public STDGBSValue<CW> Instrument;\r
- public STDGBSValue<CY> Score;\r
- public CW StatusPanel;\r
- public CXY Panel;\r
- public CWH Movie;\r
- public STDGBSValue<CY> LaneFlash;\r
-\r
- public CY DrPad;\r
- public STPadValue<CY> DrPadOffset;\r
-\r
- public CRect ImgGtChipOpen;\r
- public int ImgGtCountOpenChip;\r
- public CRect ImgGtRGBButton;\r
- public int ImgGtCountRGBChip;\r
- public int ImgGtCountWailingChip;\r
- public CRect ImgGtWailingBonus;\r
- public CRect ImgGtLaneFlash;\r
- public CRect ImgGtWailingChip;\r
- public CRect ImgGtWailingFrame;\r
- public CRect ImgGtButtonR;\r
- public CRect ImgGtButtonG;\r
- public CRect ImgGtButtonB;\r
- public CRect ImgGtPressingButtonR;\r
- public CRect ImgGtPressingButtonG;\r
- public CRect ImgGtPressingButtonB;\r
- public CRect ImgDrLaneFlash;\r
-\r
- public STPadValue<CRect> ImgDrChip;\r
- public CRect ImgDrChipCYDeco;\r
- public CRect ImgDrChipHHODeco;\r
- public int ImgDrCountChip;\r
-\r
- public STPadValue<CRect> ImgDrPad;\r
- public CRect ImgJudgeLine;\r
- public CRect ImgBarLine;\r
- public CRect ImgBeatLine;\r
- public CRect ImgComboCombo;\r
- public CRect ImgComboOneDigit;\r
- public CRect ImgGaugeOrange;\r
- public CRect ImgGaugeNormal;\r
- public CRect ImgGaugeLight;\r
- public CRect ImgGaugeTopLight;\r
- public CRect ImgGaugeStar;\r
- public CRect ImgScoreOneDigit;\r
- public CRect ImgSpeedPanel;\r
- public CRect ImgConsoleFont;\r
- public CRect ImgJudgeString;\r
- public CRect ImgDanger;\r
-\r
- public CWH ImgOptionPanel;\r
-\r
- public STDGBSValue<CY>[] OffsetGuitarBassSwap;\r
- public STDGBSValue<CXY> PointFullCombo;\r
-\r
- public STDGBSValue<CXY> OptionPanelSelect;\r
-\r
- /// <summary>\r
- /// シリアル化対象メンバはここで初期値を与えます。XMLが存在しない場合一度これらの値が書きだされ、\r
- /// もう一度デシリアライズされます。XMLが存在する場合、これらの値は全て無効になります。\r
- /// </summary>\r
- public CCoordinates()\r
- {\r
- ImgJudgeLine = new CRect(0, 0, 64, 16);\r
-\r
- ImgGtChipOpen = new CRect(72 * 3, 0, 72 * 3, 14);\r
- ImgGtRGBButton = new CRect(0, 0, 72, 14);\r
- ImgGtWailingChip = new CRect(0, 590, 60, 120);\r
- ImgGtCountWailingChip = 5;\r
- ImgGtCountRGBChip = 48;\r
- ImgGtCountOpenChip = 48;\r
-\r
- ImgDanger = new CRect(0, 0, 64, 256);\r
-\r
- ImgGtButtonR = new CRect(0, 0, 72, 72);\r
- ImgGtButtonG = new CRect(72, 0, 72, 72);\r
- ImgGtButtonB = new CRect(144, 0, 72, 72);\r
- ImgGtPressingButtonR = new CRect(0, 72, 72, 72);\r
- ImgGtPressingButtonG = new CRect(72, 72, 72, 72);\r
- ImgGtPressingButtonB = new CRect(144, 72, 72, 72);\r
- ImgGtWailingBonus = new CRect(0, 0, 78, 549);\r
-\r
- ImgComboCombo = new CRect(100, 140, 110, 30);\r
- ImgComboOneDigit = new CRect(0, 0, 50, 70);\r
-\r
- ImgGtWailingFrame = new CRect(0, 0, 66, 113);\r
- ImgSpeedPanel = new CRect(0, 0, 45, 164);\r
-\r
- ImgConsoleFont = new CRect(0, 0, 16, 32);\r
- ImgJudgeString = new CRect(0, 0, 256, 36);\r
-\r
- ImgDrCountChip = 48;\r
- ImgDrChip = new STPadValue<CRect>();\r
- ImgDrChip.LC = new CRect(99 + 72 * 5, 16, 85, 18);\r
- ImgDrChip.BD = new CRect(0, 20, 99, 22);\r
- ImgDrChip.HH = new CRect(99, 16, 72, 18);\r
- ImgDrChip.SD = new CRect(99 + 72, 16, 72, 18);\r
- ImgDrChip.HT = new CRect(99 + 72 * 2, 16, 72, 18);\r
- ImgDrChip.LT = new CRect(99 + 72 * 3, 16, 72, 18);\r
- ImgDrChip.FT = new CRect(99 + 72 * 4, 16, 72, 18);\r
- ImgDrChip.CY = new CRect(99 + 72 * 5, 16, 85, 18);\r
- ImgDrChipCYDeco = new CRect(99 + 72 * 5, 786, 85, 64);\r
- ImgDrChip.RD = new CRect(99 + 72 * 5 + 85, 16, 58, 18);\r
- ImgDrChip.HHO = new CRect(99 + 72 * 5 + 85, 16, 58, 18);\r
- ImgDrChipHHODeco = new CRect(99 + 72 * 5 + 85, 791, 58, 30);\r
-\r
- ImgDrPad = new STPadValue<CRect>();\r
- ImgDrPad.LC = new CRect(0, 0, 170, 130);\r
- ImgDrPad.HH = new CRect(170, 0, 170, 130);\r
- ImgDrPad.SD = new CRect(340, 0, 170, 130);\r
- ImgDrPad.BD = new CRect(0, 130, 170, 130);\r
- ImgDrPad.HT = new CRect(170, 130, 170, 130);\r
- ImgDrPad.LT = new CRect(340, 130, 170, 130);\r
- ImgDrPad.FT = new CRect(0, 260, 170, 130);\r
- ImgDrPad.CY = new CRect(170, 260, 170, 130);\r
- ImgDrPad.RD = new CRect(340, 260, 170, 130);\r
-\r
- ImgBarLine = new CRect(0, 982, 480, 3);\r
- ImgBeatLine = new CRect(0, 985, 480, 2);\r
-\r
- ImgGaugeOrange = new CRect(48, 0, 48, 61);\r
- ImgGaugeNormal = new CRect(0, 0, 48, 61);\r
- ImgGaugeLight = new CRect(0, 0, 48, 576);\r
- ImgGaugeTopLight = new CRect(144, 0, 48, 36);\r
- ImgGaugeStar = new CRect(0, 72, 96, 72);\r
-\r
- ImgScoreOneDigit = new CRect(0, 0, 30, 38);\r
-\r
- // w無効\r
- ImgGtLaneFlash = new CRect(0, 0, -1, 512);\r
- // w無効\r
- ImgDrLaneFlash = new CRect(0, 0, -1, 768);\r
-\r
- ImgOptionPanel = new CWH(72, 27);\r
-\r
- // #24063 2011.1.27 yyagi\r
- OffsetGuitarBassSwap = new STDGBSValue<CY>[2];\r
- OffsetGuitarBassSwap[0] = new STDGBSValue<CY>();\r
- OffsetGuitarBassSwap[0].Drums = new CY(0);\r
- OffsetGuitarBassSwap[0].Guitar = new CY((int)(21 * Scale.Y));\r
- OffsetGuitarBassSwap[0].Bass = new CY((int)(42 * Scale.Y));\r
- OffsetGuitarBassSwap[1].Drums = new CY(0);\r
- OffsetGuitarBassSwap[1].Guitar = new CY((int)(42 * Scale.Y));\r
- OffsetGuitarBassSwap[1].Bass = new CY((int)(21 * Scale.Y));\r
-\r
- PointFullCombo = new STDGBSValue<CXY>();\r
- PointFullCombo.Drums = new CXY((int)(0x80 * Scale.X), (int)(0xed * Scale.Y));\r
- PointFullCombo.Guitar = new CXY((int)(0xdf * Scale.X), (int)(0xed * Scale.Y));\r
- PointFullCombo.Bass = new CXY((int)(0x141 * Scale.X), (int)(0xed * Scale.Y));\r
-\r
- DrPadOffset = new STPadValue<CY>();\r
-\r
- DrPadOffset.LC = new CY(0); // <- 非対象化\r
- DrPadOffset.HH = new CY(10);\r
- DrPadOffset.HHO = new CY(10);\r
- DrPadOffset.SD = new CY(22);\r
- DrPadOffset.BD = new CY(30);\r
- DrPadOffset.HT = new CY(0);\r
- DrPadOffset.LT = new CY(15);\r
- DrPadOffset.FT = new CY(30);\r
- DrPadOffset.CY = new CY(15);\r
- DrPadOffset.RD = new CY(80);\r
- DrPad = new CY(930);\r
-\r
- Instrument = new STDGBSValue<CW>();\r
- Instrument.Drums = new CW(72 * 5 + 85 * 2 + 99);\r
- Instrument.Guitar = new CW(72 * 4);\r
- Instrument.Bass = new CW(72 * 4);\r
-\r
- Gauge = new CXY(0, 1080); // <- 左固定\r
- GaugeMax = 1080;\r
- Danger = new CRange(0, SampleFramework.GameWindowSize.Width - 64);\r
- StatusPanel = new CW(45);\r
- Score = new STDGBSValue<CY>();\r
- Score.Drums = new CY(30);\r
- Score.Guitar = new CY(30);\r
- Score.Bass = new CY(30);\r
-\r
- Panel = new CXY(SampleFramework.GameWindowSize.Width, 0);\r
- Movie = new CWH(556, 710);\r
-\r
- LaneFlash = new STDGBSValue<CY>();\r
- LaneFlash.Drums = new CY(SampleFramework.GameWindowSize.Height - 768);\r
- LaneFlash.Guitar = new CY(0);\r
- LaneFlash.Bass = new CY(0);\r
-\r
- OptionPanelSelect = new STDGBSValue<CXY>();\r
- OptionPanelSelect.Drums = new CXY(1107, 23);\r
- OptionPanelSelect.Guitar = new CXY(1107, 50);\r
- OptionPanelSelect.Bass = new CXY(1107, 77);\r
- \r
- Graph.Drums = new CWH(62, 1080);\r
- Graph.Guitar = new CWH(62, 1080);\r
- Graph.Bass = new CWH(62, 1080);\r
-\r
- }\r
- }\r
-}\r