Refactoring II
This commit is contained in:
parent
0dd3ff7a16
commit
20c92e836a
132
Game1.cs
132
Game1.cs
@ -503,10 +503,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
num = (1.0 - num) * (1.0 - num);
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = (int)(720.0 - 640.0 * num);
|
||||
tinyRect.Right = (int)(1360.0 - 640.0 * num);
|
||||
tinyRect.Top = 0;
|
||||
tinyRect.Bottom = 160;
|
||||
tinyRect.LeftX = (int)(720.0 - 640.0 * num);
|
||||
tinyRect.RightX = (int)(1360.0 - 640.0 * num);
|
||||
tinyRect.TopY = 0;
|
||||
tinyRect.BottomY = 160;
|
||||
rect = tinyRect;
|
||||
opacity = num * num;
|
||||
}
|
||||
@ -514,10 +514,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
num = ((fadeOutPhase != 0) ? (1.0 - num * 2.0) : (1.0 - (1.0 - num) * (1.0 - num)));
|
||||
TinyRect tinyRect2 = default(TinyRect);
|
||||
tinyRect2.Left = 80;
|
||||
tinyRect2.Right = 720;
|
||||
tinyRect2.Top = (int)(-160.0 + num * 160.0);
|
||||
tinyRect2.Bottom = (int)(0.0 + num * 160.0);
|
||||
tinyRect2.LeftX = 80;
|
||||
tinyRect2.RightX = 720;
|
||||
tinyRect2.TopY = (int)(-160.0 + num * 160.0);
|
||||
tinyRect2.BottomY = (int)(0.0 + num * 160.0);
|
||||
rect = tinyRect2;
|
||||
opacity = 1.0;
|
||||
}
|
||||
@ -543,10 +543,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
num = 1.0 + num * 10.0;
|
||||
}
|
||||
TinyRect tinyRect3 = default(TinyRect);
|
||||
tinyRect3.Left = (int)(468.0 - 205.0 * num);
|
||||
tinyRect3.Right = (int)(468.0 + 205.0 * num);
|
||||
tinyRect3.Top = (int)(280.0 - 190.0 * num);
|
||||
tinyRect3.Bottom = (int)(280.0 + 190.0 * num);
|
||||
tinyRect3.LeftX = (int)(468.0 - 205.0 * num);
|
||||
tinyRect3.RightX = (int)(468.0 + 205.0 * num);
|
||||
tinyRect3.TopY = (int)(280.0 - 190.0 * num);
|
||||
tinyRect3.BottomY = (int)(280.0 + 190.0 * num);
|
||||
TinyRect rect = tinyRect3;
|
||||
pixmap.DrawIcon(16, 0, rect, opacity, 0.0, false);
|
||||
}
|
||||
@ -558,10 +558,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
double opacity = 1.0 - num;
|
||||
num = 1.0 + num * 10.0;
|
||||
TinyRect tinyRect4 = default(TinyRect);
|
||||
tinyRect4.Left = (int)(418.0 - 205.0 * num);
|
||||
tinyRect4.Right = (int)(418.0 + 205.0 * num);
|
||||
tinyRect4.Top = (int)(190.0 - 190.0 * num);
|
||||
tinyRect4.Bottom = (int)(190.0 + 190.0 * num);
|
||||
tinyRect4.LeftX = (int)(418.0 - 205.0 * num);
|
||||
tinyRect4.RightX = (int)(418.0 + 205.0 * num);
|
||||
tinyRect4.TopY = (int)(190.0 - 190.0 * num);
|
||||
tinyRect4.BottomY = (int)(190.0 + 190.0 * num);
|
||||
TinyRect rect = tinyRect4;
|
||||
pixmap.DrawIcon(16, 0, rect, opacity, 0.0, false);
|
||||
}
|
||||
@ -570,10 +570,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
double num = Math.Min((double)phaseTime / 20.0, 1.0);
|
||||
num *= num;
|
||||
TinyRect tinyRect5 = default(TinyRect);
|
||||
tinyRect5.Left = (int)(213.0 + 800.0 * num);
|
||||
tinyRect5.Right = (int)(623.0 + 800.0 * num);
|
||||
tinyRect5.Top = 0;
|
||||
tinyRect5.Bottom = 0;
|
||||
tinyRect5.LeftX = (int)(213.0 + 800.0 * num);
|
||||
tinyRect5.RightX = (int)(623.0 + 800.0 * num);
|
||||
tinyRect5.TopY = 0;
|
||||
tinyRect5.BottomY = 0;
|
||||
TinyRect rect = tinyRect5;
|
||||
pixmap.DrawIcon(16, 0, rect, 1.0, 0.0, false);
|
||||
}
|
||||
@ -590,10 +590,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
num = 1.0 - num;
|
||||
}
|
||||
TinyRect tinyRect6 = default(TinyRect);
|
||||
tinyRect6.Left = (int)(418.0 - 205.0 * num);
|
||||
tinyRect6.Right = (int)(418.0 + 205.0 * num);
|
||||
tinyRect6.Top = (int)(190.0 - 190.0 * num);
|
||||
tinyRect6.Bottom = (int)(190.0 + 190.0 * num);
|
||||
tinyRect6.LeftX = (int)(418.0 - 205.0 * num);
|
||||
tinyRect6.RightX = (int)(418.0 + 205.0 * num);
|
||||
tinyRect6.TopY = (int)(190.0 - 190.0 * num);
|
||||
tinyRect6.BottomY = (int)(190.0 + 190.0 * num);
|
||||
TinyRect rect = tinyRect6;
|
||||
double rotation = 0.0;
|
||||
if (num < 1.0)
|
||||
@ -626,23 +626,23 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
num2 = 1.0 - num2;
|
||||
}
|
||||
TinyRect tinyRect7 = default(TinyRect);
|
||||
tinyRect7.Left = (int)(720.0 - 640.0 * num);
|
||||
tinyRect7.Right = (int)(1360.0 - 640.0 * num);
|
||||
tinyRect7.Top = 0;
|
||||
tinyRect7.Bottom = 160;
|
||||
tinyRect7.LeftX = (int)(720.0 - 640.0 * num);
|
||||
tinyRect7.RightX = (int)(1360.0 - 640.0 * num);
|
||||
tinyRect7.TopY = 0;
|
||||
tinyRect7.BottomY = 160;
|
||||
TinyRect rect = tinyRect7;
|
||||
pixmap.DrawIcon(15, 0, rect, num * num, false);
|
||||
TinyRect tinyRect8 = default(TinyRect);
|
||||
tinyRect8.Left = 487;
|
||||
tinyRect8.Right = 713;
|
||||
tinyRect8.Top = 148;
|
||||
tinyRect8.Bottom = 374;
|
||||
tinyRect8.LeftX = 487;
|
||||
tinyRect8.RightX = 713;
|
||||
tinyRect8.TopY = 148;
|
||||
tinyRect8.BottomY = 374;
|
||||
TinyRect rect2 = tinyRect8;
|
||||
TinyRect tinyRect9 = default(TinyRect);
|
||||
tinyRect9.Left = 118;
|
||||
tinyRect9.Right = 570;
|
||||
tinyRect9.Top = 268;
|
||||
tinyRect9.Bottom = 720;
|
||||
tinyRect9.LeftX = 118;
|
||||
tinyRect9.RightX = 570;
|
||||
tinyRect9.TopY = 268;
|
||||
tinyRect9.BottomY = 720;
|
||||
TinyRect rect3 = tinyRect9;
|
||||
double opacity = 0.5 - num * 0.4;
|
||||
double rotation = (0.0 - num2) * 100.0 * 2.5;
|
||||
@ -653,10 +653,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
double num = Math.Min((double)phaseTime / 100.0, 1.0);
|
||||
TinyRect tinyRect10 = default(TinyRect);
|
||||
tinyRect10.Left = (int)(418.0 - 205.0 * num);
|
||||
tinyRect10.Right = (int)(418.0 + 205.0 * num);
|
||||
tinyRect10.Top = (int)(238.0 - 190.0 * num);
|
||||
tinyRect10.Bottom = (int)(238.0 + 190.0 * num);
|
||||
tinyRect10.LeftX = (int)(418.0 - 205.0 * num);
|
||||
tinyRect10.RightX = (int)(418.0 + 205.0 * num);
|
||||
tinyRect10.TopY = (int)(238.0 - 190.0 * num);
|
||||
tinyRect10.BottomY = (int)(238.0 + 190.0 * num);
|
||||
TinyRect rect = tinyRect10;
|
||||
double rotation = 0.0;
|
||||
if (num < 1.0)
|
||||
@ -672,10 +672,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
double num = Math.Sin((double)phaseTime / 3.0) / 2.0 + 1.0;
|
||||
TinyRect tinyRect11 = default(TinyRect);
|
||||
tinyRect11.Left = (int)(418.0 - 205.0 * num);
|
||||
tinyRect11.Right = (int)(418.0 + 205.0 * num);
|
||||
tinyRect11.Top = (int)(238.0 - 190.0 * num);
|
||||
tinyRect11.Bottom = (int)(238.0 + 190.0 * num);
|
||||
tinyRect11.LeftX = (int)(418.0 - 205.0 * num);
|
||||
tinyRect11.RightX = (int)(418.0 + 205.0 * num);
|
||||
tinyRect11.TopY = (int)(238.0 - 190.0 * num);
|
||||
tinyRect11.BottomY = (int)(238.0 + 190.0 * num);
|
||||
TinyRect rect = tinyRect11;
|
||||
pixmap.DrawIcon(16, 0, rect, 1.0, 0.0, false);
|
||||
}
|
||||
@ -689,17 +689,17 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
int width = drawBounds.Width;
|
||||
int height = drawBounds.Height;
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = 10;
|
||||
tinyRect.Right = 260;
|
||||
tinyRect.Top = height - 325;
|
||||
tinyRect.Bottom = height - 10;
|
||||
tinyRect.LeftX = 10;
|
||||
tinyRect.RightX = 260;
|
||||
tinyRect.TopY = height - 325;
|
||||
tinyRect.BottomY = height - 10;
|
||||
TinyRect rect = tinyRect;
|
||||
pixmap.DrawIcon(14, 15, rect, 0.3, false);
|
||||
TinyRect tinyRect2 = default(TinyRect);
|
||||
tinyRect2.Left = width - 170;
|
||||
tinyRect2.Right = width - 10;
|
||||
tinyRect2.Top = height - ((IsTrialMode || IsRankingMode) ? 325 : 195);
|
||||
tinyRect2.Bottom = height - 10;
|
||||
tinyRect2.LeftX = width - 170;
|
||||
tinyRect2.RightX = width - 10;
|
||||
tinyRect2.TopY = height - ((IsTrialMode || IsRankingMode) ? 325 : 195);
|
||||
tinyRect2.BottomY = height - 10;
|
||||
rect = tinyRect2;
|
||||
pixmap.DrawIcon(14, 15, rect, 0.3, false);
|
||||
}
|
||||
@ -788,26 +788,26 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
int secondaryDoors;
|
||||
gameData.GetGamerInfo(gamer, out nbVies, out mainDoors, out secondaryDoors);
|
||||
TinyPoint tinyPoint = default(TinyPoint);
|
||||
tinyPoint.X = buttonRect.Right + 5 - pixmap.Origin.X;
|
||||
tinyPoint.Y = buttonRect.Top + 3 - pixmap.Origin.Y;
|
||||
tinyPoint.X = buttonRect.RightX + 5 - pixmap.Origin.X;
|
||||
tinyPoint.Y = buttonRect.TopY + 3 - pixmap.Origin.Y;
|
||||
TinyPoint pos = tinyPoint;
|
||||
string text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_TITLE), new string((char)(65 + gamer), 1));
|
||||
Text.DrawText(pixmap, pos, text, 0.7);
|
||||
TinyPoint tinyPoint2 = default(TinyPoint);
|
||||
tinyPoint2.X = buttonRect.Right + 5 - pixmap.Origin.X;
|
||||
tinyPoint2.Y = buttonRect.Top + 25 - pixmap.Origin.Y;
|
||||
tinyPoint2.X = buttonRect.RightX + 5 - pixmap.Origin.X;
|
||||
tinyPoint2.Y = buttonRect.TopY + 25 - pixmap.Origin.Y;
|
||||
pos = tinyPoint2;
|
||||
text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_MDOORS), mainDoors);
|
||||
Text.DrawText(pixmap, pos, text, 0.45);
|
||||
TinyPoint tinyPoint3 = default(TinyPoint);
|
||||
tinyPoint3.X = buttonRect.Right + 5 - pixmap.Origin.X;
|
||||
tinyPoint3.Y = buttonRect.Top + 39 - pixmap.Origin.Y;
|
||||
tinyPoint3.X = buttonRect.RightX + 5 - pixmap.Origin.X;
|
||||
tinyPoint3.Y = buttonRect.TopY + 39 - pixmap.Origin.Y;
|
||||
pos = tinyPoint3;
|
||||
text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_SDOORS), secondaryDoors);
|
||||
Text.DrawText(pixmap, pos, text, 0.45);
|
||||
TinyPoint tinyPoint4 = default(TinyPoint);
|
||||
tinyPoint4.X = buttonRect.Right + 5 - pixmap.Origin.X;
|
||||
tinyPoint4.Y = buttonRect.Top + 53 - pixmap.Origin.Y;
|
||||
tinyPoint4.X = buttonRect.RightX + 5 - pixmap.Origin.X;
|
||||
tinyPoint4.Y = buttonRect.TopY + 53 - pixmap.Origin.Y;
|
||||
pos = tinyPoint4;
|
||||
text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_LIFES), nbVies);
|
||||
Text.DrawText(pixmap, pos, text, 0.45);
|
||||
@ -825,8 +825,8 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
if (array.Length == 2)
|
||||
{
|
||||
TinyPoint tinyPoint = default(TinyPoint);
|
||||
tinyPoint.X = buttonRect.Right + 10 - pixmap.Origin.X;
|
||||
tinyPoint.Y = (buttonRect.Top + buttonRect.Bottom) / 2 - 20 - pixmap.Origin.Y;
|
||||
tinyPoint.X = buttonRect.RightX + 10 - pixmap.Origin.X;
|
||||
tinyPoint.Y = (buttonRect.TopY + buttonRect.BottomY) / 2 - 20 - pixmap.Origin.Y;
|
||||
TinyPoint pos = tinyPoint;
|
||||
Text.DrawText(pixmap, pos, array[0], 0.7);
|
||||
pos.Y += 24;
|
||||
@ -835,8 +835,8 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
else
|
||||
{
|
||||
TinyPoint tinyPoint2 = default(TinyPoint);
|
||||
tinyPoint2.X = buttonRect.Right + 10 - pixmap.Origin.X;
|
||||
tinyPoint2.Y = (buttonRect.Top + buttonRect.Bottom) / 2 - 8 - pixmap.Origin.Y;
|
||||
tinyPoint2.X = buttonRect.RightX + 10 - pixmap.Origin.X;
|
||||
tinyPoint2.Y = (buttonRect.TopY + buttonRect.BottomY) / 2 - 8 - pixmap.Origin.Y;
|
||||
TinyPoint pos2 = tinyPoint2;
|
||||
Text.DrawText(pixmap, pos2, text, 0.7);
|
||||
}
|
||||
@ -846,8 +846,8 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
TinyRect buttonRect = inputPad.GetButtonRect(glyph);
|
||||
TinyPoint tinyPoint = default(TinyPoint);
|
||||
tinyPoint.X = (buttonRect.Left + buttonRect.Right) / 2 - pixmap.Origin.X;
|
||||
tinyPoint.Y = buttonRect.Bottom + 2 - pixmap.Origin.Y;
|
||||
tinyPoint.X = (buttonRect.LeftX + buttonRect.RightX) / 2 - pixmap.Origin.X;
|
||||
tinyPoint.Y = buttonRect.BottomY + 2 - pixmap.Origin.Y;
|
||||
TinyPoint pos = tinyPoint;
|
||||
string text = MyResource.LoadString(res);
|
||||
Text.DrawTextCenter(pixmap, pos, text, 0.7);
|
||||
|
345
InputPad.cs
345
InputPad.cs
@ -13,7 +13,7 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
public class InputPad
|
||||
{
|
||||
private static readonly int padSize = 140;
|
||||
private static readonly int padRadius = 140;
|
||||
|
||||
private readonly Game1 game1;
|
||||
|
||||
@ -314,32 +314,32 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
Boolean keyPressedDown = false;
|
||||
Boolean keyPressedLeft = false;
|
||||
Boolean keyPressedRight = false;
|
||||
foreach (TinyPoint touchOrClick in touchesOrClicks)
|
||||
foreach (TinyPoint touchOrClickItem in touchesOrClicks)
|
||||
{
|
||||
Boolean keyboardPressed = false;
|
||||
if (touchOrClick.X == -1)
|
||||
if (touchOrClickItem.X == -1)
|
||||
{
|
||||
keyboardPressed = true;
|
||||
}
|
||||
Keys keyPressed = keyboardPressed ? (Keys)touchOrClick.Y : Keys.None;
|
||||
Keys keyPressed = keyboardPressed ? (Keys)touchOrClickItem.Y : Keys.None;
|
||||
keyPressedUp = keyPressed == Keys.Up ? true : keyPressedUp;
|
||||
keyPressedDown = keyPressed == Keys.Down ? true : keyPressedDown;
|
||||
keyPressedLeft = keyPressed == Keys.Left ? true : keyPressedLeft;
|
||||
keyPressedRight = keyPressed == Keys.Right ? true : keyPressedRight;
|
||||
|
||||
{
|
||||
TinyPoint tinyPoint2 = keyboardPressed ? new TinyPoint(1, 1) : touchOrClick;
|
||||
if (!accelStarted && Misc.IsInside(GetPadBounds(PadCenter, padSize), tinyPoint2))
|
||||
TinyPoint touchOrClick = keyboardPressed ? new TinyPoint(1, 1) : touchOrClickItem;
|
||||
if (!accelStarted && Misc.IsInside(GetPadBounds(PadCenter, padRadius), touchOrClick))
|
||||
{
|
||||
padPressed = true;
|
||||
padTouchPos = tinyPoint2;
|
||||
padTouchPos = touchOrClick;
|
||||
}
|
||||
if (keyPressed == Keys.Up || keyPressed == Keys.Right || keyPressed == Keys.Down || keyPressed == Keys.Left)
|
||||
if (keyPressedUp || keyPressedDown || keyPressedLeft || keyPressedRight)
|
||||
{
|
||||
padPressed = true;
|
||||
}
|
||||
Debug.WriteLine("padPressed=" + padPressed);
|
||||
Def.ButtonGlyph buttonGlyph2 = ButtonDetect(tinyPoint2);
|
||||
Def.ButtonGlyph buttonGlyph2 = ButtonDetect(touchOrClick);
|
||||
Debug.WriteLine("buttonGlyph2 =" + buttonGlyph2);
|
||||
if (buttonGlyph2 != 0)
|
||||
{
|
||||
@ -354,7 +354,7 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
}
|
||||
}
|
||||
|
||||
if ((Phase == Def.Phase.MainSetup || Phase == Def.Phase.PlaySetup) && accelSlider.Move(tinyPoint2))
|
||||
if ((Phase == Def.Phase.MainSetup || Phase == Def.Phase.PlaySetup) && accelSlider.Move(touchOrClick))
|
||||
{
|
||||
gameData.AccelSensitivity = accelSlider.Value;
|
||||
}
|
||||
@ -508,19 +508,20 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
decor.KeyChange(num3);
|
||||
}
|
||||
|
||||
private Def.ButtonGlyph ButtonDetect(TinyPoint pos)
|
||||
private Def.ButtonGlyph ButtonDetect(TinyPoint touchOrClick)
|
||||
{
|
||||
foreach (Def.ButtonGlyph item in ButtonGlyphs.Reverse())
|
||||
foreach (Def.ButtonGlyph buttonGlyph in ButtonGlyphs.Reverse())
|
||||
{
|
||||
int value = 0;
|
||||
if (item == Def.ButtonGlyph.PlayJump || item == Def.ButtonGlyph.PlayAction || item == Def.ButtonGlyph.PlayDown || item == Def.ButtonGlyph.PlayPause)
|
||||
TinyRect buttonRect = GetButtonRect(buttonGlyph);
|
||||
|
||||
if (buttonGlyph == Def.ButtonGlyph.PlayJump || buttonGlyph == Def.ButtonGlyph.PlayAction || buttonGlyph == Def.ButtonGlyph.PlayDown || buttonGlyph == Def.ButtonGlyph.PlayPause)
|
||||
{
|
||||
value = 20;
|
||||
buttonRect = Misc.Inflate(buttonRect, 20);
|
||||
}
|
||||
TinyRect rect = Misc.Inflate(GetButtonRect(item), value);
|
||||
if (Misc.IsInside(rect, pos))
|
||||
|
||||
if (Misc.IsInside(buttonRect, touchOrClick))
|
||||
{
|
||||
return item;
|
||||
return buttonGlyph;
|
||||
}
|
||||
}
|
||||
return Def.ButtonGlyph.None;
|
||||
@ -530,9 +531,9 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
if (!accelStarted && Phase == Def.Phase.Play)
|
||||
{
|
||||
pixmap.DrawIcon(14, 0, GetPadBounds(PadCenter, padSize / 2), 1.0, false);
|
||||
pixmap.DrawIcon(14, 0, GetPadBounds(PadCenter, padRadius / 2), 1.0, false);
|
||||
TinyPoint center = (padPressed ? padTouchPos : PadCenter);
|
||||
pixmap.DrawIcon(14, 1, GetPadBounds(center, padSize / 2), 1.0, false);
|
||||
pixmap.DrawIcon(14, 1, GetPadBounds(center, padRadius / 2), 1.0, false);
|
||||
}
|
||||
foreach (Def.ButtonGlyph buttonGlyph in ButtonGlyphs)
|
||||
{
|
||||
@ -570,10 +571,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
private TinyRect GetPadBounds(TinyPoint center, int radius)
|
||||
{
|
||||
TinyRect result = default(TinyRect);
|
||||
result.Left = center.X - radius;
|
||||
result.Right = center.X + radius;
|
||||
result.Top = center.Y - radius;
|
||||
result.Bottom = center.Y + radius;
|
||||
result.LeftX = center.X - radius;
|
||||
result.RightX = center.X + radius;
|
||||
result.TopY = center.Y - radius;
|
||||
result.BottomY = center.Y + radius;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -589,10 +590,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
int num6 = (int)(glyph - 35);
|
||||
TinyRect result = default(TinyRect);
|
||||
result.Left = 80 * num6;
|
||||
result.Right = 80 * (num6 + 1);
|
||||
result.Top = 0;
|
||||
result.Bottom = 80;
|
||||
result.LeftX = 80 * num6;
|
||||
result.RightX = 80 * (num6 + 1);
|
||||
result.TopY = 0;
|
||||
result.BottomY = 80;
|
||||
return result;
|
||||
}
|
||||
switch (glyph)
|
||||
@ -600,218 +601,218 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
case Def.ButtonGlyph.InitGamerA:
|
||||
{
|
||||
TinyRect result19 = default(TinyRect);
|
||||
result19.Left = (int)(20.0 + num4 * 0.0);
|
||||
result19.Right = (int)(20.0 + num4 * 0.5);
|
||||
result19.Top = (int)(num2 - 20.0 - num4 * 2.1);
|
||||
result19.Bottom = (int)(num2 - 20.0 - num4 * 1.6);
|
||||
result19.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result19.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result19.TopY = (int)(num2 - 20.0 - num4 * 2.1);
|
||||
result19.BottomY = (int)(num2 - 20.0 - num4 * 1.6);
|
||||
return result19;
|
||||
}
|
||||
case Def.ButtonGlyph.InitGamerB:
|
||||
{
|
||||
TinyRect result18 = default(TinyRect);
|
||||
result18.Left = (int)(20.0 + num4 * 0.0);
|
||||
result18.Right = (int)(20.0 + num4 * 0.5);
|
||||
result18.Top = (int)(num2 - 20.0 - num4 * 1.6);
|
||||
result18.Bottom = (int)(num2 - 20.0 - num4 * 1.1);
|
||||
result18.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result18.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result18.TopY = (int)(num2 - 20.0 - num4 * 1.6);
|
||||
result18.BottomY = (int)(num2 - 20.0 - num4 * 1.1);
|
||||
return result18;
|
||||
}
|
||||
case Def.ButtonGlyph.InitGamerC:
|
||||
{
|
||||
TinyRect result15 = default(TinyRect);
|
||||
result15.Left = (int)(20.0 + num4 * 0.0);
|
||||
result15.Right = (int)(20.0 + num4 * 0.5);
|
||||
result15.Top = (int)(num2 - 20.0 - num4 * 1.1);
|
||||
result15.Bottom = (int)(num2 - 20.0 - num4 * 0.6);
|
||||
result15.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result15.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result15.TopY = (int)(num2 - 20.0 - num4 * 1.1);
|
||||
result15.BottomY = (int)(num2 - 20.0 - num4 * 0.6);
|
||||
return result15;
|
||||
}
|
||||
case Def.ButtonGlyph.InitSetup:
|
||||
{
|
||||
TinyRect result14 = default(TinyRect);
|
||||
result14.Left = (int)(20.0 + num4 * 0.0);
|
||||
result14.Right = (int)(20.0 + num4 * 0.5);
|
||||
result14.Top = (int)(num2 - 20.0 - num4 * 0.5);
|
||||
result14.Bottom = (int)(num2 - 20.0 - num4 * 0.0);
|
||||
result14.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result14.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result14.TopY = (int)(num2 - 20.0 - num4 * 0.5);
|
||||
result14.BottomY = (int)(num2 - 20.0 - num4 * 0.0);
|
||||
return result14;
|
||||
}
|
||||
case Def.ButtonGlyph.InitPlay:
|
||||
{
|
||||
TinyRect result11 = default(TinyRect);
|
||||
result11.Left = (int)(num - 20.0 - num4 * 1.0);
|
||||
result11.Right = (int)(num - 20.0 - num4 * 0.0);
|
||||
result11.Top = (int)(num2 - 40.0 - num4 * 1.0);
|
||||
result11.Bottom = (int)(num2 - 40.0 - num4 * 0.0);
|
||||
result11.LeftX = (int)(num - 20.0 - num4 * 1.0);
|
||||
result11.RightX = (int)(num - 20.0 - num4 * 0.0);
|
||||
result11.TopY = (int)(num2 - 40.0 - num4 * 1.0);
|
||||
result11.BottomY = (int)(num2 - 40.0 - num4 * 0.0);
|
||||
return result11;
|
||||
}
|
||||
case Def.ButtonGlyph.InitBuy:
|
||||
case Def.ButtonGlyph.InitRanking:
|
||||
{
|
||||
TinyRect result10 = default(TinyRect);
|
||||
result10.Left = (int)(num - 20.0 - num4 * 0.75);
|
||||
result10.Right = (int)(num - 20.0 - num4 * 0.25);
|
||||
result10.Top = (int)(num2 - 20.0 - num4 * 2.1);
|
||||
result10.Bottom = (int)(num2 - 20.0 - num4 * 1.6);
|
||||
result10.LeftX = (int)(num - 20.0 - num4 * 0.75);
|
||||
result10.RightX = (int)(num - 20.0 - num4 * 0.25);
|
||||
result10.TopY = (int)(num2 - 20.0 - num4 * 2.1);
|
||||
result10.BottomY = (int)(num2 - 20.0 - num4 * 1.6);
|
||||
return result10;
|
||||
}
|
||||
case Def.ButtonGlyph.PauseMenu:
|
||||
{
|
||||
TinyRect result37 = default(TinyRect);
|
||||
result37.Left = (int)((double)PixmapOrigin.X + num4 * -0.21);
|
||||
result37.Right = (int)((double)PixmapOrigin.X + num4 * 0.79);
|
||||
result37.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result37.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
result37.LeftX = (int)((double)PixmapOrigin.X + num4 * -0.21);
|
||||
result37.RightX = (int)((double)PixmapOrigin.X + num4 * 0.79);
|
||||
result37.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result37.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
return result37;
|
||||
}
|
||||
case Def.ButtonGlyph.PauseBack:
|
||||
{
|
||||
TinyRect result36 = default(TinyRect);
|
||||
result36.Left = (int)((double)PixmapOrigin.X + num4 * 0.79);
|
||||
result36.Right = (int)((double)PixmapOrigin.X + num4 * 1.79);
|
||||
result36.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result36.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
result36.LeftX = (int)((double)PixmapOrigin.X + num4 * 0.79);
|
||||
result36.RightX = (int)((double)PixmapOrigin.X + num4 * 1.79);
|
||||
result36.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result36.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
return result36;
|
||||
}
|
||||
case Def.ButtonGlyph.PauseSetup:
|
||||
{
|
||||
TinyRect result35 = default(TinyRect);
|
||||
result35.Left = (int)((double)PixmapOrigin.X + num4 * 1.79);
|
||||
result35.Right = (int)((double)PixmapOrigin.X + num4 * 2.79);
|
||||
result35.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result35.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
result35.LeftX = (int)((double)PixmapOrigin.X + num4 * 1.79);
|
||||
result35.RightX = (int)((double)PixmapOrigin.X + num4 * 2.79);
|
||||
result35.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result35.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
return result35;
|
||||
}
|
||||
case Def.ButtonGlyph.PauseRestart:
|
||||
{
|
||||
TinyRect result34 = default(TinyRect);
|
||||
result34.Left = (int)((double)PixmapOrigin.X + num4 * 2.79);
|
||||
result34.Right = (int)((double)PixmapOrigin.X + num4 * 3.79);
|
||||
result34.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result34.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
result34.LeftX = (int)((double)PixmapOrigin.X + num4 * 2.79);
|
||||
result34.RightX = (int)((double)PixmapOrigin.X + num4 * 3.79);
|
||||
result34.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result34.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
return result34;
|
||||
}
|
||||
case Def.ButtonGlyph.PauseContinue:
|
||||
{
|
||||
TinyRect result33 = default(TinyRect);
|
||||
result33.Left = (int)((double)PixmapOrigin.X + num4 * 3.79);
|
||||
result33.Right = (int)((double)PixmapOrigin.X + num4 * 4.79);
|
||||
result33.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result33.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
result33.LeftX = (int)((double)PixmapOrigin.X + num4 * 3.79);
|
||||
result33.RightX = (int)((double)PixmapOrigin.X + num4 * 4.79);
|
||||
result33.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result33.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
return result33;
|
||||
}
|
||||
case Def.ButtonGlyph.ResumeMenu:
|
||||
{
|
||||
TinyRect result32 = default(TinyRect);
|
||||
result32.Left = (int)((double)PixmapOrigin.X + num4 * 1.29);
|
||||
result32.Right = (int)((double)PixmapOrigin.X + num4 * 2.29);
|
||||
result32.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result32.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
result32.LeftX = (int)((double)PixmapOrigin.X + num4 * 1.29);
|
||||
result32.RightX = (int)((double)PixmapOrigin.X + num4 * 2.29);
|
||||
result32.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result32.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
return result32;
|
||||
}
|
||||
case Def.ButtonGlyph.ResumeContinue:
|
||||
{
|
||||
TinyRect result31 = default(TinyRect);
|
||||
result31.Left = (int)((double)PixmapOrigin.X + num4 * 2.29);
|
||||
result31.Right = (int)((double)PixmapOrigin.X + num4 * 3.29);
|
||||
result31.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result31.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
result31.LeftX = (int)((double)PixmapOrigin.X + num4 * 2.29);
|
||||
result31.RightX = (int)((double)PixmapOrigin.X + num4 * 3.29);
|
||||
result31.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.2);
|
||||
result31.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.2);
|
||||
return result31;
|
||||
}
|
||||
case Def.ButtonGlyph.WinLostReturn:
|
||||
{
|
||||
TinyRect result30 = default(TinyRect);
|
||||
result30.Left = (int)((double)PixmapOrigin.X + num - num3 * 2.2);
|
||||
result30.Right = (int)((double)PixmapOrigin.X + num - num3 * 1.2);
|
||||
result30.Top = (int)((double)PixmapOrigin.Y + num3 * 0.2);
|
||||
result30.Bottom = (int)((double)PixmapOrigin.Y + num3 * 1.2);
|
||||
result30.LeftX = (int)((double)PixmapOrigin.X + num - num3 * 2.2);
|
||||
result30.RightX = (int)((double)PixmapOrigin.X + num - num3 * 1.2);
|
||||
result30.TopY = (int)((double)PixmapOrigin.Y + num3 * 0.2);
|
||||
result30.BottomY = (int)((double)PixmapOrigin.Y + num3 * 1.2);
|
||||
return result30;
|
||||
}
|
||||
case Def.ButtonGlyph.TrialBuy:
|
||||
{
|
||||
TinyRect result29 = default(TinyRect);
|
||||
result29.Left = (int)((double)PixmapOrigin.X + num4 * 2.5);
|
||||
result29.Right = (int)((double)PixmapOrigin.X + num4 * 3.5);
|
||||
result29.Top = (int)((double)PixmapOrigin.Y + num4 * 2.1);
|
||||
result29.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.1);
|
||||
result29.LeftX = (int)((double)PixmapOrigin.X + num4 * 2.5);
|
||||
result29.RightX = (int)((double)PixmapOrigin.X + num4 * 3.5);
|
||||
result29.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.1);
|
||||
result29.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.1);
|
||||
return result29;
|
||||
}
|
||||
case Def.ButtonGlyph.TrialCancel:
|
||||
{
|
||||
TinyRect result28 = default(TinyRect);
|
||||
result28.Left = (int)((double)PixmapOrigin.X + num4 * 3.5);
|
||||
result28.Right = (int)((double)PixmapOrigin.X + num4 * 4.5);
|
||||
result28.Top = (int)((double)PixmapOrigin.Y + num4 * 2.1);
|
||||
result28.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.1);
|
||||
result28.LeftX = (int)((double)PixmapOrigin.X + num4 * 3.5);
|
||||
result28.RightX = (int)((double)PixmapOrigin.X + num4 * 4.5);
|
||||
result28.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.1);
|
||||
result28.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.1);
|
||||
return result28;
|
||||
}
|
||||
case Def.ButtonGlyph.RankingContinue:
|
||||
{
|
||||
TinyRect result27 = default(TinyRect);
|
||||
result27.Left = (int)((double)PixmapOrigin.X + num4 * 3.5);
|
||||
result27.Right = (int)((double)PixmapOrigin.X + num4 * 4.5);
|
||||
result27.Top = (int)((double)PixmapOrigin.Y + num4 * 2.1);
|
||||
result27.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.1);
|
||||
result27.LeftX = (int)((double)PixmapOrigin.X + num4 * 3.5);
|
||||
result27.RightX = (int)((double)PixmapOrigin.X + num4 * 4.5);
|
||||
result27.TopY = (int)((double)PixmapOrigin.Y + num4 * 2.1);
|
||||
result27.BottomY = (int)((double)PixmapOrigin.Y + num4 * 3.1);
|
||||
return result27;
|
||||
}
|
||||
case Def.ButtonGlyph.SetupSounds:
|
||||
{
|
||||
TinyRect result26 = default(TinyRect);
|
||||
result26.Left = (int)(20.0 + num4 * 0.0);
|
||||
result26.Right = (int)(20.0 + num4 * 0.5);
|
||||
result26.Top = (int)(num2 - 20.0 - num4 * 2.0);
|
||||
result26.Bottom = (int)(num2 - 20.0 - num4 * 1.5);
|
||||
result26.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result26.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result26.TopY = (int)(num2 - 20.0 - num4 * 2.0);
|
||||
result26.BottomY = (int)(num2 - 20.0 - num4 * 1.5);
|
||||
return result26;
|
||||
}
|
||||
case Def.ButtonGlyph.SetupJump:
|
||||
{
|
||||
TinyRect result25 = default(TinyRect);
|
||||
result25.Left = (int)(20.0 + num4 * 0.0);
|
||||
result25.Right = (int)(20.0 + num4 * 0.5);
|
||||
result25.Top = (int)(num2 - 20.0 - num4 * 1.5);
|
||||
result25.Bottom = (int)(num2 - 20.0 - num4 * 1.0);
|
||||
result25.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result25.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result25.TopY = (int)(num2 - 20.0 - num4 * 1.5);
|
||||
result25.BottomY = (int)(num2 - 20.0 - num4 * 1.0);
|
||||
return result25;
|
||||
}
|
||||
case Def.ButtonGlyph.SetupZoom:
|
||||
{
|
||||
TinyRect result24 = default(TinyRect);
|
||||
result24.Left = (int)(20.0 + num4 * 0.0);
|
||||
result24.Right = (int)(20.0 + num4 * 0.5);
|
||||
result24.Top = (int)(num2 - 20.0 - num4 * 1.0);
|
||||
result24.Bottom = (int)(num2 - 20.0 - num4 * 0.5);
|
||||
result24.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result24.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result24.TopY = (int)(num2 - 20.0 - num4 * 1.0);
|
||||
result24.BottomY = (int)(num2 - 20.0 - num4 * 0.5);
|
||||
return result24;
|
||||
}
|
||||
case Def.ButtonGlyph.SetupAccel:
|
||||
{
|
||||
TinyRect result23 = default(TinyRect);
|
||||
result23.Left = (int)(20.0 + num4 * 0.0);
|
||||
result23.Right = (int)(20.0 + num4 * 0.5);
|
||||
result23.Top = (int)(num2 - 20.0 - num4 * 0.5);
|
||||
result23.Bottom = (int)(num2 - 20.0 - num4 * 0.0);
|
||||
result23.LeftX = (int)(20.0 + num4 * 0.0);
|
||||
result23.RightX = (int)(20.0 + num4 * 0.5);
|
||||
result23.TopY = (int)(num2 - 20.0 - num4 * 0.5);
|
||||
result23.BottomY = (int)(num2 - 20.0 - num4 * 0.0);
|
||||
return result23;
|
||||
}
|
||||
case Def.ButtonGlyph.SetupReset:
|
||||
{
|
||||
TinyRect result22 = default(TinyRect);
|
||||
result22.Left = (int)(450.0 + num4 * 0.0);
|
||||
result22.Right = (int)(450.0 + num4 * 0.5);
|
||||
result22.Top = (int)(num2 - 20.0 - num4 * 2.0);
|
||||
result22.Bottom = (int)(num2 - 20.0 - num4 * 1.5);
|
||||
result22.LeftX = (int)(450.0 + num4 * 0.0);
|
||||
result22.RightX = (int)(450.0 + num4 * 0.5);
|
||||
result22.TopY = (int)(num2 - 20.0 - num4 * 2.0);
|
||||
result22.BottomY = (int)(num2 - 20.0 - num4 * 1.5);
|
||||
return result22;
|
||||
}
|
||||
case Def.ButtonGlyph.SetupReturn:
|
||||
{
|
||||
TinyRect result21 = default(TinyRect);
|
||||
result21.Left = (int)(num - 20.0 - num4 * 0.8);
|
||||
result21.Right = (int)(num - 20.0 - num4 * 0.0);
|
||||
result21.Top = (int)(num2 - 20.0 - num4 * 0.8);
|
||||
result21.Bottom = (int)(num2 - 20.0 - num4 * 0.0);
|
||||
result21.LeftX = (int)(num - 20.0 - num4 * 0.8);
|
||||
result21.RightX = (int)(num - 20.0 - num4 * 0.0);
|
||||
result21.TopY = (int)(num2 - 20.0 - num4 * 0.8);
|
||||
result21.BottomY = (int)(num2 - 20.0 - num4 * 0.0);
|
||||
return result21;
|
||||
}
|
||||
case Def.ButtonGlyph.PlayPause:
|
||||
{
|
||||
TinyRect result20 = default(TinyRect);
|
||||
result20.Left = (int)(num - num3 * 0.7);
|
||||
result20.Right = (int)(num - num3 * 0.2);
|
||||
result20.Top = (int)(num3 * 0.2);
|
||||
result20.Bottom = (int)(num3 * 0.7);
|
||||
result20.LeftX = (int)(num - num3 * 0.7);
|
||||
result20.RightX = (int)(num - num3 * 0.2);
|
||||
result20.TopY = (int)(num3 * 0.2);
|
||||
result20.BottomY = (int)(num3 * 0.7);
|
||||
return result20;
|
||||
}
|
||||
case Def.ButtonGlyph.PlayAction:
|
||||
@ -819,17 +820,17 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
if (gameData.JumpRight)
|
||||
{
|
||||
TinyRect result16 = default(TinyRect);
|
||||
result16.Left = (int)((double)drawBounds.Width - num3 * 1.2);
|
||||
result16.Right = (int)((double)drawBounds.Width - num3 * 0.2);
|
||||
result16.Top = (int)(num2 - num3 * 2.6);
|
||||
result16.Bottom = (int)(num2 - num3 * 1.6);
|
||||
result16.LeftX = (int)((double)drawBounds.Width - num3 * 1.2);
|
||||
result16.RightX = (int)((double)drawBounds.Width - num3 * 0.2);
|
||||
result16.TopY = (int)(num2 - num3 * 2.6);
|
||||
result16.BottomY = (int)(num2 - num3 * 1.6);
|
||||
return result16;
|
||||
}
|
||||
TinyRect result17 = default(TinyRect);
|
||||
result17.Left = (int)(num3 * 0.2);
|
||||
result17.Right = (int)(num3 * 1.2);
|
||||
result17.Top = (int)(num2 - num3 * 2.6);
|
||||
result17.Bottom = (int)(num2 - num3 * 1.6);
|
||||
result17.LeftX = (int)(num3 * 0.2);
|
||||
result17.RightX = (int)(num3 * 1.2);
|
||||
result17.TopY = (int)(num2 - num3 * 2.6);
|
||||
result17.BottomY = (int)(num2 - num3 * 1.6);
|
||||
return result17;
|
||||
}
|
||||
case Def.ButtonGlyph.PlayJump:
|
||||
@ -837,17 +838,17 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
if (gameData.JumpRight)
|
||||
{
|
||||
TinyRect result12 = default(TinyRect);
|
||||
result12.Left = (int)((double)drawBounds.Width - num3 * 1.2);
|
||||
result12.Right = (int)((double)drawBounds.Width - num3 * 0.2);
|
||||
result12.Top = (int)(num2 - num3 * 1.2);
|
||||
result12.Bottom = (int)(num2 - num3 * 0.2);
|
||||
result12.LeftX = (int)((double)drawBounds.Width - num3 * 1.2);
|
||||
result12.RightX = (int)((double)drawBounds.Width - num3 * 0.2);
|
||||
result12.TopY = (int)(num2 - num3 * 1.2);
|
||||
result12.BottomY = (int)(num2 - num3 * 0.2);
|
||||
return result12;
|
||||
}
|
||||
TinyRect result13 = default(TinyRect);
|
||||
result13.Left = (int)(num3 * 0.2);
|
||||
result13.Right = (int)(num3 * 1.2);
|
||||
result13.Top = (int)(num2 - num3 * 1.2);
|
||||
result13.Bottom = (int)(num2 - num3 * 0.2);
|
||||
result13.LeftX = (int)(num3 * 0.2);
|
||||
result13.RightX = (int)(num3 * 1.2);
|
||||
result13.TopY = (int)(num2 - num3 * 1.2);
|
||||
result13.BottomY = (int)(num2 - num3 * 0.2);
|
||||
return result13;
|
||||
}
|
||||
case Def.ButtonGlyph.PlayDown:
|
||||
@ -855,71 +856,71 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
if (gameData.JumpRight)
|
||||
{
|
||||
TinyRect result8 = default(TinyRect);
|
||||
result8.Left = (int)(num3 * 0.2);
|
||||
result8.Right = (int)(num3 * 1.2);
|
||||
result8.Top = (int)(num2 - num3 * 1.2);
|
||||
result8.Bottom = (int)(num2 - num3 * 0.2);
|
||||
result8.LeftX = (int)(num3 * 0.2);
|
||||
result8.RightX = (int)(num3 * 1.2);
|
||||
result8.TopY = (int)(num2 - num3 * 1.2);
|
||||
result8.BottomY = (int)(num2 - num3 * 0.2);
|
||||
return result8;
|
||||
}
|
||||
TinyRect result9 = default(TinyRect);
|
||||
result9.Left = (int)((double)drawBounds.Width - num3 * 1.2);
|
||||
result9.Right = (int)((double)drawBounds.Width - num3 * 0.2);
|
||||
result9.Top = (int)(num2 - num3 * 1.2);
|
||||
result9.Bottom = (int)(num2 - num3 * 0.2);
|
||||
result9.LeftX = (int)((double)drawBounds.Width - num3 * 1.2);
|
||||
result9.RightX = (int)((double)drawBounds.Width - num3 * 0.2);
|
||||
result9.TopY = (int)(num2 - num3 * 1.2);
|
||||
result9.BottomY = (int)(num2 - num3 * 0.2);
|
||||
return result9;
|
||||
}
|
||||
case Def.ButtonGlyph.Cheat11:
|
||||
{
|
||||
TinyRect result7 = default(TinyRect);
|
||||
result7.Left = (int)(num5 * 0.0);
|
||||
result7.Right = (int)(num5 * 1.0);
|
||||
result7.Top = (int)(num5 * 0.0);
|
||||
result7.Bottom = (int)(num5 * 1.0);
|
||||
result7.LeftX = (int)(num5 * 0.0);
|
||||
result7.RightX = (int)(num5 * 1.0);
|
||||
result7.TopY = (int)(num5 * 0.0);
|
||||
result7.BottomY = (int)(num5 * 1.0);
|
||||
return result7;
|
||||
}
|
||||
case Def.ButtonGlyph.Cheat12:
|
||||
{
|
||||
TinyRect result6 = default(TinyRect);
|
||||
result6.Left = (int)(num5 * 0.0);
|
||||
result6.Right = (int)(num5 * 1.0);
|
||||
result6.Top = (int)(num5 * 1.0);
|
||||
result6.Bottom = (int)(num5 * 2.0);
|
||||
result6.LeftX = (int)(num5 * 0.0);
|
||||
result6.RightX = (int)(num5 * 1.0);
|
||||
result6.TopY = (int)(num5 * 1.0);
|
||||
result6.BottomY = (int)(num5 * 2.0);
|
||||
return result6;
|
||||
}
|
||||
case Def.ButtonGlyph.Cheat21:
|
||||
{
|
||||
TinyRect result5 = default(TinyRect);
|
||||
result5.Left = (int)(num5 * 1.0);
|
||||
result5.Right = (int)(num5 * 2.0);
|
||||
result5.Top = (int)(num5 * 0.0);
|
||||
result5.Bottom = (int)(num5 * 1.0);
|
||||
result5.LeftX = (int)(num5 * 1.0);
|
||||
result5.RightX = (int)(num5 * 2.0);
|
||||
result5.TopY = (int)(num5 * 0.0);
|
||||
result5.BottomY = (int)(num5 * 1.0);
|
||||
return result5;
|
||||
}
|
||||
case Def.ButtonGlyph.Cheat22:
|
||||
{
|
||||
TinyRect result4 = default(TinyRect);
|
||||
result4.Left = (int)(num5 * 1.0);
|
||||
result4.Right = (int)(num5 * 2.0);
|
||||
result4.Top = (int)(num5 * 1.0);
|
||||
result4.Bottom = (int)(num5 * 2.0);
|
||||
result4.LeftX = (int)(num5 * 1.0);
|
||||
result4.RightX = (int)(num5 * 2.0);
|
||||
result4.TopY = (int)(num5 * 1.0);
|
||||
result4.BottomY = (int)(num5 * 2.0);
|
||||
return result4;
|
||||
}
|
||||
case Def.ButtonGlyph.Cheat31:
|
||||
{
|
||||
TinyRect result3 = default(TinyRect);
|
||||
result3.Left = (int)(num5 * 2.0);
|
||||
result3.Right = (int)(num5 * 3.0);
|
||||
result3.Top = (int)(num5 * 0.0);
|
||||
result3.Bottom = (int)(num5 * 1.0);
|
||||
result3.LeftX = (int)(num5 * 2.0);
|
||||
result3.RightX = (int)(num5 * 3.0);
|
||||
result3.TopY = (int)(num5 * 0.0);
|
||||
result3.BottomY = (int)(num5 * 1.0);
|
||||
return result3;
|
||||
}
|
||||
case Def.ButtonGlyph.Cheat32:
|
||||
{
|
||||
TinyRect result2 = default(TinyRect);
|
||||
result2.Left = (int)(num5 * 2.0);
|
||||
result2.Right = (int)(num5 * 3.0);
|
||||
result2.Top = (int)(num5 * 1.0);
|
||||
result2.Bottom = (int)(num5 * 2.0);
|
||||
result2.LeftX = (int)(num5 * 2.0);
|
||||
result2.RightX = (int)(num5 * 3.0);
|
||||
result2.TopY = (int)(num5 * 1.0);
|
||||
result2.BottomY = (int)(num5 * 2.0);
|
||||
return result2;
|
||||
}
|
||||
default:
|
||||
|
16
Jauge.cs
16
Jauge.cs
@ -74,17 +74,17 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
if (!m_bHide)
|
||||
{
|
||||
int num = m_level * 114 / 100;
|
||||
rect.Left = 0;
|
||||
rect.Right = 124;
|
||||
rect.Top = 0;
|
||||
rect.Bottom = 22;
|
||||
rect.LeftX = 0;
|
||||
rect.RightX = 124;
|
||||
rect.TopY = 0;
|
||||
rect.BottomY = 22;
|
||||
m_pixmap.DrawPart(5, m_pos, rect, m_zoom);
|
||||
if (num > 0)
|
||||
{
|
||||
rect.Left = 0;
|
||||
rect.Right = 6 + num;
|
||||
rect.Top = 22 * m_mode;
|
||||
rect.Bottom = 22 * (m_mode + 1);
|
||||
rect.LeftX = 0;
|
||||
rect.RightX = 6 + num;
|
||||
rect.TopY = 22 * m_mode;
|
||||
rect.BottomY = 22 * (m_mode + 1);
|
||||
m_pixmap.DrawPart(5, m_pos, rect, m_zoom);
|
||||
}
|
||||
}
|
||||
|
34
Misc.cs
34
Misc.cs
@ -77,47 +77,43 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
public static TinyRect Inflate(TinyRect rect, int value)
|
||||
{
|
||||
TinyRect result = default(TinyRect);
|
||||
result.Left = rect.Left - value;
|
||||
result.Right = rect.Right + value;
|
||||
result.Top = rect.Top - value;
|
||||
result.Bottom = rect.Bottom + value;
|
||||
result.LeftX = rect.LeftX - value;
|
||||
result.RightX = rect.RightX + value;
|
||||
result.TopY = rect.TopY - value;
|
||||
result.BottomY = rect.BottomY + value;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool IsInside(TinyRect rect, TinyPoint p)
|
||||
{
|
||||
if (p.X >= rect.Left && p.X <= rect.Right && p.Y >= rect.Top)
|
||||
{
|
||||
return p.Y <= rect.Bottom;
|
||||
}
|
||||
return false;
|
||||
return p.X >= rect.LeftX && p.X <= rect.RightX && p.Y >= rect.TopY && p.Y <= rect.BottomY;
|
||||
}
|
||||
|
||||
public static bool IntersectRect(out TinyRect dst, TinyRect src1, TinyRect src2)
|
||||
{
|
||||
dst = default(TinyRect);
|
||||
dst.Left = Math.Max(src1.Left, src2.Left);
|
||||
dst.Right = Math.Min(src1.Right, src2.Right);
|
||||
dst.Top = Math.Max(src1.Top, src2.Top);
|
||||
dst.Bottom = Math.Min(src1.Bottom, src2.Bottom);
|
||||
dst.LeftX = Math.Max(src1.LeftX, src2.LeftX);
|
||||
dst.RightX = Math.Min(src1.RightX, src2.RightX);
|
||||
dst.TopY = Math.Max(src1.TopY, src2.TopY);
|
||||
dst.BottomY = Math.Min(src1.BottomY, src2.BottomY);
|
||||
return !IsRectEmpty(dst);
|
||||
}
|
||||
|
||||
public static bool UnionRect(out TinyRect dst, TinyRect src1, TinyRect src2)
|
||||
{
|
||||
dst = default(TinyRect);
|
||||
dst.Left = Math.Min(src1.Left, src2.Left);
|
||||
dst.Right = Math.Max(src1.Right, src2.Right);
|
||||
dst.Top = Math.Min(src1.Top, src2.Top);
|
||||
dst.Bottom = Math.Max(src1.Bottom, src2.Bottom);
|
||||
dst.LeftX = Math.Min(src1.LeftX, src2.LeftX);
|
||||
dst.RightX = Math.Max(src1.RightX, src2.RightX);
|
||||
dst.TopY = Math.Min(src1.TopY, src2.TopY);
|
||||
dst.BottomY = Math.Max(src1.BottomY, src2.BottomY);
|
||||
return !IsRectEmpty(dst);
|
||||
}
|
||||
|
||||
private static bool IsRectEmpty(TinyRect rect)
|
||||
{
|
||||
if (rect.Left < rect.Right)
|
||||
if (rect.LeftX < rect.RightX)
|
||||
{
|
||||
return rect.Top >= rect.Bottom;
|
||||
return rect.TopY >= rect.BottomY;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
58
Pixmap.cs
58
Pixmap.cs
@ -83,10 +83,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
num3 = 480.0 * (screenWidth / screenHeight);
|
||||
num4 = 480.0;
|
||||
}
|
||||
result.Left = 0;
|
||||
result.Right = (int)num3;
|
||||
result.Top = 0;
|
||||
result.Bottom = (int)num4;
|
||||
result.LeftX = 0;
|
||||
result.RightX = (int)num3;
|
||||
result.TopY = 0;
|
||||
result.BottomY = (int)num4;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -210,8 +210,8 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
DrawIcon(14, 0, rect, pressed ? 0.6 : 1.0, false);
|
||||
TinyPoint tinyPoint = default(TinyPoint);
|
||||
tinyPoint.X = rect.Left + rect.Width / 2 - (int)originX;
|
||||
tinyPoint.Y = rect.Top + 28;
|
||||
tinyPoint.X = rect.LeftX + rect.Width / 2 - (int)originX;
|
||||
tinyPoint.Y = rect.TopY + 28;
|
||||
TinyPoint pos = tinyPoint;
|
||||
Text.DrawTextCenter(this, pos, Decor.GetCheatTinyText(glyph), 1.0);
|
||||
break;
|
||||
@ -294,10 +294,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
tinyPoint.Y = (int)originY;
|
||||
TinyPoint dest = tinyPoint;
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = 0;
|
||||
tinyRect.Top = 0;
|
||||
tinyRect.Right = 640;
|
||||
tinyRect.Bottom = 480;
|
||||
tinyRect.LeftX = 0;
|
||||
tinyRect.TopY = 0;
|
||||
tinyRect.RightX = 640;
|
||||
tinyRect.BottomY = 480;
|
||||
TinyRect rect = tinyRect;
|
||||
DrawPart(3, dest, rect);
|
||||
}
|
||||
@ -307,10 +307,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
pos.X = (int)((double)pos.X + originX);
|
||||
pos.Y = (int)((double)pos.Y + originY);
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = pos.X;
|
||||
tinyRect.Top = pos.Y;
|
||||
tinyRect.Right = pos.X + (int)(32.0 * size);
|
||||
tinyRect.Bottom = pos.Y + (int)(32.0 * size);
|
||||
tinyRect.LeftX = pos.X;
|
||||
tinyRect.TopY = pos.Y;
|
||||
tinyRect.RightX = pos.X + (int)(32.0 * size);
|
||||
tinyRect.BottomY = pos.Y + (int)(32.0 * size);
|
||||
TinyRect rect = tinyRect;
|
||||
DrawIcon(6, rank, rect, 1.0, false);
|
||||
}
|
||||
@ -320,10 +320,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
pos.X = (int)((double)pos.X + originX);
|
||||
pos.Y = (int)((double)pos.Y + originY);
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = pos.X;
|
||||
tinyRect.Top = pos.Y;
|
||||
tinyRect.Right = pos.X;
|
||||
tinyRect.Bottom = pos.Y;
|
||||
tinyRect.LeftX = pos.X;
|
||||
tinyRect.TopY = pos.Y;
|
||||
tinyRect.RightX = pos.X;
|
||||
tinyRect.BottomY = pos.Y;
|
||||
TinyRect rect = tinyRect;
|
||||
DrawIcon(channel, rank, rect, 1.0, false);
|
||||
}
|
||||
@ -331,10 +331,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
public void QuickIcon(int channel, int rank, TinyPoint pos)
|
||||
{
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = pos.X;
|
||||
tinyRect.Top = pos.Y;
|
||||
tinyRect.Right = pos.X;
|
||||
tinyRect.Bottom = pos.Y;
|
||||
tinyRect.LeftX = pos.X;
|
||||
tinyRect.TopY = pos.Y;
|
||||
tinyRect.RightX = pos.X;
|
||||
tinyRect.BottomY = pos.Y;
|
||||
TinyRect rect = tinyRect;
|
||||
DrawIcon(channel, rank, rect, 1.0, true);
|
||||
}
|
||||
@ -342,10 +342,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
public void QuickIcon(int channel, int rank, TinyPoint pos, double opacity, double rotation)
|
||||
{
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = pos.X;
|
||||
tinyRect.Top = pos.Y;
|
||||
tinyRect.Right = pos.X;
|
||||
tinyRect.Bottom = pos.Y;
|
||||
tinyRect.LeftX = pos.X;
|
||||
tinyRect.TopY = pos.Y;
|
||||
tinyRect.RightX = pos.X;
|
||||
tinyRect.BottomY = pos.Y;
|
||||
TinyRect rect = tinyRect;
|
||||
DrawIcon(channel, rank, rect, opacity, rotation, true);
|
||||
}
|
||||
@ -367,7 +367,7 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
dest.X = (int)((double)dest.X + originX);
|
||||
dest.Y = (int)((double)dest.Y + originY);
|
||||
}
|
||||
Rectangle value = new Rectangle(rect.Left, rect.Top, rect.Width, rect.Height);
|
||||
Rectangle value = new Rectangle(rect.LeftX, rect.TopY, rect.Width, rect.Height);
|
||||
Rectangle destinationRectangle = new Rectangle(dest.X, dest.Y, (int)((double)rect.Width * zoom), (int)((double)rect.Height * zoom));
|
||||
spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);
|
||||
spriteBatch.Draw(bitmap, destinationRectangle, value, Color.White);
|
||||
@ -510,8 +510,8 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
int num = ((rect.Width == 0) ? iconWidth : rect.Width);
|
||||
int num2 = ((rect.Height == 0) ? iconHeight : rect.Height);
|
||||
int num3 = (int)((double)rect.Left * zoom);
|
||||
int num4 = (int)((double)rect.Top * zoom);
|
||||
int num3 = (int)((double)rect.LeftX * zoom);
|
||||
int num4 = (int)((double)rect.TopY * zoom);
|
||||
int num5 = (int)((double)num3 + (double)num * zoom);
|
||||
int num6 = (int)((double)num4 + (double)num2 * zoom);
|
||||
if (useHotSpot && hotSpotZoom > 1.0)
|
||||
|
40
Slider.cs
40
Slider.cs
@ -38,34 +38,34 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
tinyPoint.Y = TopLeftCorner.Y - pixmap.Origin.Y;
|
||||
TinyPoint dest = tinyPoint;
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = 0;
|
||||
tinyRect.Right = 124;
|
||||
tinyRect.Top = 0;
|
||||
tinyRect.Bottom = 22;
|
||||
tinyRect.LeftX = 0;
|
||||
tinyRect.RightX = 124;
|
||||
tinyRect.TopY = 0;
|
||||
tinyRect.BottomY = 22;
|
||||
TinyRect rect = tinyRect;
|
||||
pixmap.DrawPart(5, dest, rect, 2.0);
|
||||
int num = (int)((double)(PosRight - PosLeft) * Value);
|
||||
int num2 = TopLeftCorner.Y + 22;
|
||||
int num3 = 94;
|
||||
TinyRect tinyRect2 = default(TinyRect);
|
||||
tinyRect2.Left = PosLeft + num - num3 / 2;
|
||||
tinyRect2.Right = PosLeft + num + num3 / 2;
|
||||
tinyRect2.Top = num2 - num3 / 2;
|
||||
tinyRect2.Bottom = num2 + num3 / 2;
|
||||
tinyRect2.LeftX = PosLeft + num - num3 / 2;
|
||||
tinyRect2.RightX = PosLeft + num + num3 / 2;
|
||||
tinyRect2.TopY = num2 - num3 / 2;
|
||||
tinyRect2.BottomY = num2 + num3 / 2;
|
||||
rect = tinyRect2;
|
||||
pixmap.DrawIcon(14, 1, rect, 1.0, false);
|
||||
TinyRect tinyRect3 = default(TinyRect);
|
||||
tinyRect3.Left = TopLeftCorner.X - 65;
|
||||
tinyRect3.Right = TopLeftCorner.X - 65 + 60;
|
||||
tinyRect3.Top = TopLeftCorner.Y - 10;
|
||||
tinyRect3.Bottom = TopLeftCorner.Y - 10 + 60;
|
||||
tinyRect3.LeftX = TopLeftCorner.X - 65;
|
||||
tinyRect3.RightX = TopLeftCorner.X - 65 + 60;
|
||||
tinyRect3.TopY = TopLeftCorner.Y - 10;
|
||||
tinyRect3.BottomY = TopLeftCorner.Y - 10 + 60;
|
||||
rect = tinyRect3;
|
||||
pixmap.DrawIcon(10, 37, rect, 1.0, false);
|
||||
TinyRect tinyRect4 = default(TinyRect);
|
||||
tinyRect4.Left = TopLeftCorner.X + 248 + 5;
|
||||
tinyRect4.Right = TopLeftCorner.X + 248 + 5 + 60;
|
||||
tinyRect4.Top = TopLeftCorner.Y - 10;
|
||||
tinyRect4.Bottom = TopLeftCorner.Y - 10 + 60;
|
||||
tinyRect4.LeftX = TopLeftCorner.X + 248 + 5;
|
||||
tinyRect4.RightX = TopLeftCorner.X + 248 + 5 + 60;
|
||||
tinyRect4.TopY = TopLeftCorner.Y - 10;
|
||||
tinyRect4.BottomY = TopLeftCorner.Y - 10 + 60;
|
||||
rect = tinyRect4;
|
||||
pixmap.DrawIcon(10, 38, rect, 1.0, false);
|
||||
}
|
||||
@ -73,10 +73,10 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
public bool Move(TinyPoint pos)
|
||||
{
|
||||
TinyRect tinyRect = default(TinyRect);
|
||||
tinyRect.Left = TopLeftCorner.X - 50;
|
||||
tinyRect.Right = TopLeftCorner.X + 248 + 50;
|
||||
tinyRect.Top = TopLeftCorner.Y - 50;
|
||||
tinyRect.Bottom = TopLeftCorner.Y + 44 + 50;
|
||||
tinyRect.LeftX = TopLeftCorner.X - 50;
|
||||
tinyRect.RightX = TopLeftCorner.X + 248 + 50;
|
||||
tinyRect.TopY = TopLeftCorner.Y - 50;
|
||||
tinyRect.BottomY = TopLeftCorner.Y + 44 + 50;
|
||||
TinyRect rect = tinyRect;
|
||||
if (Misc.IsInside(rect, pos))
|
||||
{
|
||||
|
14
TinyRect.cs
14
TinyRect.cs
@ -5,19 +5,19 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
public struct TinyRect
|
||||
{
|
||||
public int Left;
|
||||
public int LeftX;
|
||||
|
||||
public int Right;
|
||||
public int RightX;
|
||||
|
||||
public int Top;
|
||||
public int TopY;
|
||||
|
||||
public int Bottom;
|
||||
public int BottomY;
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return Right - Left;
|
||||
return RightX - LeftX;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,13 +25,13 @@ namespace WindowsPhoneSpeedyBlupi
|
||||
{
|
||||
get
|
||||
{
|
||||
return Bottom - Top;
|
||||
return BottomY - TopY;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0};{1};{2};{3}", Left, Top, Right, Bottom);
|
||||
return string.Format("{0};{1};{2};{3}", LeftX, TopY, RightX, BottomY);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user