From 0ff2f458dd946500c83954ea59379e86efd0ce36 Mon Sep 17 00:00:00 2001 From: Robert Vokac Date: Fri, 20 Dec 2024 23:14:42 +0100 Subject: [PATCH] WindowsPhoneSpeedyBlupi was rewritten from C# to Java --- core/build.gradle | 2 + .../Accelerometer.java | 24 +- .../AccelerometerDummyImpl.java | 20 +- .../AccelerometerEventArgs.java | 37 +- .../AccelerometerFactory.java | 15 +- .../AccelerometerFailedException.java | 12 - .../phone/WindowsPhoneSpeedyBlupi/Decor.java | 1140 ++++++----- .../phone/WindowsPhoneSpeedyBlupi/Def.java | 1702 ++++++++++------- .../phone/WindowsPhoneSpeedyBlupi/Game1.java | 412 ++-- .../WindowsPhoneSpeedyBlupi/GameData.java | 241 +-- .../WindowsPhoneSpeedyBlupi/InputPad.java | 673 +++---- .../phone/WindowsPhoneSpeedyBlupi/Jauge.java | 49 +- .../WindowsPhoneSpeedyBlupi/MarketPlace.java | 14 +- .../phone/WindowsPhoneSpeedyBlupi/Misc.java | 109 +- .../WindowsPhoneSpeedyBlupi/MyResource.java | 972 +++++----- .../phone/WindowsPhoneSpeedyBlupi/Pixmap.java | 224 +-- .../WindowsPhoneSpeedyBlupi/Program.java | 19 +- .../Properties/AssemblyInfo.java | 79 +- .../WindowsPhoneSpeedyBlupi/Resource.java | 55 +- .../phone/WindowsPhoneSpeedyBlupi/Slider.java | 87 +- .../phone/WindowsPhoneSpeedyBlupi/Sound.java | 131 +- .../phone/WindowsPhoneSpeedyBlupi/Tables.java | 531 ++--- .../Tables_table_blupi.java | 318 +++ .../phone/WindowsPhoneSpeedyBlupi/Text.java | 56 +- .../WindowsPhoneSpeedyBlupi/TinyPoint.java | 41 +- .../WindowsPhoneSpeedyBlupi/TinyRect.java | 68 +- .../WindowsPhoneSpeedyBlupi/TrialMode.java | 129 +- .../phone/WindowsPhoneSpeedyBlupi/Worlds.java | 384 ++-- gradle.properties | 4 +- html/build.gradle | 7 + .../com/openeggbert/GdxDefinition.gwt.xml | 2 + 31 files changed, 4059 insertions(+), 3498 deletions(-) delete mode 100644 core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFailedException.java create mode 100644 core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables_table_blupi.java diff --git a/core/build.gradle b/core/build.gradle index 156e063..bb9d649 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -23,6 +23,8 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.3" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.3" api "com.pixelgamelibrary:pixel:$pixelVersion" + implementation "com.openeggbert.jdotnet:jdotnet:$jdotnetVersion" + implementation "com.openeggbert.jxna:jxna:$jxnaVersion" if(enableGraalNative == 'true') { implementation "io.github.berstanio:gdx-svmhelper-annotations:$graalHelperVersion" diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Accelerometer.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Accelerometer.java index 40729a6..98344d2 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Accelerometer.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Accelerometer.java @@ -1,15 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public interface Accelerometer - { - void Start(); - void Stop(); - event EventHandler CurrentValueChanged; - } +import com.openeggbert.jdotnet.System.*; + +public interface Accelerometer { + + void Start(); + + void Stop(); + + @Event + EventHandler CurrentValueChanged(); } diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerDummyImpl.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerDummyImpl.java index ffa1524..1eb9dde 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerDummyImpl.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerDummyImpl.java @@ -1,14 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public class AccelerometerDummyImpl : Accelerometer +import com.openeggbert.jdotnet.System.Event; +import com.openeggbert.jdotnet.System.EventHandler; +import com.openeggbert.jdotnet.System.EventHandlerImpl; + + + + public class AccelerometerDummyImpl implements Accelerometer { - public event EventHandler CurrentValueChanged; + private final EventHandler CurrentValueChangedInternal = new EventHandlerImpl(); + public @Event EventHandler CurrentValueChanged() {return CurrentValueChangedInternal;} public void Start() { @@ -20,4 +21,3 @@ namespace WindowsPhoneSpeedyBlupi //throw new AccelerometerFailedException(); } } -} diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerEventArgs.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerEventArgs.java index c70753e..09b85fa 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerEventArgs.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerEventArgs.java @@ -1,23 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public class AccelerometerEventArgs : EventArgs - { +import com.openeggbert.jdotnet.System.EventArgs; - public float X { get; } - public float Y { get; } - public float Z { get; } +import lombok.Getter; - public AccelerometerEventArgs(float x, float y, float z) - { - X = x; - Y = y; - Z = z; - } +public class AccelerometerEventArgs extends EventArgs { + + public float X() {return getX();} + public float Y() {return getY();} + public float Z() {return getZ();} + @Getter + private float X; + @Getter + private float Y; + @Getter + private float Z; + + public AccelerometerEventArgs(float x, float y, float z) { + X = x; + Y = y; + Z = z; } } diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFactory.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFactory.java index 5097a8c..50839a5 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFactory.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFactory.java @@ -1,13 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public class AccelerometerFactory - { - public static Accelerometer Create() { return new AccelerometerDummyImpl(); } +public class AccelerometerFactory { + + public static Accelerometer Create() { + return new AccelerometerDummyImpl(); } } diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFailedException.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFailedException.java deleted file mode 100644 index d388fa7..0000000 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/AccelerometerFailedException.java +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WindowsPhoneSpeedyBlupi -{ - public class AccelerometerFailedException : Exception - { - } -} diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Decor.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Decor.java index 2d236d7..66d60ee 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Decor.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Decor.java @@ -1,22 +1,54 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 // WindowsPhoneSpeedyBlupi.Decor -using System; -using System.Collections.Generic; -using Microsoft.Xna.Framework.Media; -using WindowsPhoneSpeedyBlupi; -using static System.Net.Mime.MediaTypeNames; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.*; +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jdotnet.System.Collections.Generic.*; +import com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi.*; +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jdotnet.JDotNet.Pair; +import com.openeggbert.jdotnet.JDotNet.UnusedCode; +// +//static +import com.openeggbert.jdotnet.System.Net.Mime.MediaTypeNames.*; +import java.util.ArrayList; +import java.util.List; +// +// +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + @namespace(name = "WindowsPhoneSpeedyBlupi") -namespace WindowsPhoneSpeedyBlupi -{ public class Decor { - private struct Cellule - { + + @AllArgsConstructor + @NoArgsConstructor + private class Cellule extends com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.struct { + public int icon; + + @Override + public Cellule copy() { + return new Cellule(icon); + } + + @Override + public Cellule reset() { + this.icon = 0; + return this; + } } - private struct MoveObject + + + @AllArgsConstructor + @NoArgsConstructor + private class MoveObject extends com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.struct { public int type; @@ -43,6 +75,32 @@ namespace WindowsPhoneSpeedyBlupi public int channel; public int icon; + + @Override + public MoveObject copy() { + return new MoveObject(type, stepAdvance, stepRecede, timeStopStart, timeStopEnd, posStart.copy(), posEnd.copy(), posCurrent.copy(), step, time, phase, channel, icon); + } + + @Override + public MoveObject reset() { + + type = 0; + stepAdvance = 0; + stepRecede = 0; + timeStopStart = 0; + timeStopEnd = 0; + posStart = default_(new TinyPoint()); + posEnd = default_(new TinyPoint()); + posCurrent = default_(new TinyPoint()); + step = 0; + time = 0; + phase = 0; + channel = 0; + icon = 0; + return this; + } + + } private class ByeByeObject @@ -66,25 +124,25 @@ namespace WindowsPhoneSpeedyBlupi public double speedX; } - private static readonly int MAXMOVEOBJECT = 200; + private static @readonly final int MAXMOVEOBJECT = 200; - private static readonly int MAXQUART = 441; + private static @readonly final int MAXQUART = 441; - private static readonly int SCROLL_SPEED = 8; + private static @readonly final int SCROLL_SPEED = 8; - private static readonly int SCROLL_MARGX = 80; + private static @readonly final int SCROLL_MARGX = 80; - private static readonly int SCROLL_MARGY = 40; + private static @readonly final int SCROLL_MARGY = 40; - private static readonly int BLUPIFLOOR = 2; + private static @readonly final int BLUPIFLOOR = 2; - private static readonly int BLUPIOFFY = 4 + BLUPIFLOOR; + private static @readonly final int BLUPIOFFY = 4 + BLUPIFLOOR; - private static readonly int BLUPISURF = 12; + private static @readonly final int BLUPISURF = 12; - private static readonly int BLUPISUSPEND = 12; + private static @readonly final int BLUPISUSPEND = 12; - private static readonly int OVERHEIGHT = 80; + private static @readonly final int OVERHEIGHT = 80; private Sound m_sound; @@ -92,9 +150,9 @@ namespace WindowsPhoneSpeedyBlupi private GameData m_gameData; - private Cellule[,] m_decor = new Cellule[100, 100]; + private Cellule[][] m_decor = new Cellule[100][100]; - private Cellule[,] m_bigDecor = new Cellule[100, 100]; + private Cellule[][] m_bigDecor = new Cellule[100][100]; private int[] m_balleTraj = new int[1300]; @@ -118,7 +176,7 @@ namespace WindowsPhoneSpeedyBlupi private int m_time; - private bool m_bPause; + private boolean m_bPause; private TinyRect m_drawBounds; @@ -156,45 +214,45 @@ namespace WindowsPhoneSpeedyBlupi private int m_blupiTransport; - private bool m_blupiFocus; + private boolean m_blupiFocus; - private bool m_blupiAir; + private boolean m_blupiAir; - private bool m_blupiHelico; + private boolean m_blupiHelico; - private bool m_blupiOver; + private boolean m_blupiOver; - private bool m_blupiJeep; + private boolean m_blupiJeep; - private bool m_blupiTank; + private boolean m_blupiTank; - private bool m_blupiSkate; + private boolean m_blupiSkate; - private bool m_blupiNage; + private boolean m_blupiNage; - private bool m_blupiSurf; + private boolean m_blupiSurf; - private bool m_blupiVent; + private boolean m_blupiVent; - private bool m_blupiSuspend; + private boolean m_blupiSuspend; - private bool m_blupiJumpAie; + private boolean m_blupiJumpAie; - private bool m_blupiShield; + private boolean m_blupiShield; - private bool m_blupiPower; + private boolean m_blupiPower; - private bool m_blupiCloud; + private boolean m_blupiCloud; - private bool m_blupiHide; + private boolean m_blupiHide; - private bool m_blupiInvert; + private boolean m_blupiInvert; - private bool m_blupiBalloon; + private boolean m_blupiBalloon; - private bool m_blupiEcrase; + private boolean m_blupiEcrase; - private bool m_blupiMotorHigh; + private boolean m_blupiMotorHigh; private int m_blupiMotorSound; @@ -202,9 +260,9 @@ namespace WindowsPhoneSpeedyBlupi private TinyPoint m_blupiPosMagic; - private bool m_blupiRestart; + private boolean m_blupiRestart; - private bool m_blupiFront; + private boolean m_blupiFront; private int m_blupiBullet; @@ -248,17 +306,17 @@ namespace WindowsPhoneSpeedyBlupi private int m_blupiLevel; - private bool m_bFoundCle; + private boolean m_bFoundCle; - private bool m_bPrivate; + private boolean m_bPrivate; - private bool m_bCheatDoors; + private boolean m_bCheatDoors; - private bool m_bSuperBlupi; + private boolean m_bSuperBlupi; - private bool m_bDrawSecret; + private boolean m_bDrawSecret; - private bool m_buildOfficialMissions; + private boolean m_buildOfficialMissions; private int m_mission; @@ -326,34 +384,32 @@ namespace WindowsPhoneSpeedyBlupi private double m_hotSpotOutLag; - private Random m_random; + private com.openeggbert.jdotnet.System.Random_ m_random; private List byeByeObjects; - public TinyRect DrawBounds - { - get - { - return m_drawBounds; - } - set - { - m_drawBounds = value; - } + public TinyRect getDrawBounds() { + return m_drawBounds; } - public Def.ButtonGlygh ButtonPressed { get; set; } + public void setDrawBounds(TinyRect value) { + m_drawBounds = value; + } - private static void MoveObjectCopy(ref MoveObject dst, MoveObject src) + @Getter + @Setter + public Def.ButtonGlygh ButtonPressed; + + private static void MoveObjectCopy(MoveObject dst, MoveObject src) { dst.type = src.type; dst.stepAdvance = src.stepAdvance; dst.stepRecede = src.stepRecede; dst.timeStopStart = src.timeStopStart; dst.timeStopEnd = src.timeStopEnd; - dst.posStart = src.posStart; - dst.posEnd = src.posEnd; - dst.posCurrent = src.posCurrent; + dst.posStart = src.posStart.copy(); + dst.posEnd = src.posEnd.copy(); + dst.posCurrent = src.posCurrent.copy(); dst.step = src.step; dst.time = src.time; dst.phase = src.phase; @@ -382,8 +438,8 @@ namespace WindowsPhoneSpeedyBlupi m_hotSpotCurrentZoom = 1.0; m_hotSpotCurrentX = 320.0; m_hotSpotCurrentY = 240.0; - m_random = new Random(); - byeByeObjects = new List(); + m_random = new com.openeggbert.jdotnet.System.Random_(); + byeByeObjects = new ArrayList(); } public void Create(Sound sound, Pixmap pixmap, GameData gameData) @@ -395,7 +451,7 @@ namespace WindowsPhoneSpeedyBlupi m_lastKeyPress = 0; m_blupiMotorSound = 0; InitDecor(); - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); pos.X = 90; pos.Y = 450; m_jauges[0] = new Jauge(); @@ -408,9 +464,9 @@ namespace WindowsPhoneSpeedyBlupi m_jauges[1].SetHide(true); } - public bool LoadImages() + public boolean LoadImages() { - string name = string.Format("decor{0}", m_region.ToString("d3")); + String name = string.Format("decor{0}", int_.of(m_region).ToString("d3")); m_pixmap.BackgroundCache(name); return true; } @@ -428,17 +484,17 @@ namespace WindowsPhoneSpeedyBlupi { for (int j = 0; j < 100; j++) { - m_decor[i, j].icon = -1; - m_bigDecor[i, j].icon = -1; + m_decor[i][j].icon = -1; + m_bigDecor[i][j].icon = -1; } } - m_decor[1, 4].icon = 40; - m_decor[2, 4].icon = 38; - m_decor[3, 4].icon = 38; - m_decor[4, 4].icon = 38; - m_decor[5, 4].icon = 38; - m_decor[6, 4].icon = 38; - m_decor[7, 4].icon = 39; + m_decor[1][4].icon = 40; + m_decor[2][4].icon = 38; + m_decor[3][4].icon = 38; + m_decor[4][4].icon = 38; + m_decor[5][4].icon = 38; + m_decor[6][4].icon = 38; + m_decor[7][4].icon = 39; for (int k = 0; k < MAXMOVEOBJECT; k++) { m_moveObject[k].type = 0; @@ -518,10 +574,10 @@ namespace WindowsPhoneSpeedyBlupi m_scrollAdd.X = 0; m_scrollAdd.Y = 0; m_term = 0; - byeByeObjects.Clear(); + byeByeObjects.clear(); } - public void PlayPrepare(bool bTest) + public void PlayPrepare(boolean bTest) { if (bTest) { @@ -642,20 +698,22 @@ namespace WindowsPhoneSpeedyBlupi BlupiStep(); MoveHotSpot(); AdaptMotorVehicleSound(); + //todo: remove me + if(1 == 0) throw new Exception_(); } - catch + catch (Exception_ e) { } } private void ResetHotSpot() { - m_pixmap.SetHotSpot(1.0, DrawBounds.Width / 2, DrawBounds.Height / 2); + m_pixmap.SetHotSpot(1.0, m_drawBounds.Width() / 2, m_drawBounds.Height() / 2); } private void MoveHotSpot() { - bool flag = false; + boolean flag = false; if (m_blupiSpeedX != 0.0) { flag = true; @@ -668,7 +726,7 @@ namespace WindowsPhoneSpeedyBlupi { flag = false; } - if (!m_gameData.AutoZoom) + if (!m_gameData.isAutoZoom()) { flag = false; } @@ -700,38 +758,38 @@ namespace WindowsPhoneSpeedyBlupi else { m_hotSpotFinalZoom = 1.0; - m_hotSpotFinalX = DrawBounds.Width / 2; - m_hotSpotFinalY = DrawBounds.Height / 2; + m_hotSpotFinalX = getDrawBounds().Width() / 2; + m_hotSpotFinalY = getDrawBounds().Height() / 2; } m_hotSpotStepZoom = 1.0 / 30.0; m_hotSpotStepX = 10.0; m_hotSpotStepY = 10.0; if (m_hotSpotCurrentZoom < m_hotSpotFinalZoom) { - m_hotSpotCurrentZoom = Math.Min(m_hotSpotCurrentZoom + m_hotSpotStepZoom, m_hotSpotFinalZoom); + m_hotSpotCurrentZoom = Math_.Min(m_hotSpotCurrentZoom + m_hotSpotStepZoom, m_hotSpotFinalZoom); } if (m_hotSpotCurrentZoom > m_hotSpotFinalZoom) { - m_hotSpotCurrentZoom = Math.Max(m_hotSpotCurrentZoom - m_hotSpotStepZoom, m_hotSpotFinalZoom); + m_hotSpotCurrentZoom = Math_.Max(m_hotSpotCurrentZoom - m_hotSpotStepZoom, m_hotSpotFinalZoom); } if (m_hotSpotCurrentX < m_hotSpotFinalX) { - m_hotSpotCurrentX = Math.Min(m_hotSpotCurrentX + m_hotSpotStepX, m_hotSpotFinalX); + m_hotSpotCurrentX = Math_.Min(m_hotSpotCurrentX + m_hotSpotStepX, m_hotSpotFinalX); } if (m_hotSpotCurrentX > m_hotSpotFinalX) { - m_hotSpotCurrentX = Math.Max(m_hotSpotCurrentX - m_hotSpotStepX, m_hotSpotFinalX); + m_hotSpotCurrentX = Math_.Max(m_hotSpotCurrentX - m_hotSpotStepX, m_hotSpotFinalX); } m_pixmap.SetHotSpot(m_hotSpotCurrentZoom, m_hotSpotCurrentX, m_hotSpotCurrentY); } - private bool BlitzActif(int celx, int cely) + private boolean BlitzActif(int celx, int cely) { - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); pos.X = celx * 64; pos.Y = cely * 64; int num = m_time % 100; - if (m_decor[celx, cely - 1].icon == 304 && (num == 0 || num == 7 || num == 18 || num == 25 || num == 33 || num == 44) && cely > 0) + if (m_decor[celx][ cely - 1].icon == 304 && (num == 0 || num == 7 || num == 18 || num == 25 || num == 33 || num == 44) && cely > 0) { PlaySound(69, pos); } @@ -745,13 +803,13 @@ namespace WindowsPhoneSpeedyBlupi public void Build() { TinyPoint posDecor = DecorNextAction(); - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); pos.X = posDecor.X * 2 / 3; pos.Y = posDecor.Y * 2 / 3; int num = 1; - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = m_drawBounds.Left; - TinyRect rect = default(TinyRect); + TinyRect rect = default_(new TinyRect()); rect.Left = pos.X % 640; rect.Right = 640; for (int i = 0; i < 3; i++) @@ -762,11 +820,11 @@ namespace WindowsPhoneSpeedyBlupi for (int j = 0; j < 2; j++) { m_pixmap.DrawPart(3, tinyPoint, rect); - tinyPoint.Y += rect.Height - num; + tinyPoint.Y += rect.Height() - num; rect.Top = 0; rect.Bottom = 480; } - tinyPoint.X += rect.Width - num; + tinyPoint.X += rect.Width() - num; rect.Left = 0; rect.Right = 640; if (tinyPoint.X > m_drawBounds.Right) @@ -775,14 +833,14 @@ namespace WindowsPhoneSpeedyBlupi } } tinyPoint.X = m_drawBounds.Left - posDecor.X % 64 - 64; - for (int i = posDecor.X / 64 - 1; i < posDecor.X / 64 + m_drawBounds.Width / 64 + 3; i++) + for (int i = posDecor.X / 64 - 1; i < posDecor.X / 64 + m_drawBounds.Width() / 64 + 3; i++) { tinyPoint.Y = m_drawBounds.Top - posDecor.Y % 64 + 2 - 64; - for (int j = posDecor.Y / 64 - 1; j < posDecor.Y / 64 + m_drawBounds.Height / 64 + 2; j++) + for (int j = posDecor.Y / 64 - 1; j < posDecor.Y / 64 + m_drawBounds.Height() / 64 + 2; j++) { if (i >= 0 && i < 100 && j >= 0 && j < 100) { - int num2 = m_bigDecor[i, j].icon; + int num2 = m_bigDecor[i][j].icon; int channel = 9; if (num2 != -1) { @@ -809,14 +867,14 @@ namespace WindowsPhoneSpeedyBlupi tinyPoint.X += 64; } tinyPoint.X = m_drawBounds.Left - posDecor.X % 64; - for (int i = posDecor.X / 64; i < posDecor.X / 64 + m_drawBounds.Width / 64 + 2; i++) + for (int i = posDecor.X / 64; i < posDecor.X / 64 + m_drawBounds.Width() / 64 + 2; i++) { tinyPoint.Y = m_drawBounds.Top - posDecor.Y % 64; - for (int j = posDecor.Y / 64; j < posDecor.Y / 64 + m_drawBounds.Height / 64 + 2; j++) + for (int j = posDecor.Y / 64; j < posDecor.Y / 64 + m_drawBounds.Height() / 64 + 2; j++) { - if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i, j].icon != -1) + if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i][j].icon != -1) { - int num2 = m_decor[i, j].icon; + int num2 = m_decor[i][j].icon; if (num2 == 384 || num2 == 385) { m_pixmap.QuickIcon(1, num2, tinyPoint); @@ -898,7 +956,7 @@ namespace WindowsPhoneSpeedyBlupi } for (int num3 = MAXMOVEOBJECT - 1; num3 >= 0; num3--) { - if (m_moveObject[num3].type != 0 && m_moveObject[num3].posCurrent.X >= posDecor.X - 64 && m_moveObject[num3].posCurrent.Y >= posDecor.Y - 64 && m_moveObject[num3].posCurrent.X <= posDecor.X + m_drawBounds.Width && m_moveObject[num3].posCurrent.Y <= posDecor.Y + m_drawBounds.Height && (m_moveObject[num3].type < 8 || m_moveObject[num3].type > 11) && (m_moveObject[num3].type < 90 || m_moveObject[num3].type > 95) && (m_moveObject[num3].type < 98 || m_moveObject[num3].type > 100) && m_moveObject[num3].type != 53 && m_moveObject[num3].type != 1 && m_moveObject[num3].type != 47 && m_moveObject[num3].type != 48) + if (m_moveObject[num3].type != 0 && m_moveObject[num3].posCurrent.X >= posDecor.X - 64 && m_moveObject[num3].posCurrent.Y >= posDecor.Y - 64 && m_moveObject[num3].posCurrent.X <= posDecor.X + m_drawBounds.Width() && m_moveObject[num3].posCurrent.Y <= posDecor.Y + m_drawBounds.Height() && (m_moveObject[num3].type < 8 || m_moveObject[num3].type > 11) && (m_moveObject[num3].type < 90 || m_moveObject[num3].type > 95) && (m_moveObject[num3].type < 98 || m_moveObject[num3].type > 100) && m_moveObject[num3].type != 53 && m_moveObject[num3].type != 1 && m_moveObject[num3].type != 47 && m_moveObject[num3].type != 48) { tinyPoint.X = m_drawBounds.Left + m_moveObject[num3].posCurrent.X - posDecor.X; tinyPoint.Y = m_drawBounds.Top + m_moveObject[num3].posCurrent.Y - posDecor.Y; @@ -919,11 +977,11 @@ namespace WindowsPhoneSpeedyBlupi m_pixmap.QuickIcon(m_moveObject[num3].channel, m_moveObject[num3].icon, tinyPoint, opacity, 0.0); if (m_moveObject[num3].type == 30) { - for (int l = 0; l < Tables.table_drinkoffset.Length; l++) + for (int l = 0; l < Tables.table_drinkoffset.length; l++) { int num4 = (m_time + Tables.table_drinkoffset[l]) % 50; int rank = Tables.table_drinkeffect[num4 % 5]; - TinyPoint tinyPoint2 = default(TinyPoint); + TinyPoint tinyPoint2 = default_(new TinyPoint()); tinyPoint2.X = tinyPoint.X + 2; tinyPoint2.Y = tinyPoint.Y - num4 * 3; TinyPoint pos2 = tinyPoint2; @@ -938,14 +996,14 @@ namespace WindowsPhoneSpeedyBlupi } } tinyPoint.X = m_drawBounds.Left - posDecor.X % 64; - for (int i = posDecor.X / 64; i < posDecor.X / 64 + m_drawBounds.Width / 64 + 2; i++) + for (int i = posDecor.X / 64; i < posDecor.X / 64 + m_drawBounds.Width() / 64 + 2; i++) { tinyPoint.Y = m_drawBounds.Top - posDecor.Y % 64; - for (int j = posDecor.Y / 64; j < posDecor.Y / 64 + m_drawBounds.Height / 64 + 2; j++) + for (int j = posDecor.Y / 64; j < posDecor.Y / 64 + m_drawBounds.Height() / 64 + 2; j++) { - if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i, j].icon != -1) + if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i][j].icon != -1) { - int num2 = m_decor[i, j].icon; + int num2 = m_decor[i][j].icon; pos.X = tinyPoint.X; pos.Y = tinyPoint.Y; if ((num2 >= 107 && num2 <= 109) || num2 == 157) @@ -1018,7 +1076,7 @@ namespace WindowsPhoneSpeedyBlupi } for (int num3 = 0; num3 < MAXMOVEOBJECT; num3++) { - if ((m_moveObject[num3].type == 1 || m_moveObject[num3].type == 47 || m_moveObject[num3].type == 48) && m_moveObject[num3].posCurrent.X >= posDecor.X - 64 && m_moveObject[num3].posCurrent.Y >= posDecor.Y - 64 && m_moveObject[num3].posCurrent.X <= posDecor.X + m_drawBounds.Width && m_moveObject[num3].posCurrent.Y <= posDecor.Y + m_drawBounds.Height) + if ((m_moveObject[num3].type == 1 || m_moveObject[num3].type == 47 || m_moveObject[num3].type == 48) && m_moveObject[num3].posCurrent.X >= posDecor.X - 64 && m_moveObject[num3].posCurrent.Y >= posDecor.Y - 64 && m_moveObject[num3].posCurrent.X <= posDecor.X + m_drawBounds.Width() && m_moveObject[num3].posCurrent.Y <= posDecor.Y + m_drawBounds.Height()) { tinyPoint.X = m_drawBounds.Left + m_moveObject[num3].posCurrent.X - posDecor.X; tinyPoint.Y = m_drawBounds.Top + m_moveObject[num3].posCurrent.Y - posDecor.Y; @@ -1026,14 +1084,14 @@ namespace WindowsPhoneSpeedyBlupi } } tinyPoint.X = m_drawBounds.Left - posDecor.X % 64; - for (int i = posDecor.X / 64; i < posDecor.X / 64 + m_drawBounds.Width / 64 + 2; i++) + for (int i = posDecor.X / 64; i < posDecor.X / 64 + m_drawBounds.Width() / 64 + 2; i++) { tinyPoint.Y = m_drawBounds.Top - posDecor.Y % 64; - for (int j = posDecor.Y / 64; j < posDecor.Y / 64 + m_drawBounds.Height / 64 + 2; j++) + for (int j = posDecor.Y / 64; j < posDecor.Y / 64 + m_drawBounds.Height() / 64 + 2; j++) { - if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i, j].icon != -1) + if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i][j].icon != -1) { - int num2 = m_decor[i, j].icon; + int num2 = m_decor[i][j].icon; pos = tinyPoint; if (num2 == 68) { @@ -1052,11 +1110,11 @@ namespace WindowsPhoneSpeedyBlupi m_pixmap.QuickIcon(1, num2, pos); if (num2 >= 404 && num2 <= 407) { - m_decor[i, j].icon = 404; + m_decor[i][j].icon = 404; } else { - m_decor[i, j].icon = 410; + m_decor[i][j].icon = 410; } } if (num2 == 317) @@ -1138,7 +1196,7 @@ namespace WindowsPhoneSpeedyBlupi ByeByeDraw(posDecor); for (int num3 = 0; num3 < MAXMOVEOBJECT; num3++) { - if (m_moveObject[num3].type != 0 && m_moveObject[num3].posCurrent.X >= posDecor.X - 64 && m_moveObject[num3].posCurrent.Y >= posDecor.Y - 64 && m_moveObject[num3].posCurrent.X <= posDecor.X + m_drawBounds.Width && m_moveObject[num3].posCurrent.Y <= posDecor.Y + m_drawBounds.Height && ((m_moveObject[num3].type >= 8 && m_moveObject[num3].type <= 11) || (m_moveObject[num3].type >= 90 && m_moveObject[num3].type <= 95) || (m_moveObject[num3].type >= 98 && m_moveObject[num3].type <= 100) || m_moveObject[num3].type == 53)) + if (m_moveObject[num3].type != 0 && m_moveObject[num3].posCurrent.X >= posDecor.X - 64 && m_moveObject[num3].posCurrent.Y >= posDecor.Y - 64 && m_moveObject[num3].posCurrent.X <= posDecor.X + m_drawBounds.Width() && m_moveObject[num3].posCurrent.Y <= posDecor.Y + m_drawBounds.Height() && ((m_moveObject[num3].type >= 8 && m_moveObject[num3].type <= 11) || (m_moveObject[num3].type >= 90 && m_moveObject[num3].type <= 95) || (m_moveObject[num3].type >= 98 && m_moveObject[num3].type <= 100) || m_moveObject[num3].type == 53)) { tinyPoint.X = m_drawBounds.Left + m_moveObject[num3].posCurrent.X - posDecor.X; tinyPoint.Y = m_drawBounds.Top + m_moveObject[num3].posCurrent.Y - posDecor.Y; @@ -1158,7 +1216,7 @@ namespace WindowsPhoneSpeedyBlupi private void DrawInfo() { - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); pos.X = 210; pos.Y = 417; for (int i = 0; i < m_nbVies; i++) @@ -1178,7 +1236,7 @@ namespace WindowsPhoneSpeedyBlupi pos.X = 0; pos.Y = 438; m_pixmap.HudIcon(4, 108, pos); - string text = string.Format("= {0}", m_blupiPerso.ToString()); + String text = string.Format("= {0}", int_.of(m_blupiPerso).ToString()); pos.X = 32; pos.Y = 452; Text.DrawText(m_pixmap, pos, text, 0.7); @@ -1189,19 +1247,19 @@ namespace WindowsPhoneSpeedyBlupi pos.Y = 414; m_pixmap.HudIcon(10, 252, pos); } - if (((uint)m_blupiCle & (true ? 1u : 0u)) != 0) + if ((m_blupiCle & (true ? 1 : 0)) != 0) { pos.X = 520; pos.Y = 418; m_pixmap.HudIcon(10, 215, pos); } - if (((uint)m_blupiCle & 2u) != 0) + if ((m_blupiCle & 2) != 0) { pos.X = 530; pos.Y = 418; m_pixmap.HudIcon(10, 222, pos); } - if (((uint)m_blupiCle & 4u) != 0) + if ((m_blupiCle & 4) != 0) { pos.X = 540; pos.Y = 418; @@ -1209,14 +1267,14 @@ namespace WindowsPhoneSpeedyBlupi } if ((m_mission != 1 && m_mission % 10 != 0) || m_bPrivate) { - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = 410 + m_pixmap.Origin.X; - tinyRect.Right = 510 + m_pixmap.Origin.X; + TinyRect tinyRect = default_(new TinyRect()); + tinyRect.Left = 410 + m_pixmap.Origin().X; + tinyRect.Right = 510 + m_pixmap.Origin().X; tinyRect.Top = 445; tinyRect.Bottom = 480; TinyRect rect = tinyRect; m_pixmap.DrawIcon(14, 15, rect, 0.6, false); - string text = string.Format("{0}/{1}", m_nbTresor.ToString(), m_totalTresor.ToString()); + String text = string.Format("{0}/{1}", int_.of(m_nbTresor).ToString(), int_.of(m_totalTresor).ToString()); pos.X = 460; pos.Y = 450; Text.DrawTextCenter(m_pixmap, pos, text, 1.0); @@ -1256,23 +1314,23 @@ namespace WindowsPhoneSpeedyBlupi if (num >= array[i] && num <= array[i + 1] && num2 >= array[i + 2] && num2 <= array[i + 3] && IsDisplayInfo(array[i + 4])) { int num3 = 0; - if (m_gameData.AccelActive) + if (m_gameData.isAccelActive()) { num3 = 10000; } - string text = MyResource.LoadString(array[i + 5] + num3); - if (!string.IsNullOrEmpty(text)) + String text = MyResource.LoadString(array[i + 5] + num3); + if (!(text == null || text.isEmpty())) { - TinyRect drawBounds = m_pixmap.DrawBounds; - TinyRect tinyRect2 = default(TinyRect); + TinyRect drawBounds = m_pixmap.DrawBounds(); + TinyRect tinyRect2 = default_(new TinyRect()); tinyRect2.Left = 0; - tinyRect2.Right = drawBounds.Width; + tinyRect2.Right = drawBounds.Width(); tinyRect2.Top = 0; tinyRect2.Bottom = 40; TinyRect rect2 = tinyRect2; m_pixmap.DrawIcon(14, 15, rect2, 1.0, false); double num4 = Text.GetTextWidth(text, 1.0); - double num5 = Math.Min(640.0 / num4, 1.0); + double num5 = Math_.Min(640.0 / num4, 1.0); pos.X = 320; pos.Y = 5 + (int)((1.0 - num5) * 35.0 * 0.6); Text.DrawTextCenter(m_pixmap, pos, text, num5); @@ -1282,7 +1340,7 @@ namespace WindowsPhoneSpeedyBlupi } } - private bool IsDisplayInfo(int tableTresor) + private boolean IsDisplayInfo(int tableTresor) { if (tableTresor >= 0) { @@ -1329,7 +1387,7 @@ namespace WindowsPhoneSpeedyBlupi { posDecor.X += 3 * Tables.table_decor_action[i + 2 + m_decorPhase * 2]; posDecor.Y += 3 * Tables.table_decor_action[i + 2 + m_decorPhase * 2 + 1]; - int num = ((m_dimDecor.X != 0) ? (6400 - m_drawBounds.Width) : 0); + int num = ((m_dimDecor.X != 0) ? (6400 - m_drawBounds.Width()) : 0); if (posDecor.X < 0) { posDecor.X = 0; @@ -1338,7 +1396,7 @@ namespace WindowsPhoneSpeedyBlupi { posDecor.X = num; } - num = ((m_dimDecor.Y != 0) ? (6400 - m_drawBounds.Height) : 0); + num = ((m_dimDecor.Y != 0) ? (6400 - m_drawBounds.Height()) : 0); if (posDecor.Y < 0) { posDecor.Y = 0; @@ -1377,14 +1435,32 @@ namespace WindowsPhoneSpeedyBlupi m_keyPress = keyPress; } - private void GetBlupiInfo(out bool bHelico, out bool bJeep, out bool bSkate, out bool bNage) - { - bHelico = m_blupiHelico; - bJeep = m_blupiJeep | m_blupiTank; - bSkate = m_blupiSkate; - bNage = m_blupiNage | m_blupiSurf; + class BlupiInfo { + + public boolean bHelico; + public boolean bJeep; + public boolean bSkate; + public boolean bNage; + + public BlupiInfo(boolean bHelico, boolean bJeep, boolean bSkate, boolean bNage) { + this.bHelico = bHelico; + this.bJeep = bJeep; + this.bSkate = bSkate; + this.bNage = bNage; + } } + @UnusedCode + private BlupiInfo getBlupiInfo(/*out bool bHelico, out bool bJeep, out bool bSkate, out bool bNage*/) { + boolean bHelico = m_blupiHelico; + boolean bJeep = m_blupiJeep || m_blupiTank; + boolean bSkate = m_blupiSkate; + boolean bNage = m_blupiNage || m_blupiSurf; + + return new BlupiInfo(bHelico, bJeep, bSkate, bNage); + } + + private int SoundEnviron(int sound, int obstacle) { if ((obstacle >= 32 && obstacle <= 34) || (obstacle >= 41 && obstacle <= 47) || (obstacle >= 139 && obstacle <= 143)) @@ -1598,27 +1674,27 @@ namespace WindowsPhoneSpeedyBlupi gameData.SetDoors(m_doors); } - public static string GetCheatTinyText(Def.ButtonGlygh glyph) + public static String GetCheatTinyText(Def.ButtonGlygh glyph) { switch (glyph) { - case Def.ButtonGlygh.Cheat1: + case Cheat1: return "D"; - case Def.ButtonGlygh.Cheat2: + case Cheat2: return "B"; - case Def.ButtonGlygh.Cheat3: + case Cheat3: return "S"; - case Def.ButtonGlygh.Cheat4: + case Cheat4: return "E"; - case Def.ButtonGlygh.Cheat5: + case Cheat5: return "R"; - case Def.ButtonGlygh.Cheat6: + case Cheat6: return "T"; - case Def.ButtonGlygh.Cheat7: + case Cheat7: return "C"; - case Def.ButtonGlygh.Cheat8: + case Cheat8: return "T"; - case Def.ButtonGlygh.Cheat9: + case Cheat9: return "G"; default: return ""; @@ -1893,7 +1969,7 @@ namespace WindowsPhoneSpeedyBlupi } } - private void SetBuildOfficialMissions(bool bMode) + private void SetBuildOfficialMissions(boolean bMode) { m_buildOfficialMissions = bMode; } @@ -2029,7 +2105,7 @@ namespace WindowsPhoneSpeedyBlupi { num2 = 41; } - if (num2 == 38 && m_blupiSpeedX == 0.0 && Math.Abs(m_blupiVitesseX) > 5.0) + if (num2 == 38 && m_blupiSpeedX == 0.0 && Math_.Abs(m_blupiVitesseX) > 5.0) { num2 = 85; } @@ -2081,7 +2157,7 @@ namespace WindowsPhoneSpeedyBlupi { m_blupiRealRotation = 90 - m_blupiLogicRotation; } - m_blupiRealRotation += (int)(Math.Sin((double)m_time / 6.0) * 20.0); + m_blupiRealRotation += (int)(Math_.Sin((double)m_time / 6.0) * 20.0); } if (m_blupiSurf) { @@ -2099,7 +2175,7 @@ namespace WindowsPhoneSpeedyBlupi } m_blupiLogicRotation = Misc.Approch(m_blupiLogicRotation, 0, 10); m_blupiRealRotation = m_blupiLogicRotation; - m_blupiRealRotation += (int)(Math.Sin((double)m_time / 10.0) * 10.0); + m_blupiRealRotation += (int)(Math_.Sin((double)m_time / 10.0) * 10.0); } if (m_blupiSuspend) { @@ -2215,7 +2291,7 @@ namespace WindowsPhoneSpeedyBlupi m_blupiPhase++; } - private bool BlupiIsGround() + private boolean BlupiIsGround() { if (m_blupiTransport == -1) { @@ -2229,7 +2305,7 @@ namespace WindowsPhoneSpeedyBlupi private TinyRect BlupiRect(TinyPoint pos) { - TinyRect result = default(TinyRect); + TinyRect result = default_(new TinyRect()); if (m_blupiNage || m_blupiSurf) { result.Left = pos.X + 12; @@ -2365,7 +2441,7 @@ namespace WindowsPhoneSpeedyBlupi } } - private bool BlupiBloque(TinyPoint pos, int dir) + private boolean BlupiBloque(TinyPoint pos, int dir) { TinyRect rect = BlupiRect(pos); rect.Top = rect.Bottom - 20; @@ -2383,15 +2459,15 @@ namespace WindowsPhoneSpeedyBlupi private void BlupiStep() { - TinyPoint celSwitch = default(TinyPoint); - TinyPoint celBridge = default(TinyPoint); + TinyPoint celSwitch = default_(new TinyPoint()); + TinyPoint celBridge = default_(new TinyPoint()); BlupiAdjust(); m_blupiLastPos = m_blupiPos; TinyPoint end = m_blupiPos; - bool flag = m_blupiAir; + boolean flag = m_blupiAir; int blupiAction = m_blupiAction; - bool bVertigoLeft = false; - bool bVertigoRight = false; + boolean bVertigoLeft = false; + boolean bVertigoRight = false; end.X += m_blupiVector.X; end.Y += m_blupiVector.Y; if (m_blupiFocus && (end.Y + 30) / 64 >= 99) @@ -2403,19 +2479,19 @@ namespace WindowsPhoneSpeedyBlupi PlaySound(8, m_blupiPos); return; } - TinyRect rect = default(TinyRect); + TinyRect rect = default_(new TinyRect()); if (m_blupiVector.X != 0 || m_blupiVector.Y != 0) { rect = BlupiRect(m_blupiPos); rect.Top = m_blupiPos.Y + 11; rect.Bottom = m_blupiPos.Y + 60 - 2; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); } m_blupiVent = false; int icon; if (m_blupiTransport == -1 && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && m_blupiFocus) { - icon = m_decor[(end.X + 30) / 64, (end.Y + 30) / 64].icon; + icon = m_decor[(end.X + 30) / 64][(end.Y + 30) / 64].icon; if (icon == 110) { end.X -= 9; @@ -2439,10 +2515,10 @@ namespace WindowsPhoneSpeedyBlupi rect.Right = m_blupiPos.X + 60 - 12; rect.Top = m_blupiPos.Y + 11; rect.Bottom = m_blupiPos.Y + 60 - 2; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); } } - bool flag2; + boolean flag2; if (m_blupiTransport == -1) { rect = BlupiRect(end); @@ -2457,7 +2533,7 @@ namespace WindowsPhoneSpeedyBlupi rect = BlupiRect(end); rect.Top = end.Y + 10; rect.Bottom = end.Y + 20; - bool flag3 = DecorDetect(rect); + boolean flag3 = DecorDetect(rect); int detectIcon = m_detectIcon; if (!m_blupiAir && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && flag2 && m_blupiFocus) { @@ -2534,7 +2610,7 @@ namespace WindowsPhoneSpeedyBlupi m_blupiAction = 5; m_blupiPhase = 0; } - if (((uint)m_keyPress & (true ? 1u : 0u)) != 0 && m_blupiFocus) + if ((m_keyPress & (true ? 1 : 0)) != 0 && m_blupiFocus) { m_blupiVitesseY = (m_blupiPower ? (-25) : (-19)); } @@ -2546,7 +2622,7 @@ namespace WindowsPhoneSpeedyBlupi flag = true; PlaySound(41, end); } - if (((uint)m_keyPress & (true ? 1u : 0u)) != 0 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) + if (((m_keyPress & (true ? 1 : 0)) != 0) && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) { if (m_blupiAction != 4 && m_blupiAction != 3 && !m_blupiAir) { @@ -2719,20 +2795,26 @@ namespace WindowsPhoneSpeedyBlupi m_blupiPhase = 0; m_blupiFocus = true; } - bool bNear; + boolean bNear; if (m_blupiAction == 48 && m_blupiPhase == 40) { m_blupiAction = 1; m_blupiPhase = 0; m_blupiFocus = true; - icon = MoveObjectDetect(end, out bNear); + Pair resultOfMoveObjectDetect = MoveObjectDetect(end); + icon = resultOfMoveObjectDetect.getValue1(); + bNear = resultOfMoveObjectDetect.getValue2(); if (icon != -1 && !bNear && end.Y - BLUPIFLOOR == m_moveObject[icon].posCurrent.Y) { if (m_blupiDir == 2 && end.X < m_moveObject[icon].posCurrent.X) { celSwitch.X = end.X - 16; celSwitch.Y = end.Y; - int num = MoveObjectDetect(celSwitch, out bNear); + + Pair resultOfMoveObjectDetect_ = MoveObjectDetect(celSwitch); + int num = resultOfMoveObjectDetect_.getValue1(); + bNear = resultOfMoveObjectDetect_.getValue2(); + if (num == -1) { m_blupiAction = 9; @@ -2743,7 +2825,11 @@ namespace WindowsPhoneSpeedyBlupi { celSwitch.X = end.X + 16; celSwitch.Y = end.Y; - int num = MoveObjectDetect(celSwitch, out bNear); + + Pair resultOfMoveObjectDetect_ = MoveObjectDetect(celSwitch); + int num = resultOfMoveObjectDetect_.getValue1(); + bNear = resultOfMoveObjectDetect_.getValue2(); + if (num == -1) { m_blupiAction = 9; @@ -2954,7 +3040,7 @@ namespace WindowsPhoneSpeedyBlupi int num3; if (m_blupiSpeedX < 0.0 && m_blupiFocus) { - if (m_blupiDir == 2 && m_blupiAction != 3 && m_blupiAction != 59 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && ((!m_blupiJeep && !m_blupiTank && !m_blupiSkate) || Math.Abs(m_blupiVitesseX) <= 8.0)) + if (m_blupiDir == 2 && m_blupiAction != 3 && m_blupiAction != 59 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && ((!m_blupiJeep && !m_blupiTank && !m_blupiSkate) || Math_.Abs(m_blupiVitesseX) <= 8.0)) { if (m_blupiAir) { @@ -3004,7 +3090,7 @@ namespace WindowsPhoneSpeedyBlupi } if (m_blupiSpeedX > 0.0 && m_blupiFocus) { - if (m_blupiDir == 1 && m_blupiAction != 3 && m_blupiAction != 59 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && ((!m_blupiJeep && !m_blupiTank && !m_blupiSkate) || Math.Abs(m_blupiVitesseX) <= 8.0)) + if (m_blupiDir == 1 && m_blupiAction != 3 && m_blupiAction != 59 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && ((!m_blupiJeep && !m_blupiTank && !m_blupiSkate) || Math_.Abs(m_blupiVitesseX) <= 8.0)) { if (m_blupiAir) { @@ -3264,7 +3350,7 @@ namespace WindowsPhoneSpeedyBlupi } if (m_blupiHelico && (m_blupiFocus || m_blupiAction == 58)) { - if (((uint)m_keyPress & 2u) != 0 && m_blupiTimeFire == 0 && m_blupiAction != 3 && m_blupiAction != 58 && flag2) + if ((m_keyPress & 2) != 0 && m_blupiTimeFire == 0 && m_blupiAction != 3 && m_blupiAction != 58 && flag2) { if (m_blupiBullet == 0) { @@ -3291,9 +3377,9 @@ namespace WindowsPhoneSpeedyBlupi m_blupiVitesseY = 0.0; } } - if (Def.EasyMove) + if (Def.EasyMove()) { - if (m_blupiSpeedY <= -1.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) + if (m_blupiSpeedY <= -1.0 || (m_keyPress & (true ? 1 : 0)) != 0) { if (m_blupiVitesseY > -7.0) { @@ -3326,7 +3412,7 @@ namespace WindowsPhoneSpeedyBlupi } else { - if (m_blupiSpeedY <= -1.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) + if (m_blupiSpeedY <= -1.0 || (m_keyPress & (true ? 1 : 0)) != 0) { if (m_blupiVitesseY > -10.0) { @@ -3353,7 +3439,7 @@ namespace WindowsPhoneSpeedyBlupi } end.Y += (int)m_blupiVitesseY; } - if (Def.EasyMove) + if (Def.EasyMove()) { if (m_blupiSpeedX <= -1.0) { @@ -3507,13 +3593,13 @@ namespace WindowsPhoneSpeedyBlupi rect = BlupiRect(end); rect.Top = end.Y + 60 - 2; rect.Bottom = end.Y + 60 + OVERHEIGHT - 1; - bool flag4 = !DecorDetect(rect); + boolean flag4 = !DecorDetect(rect); icon = MoveAscenseurDetect(m_blupiPos, OVERHEIGHT); if (icon != -1) { flag4 = false; } - if ((m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) && !flag4) + if ((m_blupiSpeedY < 0.0 || (m_keyPress & (true ? 1 : 0)) != 0) && !flag4) { if (m_blupiVitesseY == 0.0 && icon != -1) { @@ -3608,7 +3694,7 @@ namespace WindowsPhoneSpeedyBlupi } if (m_blupiBalloon && m_blupiFocus) { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) + if (m_blupiSpeedY < 0.0 || (m_keyPress & (true ? 1 : 0)) != 0) { if (m_blupiVitesseY > -5.0 && m_time % 6 == 0) { @@ -3756,10 +3842,10 @@ namespace WindowsPhoneSpeedyBlupi rect.Right -= 40; rect.Top = end.Y + 60 - 2; rect.Bottom = end.Y + 60 - 1; - bool flag5 = !DecorDetect(rect); + boolean flag5 = !DecorDetect(rect); rect.Left += 40; rect.Right += 40; - bool flag6 = !DecorDetect(rect); + boolean flag6 = !DecorDetect(rect); if (flag2) { if (m_blupiVitesseY < 50.0) @@ -3859,7 +3945,7 @@ namespace WindowsPhoneSpeedyBlupi { m_blupiRealRotation = 0; } - m_blupiOffsetY = Math.Abs(m_blupiRealRotation / 2); + m_blupiOffsetY = Math_.Abs(m_blupiRealRotation / 2); MoveObjectPollution(); if (ButtonPressed == Def.ButtonGlygh.PlayAction && !flag2 && m_blupiTransport == -1) { @@ -3883,7 +3969,7 @@ namespace WindowsPhoneSpeedyBlupi m_blupiAction = 1; m_blupiPhase = 0; } - if (((uint)m_keyPress & 2u) != 0 && m_blupiTimeFire == 0 && m_blupiAction != 3) + if ((m_keyPress & 2) != 0 && m_blupiTimeFire == 0 && m_blupiAction != 3) { if (m_blupiBullet == 0) { @@ -4069,7 +4155,11 @@ namespace WindowsPhoneSpeedyBlupi { if (m_blupiPhase == 8) { - icon = MoveObjectDetect(m_blupiPos, out bNear); + + Pair resultOfMoveObjectDetect = MoveObjectDetect(m_blupiPos); + icon = resultOfMoveObjectDetect.getValue1(); + bNear = resultOfMoveObjectDetect.getValue2(); + if (icon != -1) { ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); @@ -4101,7 +4191,7 @@ namespace WindowsPhoneSpeedyBlupi { if (m_blupiTransport == -1) { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) + if (m_blupiSpeedY < 0.0 || (m_keyPress & (true ? 1 : 0)) != 0) { if (m_blupiVitesseY > -5.0) { @@ -4215,7 +4305,7 @@ namespace WindowsPhoneSpeedyBlupi { if (m_blupiTransport == -1) { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) + if (m_blupiSpeedY < 0.0 || (m_keyPress & (true ? 1 : 0)) != 0) { if (m_blupiVitesseY > -5.0) { @@ -4286,7 +4376,7 @@ namespace WindowsPhoneSpeedyBlupi icon = Tables.table_vitesse_surf[m_blupiPhase % 12 / 2]; end.X += (int)(m_blupiVitesseX * (double)icon / 10.0); } - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); if (m_blupiSuspend && m_blupiFocus) { if (m_blupiSpeedX < 0.0 && m_blupiAction == 2) @@ -4324,7 +4414,7 @@ namespace WindowsPhoneSpeedyBlupi m_blupiActionOuf = 65; m_blupiTimeOuf = 0; } - if ((((uint)m_keyPress & (true ? 1u : 0u)) != 0 || m_blupiSpeedY < 0.0) && m_blupiAction != 4 && m_blupiAction != 3) + if (((m_keyPress & (true ? 1 : 0)) != 0 || m_blupiSpeedY < 0.0) && m_blupiAction != 4 && m_blupiAction != 3) { m_blupiAction = 4; m_blupiPhase = 0; @@ -4373,7 +4463,11 @@ namespace WindowsPhoneSpeedyBlupi else if (m_blupiPerso > 0) { ButtonPressed = Def.ButtonGlygh.None; - icon = MoveObjectDetect(end, out bNear); + + Pair resultOfMoveObjectDetect = MoveObjectDetect(end); + icon = resultOfMoveObjectDetect.getValue1(); + bNear = resultOfMoveObjectDetect.getValue2(); + if (icon == -1 || m_moveObject[icon].type != 200) { rect.Left = end.X + 18; @@ -4406,33 +4500,33 @@ namespace WindowsPhoneSpeedyBlupi } rect = BlupiRect(m_blupiPos); tinyPoint = end; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); if (flag && m_blupiPos.X == end.X && m_blupiPos.X != tinyPoint.X) { end.Y = tinyPoint.Y; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); } if (m_blupiVent && m_blupiPos.Y == end.Y && m_blupiPos.Y != tinyPoint.Y) { end.X = tinyPoint.X; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); } if (m_blupiTransport != -1 && m_blupiPos.X == end.X && m_blupiPos.X != tinyPoint.X) { end.Y = tinyPoint.Y; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); } if (m_blupiHelico || m_blupiOver || m_blupiBalloon || m_blupiEcrase || m_blupiJeep || m_blupiTank || m_blupiSkate || m_blupiNage) { if (m_blupiPos.X == end.X && m_blupiPos.X != tinyPoint.X) { end.Y = tinyPoint.Y; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); } else if (m_blupiPos.Y == end.Y && m_blupiPos.Y != tinyPoint.Y) { end.X = tinyPoint.X; - TestPath(rect, m_blupiPos, ref end); + TestPath(rect, m_blupiPos, end); } } TinyPoint blupiPos = m_blupiPos; @@ -4441,7 +4535,9 @@ namespace WindowsPhoneSpeedyBlupi { if (m_blupiTransport != -1) { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); + VertigoStatus status = AscenseurVertigo(m_blupiTransport); + bVertigoLeft = status.vertigoLeft; + bVertigoRight = status.vertigoRight; } else { @@ -4498,7 +4594,9 @@ namespace WindowsPhoneSpeedyBlupi { if (m_blupiTransport != -1) { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); + VertigoStatus status = AscenseurVertigo(m_blupiTransport); + bVertigoLeft = status.vertigoLeft; + bVertigoRight = status.vertigoRight; } else { @@ -4528,7 +4626,9 @@ namespace WindowsPhoneSpeedyBlupi { if (m_blupiTransport != -1) { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); + VertigoStatus status = AscenseurVertigo(m_blupiTransport); + bVertigoLeft = status.vertigoLeft; + bVertigoRight = status.vertigoRight; } else { @@ -4558,7 +4658,9 @@ namespace WindowsPhoneSpeedyBlupi { if (m_blupiTransport != -1) { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); + VertigoStatus status = AscenseurVertigo(m_blupiTransport); + bVertigoLeft = status.vertigoLeft; + bVertigoRight = status.vertigoRight; } else { @@ -4750,7 +4852,7 @@ namespace WindowsPhoneSpeedyBlupi m_jauges[1].SetLevel(m_blupiTimeShield); } } - if (m_blupiPower && Math.Abs(m_blupiPos.X - m_blupiPosMagic.X) + Math.Abs(m_blupiPos.Y - m_blupiPosMagic.Y) >= 40) + if (m_blupiPower && Math_.Abs(m_blupiPos.X - m_blupiPosMagic.X) + Math_.Abs(m_blupiPos.Y - m_blupiPosMagic.Y) >= 40) { icon = MoveObjectFree(); if (icon != -1) @@ -4766,7 +4868,7 @@ namespace WindowsPhoneSpeedyBlupi m_blupiPosMagic = m_blupiPos; } } - if (m_blupiShield && Math.Abs(m_blupiPos.X - m_blupiPosMagic.X) + Math.Abs(m_blupiPos.Y - m_blupiPosMagic.Y) >= 40) + if (m_blupiShield && Math_.Abs(m_blupiPos.X - m_blupiPosMagic.X) + Math_.Abs(m_blupiPos.Y - m_blupiPosMagic.Y) >= 40) { icon = MoveObjectFree(); if (icon != -1) @@ -4782,7 +4884,7 @@ namespace WindowsPhoneSpeedyBlupi m_blupiPosMagic = m_blupiPos; } } - if (m_blupiHide && Math.Abs(m_blupiPos.X - m_blupiPosMagic.X) + Math.Abs(m_blupiPos.Y - m_blupiPosMagic.Y) >= 10) + if (m_blupiHide && Math_.Abs(m_blupiPos.X - m_blupiPosMagic.X) + Math_.Abs(m_blupiPos.Y - m_blupiPosMagic.Y) >= 10) { icon = MoveObjectFree(); if (icon != -1) @@ -4880,7 +4982,7 @@ namespace WindowsPhoneSpeedyBlupi } tinyPoint.X = m_blupiPos.X; tinyPoint.Y = m_blupiPos.Y - 60; - if ((m_blupiSurf || m_blupiNage) && (m_blupiPos.Y % 64 == 64 - BLUPISURF || m_blupiPos.Y % 64 == 32) && IsOutWater(tinyPoint) && ((uint)m_keyPress & (true ? 1u : 0u)) != 0) + if ((m_blupiSurf || m_blupiNage) && (m_blupiPos.Y % 64 == 64 - BLUPISURF || m_blupiPos.Y % 64 == 32) && IsOutWater(tinyPoint) && (m_keyPress & (true ? 1 : 0)) != 0) { m_blupiNage = false; m_blupiSurf = false; @@ -5030,8 +5132,12 @@ namespace WindowsPhoneSpeedyBlupi m_blupiFront = true; } } - int num26 = MoveObjectDetect(m_blupiPos, out bNear); - TinyPoint tinyPoint2 = default(TinyPoint); + Pair resultOfMoveObjectDetect = MoveObjectDetect(m_blupiPos); + int num26 = resultOfMoveObjectDetect.getValue1(); + bNear = resultOfMoveObjectDetect.getValue2(); + + + TinyPoint tinyPoint2 = default_(new TinyPoint()); if (m_blupiAction != 11 && m_blupiAction != 75 && m_blupiAction != 76 && m_blupiAction != 77 && m_blupiAction != 78 && m_blupiAction != 79 && m_blupiAction != 80 && m_blupiAction != 81) { if (IsLave(m_blupiPos) && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) @@ -5063,10 +5169,10 @@ namespace WindowsPhoneSpeedyBlupi m_blupiRestart = true; m_blupiAir = true; } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && (num26 == -1 || !bNear) && IsSwitch(m_blupiPos, ref celSwitch) && !m_blupiOver && !m_blupiBalloon && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) + if (ButtonPressed == Def.ButtonGlygh.PlayAction && (num26 == -1 || !bNear) && IsSwitch(m_blupiPos, celSwitch) && !m_blupiOver && !m_blupiBalloon && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) { ButtonPressed = Def.ButtonGlygh.None; - ActiveSwitch(m_decor[celSwitch.X, celSwitch.Y].icon == 385, celSwitch); + ActiveSwitch(m_decor[celSwitch.X][celSwitch.Y].icon == 385, celSwitch); m_blupiAction = 82; m_blupiPhase = 0; m_blupiFocus = false; @@ -5137,13 +5243,13 @@ namespace WindowsPhoneSpeedyBlupi celSwitch.Y = m_blupiPos.Y - 5; ObjectStart(celSwitch, 92, 0); } - if (IsBridge(m_blupiPos, ref celBridge) && m_blupiFocus) + if (IsBridge(m_blupiPos, celBridge) && m_blupiFocus) { celBridge.X *= 64; celBridge.Y *= 64; ObjectStart(celBridge, 52, 0); } - int num = IsDoor(m_blupiPos, ref celBridge); + int num = IsDoor(m_blupiPos, celBridge); if (num != -1 && (m_blupiCle & (1 << num - 334)) != 0) { OpenDoor(celBridge); @@ -5449,7 +5555,7 @@ namespace WindowsPhoneSpeedyBlupi ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); celSwitch.X = m_moveObject[icon].posCurrent.X - m_posDecor.X; celSwitch.Y = m_moveObject[icon].posCurrent.Y - m_posDecor.Y; - TinyPoint end2 = default(TinyPoint); + TinyPoint end2 = default_(new TinyPoint()); end2.X = 430; end2.Y = 430; VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end2, 6, 10); @@ -5463,7 +5569,7 @@ namespace WindowsPhoneSpeedyBlupi ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); celSwitch.X = m_moveObject[icon].posCurrent.X - m_posDecor.X; celSwitch.Y = m_moveObject[icon].posCurrent.Y - m_posDecor.Y; - TinyPoint end3 = default(TinyPoint); + TinyPoint end3 = default_(new TinyPoint()); end3.X = 520; end3.Y = 418; VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end3, 215, 10); @@ -5477,7 +5583,7 @@ namespace WindowsPhoneSpeedyBlupi ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); celSwitch.X = m_moveObject[icon].posCurrent.X - m_posDecor.X; celSwitch.Y = m_moveObject[icon].posCurrent.Y - m_posDecor.Y; - TinyPoint end4 = default(TinyPoint); + TinyPoint end4 = default_(new TinyPoint()); end4.X = 530; end4.Y = 418; VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end4, 222, 10); @@ -5491,7 +5597,7 @@ namespace WindowsPhoneSpeedyBlupi ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); celSwitch.X = m_moveObject[icon].posCurrent.X - m_posDecor.X; celSwitch.Y = m_moveObject[icon].posCurrent.Y - m_posDecor.Y; - TinyPoint end5 = default(TinyPoint); + TinyPoint end5 = default_(new TinyPoint()); end5.X = 540; end5.Y = 418; VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end5, 229, 10); @@ -5833,8 +5939,8 @@ namespace WindowsPhoneSpeedyBlupi } if (m_blupiAction == 74 && m_blupiPhase == 128) { - TinyPoint newpos = default(TinyPoint); - if (SearchTeleporte(m_blupiPos, ref newpos)) + TinyPoint newpos = default_(new TinyPoint()); + if (SearchTeleporte(m_blupiPos, newpos)) { m_blupiPos = newpos; ObjectStart(m_blupiPos, 27, 20); @@ -5945,7 +6051,7 @@ namespace WindowsPhoneSpeedyBlupi { StopSound(47); } - if (m_blupiFocus && !m_blupiAir && (!m_blupiHelico || BlupiIsGround()) && (!m_blupiOver || BlupiIsGround()) && !m_blupiBalloon && !m_blupiEcrase && !m_blupiShield && !m_blupiHide && !bVertigoLeft && !bVertigoRight && m_blupiTransport == -1 && !IsLave(m_blupiPos) && !IsPiege(m_blupiPos) && !IsGoutte(m_blupiPos, true) && !IsScie(m_blupiPos) && !IsBridge(m_blupiPos, ref celSwitch) && IsTeleporte(m_blupiPos) == -1 && !IsBlitz(m_blupiPos, true) && !IsTemp(m_blupiPos) && !IsBalleTraj(m_blupiPos) && !IsMoveTraj(m_blupiPos)) + if (m_blupiFocus && !m_blupiAir && (!m_blupiHelico || BlupiIsGround()) && (!m_blupiOver || BlupiIsGround()) && !m_blupiBalloon && !m_blupiEcrase && !m_blupiShield && !m_blupiHide && !bVertigoLeft && !bVertigoRight && m_blupiTransport == -1 && !IsLave(m_blupiPos) && !IsPiege(m_blupiPos) && !IsGoutte(m_blupiPos, true) && !IsScie(m_blupiPos) && !IsBridge(m_blupiPos, celSwitch) && IsTeleporte(m_blupiPos) == -1 && !IsBlitz(m_blupiPos, true) && !IsTemp(m_blupiPos) && !IsBalleTraj(m_blupiPos) && !IsMoveTraj(m_blupiPos)) { if (m_blupiFifoNb > 0) { @@ -5955,8 +6061,8 @@ namespace WindowsPhoneSpeedyBlupi } end.X = m_blupiPos.X + 30 + m_scrollAdd.X; end.Y = m_blupiPos.Y + 30 + m_scrollAdd.Y; - int num27 = Math.Abs(m_scrollPoint.X - end.X); - int num28 = Math.Abs(m_scrollPoint.Y - end.Y); + int num27 = Math_.Abs(m_scrollPoint.X - end.X); + int num28 = Math_.Abs(m_scrollPoint.Y - end.Y); num3 = SCROLL_SPEED; if (num27 > SCROLL_MARGX * 2) { @@ -6049,8 +6155,8 @@ namespace WindowsPhoneSpeedyBlupi StopSound(18); StopSound(29); StopSound(31); - TinyPoint pos = default(TinyPoint); - TinyPoint pos2 = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); + TinyPoint pos2 = default_(new TinyPoint()); if (m_blupiAction == 75) { pos.X = m_blupiPos.X - m_posDecor.X; @@ -6080,16 +6186,16 @@ namespace WindowsPhoneSpeedyBlupi private TinyPoint GetPosDecor(TinyPoint pos) { - TinyPoint result = default(TinyPoint); + TinyPoint result = default_(new TinyPoint()); if (m_dimDecor.X == 0) { result.X = 0; } else { - result.X = pos.X - m_drawBounds.Width / 2; - result.X = Math.Max(result.X, 0); - result.X = Math.Min(result.X, 6400 - m_drawBounds.Width); + result.X = pos.X - m_drawBounds.Width() / 2; + result.X = Math_.Max(result.X, 0); + result.X = Math_.Min(result.X, 6400 - m_drawBounds.Width()); } if (m_dimDecor.Y == 0) { @@ -6097,9 +6203,9 @@ namespace WindowsPhoneSpeedyBlupi } else { - result.Y = pos.Y - m_drawBounds.Height / 2; - result.Y = Math.Max(result.Y, 0); - result.Y = Math.Min(result.Y, 6400 - m_drawBounds.Height); + result.Y = pos.Y - m_drawBounds.Height() / 2; + result.Y = Math_.Max(result.Y, 0); + result.Y = Math_.Min(result.Y, 6400 - m_drawBounds.Height()); } return result; } @@ -6124,12 +6230,12 @@ namespace WindowsPhoneSpeedyBlupi } } - private bool DecorDetect(TinyRect rect) + private boolean DecorDetect(TinyRect rect) { return DecorDetect(rect, true); } - private bool DecorDetect(TinyRect rect, bool bCaisse) + private boolean DecorDetect(TinyRect rect, boolean bCaisse) { m_detectIcon = -1; if (rect.Left < 0 || rect.Top < 0) @@ -6153,8 +6259,8 @@ namespace WindowsPhoneSpeedyBlupi int num3 = (rect.Right + 16 - 1) / 16; int num4 = rect.Top / 16; int num5 = (rect.Bottom + 16 - 1) / 16; - TinyRect src = default(TinyRect); - TinyRect dst; + TinyRect src = default_(new TinyRect()); + TinyRect dst = default_(new TinyRect()); for (int i = num4; i <= num5; i++) { for (int j = num2; j <= num3; j++) @@ -6165,7 +6271,7 @@ namespace WindowsPhoneSpeedyBlupi { continue; } - int icon = m_decor[num6, num7].icon; + int icon = m_decor[num6][num7].icon; if (icon < 0 || icon >= MAXQUART || (m_blupiHelico && icon == 214) || (m_blupiOver && icon == 214) || (icon == 324 && m_time / 4 % 20 >= 18)) { continue; @@ -6178,7 +6284,7 @@ namespace WindowsPhoneSpeedyBlupi src.Right = src.Left + 16; src.Top = i * 16; src.Bottom = src.Top + 16; - if (Misc.IntersectRect(out dst, src, rect)) + if (Misc.IntersectRect(dst, src, rect)) { m_detectIcon = icon; return true; @@ -6197,7 +6303,7 @@ namespace WindowsPhoneSpeedyBlupi src.Right = m_moveObject[num8].posCurrent.X + 64; src.Top = m_moveObject[num8].posCurrent.Y; src.Bottom = m_moveObject[num8].posCurrent.Y + 64; - if (Misc.IntersectRect(out dst, src, rect)) + if (Misc.IntersectRect(dst, src, rect)) { m_detectIcon = m_moveObject[num8].icon; return true; @@ -6206,12 +6312,12 @@ namespace WindowsPhoneSpeedyBlupi return false; } - private bool TestPath(TinyRect rect, TinyPoint start, ref TinyPoint end) + private boolean TestPath(TinyRect rect, TinyPoint start, TinyPoint end) { - int num = Math.Abs(end.X - start.X); - int num2 = Math.Abs(end.Y - start.Y); + int num = Math_.Abs(end.X - start.X); + int num2 = Math_.Abs(end.Y - start.Y); TinyPoint tinyPoint = start; - TinyRect rect2 = default(TinyRect); + TinyRect rect2 = default_(new TinyRect()); if (num > num2) { if (end.X > start.X) @@ -6295,9 +6401,9 @@ namespace WindowsPhoneSpeedyBlupi private void MoveObjectPollution() { - bool flag = false; + boolean flag = false; TinyPoint blupiPos = m_blupiPos; - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = 0; tinyPoint.Y = 0; int num = 20; @@ -6330,7 +6436,7 @@ namespace WindowsPhoneSpeedyBlupi } if (m_blupiOver) { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) + if (m_blupiSpeedY < 0.0 || (m_keyPress & (true ? 1 : 0)) != 0) { if (m_time % 20 != 0 && m_time % 20 != 2 && m_time % 20 != 5 && m_time % 20 != 8 && m_time % 20 != 11 && m_time % 20 != 13 && m_time % 20 != 14 && m_time % 20 != 18) { @@ -6447,7 +6553,7 @@ namespace WindowsPhoneSpeedyBlupi TinyPoint tinyPoint = pos; while (tinyPoint.Y > 0) { - int icon = m_decor[(tinyPoint.X + 16) / 64, tinyPoint.Y / 64].icon; + int icon = m_decor[(tinyPoint.X + 16) / 64][ tinyPoint.Y / 64].icon; if (icon != 91 && icon != 92) { break; @@ -6485,7 +6591,7 @@ namespace WindowsPhoneSpeedyBlupi { return -1; } - int icon = m_decor[pos.X / 64, pos.Y / 64].icon; + int icon = m_decor[pos.X / 64][ pos.Y / 64].icon; if (icon >= 158 && icon <= 165) { return icon - 158 + 1; @@ -6522,9 +6628,9 @@ namespace WindowsPhoneSpeedyBlupi } } - private void ActiveSwitch(bool bState, TinyPoint cel) + private void ActiveSwitch(boolean bState, TinyPoint cel) { - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); pos.X = cel.X * 64; pos.Y = cel.Y * 64; ModifDecor(pos, bState ? 384 : 385); @@ -6532,7 +6638,7 @@ namespace WindowsPhoneSpeedyBlupi cel.X -= 20; for (int i = 0; i < 41; i++) { - if (cel.X >= 0 && cel.X < 100 && m_decor[cel.X, cel.Y].icon == (bState ? 379 : 378)) + if (cel.X >= 0 && cel.X < 100 && m_decor[cel.X][ cel.Y].icon == (bState ? 379 : 378)) { pos.X = cel.X * 64; pos.Y = cel.Y * 64; @@ -6555,7 +6661,7 @@ namespace WindowsPhoneSpeedyBlupi { return 0; } - int icon = m_decor[pos.X / 64, pos.Y / 64].icon; + int icon = m_decor[pos.X / 64][ pos.Y / 64].icon; if (icon != 138 && icon != 202) { return 0; @@ -6564,7 +6670,7 @@ namespace WindowsPhoneSpeedyBlupi { return 1; } - icon = m_decor[pos.X / 64, pos.Y / 64 + 1].icon; + icon = m_decor[pos.X / 64][ pos.Y / 64 + 1].icon; if (!IsPassIcon(icon)) { return 2; @@ -6579,17 +6685,17 @@ namespace WindowsPhoneSpeedyBlupi return 1; } - private bool IsLave(TinyPoint pos) + private boolean IsLave(TinyPoint pos) { pos.X += 30; if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) { return false; } - return m_decor[pos.X / 64, pos.Y / 64].icon == 68; + return m_decor[pos.X / 64][ pos.Y / 64].icon == 68; } - private bool IsPiege(TinyPoint pos) + private boolean IsPiege(TinyPoint pos) { pos.X += 30; pos.Y += 60; @@ -6601,10 +6707,10 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - return m_decor[pos.X / 64, pos.Y / 64].icon == 373; + return m_decor[pos.X / 64][ pos.Y / 64].icon == 373; } - private bool IsGoutte(TinyPoint pos, bool bAlways) + private boolean IsGoutte(TinyPoint pos, boolean bAlways) { pos.X += 30; if (pos.X % 64 < 15 || pos.X % 64 > 49) @@ -6615,7 +6721,7 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - int icon = m_decor[pos.X / 64, pos.Y / 64].icon; + int icon = m_decor[pos.X / 64][ pos.Y / 64].icon; if (bAlways) { if (icon != 404) @@ -6627,7 +6733,7 @@ namespace WindowsPhoneSpeedyBlupi return icon == 404; } - private bool IsScie(TinyPoint pos) + private boolean IsScie(TinyPoint pos) { pos.X += 30; if (pos.X % 64 < 4 || pos.X % 64 > 60) @@ -6638,10 +6744,10 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - return m_decor[pos.X / 64, pos.Y / 64].icon == 378; + return m_decor[pos.X / 64][ pos.Y / 64].icon == 378; } - private bool IsSwitch(TinyPoint pos, ref TinyPoint celSwitch) + private boolean IsSwitch(TinyPoint pos, TinyPoint celSwitch) { pos.X += 30; if (pos.X % 64 < 4 || pos.X % 64 > 60) @@ -6654,14 +6760,14 @@ namespace WindowsPhoneSpeedyBlupi } celSwitch.X = pos.X / 64; celSwitch.Y = pos.Y / 64; - if (m_decor[pos.X / 64, pos.Y / 64].icon != 384) + if (m_decor[pos.X / 64][ pos.Y / 64].icon != 384) { - return m_decor[pos.X / 64, pos.Y / 64].icon == 385; + return m_decor[pos.X / 64][ pos.Y / 64].icon == 385; } return true; } - private bool IsEcraseur(TinyPoint pos) + private boolean IsEcraseur(TinyPoint pos) { if (m_time / 3 % 10 > 2) { @@ -6672,20 +6778,20 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - return m_decor[pos.X / 64, pos.Y / 64].icon == 317; + return m_decor[pos.X / 64][ pos.Y / 64].icon == 317; } - private bool IsBlitz(TinyPoint pos, bool bAlways) + private boolean IsBlitz(TinyPoint pos, boolean bAlways) { pos.X += 30; if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) { return false; } - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = pos.X / 64; tinyPoint.Y = pos.Y / 64; - if (m_decor[tinyPoint.X, tinyPoint.Y].icon != 305) + if (m_decor[tinyPoint.X][ tinyPoint.Y].icon != 305) { return false; } @@ -6696,7 +6802,7 @@ namespace WindowsPhoneSpeedyBlupi return BlitzActif(tinyPoint.X, tinyPoint.Y); } - private bool IsRessort(TinyPoint pos) + private boolean IsRessort(TinyPoint pos) { pos.X += 30; pos.Y += 60; @@ -6704,10 +6810,10 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - return m_decor[pos.X / 64, pos.Y / 64].icon == 211; + return m_decor[pos.X / 64][ pos.Y / 64].icon == 211; } - private bool IsTemp(TinyPoint pos) + private boolean IsTemp(TinyPoint pos) { pos.X += 30; pos.Y += 60; @@ -6715,21 +6821,21 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - return m_decor[pos.X / 64, pos.Y / 64].icon == 324; + return m_decor[pos.X / 64][ pos.Y / 64].icon == 324; } - private bool IsBridge(TinyPoint pos, ref TinyPoint celBridge) + private boolean IsBridge(TinyPoint pos, TinyPoint celBridge) { pos.X += 30; pos.Y += 60; - if (pos.X >= 0 && pos.X < 6400 && pos.Y >= 0 && pos.Y < 6400 && m_decor[pos.X / 64, pos.Y / 64].icon == 364) + if (pos.X >= 0 && pos.X < 6400 && pos.Y >= 0 && pos.Y < 6400 && m_decor[pos.X / 64][ pos.Y / 64].icon == 364) { celBridge.X = pos.X / 64; celBridge.Y = pos.Y / 64; return true; } pos.Y -= 60; - if (pos.X >= 0 && pos.X < 6400 && pos.Y >= 0 && pos.Y < 6400 && m_decor[pos.X / 64, pos.Y / 64].icon == 364) + if (pos.X >= 0 && pos.X < 6400 && pos.Y >= 0 && pos.Y < 6400 && m_decor[pos.X / 64][ pos.Y / 64].icon == 364) { celBridge.X = pos.X / 64; celBridge.Y = pos.Y / 64; @@ -6738,17 +6844,17 @@ namespace WindowsPhoneSpeedyBlupi return false; } - private int IsDoor(TinyPoint pos, ref TinyPoint celPorte) + private int IsDoor(TinyPoint pos, TinyPoint celPorte) { int num = ((m_blupiDir != 1) ? 60 : (-60)); pos.X += 30; for (int i = 0; i < 2; i++) { - if (pos.X >= 0 && pos.X < 6400 && pos.Y >= 0 && pos.Y < 6400 && m_decor[pos.X / 64, pos.Y / 64].icon >= 334 && m_decor[pos.X / 64, pos.Y / 64].icon <= 336) + if (pos.X >= 0 && pos.X < 6400 && pos.Y >= 0 && pos.Y < 6400 && m_decor[pos.X / 64][ pos.Y / 64].icon >= 334 && m_decor[pos.X / 64][ pos.Y / 64].icon <= 336) { celPorte.X = pos.X / 64; celPorte.Y = pos.Y / 64; - return m_decor[pos.X / 64, pos.Y / 64].icon; + return m_decor[pos.X / 64][ pos.Y / 64].icon; } pos.X += num; } @@ -6767,14 +6873,14 @@ namespace WindowsPhoneSpeedyBlupi { return -1; } - if (m_decor[pos.X / 64, pos.Y / 64].icon >= 330 && m_decor[pos.X / 64, pos.Y / 64].icon <= 333) + if (m_decor[pos.X / 64][ pos.Y / 64].icon >= 330 && m_decor[pos.X / 64][ pos.Y / 64].icon <= 333) { - return m_decor[pos.X / 64, pos.Y / 64].icon; + return m_decor[pos.X / 64][ pos.Y / 64].icon; } return -1; } - private bool SearchTeleporte(TinyPoint pos, ref TinyPoint newpos) + private boolean SearchTeleporte(TinyPoint pos, TinyPoint newpos) { int num = IsTeleporte(pos); if (num == -1) @@ -6785,7 +6891,7 @@ namespace WindowsPhoneSpeedyBlupi { for (int j = 0; j < 100; j++) { - if (num == m_decor[i, j].icon) + if (num == m_decor[i][ j].icon) { newpos.X = i * 64; newpos.Y = j * 64 + 60; @@ -6799,7 +6905,7 @@ namespace WindowsPhoneSpeedyBlupi return false; } - private bool IsNormalJump(TinyPoint pos) + private boolean IsNormalJump(TinyPoint pos) { pos.X += 32; pos.Y -= 32; @@ -6819,7 +6925,7 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - int icon = m_decor[num, num2].icon; + int icon = m_decor[num][ num2].icon; if (!IsPassIcon(icon)) { return false; @@ -6829,14 +6935,14 @@ namespace WindowsPhoneSpeedyBlupi return true; } - private bool IsSurfWater(TinyPoint pos) + private boolean IsSurfWater(TinyPoint pos) { if (pos.Y % 64 < 64 - BLUPISURF) { return false; } - int icon = m_decor[(pos.X + 30) / 64, pos.Y / 64].icon; - int icon2 = m_decor[(pos.X + 30) / 64, (pos.Y + BLUPISURF) / 64].icon; + int icon = m_decor[(pos.X + 30) / 64][ pos.Y / 64].icon; + int icon2 = m_decor[(pos.X + 30) / 64][ (pos.Y + BLUPISURF) / 64].icon; if (icon != 92 && icon2 == 92) { return true; @@ -6844,7 +6950,7 @@ namespace WindowsPhoneSpeedyBlupi return false; } - private bool IsDeepWater(TinyPoint pos) + private boolean IsDeepWater(TinyPoint pos) { int num = (pos.X + 30) / 64; int num2 = pos.Y / 64; @@ -6852,7 +6958,7 @@ namespace WindowsPhoneSpeedyBlupi { return false; } - int icon = m_decor[num, num2].icon; + int icon = m_decor[num][ num2].icon; if (icon != 91) { return icon == 92; @@ -6860,9 +6966,9 @@ namespace WindowsPhoneSpeedyBlupi return true; } - private bool IsOutWater(TinyPoint pos) + private boolean IsOutWater(TinyPoint pos) { - int icon = m_decor[(pos.X + 30) / 64, (pos.Y + 30) / 64].icon; + int icon = m_decor[(pos.X + 30) / 64][ (pos.Y + 30) / 64].icon; if (icon == 91 || icon == 92) { return false; @@ -6870,7 +6976,7 @@ namespace WindowsPhoneSpeedyBlupi return IsPassIcon(icon); } - private bool IsPassIcon(int icon) + private boolean IsPassIcon(int icon) { if (icon == 324 && m_time / 4 % 20 >= 18) { @@ -6889,7 +6995,7 @@ namespace WindowsPhoneSpeedyBlupi return true; } - private bool IsBlocIcon(int icon) + private boolean IsBlocIcon(int icon) { if (icon < 0 || icon >= MAXQUART) { @@ -6928,7 +7034,7 @@ namespace WindowsPhoneSpeedyBlupi } } - private bool IsBalleTraj(TinyPoint pos) + private boolean IsBalleTraj(TinyPoint pos) { pos.X = (pos.X + 32) / 64; pos.Y = (pos.Y + 32) / 64; @@ -6961,7 +7067,7 @@ namespace WindowsPhoneSpeedyBlupi } } - private bool IsMoveTraj(TinyPoint pos) + private boolean IsMoveTraj(TinyPoint pos) { pos.X = (pos.X + 32) / 64; pos.Y = (pos.Y + 32) / 64; @@ -6984,7 +7090,7 @@ namespace WindowsPhoneSpeedyBlupi } pos.X = (pos.X + 32) / 64; pos.Y = (pos.Y + 32) / 64; - while (pos.X >= 0 && pos.X < 100 && pos.Y >= 0 && pos.Y < 100 && !IsBlocIcon(m_decor[pos.X, pos.Y].icon)) + while (pos.X >= 0 && pos.X < 100 && pos.Y >= 0 && pos.Y < 100 && !IsBlocIcon(m_decor[pos.X][ pos.Y].icon)) { if (type == 23) { @@ -7005,18 +7111,18 @@ namespace WindowsPhoneSpeedyBlupi return num; } - private bool IsVentillo(TinyPoint pos) + private boolean IsVentillo(TinyPoint pos) { int num = 0; - bool flag = false; - TinyPoint tinyPoint = default(TinyPoint); + boolean flag = false; + TinyPoint tinyPoint = default_(new TinyPoint()); pos.X += 30; pos.Y += 30; if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) { return false; } - int icon = m_decor[pos.X / 64, pos.Y / 64].icon; + int icon = m_decor[pos.X / 64][ pos.Y / 64].icon; switch (icon) { default: @@ -7082,7 +7188,7 @@ namespace WindowsPhoneSpeedyBlupi { pos.X += tinyPoint.X; pos.Y += tinyPoint.Y; - if (num != m_decor[pos.X / 64, pos.Y / 64].icon) + if (num != m_decor[pos.X / 64][ pos.Y / 64].icon) { break; } @@ -7098,7 +7204,7 @@ namespace WindowsPhoneSpeedyBlupi private void StartSploutchGlu(TinyPoint pos) { - TinyPoint pos2 = default(TinyPoint); + TinyPoint pos2 = default_(new TinyPoint()); pos2.X = pos.X; pos2.Y = pos.Y; ObjectStart(pos2, 98, 0); @@ -7145,7 +7251,7 @@ namespace WindowsPhoneSpeedyBlupi TinyPoint tinyPoint = pos; int num2 = speed; int num3 = 0; - TinyPoint dir = default(TinyPoint); + TinyPoint dir = default_(new TinyPoint()); if (num2 > 50) { num2 -= 50; @@ -7188,7 +7294,7 @@ namespace WindowsPhoneSpeedyBlupi { m_moveObject[num].posEnd = tinyPoint; m_moveObject[num].timeStopStart = 0; - m_moveObject[num].stepAdvance = Math.Abs(num2 * num3 / 64); + m_moveObject[num].stepAdvance = Math_.Abs(num2 * num3 / 64); m_moveObject[num].step = 2; m_moveObject[num].time = 0; } @@ -7197,7 +7303,7 @@ namespace WindowsPhoneSpeedyBlupi return num; } - private bool ObjectDelete(TinyPoint pos, int type) + private boolean ObjectDelete(TinyPoint pos, int type) { int num = MoveObjectSearch(pos, type); if (num == -1) @@ -7228,12 +7334,12 @@ namespace WindowsPhoneSpeedyBlupi private void ModifDecor(TinyPoint pos, int icon) { - int icon2 = m_decor[pos.X / 64, pos.Y / 64].icon; + int icon2 = m_decor[pos.X / 64][ pos.Y / 64].icon; if (icon == -1 && icon2 >= 126 && icon2 <= 137) { ByeByeAdd(1, icon2, pos, 17.0, 1.0); } - m_decor[pos.X / 64, pos.Y / 64].icon = icon; + m_decor[pos.X / 64][ pos.Y / 64].icon = icon; } private void MoveObjectStep() @@ -7283,12 +7389,12 @@ namespace WindowsPhoneSpeedyBlupi private void MoveObjectStepLine(int i) { - TinyPoint tinyPoint = default(TinyPoint); - bool flag = false; - TinyRect tinyRect = default(TinyRect); + TinyPoint tinyPoint = default_(new TinyPoint()); + boolean flag = false; + TinyRect tinyRect = default_(new TinyRect()); if ((m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48) && !m_blupiSuspend) { - TinyRect src = default(TinyRect); + TinyRect src = default_(new TinyRect()); src.Left = m_blupiPos.X + 20; src.Right = m_blupiPos.X + 60 - 20; src.Top = m_blupiPos.Y + 60 - 2; @@ -7297,11 +7403,11 @@ namespace WindowsPhoneSpeedyBlupi tinyRect.Right = m_moveObject[i].posCurrent.X + 64; tinyRect.Top = m_moveObject[i].posCurrent.Y; tinyRect.Bottom = m_moveObject[i].posCurrent.Y + 16; - TinyRect dst; - flag = Misc.IntersectRect(out dst, tinyRect, src); + TinyRect dst = default_(new TinyRect()); + flag = Misc.IntersectRect(dst, tinyRect, src); tinyPoint = m_moveObject[i].posCurrent; } - TinyPoint end; + TinyPoint end = default_(new TinyPoint()); if (m_blupiFocus && !m_blupiHide && m_moveObject[i].type == 97) { end = m_moveObject[i].posCurrent; @@ -7325,7 +7431,7 @@ namespace WindowsPhoneSpeedyBlupi tinyRect.Right = end.X + 60 - 10; tinyRect.Top = end.Y + 10; tinyRect.Bottom = end.Y + 60 - 10; - if (TestPath(tinyRect, m_moveObject[i].posCurrent, ref end)) + if (TestPath(tinyRect, m_moveObject[i].posCurrent, end)) { m_moveObject[i].posCurrent = end; m_moveObject[i].posStart = end; @@ -7650,7 +7756,7 @@ namespace WindowsPhoneSpeedyBlupi } if (m_moveObject[i].type == 8) { - if (m_moveObject[i].phase >= Tables.table_explo1.Length) + if (m_moveObject[i].phase >= Tables.table_explo1.length) { m_moveObject[i].type = 0; } @@ -7792,7 +7898,7 @@ namespace WindowsPhoneSpeedyBlupi m_moveObject[i].channel = 9; } } - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); if (m_moveObject[i].type == 52) { if (m_moveObject[i].phase == 0) @@ -7813,7 +7919,7 @@ namespace WindowsPhoneSpeedyBlupi m_moveObject[i].channel = 1; pos.X = m_moveObject[i].posStart.X / 64; pos.Y = m_moveObject[i].posStart.Y / 64; - m_decor[pos.X, pos.Y].icon = m_moveObject[i].icon; + m_decor[pos.X][ pos.Y].icon = m_moveObject[i].icon; } } if (m_moveObject[i].type == 36) @@ -8314,14 +8420,14 @@ namespace WindowsPhoneSpeedyBlupi m_decorAction = 1; m_decorPhase = 0; } - TinyRect src = default(TinyRect); + TinyRect src = default_(new TinyRect()); src.Left = posStart.X; src.Right = posStart.X + 128; src.Top = posStart.Y; src.Bottom = posStart.Y + 128; - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.Y = posStart.Y / 64; - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); for (int j = 0; j < 2; j++) { tinyPoint.X = posStart.X / 64; @@ -8329,7 +8435,7 @@ namespace WindowsPhoneSpeedyBlupi { if (tinyPoint.X >= 0 && tinyPoint.X < 100 && tinyPoint.Y >= 0 && tinyPoint.Y < 100) { - int icon = m_decor[tinyPoint.X, tinyPoint.Y].icon; + int icon = m_decor[tinyPoint.X][ tinyPoint.Y].icon; if (icon == 378 || icon == 379 || icon == 404 || icon == 410) { pos.X = tinyPoint.X * 64; @@ -8341,7 +8447,7 @@ namespace WindowsPhoneSpeedyBlupi } tinyPoint.Y++; } - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); for (i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type == 2 || m_moveObject[i].type == 3 || m_moveObject[i].type == 96 || m_moveObject[i].type == 97 || m_moveObject[i].type == 4 || m_moveObject[i].type == 6 || m_moveObject[i].type == 12 || m_moveObject[i].type == 13 || m_moveObject[i].type == 16 || m_moveObject[i].type == 17 || m_moveObject[i].type == 18 || m_moveObject[i].type == 19 || m_moveObject[i].type == 20 || m_moveObject[i].type == 24 || m_moveObject[i].type == 25 || m_moveObject[i].type == 26 || m_moveObject[i].type == 28 || m_moveObject[i].type == 30 || m_moveObject[i].type == 32 || m_moveObject[i].type == 33 || m_moveObject[i].type == 34 || m_moveObject[i].type == 40 || m_moveObject[i].type == 44 || m_moveObject[i].type == 46 || m_moveObject[i].type == 52 || m_moveObject[i].type == 54 || m_moveObject[i].type == 200 || m_moveObject[i].type == 201 || m_moveObject[i].type == 202 || m_moveObject[i].type == 203) @@ -8350,8 +8456,8 @@ namespace WindowsPhoneSpeedyBlupi src2.Right = m_moveObject[i].posCurrent.X + 60; src2.Top = m_moveObject[i].posCurrent.Y; src2.Bottom = m_moveObject[i].posCurrent.Y + 60; - TinyRect dst; - if (Misc.IntersectRect(out dst, src2, src)) + TinyRect dst = default_(new TinyRect()); + if (Misc.IntersectRect(dst, src2, src)) { if (m_moveObject[i].type == 12) { @@ -8394,8 +8500,8 @@ namespace WindowsPhoneSpeedyBlupi } int num = newpos.Y - oldpos.Y; int num2 = ((num >= 0) ? 30 : (-30)); - num = Math.Abs(num); - TinyRect src = default(TinyRect); + num = Math_.Abs(num); + TinyRect src = default_(new TinyRect()); for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type != 1 && m_moveObject[i].type != 47 && m_moveObject[i].type != 48) @@ -8406,10 +8512,10 @@ namespace WindowsPhoneSpeedyBlupi src.Right = m_moveObject[i].posCurrent.X + 64; src.Top = m_moveObject[i].posCurrent.Y; src.Bottom = m_moveObject[i].posCurrent.Y + 16; - TinyRect dst; + TinyRect dst = default_(new TinyRect()); if (num < 30) { - if (Misc.IntersectRect(out dst, src, rect)) + if (Misc.IntersectRect(dst, src, rect)) { return i; } @@ -8420,7 +8526,7 @@ namespace WindowsPhoneSpeedyBlupi src2.Bottom -= num / 30 * num2; for (int j = 0; j <= num / 30; j++) { - if (Misc.IntersectRect(out dst, src, src2)) + if (Misc.IntersectRect(dst, src, src2)) { return i; } @@ -8431,36 +8537,42 @@ namespace WindowsPhoneSpeedyBlupi return -1; } - private void AscenseurVertigo(int i, out bool bVertigoLeft, out bool bVertigoRight) - { - bVertigoLeft = false; - bVertigoRight = false; - if (m_blupiPos.X + 20 + 4 < m_moveObject[i].posCurrent.X) - { - bVertigoLeft = true; - } - if (m_blupiPos.X + 60 - 20 - 4 > m_moveObject[i].posCurrent.X + 64) - { - bVertigoRight = true; - } - if (AscenseurShift(i)) - { - if (bVertigoLeft) - { - bVertigoLeft = false; - bVertigoRight = true; - m_blupiTimeNoAsc = 10; - } - else if (bVertigoRight) - { - bVertigoRight = false; - bVertigoLeft = true; - m_blupiTimeNoAsc = 10; - } - } + class VertigoStatus { + + public boolean vertigoLeft; + public boolean vertigoRight; } - private bool AscenseurShift(int i) + private VertigoStatus AscenseurVertigo(int i) { + + VertigoStatus status = new VertigoStatus(); + status.vertigoLeft = false; + status.vertigoRight = false; + + if (m_blupiPos.X + 20 + 4 < m_moveObject[i].posCurrent.X) { + status.vertigoLeft = true; + } + + if (m_blupiPos.X + 60 - 20 - 4 > m_moveObject[i].posCurrent.X + 64) { + status.vertigoRight = true; + } + + if (AscenseurShift(i)) { + if (status.vertigoLeft) { + status.vertigoLeft = false; + status.vertigoRight = true; + m_blupiTimeNoAsc = 10; + } else if (status.vertigoRight) { + status.vertigoRight = false; + status.vertigoLeft = true; + m_blupiTimeNoAsc = 10; + } + } + return status; + } + + + private boolean AscenseurShift(int i) { if (i == -1) { @@ -8496,9 +8608,9 @@ namespace WindowsPhoneSpeedyBlupi } } - private bool TestPushCaisse(int i, TinyPoint pos, bool bPop) + private boolean TestPushCaisse(int i, TinyPoint pos, boolean bPop) { - TinyPoint move = default(TinyPoint); + TinyPoint move = default_(new TinyPoint()); move.X = pos.X - m_moveObject[i].posCurrent.X; move.Y = 0; SearchLinkCaisse(i, bPop); @@ -8521,9 +8633,9 @@ namespace WindowsPhoneSpeedyBlupi return true; } - private bool TestPushOneCaisse(int i, TinyPoint move, int b) + private boolean TestPushOneCaisse(int i, TinyPoint move, int b) { - TinyRect rect = default(TinyRect); + TinyRect rect = default_(new TinyRect()); int num = (rect.Left = m_moveObject[i].posCurrent.X + move.X); rect.Right = num + 64; rect.Top = m_moveObject[i].posCurrent.Y; @@ -8555,14 +8667,14 @@ namespace WindowsPhoneSpeedyBlupi return true; } - private void SearchLinkCaisse(int rank, bool bPop) + private void SearchLinkCaisse(int rank, boolean bPop) { m_nbLinkCaisse = 0; AddLinkCaisse(rank); TinyPoint posCurrent = m_moveObject[rank].posCurrent; - bool flag; - TinyRect src = default(TinyRect); - TinyRect src2 = default(TinyRect); + boolean flag; + TinyRect src = default_(new TinyRect()); + TinyRect src2 = default_(new TinyRect()); do { flag = false; @@ -8586,8 +8698,8 @@ namespace WindowsPhoneSpeedyBlupi src2.Top = m_moveObject[num2].posCurrent.Y - 1; src2.Right = src2.Left + 64 + 1; src2.Bottom = src2.Top + 64 + 1; - TinyRect dst; - if (Misc.IntersectRect(out dst, src2, src) && AddLinkCaisse(num2)) + TinyRect dst = default_(new TinyRect()); + if (Misc.IntersectRect(dst, src2, src) && AddLinkCaisse(num2)) { flag = true; } @@ -8598,7 +8710,7 @@ namespace WindowsPhoneSpeedyBlupi while (flag); } - private bool AddLinkCaisse(int rank) + private boolean AddLinkCaisse(int rank) { for (int i = 0; i < m_nbLinkCaisse; i++) { @@ -8614,7 +8726,7 @@ namespace WindowsPhoneSpeedyBlupi private int CaisseInFront() { - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); if (m_blupiDir == 1) { tinyPoint.X = m_blupiPos.X + 16 - 32; @@ -8666,12 +8778,12 @@ namespace WindowsPhoneSpeedyBlupi } if (m_blupiAir) { - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = pos.X + 30; tinyPoint.Y = pos.Y + 30 + 64; if (tinyPoint.X >= 0 && tinyPoint.X < 6400 && tinyPoint.Y >= 0 && tinyPoint.Y < 6400) { - int icon = m_decor[tinyPoint.X / 64, tinyPoint.Y / 64].icon; + int icon = m_decor[tinyPoint.X / 64][ tinyPoint.Y / 64].icon; if (icon == 68 || icon == 317) { return 64; @@ -8680,14 +8792,14 @@ namespace WindowsPhoneSpeedyBlupi tinyPoint.Y += 64; if (tinyPoint.X >= 0 && tinyPoint.X < 6400 && tinyPoint.Y >= 0 && tinyPoint.Y < 6400) { - int icon = m_decor[tinyPoint.X / 64, tinyPoint.Y / 64].icon; + int icon = m_decor[tinyPoint.X / 64][ tinyPoint.Y / 64].icon; if (icon == 68 || icon == 317) { return 64; } } } - TinyRect src = default(TinyRect); + TinyRect src = default_(new TinyRect()); src.Left = pos.X; src.Right = pos.X + 60; src.Top = pos.Y + 11; @@ -8696,7 +8808,7 @@ namespace WindowsPhoneSpeedyBlupi { src.Bottom += 90; } - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type != 2 && m_moveObject[i].type != 16 && m_moveObject[i].type != 96 && m_moveObject[i].type != 97 && m_moveObject[i].type != 4 && m_moveObject[i].type != 20 && m_moveObject[i].type != 44 && m_moveObject[i].type != 54 && m_moveObject[i].type != 23 && m_moveObject[i].type != 32 && m_moveObject[i].type != 33) @@ -8707,8 +8819,8 @@ namespace WindowsPhoneSpeedyBlupi src2.Right = m_moveObject[i].posCurrent.X + 60; src2.Top = m_moveObject[i].posCurrent.Y + 36; src2.Bottom = m_moveObject[i].posCurrent.Y + 60; - TinyRect dst; - if (!Misc.IntersectRect(out dst, src2, src)) + TinyRect dst = default_(new TinyRect()); + if (!Misc.IntersectRect(dst, src2, src)) { continue; } @@ -8741,28 +8853,24 @@ namespace WindowsPhoneSpeedyBlupi return 0; } - private bool BlupiElectro(TinyPoint pos) + private boolean BlupiElectro(TinyPoint pos) { if (!m_blupiCloud) { return false; } - TinyRect src = default(TinyRect); + TinyRect src = default_(new TinyRect()); src.Left = pos.X + 16; src.Right = pos.X + 60 - 16; src.Top = pos.Y + 11; src.Bottom = pos.Y + 60 - 2; - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); src2.Left = m_blupiPos.X - 16 - 40; src2.Right = m_blupiPos.X + 60 + 16 + 40; src2.Top = m_blupiPos.Y + 11 - 40; src2.Bottom = m_blupiPos.Y + 60 - 2 + 40; - TinyRect dst; - if (Misc.IntersectRect(out dst, src, src2)) - { - return true; - } - return false; + TinyRect dst = default_(new TinyRect()); + return Misc.IntersectRect(dst, src, src2); } private void MoveObjectFollow(TinyPoint pos) @@ -8774,7 +8882,7 @@ namespace WindowsPhoneSpeedyBlupi TinyRect src = BlupiRect(pos); src.Left = pos.X + 16; src.Right = pos.X + 60 - 16; - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type == 96) @@ -8783,8 +8891,8 @@ namespace WindowsPhoneSpeedyBlupi src2.Right = m_moveObject[i].posCurrent.X + 60 + 100; src2.Top = m_moveObject[i].posCurrent.Y - 100; src2.Bottom = m_moveObject[i].posCurrent.Y + 60 + 100; - TinyRect dst; - if (Misc.IntersectRect(out dst, src2, src)) + TinyRect dst = default_(new TinyRect()); + if (Misc.IntersectRect(dst, src2, src)) { m_moveObject[i].type = 97; PlaySound(92, m_moveObject[i].posCurrent); @@ -8793,17 +8901,23 @@ namespace WindowsPhoneSpeedyBlupi } } - private int MoveObjectDetect(TinyPoint pos, out bool bNear) + /** + * + * @param pos + * @param bool + * @return Pair of icon Integer and bNear Boolean + */ + private Pair MoveObjectDetect(TinyPoint pos) { TinyRect src = BlupiRect(pos); src.Left = pos.X + 16; src.Right = pos.X + 60 - 16; - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); src2.Left = src.Left - 20; src2.Right = src.Right + 20; src2.Top = src.Top - 40; src2.Bottom = src.Bottom + 30; - TinyRect src3 = default(TinyRect); + TinyRect src3 = default_(new TinyRect()); for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type == 0 || m_moveObject[i].type == 27 || m_moveObject[i].type == 57 || m_moveObject[i].type == 39 || m_moveObject[i].type == 58 || m_moveObject[i].type == 34 || m_moveObject[i].type == 37 || m_moveObject[i].type == 38 || ((m_blupiAction == 14 || m_blupiAction == 29) && m_moveObject[i].type == 12)) @@ -8850,20 +8964,17 @@ namespace WindowsPhoneSpeedyBlupi src3.Top = m_moveObject[i].posCurrent.Y + 10; src3.Bottom = m_moveObject[i].posCurrent.Y + 60 - 32; } - TinyRect dst; - if (Misc.IntersectRect(out dst, src3, src)) + TinyRect dst = default_(new TinyRect()); + if (Misc.IntersectRect(dst, src3, src)) { - bNear = true; - return i; + return new Pair<>(i, true); } - if (m_moveObject[i].type == 2 && Misc.IntersectRect(out dst, src3, src2)) + if (m_moveObject[i].type == 2 && Misc.IntersectRect(dst, src3, src2)) { - bNear = false; - return i; + return new Pair<>(i, false); } } - bNear = false; - return -1; + return new Pair<>(-1, false); } private int MoveAscenseurDetect(TinyPoint pos, int height) @@ -8872,12 +8983,12 @@ namespace WindowsPhoneSpeedyBlupi { return -1; } - TinyRect src = default(TinyRect); + TinyRect src = default_(new TinyRect()); src.Left = pos.X + 12; src.Right = pos.X + 60 - 12; src.Top = pos.Y + 60 - 2; src.Bottom = pos.Y + 60 + height - 1; - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48) @@ -8886,8 +8997,8 @@ namespace WindowsPhoneSpeedyBlupi src2.Right = m_moveObject[i].posCurrent.X + 64; src2.Top = m_moveObject[i].posCurrent.Y; src2.Bottom = m_moveObject[i].posCurrent.Y + 16; - TinyRect dst; - if (Misc.IntersectRect(out dst, src2, src)) + TinyRect dst = default_(new TinyRect()); + if (Misc.IntersectRect(dst, src2, src)) { return i; } @@ -8898,12 +9009,12 @@ namespace WindowsPhoneSpeedyBlupi private int MoveChargeDetect(TinyPoint pos) { - TinyRect src = default(TinyRect); + TinyRect src = default_(new TinyRect()); src.Left = pos.X + 16; src.Right = pos.X + 60 - 16; src.Top = pos.Y + 11; src.Bottom = pos.Y + 60 - 2; - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type == 31) @@ -8912,8 +9023,8 @@ namespace WindowsPhoneSpeedyBlupi src2.Right = m_moveObject[i].posCurrent.X + 60 + 10; src2.Top = m_moveObject[i].posCurrent.Y + 36; src2.Bottom = m_moveObject[i].posCurrent.Y + 60; - TinyRect dst; - if (Misc.IntersectRect(out dst, src2, src)) + TinyRect dst = default_(new TinyRect()); + if (Misc.IntersectRect(dst, src2, src)) { return i; } @@ -8924,12 +9035,12 @@ namespace WindowsPhoneSpeedyBlupi private int MovePersoDetect(TinyPoint pos) { - TinyRect src = default(TinyRect); + TinyRect src = default_(new TinyRect()); src.Left = pos.X + 16; src.Right = pos.X + 60 - 16; src.Top = pos.Y + 11; src.Bottom = pos.Y + 60 - 2; - TinyRect src2 = default(TinyRect); + TinyRect src2 = default_(new TinyRect()); for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type >= 200 && m_moveObject[i].type <= 203) @@ -8938,8 +9049,8 @@ namespace WindowsPhoneSpeedyBlupi src2.Right = m_moveObject[i].posCurrent.X + 60 - 16; src2.Top = m_moveObject[i].posCurrent.Y + 36; src2.Bottom = m_moveObject[i].posCurrent.Y + 60; - TinyRect dst; - if (Misc.IntersectRect(out dst, src2, src)) + TinyRect dst = default_(new TinyRect()); + if (Misc.IntersectRect(dst, src2, src)) { return i; } @@ -9001,13 +9112,13 @@ namespace WindowsPhoneSpeedyBlupi private void MoveObjectSort() { - MoveObject dst = default(MoveObject); + MoveObject dst = default_(new MoveObject()); int num = 0; for (int i = 0; i < MAXMOVEOBJECT; i++) { if (m_moveObject[i].type != 0) { - MoveObjectCopy(ref m_moveObject[num++], m_moveObject[i]); + MoveObjectCopy(m_moveObject[num++], m_moveObject[i]); } } for (int i = num; i < MAXMOVEOBJECT; i++) @@ -9018,7 +9129,7 @@ namespace WindowsPhoneSpeedyBlupi { return; } - bool flag; + boolean flag; do { flag = false; @@ -9026,9 +9137,9 @@ namespace WindowsPhoneSpeedyBlupi { if (SortGetType(m_moveObject[i].type) > SortGetType(m_moveObject[i + 1].type)) { - MoveObjectCopy(ref dst, m_moveObject[i]); - MoveObjectCopy(ref m_moveObject[i], m_moveObject[i + 1]); - MoveObjectCopy(ref m_moveObject[i + 1], dst); + MoveObjectCopy(dst, m_moveObject[i]); + MoveObjectCopy(m_moveObject[i], m_moveObject[i + 1]); + MoveObjectCopy(m_moveObject[i + 1], dst); flag = true; } } @@ -9040,7 +9151,7 @@ namespace WindowsPhoneSpeedyBlupi private void MoveObjectPriority(int i) { - MoveObject dst = default(MoveObject); + MoveObject dst = default_(new MoveObject()); if (i == 0 || m_moveObject[i].type != 23) { return; @@ -9053,9 +9164,9 @@ namespace WindowsPhoneSpeedyBlupi } if (j <= i) { - MoveObjectCopy(ref dst, m_moveObject[i]); - MoveObjectCopy(ref m_moveObject[i], m_moveObject[j]); - MoveObjectCopy(ref m_moveObject[j], dst); + MoveObjectCopy(dst, m_moveObject[i]); + MoveObjectCopy(m_moveObject[i], m_moveObject[j]); + MoveObjectCopy(m_moveObject[j], dst); if (m_moveObject[i].type == 12 || m_moveObject[j].type == 12) { UpdateCaisse(); @@ -9129,23 +9240,23 @@ namespace WindowsPhoneSpeedyBlupi { byeByeObject2.speedX = -(num + 10); } - byeByeObjects.Add(byeByeObject2); + byeByeObjects.add(byeByeObject2); } private void ByeByeStep() { int num = 0; - while (num < byeByeObjects.Count) + while (num < byeByeObjects.size()) { - ByeByeObject byeByeObject = byeByeObjects[num]; + ByeByeObject byeByeObject = byeByeObjects.get(num); double num2 = 10.0 - byeByeObject.phase; if (num2 > 0.0) { - byeByeObject.posY -= Math.Pow(num2, 1.5) * byeByeObject.animationSpeed; + byeByeObject.posY -= Math_.Pow(num2, 1.5) * byeByeObject.animationSpeed; } if (num2 < 0.0) { - byeByeObject.posY += Math.Pow(0.0 - num2, 1.5) * byeByeObject.animationSpeed; + byeByeObject.posY += Math_.Pow(0.0 - num2, 1.5) * byeByeObject.animationSpeed; } byeByeObject.posX += byeByeObject.speedX * byeByeObject.animationSpeed; if (byeByeObject.speedX > 0.0) @@ -9164,7 +9275,7 @@ namespace WindowsPhoneSpeedyBlupi } if (byeByeObject.phase > 30.0) { - byeByeObjects.RemoveAt(num); + byeByeObjects.remove(num); } else { @@ -9175,9 +9286,9 @@ namespace WindowsPhoneSpeedyBlupi private void ByeByeDraw(TinyPoint posDecor) { - foreach (ByeByeObject byeByeObject in byeByeObjects) + for (ByeByeObject byeByeObject : byeByeObjects) { - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = m_drawBounds.Left + (int)byeByeObject.posX - posDecor.X; tinyPoint.Y = m_drawBounds.Top + (int)byeByeObject.posY - posDecor.Y; TinyPoint pos = tinyPoint; @@ -9187,7 +9298,7 @@ namespace WindowsPhoneSpeedyBlupi private TinyPoint VoyageGetPosVie(int nbVies) { - TinyPoint result = default(TinyPoint); + TinyPoint result = default_(new TinyPoint()); result.X = 210 + 16 * nbVies; result.Y = 417; return result; @@ -9204,8 +9315,8 @@ namespace WindowsPhoneSpeedyBlupi m_voyageEnd = end; m_voyageIcon = icon; m_voyageChannel = channel; - int num = Math.Abs(end.X - start.X); - int num2 = Math.Abs(end.Y - start.Y); + int num = Math_.Abs(end.X - start.X); + int num2 = Math_.Abs(end.Y - start.Y); m_voyagePhase = 0; m_voyageTotal = (num + num2) / 10; if (m_voyageIcon == 48 && m_voyageChannel == 2) @@ -9351,7 +9462,7 @@ namespace WindowsPhoneSpeedyBlupi num = 0; } } - TinyPoint pos = default(TinyPoint); + TinyPoint pos = default_(new TinyPoint()); pos.X = m_voyageStart.X + (m_voyageEnd.X - m_voyageStart.X) * num / m_voyageTotal; pos.Y = m_voyageStart.Y + (m_voyageEnd.Y - m_voyageStart.Y) * num / m_voyageTotal; if (m_voyageIcon != 40 || m_voyageChannel != 10 || num != 0) @@ -9360,7 +9471,7 @@ namespace WindowsPhoneSpeedyBlupi } if (m_voyageIcon == 40 && m_voyageChannel == 10) { - int[] array = new int[7] { -8, -6, -4, 0, 4, 6, 8 }; + int[] array = new int[] { -8, -6, -4, 0, 4, 6, 8 }; pos.X -= 34; pos.X += m_posDecor.X; pos.Y += m_posDecor.Y; @@ -9376,16 +9487,16 @@ namespace WindowsPhoneSpeedyBlupi } } - private bool IsFloatingObject(int i) + private boolean IsFloatingObject(int i) { TinyPoint posCurrent = m_moveObject[i].posCurrent; int num = (posCurrent.X + 32) / 64; int num2 = posCurrent.Y / 64 + 1; - int icon = m_decor[num, num2].icon; + int icon = m_decor[num][ num2].icon; return IsPassIcon(icon); } - private bool IsRightBorder(int x, int y, int dx, int dy) + private boolean IsRightBorder(int x, int y, int dx, int dy) { int num = ((m_dimDecor.X != 0) ? 100 : 10); int num2 = ((m_dimDecor.Y != 0) ? 100 : 8); @@ -9393,7 +9504,7 @@ namespace WindowsPhoneSpeedyBlupi { return true; } - int icon = m_decor[x + dx, y + dy].icon; + int icon = m_decor[x + dx][ y + dy].icon; if (icon < 386 || icon > 397) { switch (icon) @@ -9412,14 +9523,14 @@ namespace WindowsPhoneSpeedyBlupi case 258: case 259: case 260: - icon = m_decor[x, y].icon; + icon = m_decor[x][ y].icon; if (icon >= 250) { return icon <= 260; } return false; default: - icon = m_decor[x, y].icon; + icon = m_decor[x][ y].icon; switch (icon) { case -1: @@ -9687,7 +9798,7 @@ namespace WindowsPhoneSpeedyBlupi } } } - icon = m_decor[x, y].icon; + icon = m_decor[x][ y].icon; if ((icon < 386 || icon > 397) && icon != 400) { return icon == 245; @@ -9695,13 +9806,13 @@ namespace WindowsPhoneSpeedyBlupi return true; } - private bool IsFromage(int x, int y) + private boolean IsFromage(int x, int y) { if (x < 0 || x >= 100 || y < 0 || y >= 100) { return false; } - int icon = m_decor[x, y].icon; + int icon = m_decor[x][ y].icon; if (icon >= 246 && icon <= 249) { return true; @@ -9713,13 +9824,13 @@ namespace WindowsPhoneSpeedyBlupi return false; } - private bool IsGrotte(int x, int y) + private boolean IsGrotte(int x, int y) { if (x < 0 || x >= 100 || y < 0 || y >= 100) { return false; } - switch (m_decor[x, y].icon) + switch (m_decor[x][ y].icon) { case 284: case 301: @@ -9754,7 +9865,7 @@ namespace WindowsPhoneSpeedyBlupi { num &= -9; } - int num2 = m_decor[x, y].icon; + int num2 = m_decor[x][ y].icon; if (num2 == 156) { num2 = 35; @@ -9808,11 +9919,11 @@ namespace WindowsPhoneSpeedyBlupi { num2 = m_random.Next(341, 346); } - m_decor[x, y].icon = num2; + m_decor[x][ y].icon = num2; return; } } - switch (m_decor[x, y].icon) + switch (m_decor[x][ y].icon) { case -1: case 264: @@ -9868,10 +9979,10 @@ namespace WindowsPhoneSpeedyBlupi { num2 = 282; } - m_decor[x, y].icon = num2; + m_decor[x][ y].icon = num2; break; } - switch (m_decor[x, y].icon) + switch (m_decor[x][ y].icon) { case -1: case 285: @@ -9922,7 +10033,7 @@ namespace WindowsPhoneSpeedyBlupi { num2 = 303; } - m_decor[x, y].icon = num2; + m_decor[x][ y].icon = num2; break; } } @@ -9934,12 +10045,12 @@ namespace WindowsPhoneSpeedyBlupi AdaptMidBorder(cel.X - 1, cel.Y); AdaptMidBorder(cel.X, cel.Y + 1); AdaptMidBorder(cel.X, cel.Y - 1); - int icon = m_decor[cel.X, cel.Y].icon; + int icon = m_decor[cel.X][ cel.Y].icon; if (icon != -1 && !IsPassIcon(icon)) { MoveObjectDelete(cel); } - icon = m_decor[cel.X, cel.Y].icon; + icon = m_decor[cel.X][ cel.Y].icon; if (icon == 304) { for (int i = 0; i < 4; i++) @@ -9949,12 +10060,12 @@ namespace WindowsPhoneSpeedyBlupi { break; } - icon = m_decor[cel.X, cel.Y].icon; + icon = m_decor[cel.X][ cel.Y].icon; if (icon != -1) { break; } - m_decor[cel.X, cel.Y].icon = 305; + m_decor[cel.X][ cel.Y].icon = 305; } } if (icon != -1) @@ -9968,12 +10079,12 @@ namespace WindowsPhoneSpeedyBlupi { break; } - icon = m_decor[cel.X, cel.Y].icon; + icon = m_decor[cel.X][ cel.Y].icon; if (icon != 305) { break; } - m_decor[cel.X, cel.Y].icon = -1; + m_decor[cel.X][ cel.Y].icon = -1; } } @@ -9982,7 +10093,7 @@ namespace WindowsPhoneSpeedyBlupi Worlds.DeleteCurrentGame(); } - public bool CurrentWrite() + public boolean CurrentWrite() { Worlds.WriteClear(); Worlds.WriteSection("DescFile"); @@ -10080,7 +10191,7 @@ namespace WindowsPhoneSpeedyBlupi int[] array = new int[100]; for (int j = 0; j < 100; j++) { - array[j] = m_decor[i, j].icon; + array[j] = m_decor[i][ j].icon; } Worlds.WriteDecorField(array); } @@ -10091,7 +10202,7 @@ namespace WindowsPhoneSpeedyBlupi int[] array2 = new int[100]; for (int l = 0; l < 100; l++) { - array2[l] = m_bigDecor[k, l].icon; + array2[l] = m_bigDecor[k][ l].icon; } Worlds.WriteDecorField(array2); } @@ -10129,15 +10240,15 @@ namespace WindowsPhoneSpeedyBlupi return true; } - public bool CurrentRead() + public boolean CurrentRead() { - string text = Worlds.ReadCurrentGame(); + String text = Worlds.ReadCurrentGame(); if (string.IsNullOrEmpty(text)) { return false; } InitDecor(); - string[] lines = text.Split('\n'); + String[] lines = text.split("\n"); Worlds.GetIntField(lines, "DescFile", 0, "_version_"); m_posDecor = Worlds.GetPointField(lines, "DescFile", 0, "_posDecor_"); m_dimDecor = Worlds.GetPointField(lines, "DescFile", 0, "_dimDecor_"); @@ -10228,14 +10339,16 @@ namespace WindowsPhoneSpeedyBlupi { for (int j = 0; j < 100; j++) { - m_decor[j, i].icon = Worlds.GetDecorField(lines, "Decor", j, i) ?? (-1); + Integer field = Worlds.GetDecorField(lines, "Decor", j, i); + m_decor[j][ i].icon = field != null ? field : -1; } } for (int k = 0; k < 100; k++) { for (int l = 0; l < 100; l++) { - m_bigDecor[l, k].icon = Worlds.GetDecorField(lines, "BigDecor", l, k) ?? (-1); + Integer field = Worlds.GetDecorField(lines, "BigDecorDecor", l, k); + m_bigDecor[l][ k].icon = field != null ? field : -1; } } for (int m = 0; m < MAXMOVEOBJECT; m++) @@ -10273,10 +10386,10 @@ namespace WindowsPhoneSpeedyBlupi return true; } - public bool Read(int gamer, int rank, bool bUser) + public boolean Read(int gamer, int rank, boolean bUser) { InitDecor(); - string[] array = Worlds.ReadWorld(gamer, rank); + String[] array = Worlds.ReadWorld(gamer, rank); if (array == null) { return false; @@ -10291,14 +10404,16 @@ namespace WindowsPhoneSpeedyBlupi { for (int j = 0; j < 100; j++) { - m_decor[j, i].icon = Worlds.GetDecorField(array, "Decor", j, i) ?? (-1); + Integer field = Worlds.GetDecorField(array, "Decor", j, i); + m_decor[j][ i].icon = field != null ? field : -1; } } for (int k = 0; k < 100; k++) { for (int l = 0; l < 100; l++) { - m_bigDecor[l, k].icon = Worlds.GetDecorField(array, "BigDecor", l, k) ?? (-1); + Integer field = Worlds.GetDecorField(array, "BigDecor", l, k); + m_bigDecor[l][ k].icon = field != null ? field : -1; } } for (int m = 0; m < MAXMOVEOBJECT; m++) @@ -10334,17 +10449,17 @@ namespace WindowsPhoneSpeedyBlupi return true; } - private bool Delete(int gamer, int rank, bool bUser) + private boolean Delete(int gamer, int rank, boolean bUser) { return true; } - private bool FileExist(int gamer, int rank, bool bUser) + private boolean FileExist(int gamer, int rank, boolean bUser) { return false; } - private bool SearchWorld(int world, ref TinyPoint blupi, ref int dir) + private boolean SearchWorld(int world, TinyPoint blupi, Integer dir) { if (world < 0 || world > 12) { @@ -10356,17 +10471,17 @@ namespace WindowsPhoneSpeedyBlupi { for (int j = 0; j < 100; j++) { - int icon = m_decor[i, j].icon; + int icon = m_decor[i][ j].icon; if (icon == num || icon == num2) { - if (IsPassIcon(m_decor[i - 1, j].icon)) + if (IsPassIcon(m_decor[i - 1][ j].icon)) { blupi.X = (i - 1) * 64 + 2; blupi.Y = j * 64 + BLUPIOFFY; dir = 2; return true; } - if (IsPassIcon(m_decor[i + 1, j].icon)) + if (IsPassIcon(m_decor[i + 1][ j].icon)) { blupi.X = (i + 1) * 64 + 2; blupi.Y = j * 64 + BLUPIOFFY; @@ -10379,16 +10494,16 @@ namespace WindowsPhoneSpeedyBlupi return false; } - private bool SearchDoor(int n, ref TinyPoint cel, ref TinyPoint blupi) + private boolean SearchDoor(int n, TinyPoint cel, TinyPoint blupi) { for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { - int icon = m_decor[i, j].icon; + int icon = m_decor[i][ j].icon; if (icon >= 174 && icon <= 181 && icon - 174 + 1 == n) { - if (i > 0 && m_decor[i - 1, j].icon == 182) + if (i > 0 && m_decor[i - 1][ j].icon == 182) { cel.X = i - 1; cel.Y = j; @@ -10396,7 +10511,7 @@ namespace WindowsPhoneSpeedyBlupi blupi.Y = j * 64 + BLUPIOFFY; return true; } - if (i > 1 && m_decor[i - 2, j].icon == 182) + if (i > 1 && m_decor[i - 2][ j].icon == 182) { cel.X = i - 2; cel.Y = j; @@ -10404,7 +10519,7 @@ namespace WindowsPhoneSpeedyBlupi blupi.Y = j * 64 + BLUPIOFFY; return true; } - if (i < 99 && m_decor[i + 1, j].icon == 182) + if (i < 99 && m_decor[i + 1][ j].icon == 182) { cel.X = i + 1; cel.Y = j; @@ -10412,7 +10527,7 @@ namespace WindowsPhoneSpeedyBlupi blupi.Y = j * 64 + BLUPIOFFY; return true; } - if (i < 98 && m_decor[i + 2, j].icon == 182) + if (i < 98 && m_decor[i + 2][ j].icon == 182) { cel.X = i + 2; cel.Y = j; @@ -10426,13 +10541,13 @@ namespace WindowsPhoneSpeedyBlupi return false; } - private bool SearchGold(int n, ref TinyPoint cel) + private boolean SearchGold(int n, TinyPoint cel) { for (int num = 99; num >= 0; num--) { for (int num2 = 99; num2 >= 0; num2--) { - if (m_decor[num2, num].icon == 183) + if (m_decor[num2][ num].icon == 183) { cel.X = num2; cel.Y = num; @@ -10447,9 +10562,9 @@ namespace WindowsPhoneSpeedyBlupi { if (m_mission == 1) { - TinyPoint blupi = default(TinyPoint); - int dir = 0; - if (SearchWorld(lastWorld, ref blupi, ref dir)) + TinyPoint blupi = default_(new TinyPoint()); + Integer dir = 0; + if (SearchWorld(lastWorld, blupi, dir)) { m_blupiStartPos = blupi; m_blupiStartDir = dir; @@ -10457,10 +10572,10 @@ namespace WindowsPhoneSpeedyBlupi } } - public void AdaptDoors(bool bPrivate) + public void AdaptDoors(boolean bPrivate) { - TinyPoint cel = default(TinyPoint); - TinyPoint blupi = default(TinyPoint); + TinyPoint cel = default_(new TinyPoint()); + TinyPoint blupi = default_(new TinyPoint()); m_bPrivate = bPrivate; if (m_bPrivate) { @@ -10470,9 +10585,9 @@ namespace WindowsPhoneSpeedyBlupi { for (int i = 0; i < 20; i++) { - if (SearchGold(i, ref cel) && (m_doors[180 + i] == 1 || m_bCheatDoors)) + if (SearchGold(i, cel) && (m_doors[180 + i] == 1 || m_bCheatDoors)) { - m_decor[cel.X, cel.Y].icon = -1; + m_decor[cel.X][ cel.Y].icon = -1; int num = MoveObjectFree(); m_moveObject[num].type = 22; m_moveObject[num].stepAdvance = 50; @@ -10496,18 +10611,18 @@ namespace WindowsPhoneSpeedyBlupi { for (int k = 0; k < 100; k++) { - int icon = m_decor[j, k].icon; + int icon = m_decor[j][ k].icon; if (icon >= 158 && icon <= 165 && (m_doors[180 + icon - 158 + 1] == 1 || m_bCheatDoors)) { - m_decor[j, k].icon += 8; + m_decor[j][ k].icon += 8; } if (icon == 309 && (m_doors[189] == 1 || m_bCheatDoors)) { - m_decor[j, k].icon = 310; + m_decor[j][ k].icon = 310; } if (icon >= 410 && icon <= 415 && (m_doors[180 + icon - 410 + 9] == 1 || m_bCheatDoors)) { - m_decor[j, k].icon += 5; + m_decor[j][ k].icon += 5; } } } @@ -10520,7 +10635,7 @@ namespace WindowsPhoneSpeedyBlupi } for (int i = 0; i < 10; i++) { - if (SearchDoor(i, ref cel, ref blupi) && (m_doors[m_mission + i] == 1 || m_bCheatDoors)) + if (SearchDoor(i, cel, blupi) && (m_doors[m_mission + i] == 1 || m_bCheatDoors)) { OpenDoor(cel); m_blupiStartPos = blupi; @@ -10539,12 +10654,12 @@ namespace WindowsPhoneSpeedyBlupi private void OpenDoorsTresor() { - TinyPoint cel = default(TinyPoint); + TinyPoint cel = default_(new TinyPoint()); for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { - int icon = m_decor[i, j].icon; + int icon = m_decor[i][ j].icon; if (icon >= 421 && icon <= 421 + m_nbTresor - 1) { cel.X = i; @@ -10557,8 +10672,8 @@ namespace WindowsPhoneSpeedyBlupi private void OpenDoor(TinyPoint cel) { - int icon = m_decor[cel.X, cel.Y].icon; - m_decor[cel.X, cel.Y].icon = -1; + int icon = m_decor[cel.X][ cel.Y].icon; + m_decor[cel.X][ cel.Y].icon = -1; int num = MoveObjectFree(); m_moveObject[num].type = 22; m_moveObject[num].stepAdvance = 50; @@ -10594,4 +10709,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Def.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Def.java index b2bf44f..f293974 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Def.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Def.java @@ -1,705 +1,1007 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 + +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.static_; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.const_; + + // WindowsPhoneSpeedyBlupi.Def +@namespace(name = "WindowsPhoneSpeedyBlupi") +@static_ +public class Def { -namespace WindowsPhoneSpeedyBlupi -{ - - public static class Def - { - public enum Phase - { - None, - First, - Wait, - Init, - Play, - Pause, - Lost, - Win, - Trial, - MainSetup, - PlaySetup, - Resume, - Ranking - } - - public enum ButtonGlygh - { - None, - InitGamerA, - InitGamerB, - InitGamerC, - InitSetup, - InitPlay, - InitBuy, - InitRanking, - WinLostReturn, - TrialBuy, - TrialCancel, - SetupSounds, - SetupJump, - SetupZoom, - SetupAccel, - SetupReset, - SetupReturn, - PauseMenu, - PauseBack, - PauseSetup, - PauseRestart, - PauseContinue, - PlayPause, - PlayJump, - PlayAction, - PlayDown, - ResumeMenu, - ResumeContinue, - RankingContinue, - Cheat11, - Cheat12, - Cheat21, - Cheat22, - Cheat31, - Cheat32, - Cheat1, - Cheat2, - Cheat3, - Cheat4, - Cheat5, - Cheat6, - Cheat7, - Cheat8, - Cheat9 - } - - public enum KeyboardPress - { - None, Up, Right, Down, Left, LeftControl, Space, Escape, Pause - } - - public const int LXIMAGE = 640; - - public const int LYIMAGE = 480; - - public const int MAXCELX = 100; - - public const int MAXCELY = 100; - - public const int DIMOBJX = 64; - - public const int DIMOBJY = 64; - - public const int DIMBLUPIX = 60; - - public const int DIMBLUPIY = 60; - - public const int DIMEXPLOX = 128; - - public const int DIMEXPLOY = 128; - - public const int DIMBUTTONX = 40; - - public const int DIMBUTTONY = 40; - - public const int DIMJAUGEX = 124; - - public const int DIMJAUGEY = 22; - - public const int POSSTATX = 12; - - public const int POSSTATY = 220; - - public const int DIMSTATX = 60; - - public const int DIMSTATY = 30; - - public const int DIMTEXTX = 32; - - public const int DIMTEXTY = 32; - - public const int CHOBJECT = 1; - - public const int CHBLUPI = 2; - - public const int CHDECOR = 3; - - public const int CHBUTTON = 4; - - public const int CHJAUGE = 5; - - public const int CHTEXT = 6; - - public const int CHEXPLO = 9; - - public const int CHELEMENT = 10; - - public const int CHBLUPI1 = 11; - - public const int CHBLUPI2 = 12; - - public const int CHBLUPI3 = 13; - - public const int CHPAD = 14; - - public const int CHSPEEDYBLUPI = 15; - - public const int CHBLUPIYOUPIE = 16; - - public const int CHGEAR = 17; - - public const int ACTION_STOP = 1; - - public const int ACTION_MARCH = 2; - - public const int ACTION_TURN = 3; - - public const int ACTION_JUMP = 4; - - public const int ACTION_AIR = 5; - - public const int ACTION_DOWN = 6; - - public const int ACTION_UP = 7; - - public const int ACTION_VERTIGO = 8; - - public const int ACTION_RECEDE = 9; - - public const int ACTION_ADVANCE = 10; - - public const int ACTION_CLEAR1 = 11; - - public const int ACTION_SET = 12; - - public const int ACTION_WIN = 13; - - public const int ACTION_PUSH = 14; - - public const int ACTION_STOPHELICO = 15; - - public const int ACTION_MARCHHELICO = 16; - - public const int ACTION_TURNHELICO = 17; - - public const int ACTION_STOPNAGE = 18; - - public const int ACTION_MARCHNAGE = 19; - - public const int ACTION_TURNNAGE = 20; - - public const int ACTION_STOPSURF = 21; - - public const int ACTION_MARCHSURF = 22; - - public const int ACTION_TURNSURF = 23; - - public const int ACTION_DROWN = 24; - - public const int ACTION_STOPJEEP = 25; - - public const int ACTION_MARCHJEEP = 26; - - public const int ACTION_TURNJEEP = 27; - - public const int ACTION_STOPPOP = 28; - - public const int ACTION_POP = 29; - - public const int ACTION_BYE = 30; - - public const int ACTION_STOPSUSPEND = 31; - - public const int ACTION_MARCHSUSPEND = 32; - - public const int ACTION_TURNSUSPEND = 33; - - public const int ACTION_JUMPSUSPEND = 34; - - public const int ACTION_HIDE = 35; - - public const int ACTION_JUMPAIE = 36; - - public const int ACTION_STOPSKATE = 37; - - public const int ACTION_MARCHSKATE = 38; - - public const int ACTION_TURNSKATE = 39; - - public const int ACTION_JUMPSKATE = 40; - - public const int ACTION_AIRSKATE = 41; - - public const int ACTION_TAKESKATE = 42; - - public const int ACTION_DEPOSESKATE = 43; - - public const int ACTION_OUF1a = 44; - - public const int ACTION_OUF1b = 45; - - public const int ACTION_OUF2 = 46; - - public const int ACTION_OUF3 = 47; - - public const int ACTION_OUF4 = 48; - - public const int ACTION_SUCETTE = 49; - - public const int ACTION_STOPTANK = 50; - - public const int ACTION_MARCHTANK = 51; - - public const int ACTION_TURNTANK = 52; - - public const int ACTION_FIRETANK = 53; - - public const int ACTION_GLU = 54; - - public const int ACTION_DRINK = 55; - - public const int ACTION_CHARGE = 56; - - public const int ACTION_ELECTRO = 57; - - public const int ACTION_HELICOGLU = 58; - - public const int ACTION_TURNAIR = 59; - - public const int ACTION_STOPMARCH = 60; - - public const int ACTION_STOPJUMP = 61; - - public const int ACTION_STOPJUMPh = 62; - - public const int ACTION_MOCKERY = 63; - - public const int ACTION_MOCKERYi = 64; - - public const int ACTION_OUF5 = 65; - - public const int ACTION_BALLOON = 66; - - public const int ACTION_STOPOVER = 67; - - public const int ACTION_MARCHOVER = 68; - - public const int ACTION_TURNOVER = 69; - - public const int ACTION_RECEDEq = 70; - - public const int ACTION_ADVANCEq = 71; - - public const int ACTION_STOPECRASE = 72; - - public const int ACTION_MARCHECRASE = 73; - - public const int ACTION_TELEPORTE = 74; - - public const int ACTION_CLEAR2 = 75; - - public const int ACTION_CLEAR3 = 76; - - public const int ACTION_CLEAR4 = 77; - - public const int ACTION_CLEAR5 = 78; - - public const int ACTION_CLEAR6 = 79; - - public const int ACTION_CLEAR7 = 80; - - public const int ACTION_CLEAR8 = 81; - - public const int ACTION_SWITCH = 82; - - public const int ACTION_MOCKERYp = 83; - - public const int ACTION_NON = 84; - - public const int ACTION_SLOWDOWNSKATE = 85; - - public const int ACTION_TAKEDYNAMITE = 86; - - public const int ACTION_PUTDYNAMITE = 87; - - public const int DIR_LEFT = 1; - - public const int DIR_RIGHT = 2; - - public const int SEC_SHIELD = 1; - - public const int SEC_POWER = 2; - - public const int SEC_CLOUD = 3; - - public const int SEC_HIDE = 4; - - public const int TYPE_ASCENSEUR = 1; - - public const int TYPE_BOMBEDOWN = 2; - - public const int TYPE_BOMBEUP = 3; - - public const int TYPE_BULLDOZER = 4; - - public const int TYPE_TRESOR = 5; - - public const int TYPE_EGG = 6; - - public const int TYPE_GOAL = 7; - - public const int TYPE_EXPLO1 = 8; - - public const int TYPE_EXPLO2 = 9; - - public const int TYPE_EXPLO3 = 10; - - public const int TYPE_EXPLO4 = 11; - - public const int TYPE_CAISSE = 12; - - public const int TYPE_HELICO = 13; - - public const int TYPE_PLOUF = 14; - - public const int TYPE_BLUP = 15; - - public const int TYPE_BOMBEMOVE = 16; - - public const int TYPE_POISSON = 17; - - public const int TYPE_TOMATES = 18; - - public const int TYPE_JEEP = 19; - - public const int TYPE_OISEAU = 20; - - public const int TYPE_CLE = 21; - - public const int TYPE_DOOR = 22; - - public const int TYPE_BALLE = 23; - - public const int TYPE_SKATE = 24; - - public const int TYPE_SHIELD = 25; - - public const int TYPE_POWER = 26; - - public const int TYPE_MAGICTRACK = 27; - - public const int TYPE_TANK = 28; - - public const int TYPE_BULLET = 29; - - public const int TYPE_DRINK = 30; - - public const int TYPE_CHARGE = 31; - - public const int TYPE_BLUPIHELICO = 32; - - public const int TYPE_BLUPITANK = 33; - - public const int TYPE_GLU = 34; - - public const int TYPE_TIPLOUF = 35; - - public const int TYPE_POLLUTION = 36; - - public const int TYPE_CLEAR = 37; - - public const int TYPE_ELECTRO = 38; - - public const int TYPE_TRESORTRACK = 39; - - public const int TYPE_INVERT = 40; - - public const int TYPE_INVERTSTART = 41; - - public const int TYPE_INVERTSTOP = 42; - - public const int TYPE_GUEPE = 44; - - public const int TYPE_OVER = 46; - - public const int TYPE_ASCENSEURs = 47; - - public const int TYPE_ASCENSEURsi = 48; - - public const int TYPE_CLE1 = 49; - - public const int TYPE_CLE2 = 50; - - public const int TYPE_CLE3 = 51; - - public const int TYPE_BRIDGE = 52; - - public const int TYPE_TENTACULE = 53; - - public const int TYPE_CREATURE = 54; - - public const int TYPE_DYNAMITE = 55; - - public const int TYPE_DYNAMITEf = 56; - - public const int TYPE_SHIELDTRACK = 57; - - public const int TYPE_HIDETRACK = 58; - - public const int TYPE_EXPLO5 = 90; - - public const int TYPE_EXPLO6 = 91; - - public const int TYPE_EXPLO7 = 92; - - public const int TYPE_EXPLO8 = 93; - - public const int TYPE_EXPLO9 = 94; - - public const int TYPE_EXPLO10 = 95; - - public const int TYPE_BOMBEFOLLOW1 = 96; - - public const int TYPE_BOMBEFOLLOW2 = 97; - - public const int TYPE_SPLOUTCH1 = 98; - - public const int TYPE_SPLOUTCH2 = 99; - - public const int TYPE_SPLOUTCH3 = 100; - - public const int TYPE_BOMBEPERSO1 = 200; - - public const int TYPE_BOMBEPERSO2 = 201; - - public const int TYPE_BOMBEPERSO3 = 202; - - public const int TYPE_BOMBEPERSO4 = 203; - - public const int STEP_STOPSTART = 1; - - public const int STEP_ADVANCE = 2; - - public const int STEP_STOPEND = 3; - - public const int STEP_RECEDE = 4; - - public const int DECOR_EXPLO1 = 1; - - public const int DECOR_EXPLO2 = 2; - - public const int DECOR_EXPLO3 = 3; - - public const int DECOR_EXPLO4 = 4; - - public const int DECOR_BALLOON = 5; - - public const int SOUND_CLICK = 0; - - public const int SOUND_JUMP1 = 1; - - public const int SOUND_JUMP2 = 2; - - public const int SOUND_JUMPEND = 3; - - public const int SOUND_JUMPTOC = 4; - - public const int SOUND_TURN = 5; - - public const int SOUND_VERTIGO = 6; - - public const int SOUND_DOWN = 7; - - public const int SOUND_FALL = 8; - - public const int SOUND_NEW = 9; - - public const int SOUND_BOUM = 10; - - public const int SOUND_TRESOR = 11; - - public const int SOUND_EGG = 12; - - public const int SOUND_ENDKO = 13; - - public const int SOUND_ENDOK = 14; - - public const int SOUND_HELICOSTART = 15; - - public const int SOUND_HELICOHIGH = 16; - - public const int SOUND_HELICOSTOP = 17; - - public const int SOUND_HELICOLOW = 18; - - public const int SOUND_LASTTRESOR = 19; - - public const int SOUND_UP = 20; - - public const int SOUND_LOOKUP = 21; - - public const int SOUND_JUMP0 = 22; - - public const int SOUND_PLOUF = 23; - - public const int SOUND_BLUP = 24; - - public const int SOUND_SURF = 25; - - public const int SOUND_DROWN = 26; - - public const int SOUND_ERROR = 27; - - public const int SOUND_JEEPSTART = 28; - - public const int SOUND_JEEPHIGH = 29; - - public const int SOUND_JEEPSTOP = 30; - - public const int SOUND_JEEPLOW = 31; - - public const int SOUND_BYE = 32; - - public const int SOUND_DOOR = 33; - - public const int SOUND_SUSPENDTOC = 34; - - public const int SOUND_SUSPENDJUMP = 35; - - public const int SOUND_SINGE = 36; - - public const int SOUND_PATIENT = 37; - - public const int SOUND_PUSH = 38; - - public const int SOUND_POP = 39; - - public const int SOUND_JUMPAIE = 40; - - public const int SOUND_RESSORT = 41; - - public const int SOUND_STARTSHIELD = 42; - - public const int SOUND_STOPSHIELD = 43; - - public const int SOUND_STARTPOWER = 44; - - public const int SOUND_STOPPOWER = 45; - - public const int SOUND_OUF1 = 46; - - public const int SOUND_OUF2 = 47; - - public const int SOUND_OUF3 = 48; - - public const int SOUND_OUF4 = 49; - - public const int SOUND_SUCETTE = 50; - - public const int SOUND_GLU = 51; - - public const int SOUND_FIREOK = 52; - - public const int SOUND_FIREKO = 53; - - public const int SOUND_TAKEGLU = 54; - - public const int SOUND_STARTCLOUD = 55; - - public const int SOUND_STOPCLOUD = 56; - - public const int SOUND_DRINK = 57; - - public const int SOUND_CHARGE = 58; - - public const int SOUND_ELECTRO = 59; - - public const int SOUND_PERSOTAKE = 60; - - public const int SOUND_PERSOPOSE = 61; - - public const int SOUND_STARTHIDE = 62; - - public const int SOUND_STOPHIDE = 63; - - public const int SOUND_TIPLOUF = 64; - - public const int SOUND_MOCKERY = 65; - - public const int SOUND_INVERTSTART = 66; - - public const int SOUND_INVERTSTOP = 67; - - public const int SOUND_OVERSTOP = 68; - - public const int SOUND_BLITZ = 69; - - public const int SOUND_ECRASE = 70; - - public const int SOUND_TELEPORTE = 71; - - public const int SOUND_BRIDGE1 = 72; - - public const int SOUND_BRIDGE2 = 73; - - public const int SOUND_ANGEL = 74; - - public const int SOUND_SCIE = 75; - - public const int SOUND_SWITCHOFF = 76; - - public const int SOUND_SWITCHON = 77; - - public const int SOUND_JUMPENDb = 78; - - public const int SOUND_JUMPTOCb = 79; - - public const int SOUND_JUMPENDm = 80; - - public const int SOUND_JUMPTOCm = 81; - - public const int SOUND_JUMPENDg = 82; - - public const int SOUND_JUMPTOCg = 83; - - public const int SOUND_JUMPENDo = 84; - - public const int SOUND_JUMPTOCo = 85; - - public const int SOUND_JUMPENDk = 86; - - public const int SOUND_JUMPTOCk = 87; - - public const int SOUND_JUMPENDf = 88; - - public const int SOUND_JUMPTOCf = 89; - - public const int SOUND_JUMPENDh = 90; - - public const int SOUND_JUMPTOCh = 91; - - public const int SOUND_FOLLOW = 92; - - public const int KEY_JUMP = 1; - - public const int KEY_FIRE = 2; - - public const int KEY_DOWN = 4; - - public static bool HasSound - { - get - { - return true; - } - } - - public static bool EasyMove - { - get - { - return true; - } - } + private Def() { + //Not meant to be instantiated } -} \ No newline at end of file + public enum Phase { + None, + First, + Wait, + Init, + Play, + Pause, + Lost, + Win, + Trial, + MainSetup, + PlaySetup, + Resume, + Ranking + } + + public enum ButtonGlygh { + None, + InitGamerA, + InitGamerB, + InitGamerC, + InitSetup, + InitPlay, + InitBuy, + InitRanking, + WinLostReturn, + TrialBuy, + TrialCancel, + SetupSounds, + SetupJump, + SetupZoom, + SetupAccel, + SetupReset, + SetupReturn, + PauseMenu, + PauseBack, + PauseSetup, + PauseRestart, + PauseContinue, + PlayPause, + PlayJump, + PlayAction, + PlayDown, + ResumeMenu, + ResumeContinue, + RankingContinue, + Cheat11, + Cheat12, + Cheat21, + Cheat22, + Cheat31, + Cheat32, + Cheat1, + Cheat2, + Cheat3, + Cheat4, + Cheat5, + Cheat6, + Cheat7, + Cheat8, + Cheat9 + } + + public enum KeyboardPress { + None, Up, Right, Down, Left, LeftControl, Space, Escape, Pause + } + + public @const_ + static final int LXIMAGE = 640; + + public @const_ + static int LYIMAGE = 480; + + public @const_ + static int MAXCELX = 100; + + public @const_ + static int MAXCELY = 100; + + public @const_ + static int DIMOBJX = 64; + + public @const_ + static int DIMOBJY = 64; + + public @const_ + static int DIMBLUPIX = 60; + + public @const_ + static int DIMBLUPIY = 60; + + public @const_ + static int DIMEXPLOX = 128; + + public @const_ + static int DIMEXPLOY = 128; + + public @const_ + static int DIMBUTTONX = 40; + + public @const_ + static int DIMBUTTONY = 40; + + public @const_ + static int DIMJAUGEX = 124; + + public @const_ + static int DIMJAUGEY = 22; + + public @const_ + static int POSSTATX = 12; + + public @const_ + static int POSSTATY = 220; + + public @const_ + static int DIMSTATX = 60; + + public @const_ + static int DIMSTATY = 30; + + public @const_ + static int DIMTEXTX = 32; + + public @const_ + static int DIMTEXTY = 32; + + public @const_ + static int CHOBJECT = 1; + + public @const_ + static int CHBLUPI = 2; + + public @const_ + static int CHDECOR = 3; + + public @const_ + static int CHBUTTON = 4; + + public @const_ + static int CHJAUGE = 5; + + public @const_ + static int CHTEXT = 6; + + public @const_ + static int CHEXPLO = 9; + + public @const_ + static int CHELEMENT = 10; + + public @const_ + static int CHBLUPI1 = 11; + + public @const_ + static int CHBLUPI2 = 12; + + public @const_ + static int CHBLUPI3 = 13; + + public @const_ + static int CHPAD = 14; + + public @const_ + static int CHSPEEDYBLUPI = 15; + + public @const_ + static int CHBLUPIYOUPIE = 16; + + public @const_ + static int CHGEAR = 17; + + public @const_ + static int ACTION_STOP = 1; + + public @const_ + static int ACTION_MARCH = 2; + + public @const_ + static int ACTION_TURN = 3; + + public @const_ + static int ACTION_JUMP = 4; + + public @const_ + static int ACTION_AIR = 5; + + public @const_ + static int ACTION_DOWN = 6; + + public @const_ + static int ACTION_UP = 7; + + public @const_ + static int ACTION_VERTIGO = 8; + + public @const_ + static int ACTION_RECEDE = 9; + + public @const_ + static int ACTION_ADVANCE = 10; + + public @const_ + static int ACTION_CLEAR1 = 11; + + public @const_ + static int ACTION_SET = 12; + + public @const_ + static int ACTION_WIN = 13; + + public @const_ + static int ACTION_PUSH = 14; + + public @const_ + static int ACTION_STOPHELICO = 15; + + public @const_ + static int ACTION_MARCHHELICO = 16; + + public @const_ + static int ACTION_TURNHELICO = 17; + + public @const_ + static int ACTION_STOPNAGE = 18; + + public @const_ + static int ACTION_MARCHNAGE = 19; + + public @const_ + static int ACTION_TURNNAGE = 20; + + public @const_ + static int ACTION_STOPSURF = 21; + + public @const_ + static int ACTION_MARCHSURF = 22; + + public @const_ + static int ACTION_TURNSURF = 23; + + public @const_ + static int ACTION_DROWN = 24; + + public @const_ + static int ACTION_STOPJEEP = 25; + + public @const_ + static int ACTION_MARCHJEEP = 26; + + public @const_ + static int ACTION_TURNJEEP = 27; + + public @const_ + static int ACTION_STOPPOP = 28; + + public @const_ + static int ACTION_POP = 29; + + public @const_ + static int ACTION_BYE = 30; + + public @const_ + static int ACTION_STOPSUSPEND = 31; + + public @const_ + static int ACTION_MARCHSUSPEND = 32; + + public @const_ + static int ACTION_TURNSUSPEND = 33; + + public @const_ + static int ACTION_JUMPSUSPEND = 34; + + public @const_ + static int ACTION_HIDE = 35; + + public @const_ + static int ACTION_JUMPAIE = 36; + + public @const_ + static int ACTION_STOPSKATE = 37; + + public @const_ + static int ACTION_MARCHSKATE = 38; + + public @const_ + static int ACTION_TURNSKATE = 39; + + public @const_ + static int ACTION_JUMPSKATE = 40; + + public @const_ + static int ACTION_AIRSKATE = 41; + + public @const_ + static int ACTION_TAKESKATE = 42; + + public @const_ + static int ACTION_DEPOSESKATE = 43; + + public @const_ + static int ACTION_OUF1a = 44; + + public @const_ + static int ACTION_OUF1b = 45; + + public @const_ + static int ACTION_OUF2 = 46; + + public @const_ + static int ACTION_OUF3 = 47; + + public @const_ + static int ACTION_OUF4 = 48; + + public @const_ + static int ACTION_SUCETTE = 49; + + public @const_ + static int ACTION_STOPTANK = 50; + + public @const_ + static int ACTION_MARCHTANK = 51; + + public @const_ + static int ACTION_TURNTANK = 52; + + public @const_ + static int ACTION_FIRETANK = 53; + + public @const_ + static int ACTION_GLU = 54; + + public @const_ + static int ACTION_DRINK = 55; + + public @const_ + static int ACTION_CHARGE = 56; + + public @const_ + static int ACTION_ELECTRO = 57; + + public @const_ + static int ACTION_HELICOGLU = 58; + + public @const_ + static int ACTION_TURNAIR = 59; + + public @const_ + static int ACTION_STOPMARCH = 60; + + public @const_ + static int ACTION_STOPJUMP = 61; + + public @const_ + static int ACTION_STOPJUMPh = 62; + + public @const_ + static int ACTION_MOCKERY = 63; + + public @const_ + static int ACTION_MOCKERYi = 64; + + public @const_ + static int ACTION_OUF5 = 65; + + public @const_ + static int ACTION_BALLOON = 66; + + public @const_ + static int ACTION_STOPOVER = 67; + + public @const_ + static int ACTION_MARCHOVER = 68; + + public @const_ + static int ACTION_TURNOVER = 69; + + public @const_ + static int ACTION_RECEDEq = 70; + + public @const_ + static int ACTION_ADVANCEq = 71; + + public @const_ + static int ACTION_STOPECRASE = 72; + + public @const_ + static int ACTION_MARCHECRASE = 73; + + public @const_ + static int ACTION_TELEPORTE = 74; + + public @const_ + static int ACTION_CLEAR2 = 75; + + public @const_ + static int ACTION_CLEAR3 = 76; + + public @const_ + static int ACTION_CLEAR4 = 77; + + public @const_ + static int ACTION_CLEAR5 = 78; + + public @const_ + static int ACTION_CLEAR6 = 79; + + public @const_ + static int ACTION_CLEAR7 = 80; + + public @const_ + static int ACTION_CLEAR8 = 81; + + public @const_ + static int ACTION_SWITCH = 82; + + public @const_ + static int ACTION_MOCKERYp = 83; + + public @const_ + static int ACTION_NON = 84; + + public @const_ + static int ACTION_SLOWDOWNSKATE = 85; + + public @const_ + static int ACTION_TAKEDYNAMITE = 86; + + public @const_ + static int ACTION_PUTDYNAMITE = 87; + + public @const_ + static int DIR_LEFT = 1; + + public @const_ + static int DIR_RIGHT = 2; + + public @const_ + static int SEC_SHIELD = 1; + + public @const_ + static int SEC_POWER = 2; + + public @const_ + static int SEC_CLOUD = 3; + + public @const_ + static int SEC_HIDE = 4; + + public @const_ + static int TYPE_ASCENSEUR = 1; + + public @const_ + static int TYPE_BOMBEDOWN = 2; + + public @const_ + static int TYPE_BOMBEUP = 3; + + public @const_ + static int TYPE_BULLDOZER = 4; + + public @const_ + static int TYPE_TRESOR = 5; + + public @const_ + static int TYPE_EGG = 6; + + public @const_ + static int TYPE_GOAL = 7; + + public @const_ + static int TYPE_EXPLO1 = 8; + + public @const_ + static int TYPE_EXPLO2 = 9; + + public @const_ + static int TYPE_EXPLO3 = 10; + + public @const_ + static int TYPE_EXPLO4 = 11; + + public @const_ + static int TYPE_CAISSE = 12; + + public @const_ + static int TYPE_HELICO = 13; + + public @const_ + static int TYPE_PLOUF = 14; + + public @const_ + static int TYPE_BLUP = 15; + + public @const_ + static int TYPE_BOMBEMOVE = 16; + + public @const_ + static int TYPE_POISSON = 17; + + public @const_ + static int TYPE_TOMATES = 18; + + public @const_ + static int TYPE_JEEP = 19; + + public @const_ + static int TYPE_OISEAU = 20; + + public @const_ + static int TYPE_CLE = 21; + + public @const_ + static int TYPE_DOOR = 22; + + public @const_ + static int TYPE_BALLE = 23; + + public @const_ + static int TYPE_SKATE = 24; + + public @const_ + static int TYPE_SHIELD = 25; + + public @const_ + static int TYPE_POWER = 26; + + public @const_ + static int TYPE_MAGICTRACK = 27; + + public @const_ + static int TYPE_TANK = 28; + + public @const_ + static int TYPE_BULLET = 29; + + public @const_ + static int TYPE_DRINK = 30; + + public @const_ + static int TYPE_CHARGE = 31; + + public @const_ + static int TYPE_BLUPIHELICO = 32; + + public @const_ + static int TYPE_BLUPITANK = 33; + + public @const_ + static int TYPE_GLU = 34; + + public @const_ + static int TYPE_TIPLOUF = 35; + + public @const_ + static int TYPE_POLLUTION = 36; + + public @const_ + static int TYPE_CLEAR = 37; + + public @const_ + static int TYPE_ELECTRO = 38; + + public @const_ + static int TYPE_TRESORTRACK = 39; + + public @const_ + static int TYPE_INVERT = 40; + + public @const_ + static int TYPE_INVERTSTART = 41; + + public @const_ + static int TYPE_INVERTSTOP = 42; + + public @const_ + static int TYPE_GUEPE = 44; + + public @const_ + static int TYPE_OVER = 46; + + public @const_ + static int TYPE_ASCENSEURs = 47; + + public @const_ + static int TYPE_ASCENSEURsi = 48; + + public @const_ + static int TYPE_CLE1 = 49; + + public @const_ + static int TYPE_CLE2 = 50; + + public @const_ + static int TYPE_CLE3 = 51; + + public @const_ + static int TYPE_BRIDGE = 52; + + public @const_ + static int TYPE_TENTACULE = 53; + + public @const_ + static int TYPE_CREATURE = 54; + + public @const_ + static int TYPE_DYNAMITE = 55; + + public @const_ + static int TYPE_DYNAMITEf = 56; + + public @const_ + static int TYPE_SHIELDTRACK = 57; + + public @const_ + static int TYPE_HIDETRACK = 58; + + public @const_ + static int TYPE_EXPLO5 = 90; + + public @const_ + static int TYPE_EXPLO6 = 91; + + public @const_ + static int TYPE_EXPLO7 = 92; + + public @const_ + static int TYPE_EXPLO8 = 93; + + public @const_ + static int TYPE_EXPLO9 = 94; + + public @const_ + static int TYPE_EXPLO10 = 95; + + public @const_ + static int TYPE_BOMBEFOLLOW1 = 96; + + public @const_ + static int TYPE_BOMBEFOLLOW2 = 97; + + public @const_ + static int TYPE_SPLOUTCH1 = 98; + + public @const_ + static int TYPE_SPLOUTCH2 = 99; + + public @const_ + static int TYPE_SPLOUTCH3 = 100; + + public @const_ + static int TYPE_BOMBEPERSO1 = 200; + + public @const_ + static int TYPE_BOMBEPERSO2 = 201; + + public @const_ + static int TYPE_BOMBEPERSO3 = 202; + + public @const_ + static int TYPE_BOMBEPERSO4 = 203; + + public @const_ + static int STEP_STOPSTART = 1; + + public @const_ + static int STEP_ADVANCE = 2; + + public @const_ + static int STEP_STOPEND = 3; + + public @const_ + static int STEP_RECEDE = 4; + + public @const_ + static int DECOR_EXPLO1 = 1; + + public @const_ + static int DECOR_EXPLO2 = 2; + + public @const_ + static int DECOR_EXPLO3 = 3; + + public @const_ + static int DECOR_EXPLO4 = 4; + + public @const_ + static int DECOR_BALLOON = 5; + + public @const_ + static int SOUND_CLICK = 0; + + public @const_ + static int SOUND_JUMP1 = 1; + + public @const_ + static int SOUND_JUMP2 = 2; + + public @const_ + static int SOUND_JUMPEND = 3; + + public @const_ + static int SOUND_JUMPTOC = 4; + + public @const_ + static int SOUND_TURN = 5; + + public @const_ + static int SOUND_VERTIGO = 6; + + public @const_ + static int SOUND_DOWN = 7; + + public @const_ + static int SOUND_FALL = 8; + + public @const_ + static int SOUND_NEW = 9; + + public @const_ + static int SOUND_BOUM = 10; + + public @const_ + static int SOUND_TRESOR = 11; + + public @const_ + static int SOUND_EGG = 12; + + public @const_ + static int SOUND_ENDKO = 13; + + public @const_ + static int SOUND_ENDOK = 14; + + public @const_ + static int SOUND_HELICOSTART = 15; + + public @const_ + static int SOUND_HELICOHIGH = 16; + + public @const_ + static int SOUND_HELICOSTOP = 17; + + public @const_ + static int SOUND_HELICOLOW = 18; + + public @const_ + static int SOUND_LASTTRESOR = 19; + + public @const_ + static int SOUND_UP = 20; + + public @const_ + static int SOUND_LOOKUP = 21; + + public @const_ + static int SOUND_JUMP0 = 22; + + public @const_ + static int SOUND_PLOUF = 23; + + public @const_ + static int SOUND_BLUP = 24; + + public @const_ + static int SOUND_SURF = 25; + + public @const_ + static int SOUND_DROWN = 26; + + public @const_ + static int SOUND_ERROR = 27; + + public @const_ + static int SOUND_JEEPSTART = 28; + + public @const_ + static int SOUND_JEEPHIGH = 29; + + public @const_ + static int SOUND_JEEPSTOP = 30; + + public @const_ + static int SOUND_JEEPLOW = 31; + + public @const_ + static int SOUND_BYE = 32; + + public @const_ + static int SOUND_DOOR = 33; + + public @const_ + static int SOUND_SUSPENDTOC = 34; + + public @const_ + static int SOUND_SUSPENDJUMP = 35; + + public @const_ + static int SOUND_SINGE = 36; + + public @const_ + static int SOUND_PATIENT = 37; + + public @const_ + static int SOUND_PUSH = 38; + + public @const_ + static int SOUND_POP = 39; + + public @const_ + static int SOUND_JUMPAIE = 40; + + public @const_ + static int SOUND_RESSORT = 41; + + public @const_ + static int SOUND_STARTSHIELD = 42; + + public @const_ + static int SOUND_STOPSHIELD = 43; + + public @const_ + static int SOUND_STARTPOWER = 44; + + public @const_ + static int SOUND_STOPPOWER = 45; + + public @const_ + static int SOUND_OUF1 = 46; + + public @const_ + static int SOUND_OUF2 = 47; + + public @const_ + static int SOUND_OUF3 = 48; + + public @const_ + static int SOUND_OUF4 = 49; + + public @const_ + static int SOUND_SUCETTE = 50; + + public @const_ + static int SOUND_GLU = 51; + + public @const_ + static int SOUND_FIREOK = 52; + + public @const_ + static int SOUND_FIREKO = 53; + + public @const_ + static int SOUND_TAKEGLU = 54; + + public @const_ + static int SOUND_STARTCLOUD = 55; + + public @const_ + static int SOUND_STOPCLOUD = 56; + + public @const_ + static int SOUND_DRINK = 57; + + public @const_ + static int SOUND_CHARGE = 58; + + public @const_ + static int SOUND_ELECTRO = 59; + + public @const_ + static int SOUND_PERSOTAKE = 60; + + public @const_ + static int SOUND_PERSOPOSE = 61; + + public @const_ + static int SOUND_STARTHIDE = 62; + + public @const_ + static int SOUND_STOPHIDE = 63; + + public @const_ + static int SOUND_TIPLOUF = 64; + + public @const_ + static int SOUND_MOCKERY = 65; + + public @const_ + static int SOUND_INVERTSTART = 66; + + public @const_ + static int SOUND_INVERTSTOP = 67; + + public @const_ + static int SOUND_OVERSTOP = 68; + + public @const_ + static int SOUND_BLITZ = 69; + + public @const_ + static int SOUND_ECRASE = 70; + + public @const_ + static int SOUND_TELEPORTE = 71; + + public @const_ + static int SOUND_BRIDGE1 = 72; + + public @const_ + static int SOUND_BRIDGE2 = 73; + + public @const_ + static int SOUND_ANGEL = 74; + + public @const_ + static int SOUND_SCIE = 75; + + public @const_ + static int SOUND_SWITCHOFF = 76; + + public @const_ + static int SOUND_SWITCHON = 77; + + public @const_ + static int SOUND_JUMPENDb = 78; + + public @const_ + static int SOUND_JUMPTOCb = 79; + + public @const_ + static int SOUND_JUMPENDm = 80; + + public @const_ + static int SOUND_JUMPTOCm = 81; + + public @const_ + static int SOUND_JUMPENDg = 82; + + public @const_ + static int SOUND_JUMPTOCg = 83; + + public @const_ + static int SOUND_JUMPENDo = 84; + + public @const_ + static int SOUND_JUMPTOCo = 85; + + public @const_ + static int SOUND_JUMPENDk = 86; + + public @const_ + static int SOUND_JUMPTOCk = 87; + + public @const_ + static int SOUND_JUMPENDf = 88; + + public @const_ + static int SOUND_JUMPTOCf = 89; + + public @const_ + static int SOUND_JUMPENDh = 90; + + public @const_ + static int SOUND_JUMPTOCh = 91; + + public @const_ + static int SOUND_FOLLOW = 92; + + public @const_ + static int KEY_JUMP = 1; + + public @const_ + static int KEY_FIRE = 2; + + public @const_ + static int KEY_DOWN = 4; + + public static boolean HasSound() { + return true; + } + + public static boolean EasyMove() { + return true; + } + +} diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Game1.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Game1.java index 507bcdd..5b6dfd1 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Game1.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Game1.java @@ -1,26 +1,35 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Game1 -using System; -using Microsoft.Xna.Framework; -//using Microsoft.Xna.Framework.GamerServices;//todo remove me -using Microsoft.Xna.Framework.Input; -using Microsoft.Xna.Framework.Input.Touch; -using Microsoft.Xna.Framework.Media; -using WindowsPhoneSpeedyBlupi; -using static System.Net.Mime.MediaTypeNames; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public class Game1 : Game +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.Game1 +import com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi.GameData.GamerInfo; +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Content.ContentManager; +//import com.openeggbert.jxna.Microsoft.Xna.Framework.GamerServices;//todo remove me +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Touch.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Media.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Game; +//import static com.openeggbert.jdotnet.System.Net.Mime.MediaTypeNames.*; +import lombok.Getter; +import lombok.Setter; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.readonly; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; + +@namespace(name = "WindowsPhoneSpeedyBlupi") + + public class Game1 extends Game { - private static readonly double[] waitTable = new double[24] + private static @readonly final double[] waitTable = new double[] { 0.1, 7.0, 0.2, 20.0, 0.25, 22.0, 0.45, 50.0, 0.6, 53.0, 0.65, 58.0, 0.68, 60.0, 0.8, 70.0, 0.84, 75.0, 0.9, 84.0, 0.94, 91.0, 1.0, 100.0 }; - private static readonly Def.ButtonGlygh[] cheatGeste = new Def.ButtonGlygh[10] + private static @readonly final Def.ButtonGlygh[] cheatGeste = new Def.ButtonGlygh[] { Def.ButtonGlygh.Cheat12, Def.ButtonGlygh.Cheat22, @@ -34,17 +43,17 @@ namespace WindowsPhoneSpeedyBlupi Def.ButtonGlygh.Cheat32 }; - private readonly GraphicsDeviceManager graphics; + private @readonly final GraphicsDeviceManager graphics; - private readonly Pixmap pixmap; + private @readonly final Pixmap pixmap; - private readonly Sound sound; + private @readonly final Sound sound; - private readonly Decor decor; + private @readonly final Decor decor; - private readonly InputPad inputPad; + private @readonly final InputPad inputPad; - private readonly GameData gameData; + private @readonly final GameData gameData; private Def.Phase phase; @@ -64,51 +73,45 @@ namespace WindowsPhoneSpeedyBlupi private double waitProgress; - private bool isTrialMode; + private boolean isTrialMode; - private bool simulateTrialMode; + private boolean simulateTrialMode; - private bool playSetup; + private boolean playSetup; private int phaseTime; private Def.Phase fadeOutPhase; private int fadeOutMission; + + public boolean IsRankingMode() {return false;} - public bool IsRankingMode + public boolean IsTrialMode() { - get - { - return false; - } - } - - public bool IsTrialMode - { - get - { + if (!simulateTrialMode) { return isTrialMode; } return true; - } + } public Game1() { - Exiting += OnExiting; - if(!TouchPanel.GetCapabilities().IsConnected) + + Exiting().addEventListener((e)-> this.OnExiting(this, new ExitingEventArgs())); + if(!TouchPanel.GetCapabilities().IsConnected()) { - this.IsMouseVisible = true; + this.setMouseVisible(true); Mouse.SetCursor(MouseCursor.Arrow); } graphics = new GraphicsDeviceManager(this); - graphics.IsFullScreen = false; - base.Content.RootDirectory = "Content"; - base.TargetElapsedTime = TimeSpan.FromTicks(500000L); - base.InactiveSleepTime = TimeSpan.FromSeconds(1.0); + graphics.setFullScreen(false); + super.getContent().setRootDirectory("Content"); + super.setTargetElapsedTime(TimeSpan.FromTicks(500000L)); + super.setInactiveSleepTime(TimeSpan.FromSeconds(1.0d)); missionToStart1 = -1; missionToStart2 = -1; gameData = new GameData(); @@ -116,36 +119,33 @@ namespace WindowsPhoneSpeedyBlupi sound = new Sound(this, gameData); decor = new Decor(); decor.Create(sound, pixmap, gameData); - TinyPoint pos = new TinyPoint - { - X = 196, - Y = 426 - }; + TinyPoint pos = new TinyPoint(196,426); waitJauge = new Jauge(); waitJauge.Create(pixmap, sound, pos, 3, false); waitJauge.SetHide(false); - waitJauge.Zoom = 2.0; + waitJauge.setZoom(2.0); phase = Def.Phase.None; fadeOutPhase = Def.Phase.None; inputPad = new InputPad(this, decor, pixmap, sound, gameData); SetPhase(Def.Phase.First); } - protected override void Initialize() - { - base.Initialize(); + @Override + protected void Initialize() { + super.Initialize(); } - protected override void LoadContent() - { + @Override + protected void LoadContent() { pixmap.BackgroundCache("wait"); } - protected override void UnloadContent() - { + @Override + protected void UnloadContent() { } - protected override void OnDeactivated(object sender, EventArgs args) + @Override + protected void OnDeactivated(Object sender, EventArgs args) { if (phase == Def.Phase.Play) { @@ -155,21 +155,23 @@ namespace WindowsPhoneSpeedyBlupi { decor.CurrentDelete(); } - base.OnDeactivated(sender, args); + super.OnDeactivated(sender, args); } - protected override void OnActivated(object sender, EventArgs args) + @Override + protected void OnActivated(Object sender, EventArgs args) { continueMission = 1; - base.OnActivated(sender, args); + super.OnActivated(sender, args); } - protected void OnExiting(object sender, EventArgs args) + protected void OnExiting(Object sender, EventArgs args) { decor.CurrentDelete(); } - protected override void Update(GameTime gameTime) + @Override + protected void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) { @@ -192,7 +194,7 @@ namespace WindowsPhoneSpeedyBlupi return; } phaseTime++; - if (fadeOutPhase != 0) + if (fadeOutPhase != Def.Phase.None) { if (phaseTime >= 20) { @@ -211,7 +213,7 @@ namespace WindowsPhoneSpeedyBlupi pixmap.LoadContent(); sound.LoadContent(); gameData.Read(); - inputPad.PixmapOrigin = pixmap.Origin; + inputPad.PixmapOrigin = pixmap.Origin(); SetPhase(Def.Phase.Wait); return; } @@ -226,7 +228,7 @@ namespace WindowsPhoneSpeedyBlupi return; } } - long num = gameTime.TotalGameTime.Ticks - startTime.Ticks; + long num = gameTime.TotalGameTime.Ticks() - startTime.Ticks(); waitProgress = (double)num / 50000000.0; if (waitProgress > 1.0) { @@ -235,41 +237,41 @@ namespace WindowsPhoneSpeedyBlupi return; } inputPad.Update(); - Def.ButtonGlygh buttonPressed = inputPad.ButtonPressed; - if (buttonPressed >= Def.ButtonGlygh.InitGamerA && buttonPressed <= Def.ButtonGlygh.InitGamerC) + Def.ButtonGlygh buttonPressed = inputPad.ButtonPressed(); + if (buttonPressed.ordinal()>= Def.ButtonGlygh.InitGamerA.ordinal() && buttonPressed.ordinal() <= Def.ButtonGlygh.InitGamerC.ordinal()) { - SetGamer((int)(buttonPressed - 1)); + SetGamer((int)(buttonPressed.ordinal() - 1)); return; } switch (buttonPressed) { - case Def.ButtonGlygh.InitSetup: + case InitSetup: SetPhase(Def.Phase.MainSetup); return; - case Def.ButtonGlygh.PauseSetup: + case PauseSetup: SetPhase(Def.Phase.PlaySetup); return; - case Def.ButtonGlygh.SetupSounds: - gameData.Sounds = !gameData.Sounds; + case SetupSounds: + gameData.setSounds(!gameData.Sounds()); gameData.Write(); return; - case Def.ButtonGlygh.SetupJump: - gameData.JumpRight = !gameData.JumpRight; + case SetupJump: + gameData.setJumpRight(!gameData.JumpRight()); gameData.Write(); return; - case Def.ButtonGlygh.SetupZoom: - gameData.AutoZoom = !gameData.AutoZoom; + case SetupZoom: + gameData.setAutoZoom(!gameData.AutoZoom()); gameData.Write(); return; - case Def.ButtonGlygh.SetupAccel: - gameData.AccelActive = !gameData.AccelActive; + case SetupAccel: + gameData.setAccelActive(!gameData.AccelActive()); gameData.Write(); return; - case Def.ButtonGlygh.SetupReset: + case SetupReset: gameData.Reset(); gameData.Write(); return; - case Def.ButtonGlygh.SetupReturn: + case SetupReturn: if (playSetup) { SetPhase(Def.Phase.Play, -1); @@ -279,57 +281,57 @@ namespace WindowsPhoneSpeedyBlupi SetPhase(Def.Phase.Init); } return; - case Def.ButtonGlygh.InitPlay: + case InitPlay: SetPhase(Def.Phase.Play, 1); return; - case Def.ButtonGlygh.PlayPause: + case PlayPause: SetPhase(Def.Phase.Pause); return; - case Def.ButtonGlygh.WinLostReturn: - case Def.ButtonGlygh.PauseMenu: - case Def.ButtonGlygh.ResumeMenu: + case WinLostReturn: + case PauseMenu: + case ResumeMenu: SetPhase(Def.Phase.Init); break; } switch (buttonPressed) { - case Def.ButtonGlygh.ResumeContinue: + case ResumeContinue: ContinueMission(); return; - case Def.ButtonGlygh.InitBuy: - case Def.ButtonGlygh.TrialBuy: + case InitBuy: + case TrialBuy: MarketPlace.Show(PlayerIndex.One); SetPhase(Def.Phase.Init); return; - case Def.ButtonGlygh.InitRanking: + case InitRanking: SetPhase(Def.Phase.Ranking); return; - case Def.ButtonGlygh.TrialCancel: - case Def.ButtonGlygh.RankingContinue: + case TrialCancel: + case RankingContinue: SetPhase(Def.Phase.Init); return; - case Def.ButtonGlygh.PauseBack: + case PauseBack: MissionBack(); return; - case Def.ButtonGlygh.PauseRestart: + case PauseRestart: SetPhase(Def.Phase.Play, mission); return; - case Def.ButtonGlygh.PauseContinue: + case PauseContinue: SetPhase(Def.Phase.Play, -1); return; - case Def.ButtonGlygh.Cheat11: - case Def.ButtonGlygh.Cheat12: - case Def.ButtonGlygh.Cheat21: - case Def.ButtonGlygh.Cheat22: - case Def.ButtonGlygh.Cheat31: - case Def.ButtonGlygh.Cheat32: + case Cheat11: + case Cheat12: + case Cheat21: + case Cheat22: + case Cheat31: + case Cheat32: if (buttonPressed == cheatGeste[cheatGesteIndex]) { cheatGesteIndex++; - if (cheatGesteIndex == cheatGeste.Length) + if (cheatGesteIndex == cheatGeste.length) { cheatGesteIndex = 0; - inputPad.ShowCheatMenu = true; + inputPad.setShowCheatMenu(true); } } else @@ -338,13 +340,13 @@ namespace WindowsPhoneSpeedyBlupi } break; default: - if (buttonPressed != 0) + if (buttonPressed.ordinal() != 0) { cheatGesteIndex = 0; } break; } - if (buttonPressed >= Def.ButtonGlygh.Cheat1 && buttonPressed <= Def.ButtonGlygh.Cheat9) + if (buttonPressed.ordinal() >= Def.ButtonGlygh.Cheat1.ordinal() && buttonPressed.ordinal() <= Def.ButtonGlygh.Cheat9.ordinal()) { CheatAction(buttonPressed); } @@ -369,7 +371,7 @@ namespace WindowsPhoneSpeedyBlupi StartMission(num2); } } - base.Update(gameTime); + super.Update(gameTime); } private void MissionBack() @@ -386,7 +388,7 @@ namespace WindowsPhoneSpeedyBlupi private void StartMission(int mission) { - if (mission > 20 && mission % 10 > 1 && IsTrialMode) + if (mission > 20 && mission % 10 > 1 && IsTrialMode()) { SetPhase(Def.Phase.Trial); return; @@ -394,15 +396,15 @@ namespace WindowsPhoneSpeedyBlupi this.mission = mission; if (this.mission != 1) { - gameData.LastWorld = this.mission / 10; + gameData.setLastWorld(this.mission / 10); } decor.Read(0, this.mission, false); decor.LoadImages(); decor.SetMission(this.mission); - decor.SetNbVies(gameData.NbVies); + decor.SetNbVies(gameData.NbVies()); decor.InitializeDoors(gameData); decor.AdaptDoors(false); - decor.MainSwitchInitialize(gameData.LastWorld); + decor.MainSwitchInitialize(gameData.LastWorld()); decor.PlayPrepare(false); decor.StartSound(); inputPad.StartMission(this.mission); @@ -414,7 +416,7 @@ namespace WindowsPhoneSpeedyBlupi mission = decor.GetMission(); if (mission != 1) { - gameData.LastWorld = mission / 10; + gameData.setLastWorld(mission / 10); } decor.LoadImages(); decor.StartSound(); @@ -425,37 +427,38 @@ namespace WindowsPhoneSpeedyBlupi { switch (glyph) { - case Def.ButtonGlygh.Cheat1: + case Cheat1: decor.CheatAction(Tables.CheatCodes.OpenDoors); break; - case Def.ButtonGlygh.Cheat2: + case Cheat2: decor.CheatAction(Tables.CheatCodes.SuperBlupi); break; - case Def.ButtonGlygh.Cheat3: + case Cheat3: decor.CheatAction(Tables.CheatCodes.ShowSecret); break; - case Def.ButtonGlygh.Cheat4: + case Cheat4: decor.CheatAction(Tables.CheatCodes.LayEgg); break; - case Def.ButtonGlygh.Cheat5: + case Cheat5: gameData.Reset(); break; - case Def.ButtonGlygh.Cheat6: + case Cheat6: simulateTrialMode = !simulateTrialMode; break; - case Def.ButtonGlygh.Cheat7: + case Cheat7: decor.CheatAction(Tables.CheatCodes.CleanAll); break; - case Def.ButtonGlygh.Cheat8: + case Cheat8: decor.CheatAction(Tables.CheatCodes.AllTreasure); break; - case Def.ButtonGlygh.Cheat9: + case Cheat9: decor.CheatAction(Tables.CheatCodes.EndGoal); break; } } - protected override void Draw(GameTime gameTime) + @Override + protected void Draw(GameTime gameTime) { if (continueMission == 1) { @@ -489,20 +492,20 @@ namespace WindowsPhoneSpeedyBlupi { DrawWaitProgress(); } - base.Draw(gameTime); + super.Draw(gameTime); } private void DrawBackgroundFade() { if (phase == Def.Phase.Init) { - double num = Math.Min((double)phaseTime / 20.0, 1.0); + double num = Math_.Min((double)phaseTime / 20.0, 1.0); TinyRect rect; double opacity; if (fadeOutPhase == Def.Phase.MainSetup) { num = (1.0 - num) * (1.0 - num); - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = (int)(720.0 - 640.0 * num); tinyRect.Right = (int)(1360.0 - 640.0 * num); tinyRect.Top = 0; @@ -512,8 +515,8 @@ namespace WindowsPhoneSpeedyBlupi } else { - num = ((fadeOutPhase != 0) ? (1.0 - num * 2.0) : (1.0 - (1.0 - num) * (1.0 - num))); - TinyRect tinyRect2 = default(TinyRect); + num = ((fadeOutPhase.ordinal() != 0) ? (1.0 - num * 2.0) : (1.0 - (1.0 - num) * (1.0 - num))); + TinyRect tinyRect2 = default_(new TinyRect()); tinyRect2.Left = 80; tinyRect2.Right = 720; tinyRect2.Top = (int)(-160.0 + num * 160.0); @@ -525,7 +528,7 @@ namespace WindowsPhoneSpeedyBlupi } if (phase == Def.Phase.Init) { - double num = Math.Min((double)phaseTime / 20.0, 1.0); + double num = Math_.Min((double)phaseTime / 20.0, 1.0); double opacity; if (fadeOutPhase == Def.Phase.MainSetup) { @@ -534,15 +537,16 @@ namespace WindowsPhoneSpeedyBlupi } else if (fadeOutPhase == Def.Phase.None) { + num = 0.5 + num / 2.0; - opacity = Math.Min(num * num, 1.0); + opacity = Math_.Min(num * num, 1.0); } else { opacity = 1.0 - num; num = 1.0 + num * 10.0; } - TinyRect tinyRect3 = default(TinyRect); + TinyRect tinyRect3 = default_(new 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); @@ -554,10 +558,10 @@ namespace WindowsPhoneSpeedyBlupi { if (fadeOutPhase == Def.Phase.Play) { - double num = Math.Min((double)phaseTime / 20.0, 1.0); + double num = Math_.Min((double)phaseTime / 20.0, 1.0); double opacity = 1.0 - num; num = 1.0 + num * 10.0; - TinyRect tinyRect4 = default(TinyRect); + TinyRect tinyRect4 = default_(new 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); @@ -567,9 +571,9 @@ namespace WindowsPhoneSpeedyBlupi } else if (fadeOutPhase == Def.Phase.PlaySetup) { - double num = Math.Min((double)phaseTime / 20.0, 1.0); + double num = Math_.Min((double)phaseTime / 20.0, 1.0); num *= num; - TinyRect tinyRect5 = default(TinyRect); + TinyRect tinyRect5 = default_(new TinyRect()); tinyRect5.Left = (int)(213.0 + 800.0 * num); tinyRect5.Right = (int)(623.0 + 800.0 * num); tinyRect5.Top = 0; @@ -582,14 +586,14 @@ namespace WindowsPhoneSpeedyBlupi double num; if (fadeOutPhase == Def.Phase.None) { - num = Math.Min((double)phaseTime / 15.0, 1.0); + num = Math_.Min((double)phaseTime / 15.0, 1.0); } else { - num = Math.Min((double)phaseTime / 15.0, 1.0); + num = Math_.Min((double)phaseTime / 15.0, 1.0); num = 1.0 - num; } - TinyRect tinyRect6 = default(TinyRect); + TinyRect tinyRect6 = default_(new 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); @@ -600,7 +604,7 @@ namespace WindowsPhoneSpeedyBlupi { rotation = (1.0 - num) * (1.0 - num) * 360.0 * 1.0; } - if (rect.Width > 0 && rect.Height > 0) + if (rect.Width() > 0 && rect.Height() > 0) { pixmap.DrawIcon(16, 0, rect, 1.0, rotation, false); } @@ -608,7 +612,7 @@ namespace WindowsPhoneSpeedyBlupi } if (phase == Def.Phase.MainSetup || phase == Def.Phase.PlaySetup) { - double num = Math.Min((double)phaseTime / 20.0, 1.0); + double num = Math_.Min((double)phaseTime / 20.0, 1.0); num = 1.0 - (1.0 - num) * (1.0 - num); double num2; if (phaseTime < 20) @@ -620,25 +624,25 @@ namespace WindowsPhoneSpeedyBlupi { num2 = 1.0 + ((double)phaseTime - 20.0) / 400.0; } - if (fadeOutPhase != 0) + if (fadeOutPhase.ordinal() != 0) { num = 1.0 - num; num2 = 1.0 - num2; } - TinyRect tinyRect7 = default(TinyRect); + TinyRect tinyRect7 = default_(new TinyRect()); tinyRect7.Left = (int)(720.0 - 640.0 * num); tinyRect7.Right = (int)(1360.0 - 640.0 * num); tinyRect7.Top = 0; tinyRect7.Bottom = 160; TinyRect rect = tinyRect7; pixmap.DrawIcon(15, 0, rect, num * num, false); - TinyRect tinyRect8 = default(TinyRect); + TinyRect tinyRect8 = default_(new TinyRect()); tinyRect8.Left = 487; tinyRect8.Right = 713; tinyRect8.Top = 148; tinyRect8.Bottom = 374; TinyRect rect2 = tinyRect8; - TinyRect tinyRect9 = default(TinyRect); + TinyRect tinyRect9 = default_(new TinyRect()); tinyRect9.Left = 118; tinyRect9.Right = 570; tinyRect9.Top = 268; @@ -651,8 +655,8 @@ namespace WindowsPhoneSpeedyBlupi } if (phase == Def.Phase.Lost) { - double num = Math.Min((double)phaseTime / 100.0, 1.0); - TinyRect tinyRect10 = default(TinyRect); + double num = Math_.Min((double)phaseTime / 100.0, 1.0); + TinyRect tinyRect10 = default_(new 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); @@ -663,15 +667,15 @@ namespace WindowsPhoneSpeedyBlupi { rotation = (1.0 - num) * (1.0 - num) * 360.0 * 6.0; } - if (rect.Width > 0 && rect.Height > 0) + if (rect.Width() > 0 && rect.Height() > 0) { pixmap.DrawIcon(16, 0, rect, 1.0, rotation, false); } } if (phase == Def.Phase.Win) { - double num = Math.Sin((double)phaseTime / 3.0) / 2.0 + 1.0; - TinyRect tinyRect11 = default(TinyRect); + double num = Math_.Sin((double)phaseTime / 3.0) / 2.0 + 1.0; + TinyRect tinyRect11 = default_(new 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); @@ -685,20 +689,20 @@ namespace WindowsPhoneSpeedyBlupi { if (phase == Def.Phase.Init) { - TinyRect drawBounds = pixmap.DrawBounds; - int width = drawBounds.Width; - int height = drawBounds.Height; - TinyRect tinyRect = default(TinyRect); + TinyRect drawBounds = pixmap.DrawBounds(); + int width = drawBounds.Width(); + int height = drawBounds.Height(); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = 10; tinyRect.Right = 260; tinyRect.Top = height - 325; tinyRect.Bottom = height - 10; TinyRect rect = tinyRect; pixmap.DrawIcon(14, 15, rect, 0.3, false); - TinyRect tinyRect2 = default(TinyRect); + TinyRect tinyRect2 = default_(new TinyRect()); tinyRect2.Left = width - 170; tinyRect2.Right = width - 10; - tinyRect2.Top = height - ((IsTrialMode || IsRankingMode) ? 325 : 195); + tinyRect2.Top = height - ((IsTrialMode() || IsRankingMode()) ? 325 : 195); tinyRect2.Bottom = height - 10; rect = tinyRect2; pixmap.DrawIcon(14, 15, rect, 0.3, false); @@ -714,11 +718,11 @@ namespace WindowsPhoneSpeedyBlupi DrawButtonGamerText(Def.ButtonGlygh.InitGamerC, 2); DrawTextUnderButton(Def.ButtonGlygh.InitPlay, MyResource.TX_BUTTON_PLAY); DrawTextRightButton(Def.ButtonGlygh.InitSetup, MyResource.TX_BUTTON_SETUP); - if (IsTrialMode) + if (IsTrialMode()) { DrawTextUnderButton(Def.ButtonGlygh.InitBuy, MyResource.TX_BUTTON_BUY); } - if (IsRankingMode) + if (IsRankingMode()) { DrawTextUnderButton(Def.ButtonGlygh.InitRanking, MyResource.TX_BUTTON_RANKING); } @@ -750,13 +754,13 @@ namespace WindowsPhoneSpeedyBlupi DrawTextRightButton(Def.ButtonGlygh.SetupAccel, MyResource.TX_BUTTON_SETUP_ACCEL); if (phase == Def.Phase.MainSetup) { - string text = string.Format(MyResource.LoadString(MyResource.TX_BUTTON_SETUP_RESET), new string((char)(65 + gameData.SelectedGamer), 1)); + String text = string.Format(MyResource.LoadString(MyResource.TX_BUTTON_SETUP_RESET), new string((char)(65 + gameData.SelectedGamer()), 1)); DrawTextRightButton(Def.ButtonGlygh.SetupReset, text); } } if (phase == Def.Phase.Trial) { - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = 360; tinyPoint.Y = 50; TinyPoint pos = tinyPoint; @@ -783,31 +787,32 @@ namespace WindowsPhoneSpeedyBlupi private void DrawButtonGamerText(Def.ButtonGlygh glyph, int gamer) { TinyRect buttonRect = inputPad.GetButtonRect(glyph); - int nbVies; - int mainDoors; - 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; + + GamerInfo gamerInfo = gameData.GetGamerInfo(gamer); + int nbVies = gamerInfo.nbVies; + int mainDoors = gamerInfo.mainDoors; + int secondaryDoors = gamerInfo.secondaryDoors; + TinyPoint tinyPoint = default_(new TinyPoint()); + tinyPoint.X = buttonRect.Right + 5 - pixmap.Origin().X; + tinyPoint.Y = buttonRect.Top + 3 - pixmap.Origin().Y; TinyPoint pos = tinyPoint; - string text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_TITLE), new string((char)(65 + gamer), 1)); + 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; + TinyPoint tinyPoint2 = default_(new TinyPoint()); + tinyPoint2.X = buttonRect.Right + 5 - pixmap.Origin().X; + tinyPoint2.Y = buttonRect.Top + 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; + TinyPoint tinyPoint3 = default_(new TinyPoint()); + tinyPoint3.X = buttonRect.Right + 5 - pixmap.Origin().X; + tinyPoint3.Y = buttonRect.Top + 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; + TinyPoint tinyPoint4 = default_(new TinyPoint()); + tinyPoint4.X = buttonRect.Right + 5 - pixmap.Origin().X; + tinyPoint4.Y = buttonRect.Top + 53 - pixmap.Origin().Y; pos = tinyPoint4; text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_LIFES), nbVies); Text.DrawText(pixmap, pos, text, 0.45); @@ -818,15 +823,15 @@ namespace WindowsPhoneSpeedyBlupi DrawTextRightButton(glyph, MyResource.LoadString(res)); } - private void DrawTextRightButton(Def.ButtonGlygh glyph, string text) + private void DrawTextRightButton(Def.ButtonGlygh glyph, String text) { TinyRect buttonRect = inputPad.GetButtonRect(glyph); - string[] array = text.Split('\n'); - if (array.Length == 2) + String[] array = text.split("\n"); + 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 tinyPoint = default_(new TinyPoint()); + tinyPoint.X = buttonRect.Right + 10 - pixmap.Origin().X; + tinyPoint.Y = (buttonRect.Top + buttonRect.Bottom) / 2 - 20 - pixmap.Origin().Y; TinyPoint pos = tinyPoint; Text.DrawText(pixmap, pos, array[0], 0.7); pos.Y += 24; @@ -834,9 +839,9 @@ 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; + TinyPoint tinyPoint2 = default_(new TinyPoint()); + tinyPoint2.X = buttonRect.Right + 10 - pixmap.Origin().X; + tinyPoint2.Y = (buttonRect.Top + buttonRect.Bottom) / 2 - 8 - pixmap.Origin().Y; TinyPoint pos2 = tinyPoint2; Text.DrawText(pixmap, pos2, text, 0.7); } @@ -845,11 +850,11 @@ namespace WindowsPhoneSpeedyBlupi private void DrawTextUnderButton(Def.ButtonGlygh glyph, int res) { 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 tinyPoint = default_(new TinyPoint()); + tinyPoint.X = (buttonRect.Left + buttonRect.Right) / 2 - pixmap.Origin().X; + tinyPoint.Y = buttonRect.Bottom + 2 - pixmap.Origin().Y; TinyPoint pos = tinyPoint; - string text = MyResource.LoadString(res); + String text = MyResource.LoadString(res); Text.DrawTextCenter(pixmap, pos, text, 0.7); } @@ -859,7 +864,7 @@ namespace WindowsPhoneSpeedyBlupi { return; } - for (int i = 0; i < waitTable.Length; i++) + for (int i = 0; i < waitTable.length; i++) { if (waitProgress <= waitTable[i * 2]) { @@ -872,16 +877,16 @@ namespace WindowsPhoneSpeedyBlupi private void DrawDebug() { - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = 10; tinyPoint.Y = 20; TinyPoint pos = tinyPoint; - Text.DrawText(pixmap, pos, inputPad.TotalTouch.ToString(), 1.0); + Text.DrawText(pixmap, pos, Integer.valueOf(inputPad.TotalTouch()).toString(), 1.0); } private void SetGamer(int gamer) { - gameData.SelectedGamer = gamer; + gameData.setSelectedGamer(gamer); gameData.Write(); } @@ -930,31 +935,31 @@ namespace WindowsPhoneSpeedyBlupi decor.StopSound(); switch (this.phase) { - case Def.Phase.Init: + case Init: pixmap.BackgroundCache("init"); break; - case Def.Phase.Pause: - case Def.Phase.Resume: + case Pause: + case Resume: pixmap.BackgroundCache("pause"); break; - case Def.Phase.Lost: + case Lost: pixmap.BackgroundCache("lost"); break; - case Def.Phase.Win: + case Win: pixmap.BackgroundCache("win"); break; - case Def.Phase.MainSetup: - case Def.Phase.PlaySetup: + case MainSetup: + case PlaySetup: pixmap.BackgroundCache("setup"); break; - case Def.Phase.Trial: + case Trial: pixmap.BackgroundCache("trial"); break; - case Def.Phase.Ranking: + case Ranking: pixmap.BackgroundCache("pause"); break; - case Def.Phase.Play: - decor.DrawBounds = pixmap.DrawBounds; + case Play: + decor.setDrawBounds(pixmap.DrawBounds()); break; } if (this.phase == Def.Phase.Play && mission > 0) @@ -965,7 +970,7 @@ namespace WindowsPhoneSpeedyBlupi private void MemorizeGamerProgress() { - gameData.NbVies = decor.GetNbVies(); + gameData.setNbVies(decor.GetNbVies()); decor.MemorizeDoors(gameData); gameData.Write(); } @@ -978,6 +983,5 @@ namespace WindowsPhoneSpeedyBlupi { this.graphics.ToggleFullScreen(); } - public bool IsFullScreen() { return this.graphics.IsFullScreen; } + public boolean IsFullScreen() { return this.graphics.IsFullScreen(); } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/GameData.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/GameData.java index d6ad1ee..69499c7 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/GameData.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/GameData.java @@ -1,131 +1,125 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.GameData -using System; -using WindowsPhoneSpeedyBlupi; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.GameData +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.readonly; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; + + @namespace(name = "WindowsPhoneSpeedyBlupi") public class GameData { - private static readonly int HeaderLength = 10; + private static @readonly final int HeaderLength = 10; - private static readonly int DoorsLength = 200; + private static @readonly final int DoorsLength = 200; - private static readonly int GamerLength = 10 + DoorsLength; + private static @readonly final int GamerLength = 10 + DoorsLength; - private static readonly int MaxGamer = 3; + private static @readonly final int MaxGamer = 3; - private static readonly int TotalLength = HeaderLength + GamerLength * MaxGamer; + private static @readonly final int TotalLength = HeaderLength + GamerLength * MaxGamer; - private readonly byte[] data; + private @readonly final byte[] data; - public int SelectedGamer - { - get - { - return data[2]; - } - set - { - data[2] = (byte)value; - } + public int SelectedGamer() { + return getSelectedGamer(); + } + public int getSelectedGamer() { + return data[2]; } - public bool Sounds - { - get - { - return data[3] == 1; - } - set - { - data[3] = (byte)(value ? 1u : 0u); - } + public void setSelectedGamer(int value) { + data[2] = (byte) value; } - public bool JumpRight - { - get - { - return data[4] == 1; - } - set - { - data[4] = (byte)(value ? 1u : 0u); - } + + public boolean Sounds() { + return isSounds(); + } + public boolean isSounds() { + return data[3] == 1; } - public bool AutoZoom - { - get - { - return data[5] == 1; - } - set - { - data[5] = (byte)(value ? 1u : 0u); - } + public void setSounds(boolean value) { + data[3] = (byte) (value ? 1 : 0); + } + public boolean JumpRight() { + return isJumpRight(); + } + public boolean isJumpRight() { + return data[4] == 1; } - public bool AccelActive - { - get - { - return data[6] == 1; - } - set - { - data[6] = (byte)(value ? 1u : 0u); - } + public void setJumpRight(boolean value) { + data[4] = (byte) (value ? 1 : 0); } - public double AccelSensitivity - { - get - { - return (double)(int)data[7] / 100.0; - } - set - { - value = Math.Max(value, 0.0); - value = Math.Min(value, 1.0); - data[7] = (byte)(value * 100.0); - } + public boolean AutoZoom() { + return isAutoZoom(); + } + public boolean isAutoZoom() { + return data[5] == 1; } - public int NbVies - { - get - { - return data[GamerOffset]; - } - set - { - data[GamerOffset] = (byte)value; - } + public void setAutoZoom(boolean value) { + data[5] = (byte) (value ? 1 : 0); + } + public boolean AccelActive() { + return isAccelActive(); + } + public boolean isAccelActive() { + return data[6] == 1; } - public int LastWorld - { - get - { - return data[GamerOffset + 1]; - } - set - { - data[GamerOffset + 1] = (byte)value; - } + public void setAccelActive(boolean value) { + data[6] = (byte) (value ? 1 : 0); } - private int GamerOffset - { - get - { - return GetGamerOffset(SelectedGamer); - } + public double AccelSensitivity() { + return getAccelSensitivity(); + } + public double getAccelSensitivity() { + return (double) (int) data[7] / 100.0; } + public void setAccelSensitivity(double value) { + value = Math_.Max(value, 0.0); + value = Math_.Min(value, 1.0); + data[7] = (byte) (value * 100.0); + } + + public int NbVies() { + return getNbVies(); + } + public int getNbVies() { + return data[getGamerOffset()]; + } + + public void setNbVies(int value) { + data[getGamerOffset()] = (byte) value; + } + public int LastWorld() { + return getLastWorld(); + } + public int getLastWorld() { + return data[getGamerOffset() + 1]; + } + + public void setLastWorld(int value) { + data[getGamerOffset() + 1] = (byte) value; + } + + private int getGamerOffset() { + return GetGamerOffset(getSelectedGamer()); + } + private int getGamerOffset(int gamer) { + return GetGamerOffset(gamer); + } + + + + public GameData() { data = new byte[TotalLength]; @@ -144,14 +138,14 @@ namespace WindowsPhoneSpeedyBlupi public void Reset() { - Initialize(SelectedGamer); + Initialize(getSelectedGamer()); } public void GetDoors(int[] doors) { for (int i = 0; i < DoorsLength; i++) { - doors[i] = data[GamerOffset + 10 + i]; + doors[i] = data[getGamerOffset() + 10 + i]; } } @@ -159,29 +153,41 @@ namespace WindowsPhoneSpeedyBlupi { for (int i = 0; i < DoorsLength; i++) { - data[GamerOffset + 10 + i] = (byte)doors[i]; + data[getGamerOffset() + 10 + i] = (byte)doors[i]; } } - public void GetGamerInfo(int gamer, out int nbVies, out int mainDoors, out int secondaryDoors) - { - nbVies = data[GetGamerOffset(gamer)]; - secondaryDoors = 0; - for (int i = 0; i < 180; i++) - { - if (data[GetGamerOffset(gamer) + 10 + i] == 1) - { + static class GamerInfo { + + public int nbVies; + public int mainDoors; + public int secondaryDoors; + + public GamerInfo(int nbVies, int mainDoors, int secondaryDoors) { + this.nbVies = nbVies; + this.mainDoors = mainDoors; + this.secondaryDoors = secondaryDoors; + } + } + public GamerInfo GetGamerInfo(int gamer/*, @Out int nbVies, @Out int mainDoors, @Out int secondaryDoors*/) { + int nbVies = data[getGamerOffset(gamer)]; + int secondaryDoors = 0; + + for (int i = 0; i < 180; i++) { + if (data[getGamerOffset(gamer) + 10 + i] == 1) { secondaryDoors++; } } - mainDoors = 0; - for (int j = 180; j < 200; j++) - { - if (data[GetGamerOffset(gamer) + 10 + j] == 1) - { + + int mainDoors = 0; + for (int j = 180; j < 200; j++) { + if (data[getGamerOffset(gamer) + 10 + j] == 1) { mainDoors++; } } + + return new GamerInfo(nbVies, mainDoors, secondaryDoors); + } private void Initialize() @@ -194,7 +200,7 @@ namespace WindowsPhoneSpeedyBlupi data[5] = 1; data[6] = 0; data[7] = 50; - SelectedGamer = 0; + setSelectedGamer(0); for (int i = 0; i < MaxGamer; i++) { Initialize(i); @@ -217,4 +223,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/InputPad.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/InputPad.java index 322256a..2dbfd5f 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/InputPad.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/InputPad.java @@ -1,39 +1,55 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.InputPad -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using Microsoft.Xna.Framework.Input; -using Microsoft.Xna.Framework.Input.Touch; -using WindowsPhoneSpeedyBlupi; -using static WindowsPhoneSpeedyBlupi.Def; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.InputPad +import com.openeggbert.jdotnet.System.UnauthorizedAccessException; +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jdotnet.System.Collections.Generic.*; +import com.openeggbert.jdotnet.System.Diagnostics.*; +import com.openeggbert.jdotnet.System.Linq.*; +import static com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi.Def.*; +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jdotnet.JDotNet.Microsoft.Devices.Sensors.AccelerometerFailedException; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.ButtonState; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Keyboard; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.KeyboardState; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Keys; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Mouse; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.MouseState; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Touch.TouchCollection; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Touch.TouchLocation; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Touch.TouchLocationState; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Input.Touch.TouchPanel; +import lombok.Getter; +import lombok.Setter; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.readonly; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; + + @namespace(name = "WindowsPhoneSpeedyBlupi") -namespace WindowsPhoneSpeedyBlupi -{ public class InputPad { - private static readonly int padSize = 140; + private static @readonly final int padSize = 140; - private readonly Game1 game1; + private @readonly final Game1 game1; - private readonly Decor decor; + private @readonly final Decor decor; - private readonly Pixmap pixmap; + private @readonly final Pixmap pixmap; - private readonly Sound sound; + private @readonly final Sound sound; - private readonly GameData gameData; + private @readonly final GameData gameData; - private readonly List pressedGlyphs; + private @readonly final List_ pressedGlyphs; - private readonly Accelerometer accelSensor; + private @readonly final Accelerometer accelSensor; - private readonly Slider accelSlider; + private @readonly final Slider accelSlider; - private bool padPressed; + private boolean padPressed; - private bool showCheatMenu; + private boolean showCheatMenu; private TinyPoint padTouchPos; @@ -43,166 +59,163 @@ namespace WindowsPhoneSpeedyBlupi private int touchCount; - private bool accelStarted; + private boolean accelStarted; - private bool accelActive; + private boolean accelActive; private double accelSpeedX; - private bool accelLastState; + private boolean accelLastState; - private bool accelWaitZero; + private boolean accelWaitZero; private int mission; - public Def.Phase Phase { get; set; } + @Getter @Setter + public Def.Phase Phase; + + @Getter @Setter + public int SelectedGamer; - public int SelectedGamer { get; set; } + @Getter @Setter + public TinyPoint PixmapOrigin; - public TinyPoint PixmapOrigin { get; set; } - - public int TotalTouch - { - get - { - return touchCount; - } + public int TotalTouch() { + return getTotalTouch(); } - public Def.ButtonGlygh ButtonPressed - { - get - { - Def.ButtonGlygh result = buttonPressed; - buttonPressed = Def.ButtonGlygh.None; - return result; - } + public int getTotalTouch() { + return touchCount; } - public bool ShowCheatMenu - { - get - { - return showCheatMenu; - } - set - { - showCheatMenu = value; - } + public Def.ButtonGlygh ButtonPressed() { + Def.ButtonGlygh result = buttonPressed; + buttonPressed = Def.ButtonGlygh.None; + return result; + } + + public boolean ShowCheatMenu() { + return isShowCheatMenu(); } - private IEnumerable ButtonGlyphs - { - get - { + public boolean isShowCheatMenu() { + return showCheatMenu; + } + + public void setShowCheatMenu(boolean showCheatMenu) { + this.showCheatMenu = showCheatMenu; + } + + public List_ ButtonGlyphs() { + List_ buttonGlyphs = new List_<>(); + switch (Phase) { - case Def.Phase.Init: - yield return Def.ButtonGlygh.InitGamerA; - yield return Def.ButtonGlygh.InitGamerB; - yield return Def.ButtonGlygh.InitGamerC; - yield return Def.ButtonGlygh.InitSetup; - yield return Def.ButtonGlygh.InitPlay; - if (game1.IsTrialMode) + case Init: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.InitGamerA); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.InitGamerB); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.InitGamerC); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.InitSetup); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.InitPlay); + if (game1.IsTrialMode()) { - yield return Def.ButtonGlygh.InitBuy; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.InitBuy); } - if (game1.IsRankingMode) + if (game1.IsRankingMode()) { - yield return Def.ButtonGlygh.InitRanking; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.InitRanking); } break; - case Def.Phase.Play: - yield return Def.ButtonGlygh.PlayPause; - yield return Def.ButtonGlygh.PlayAction; - yield return Def.ButtonGlygh.PlayJump; + case Play: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PlayPause); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PlayAction); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PlayJump); if (accelStarted) { - yield return Def.ButtonGlygh.PlayDown; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PlayDown); } - yield return Def.ButtonGlygh.Cheat11; - yield return Def.ButtonGlygh.Cheat12; - yield return Def.ButtonGlygh.Cheat21; - yield return Def.ButtonGlygh.Cheat22; - yield return Def.ButtonGlygh.Cheat31; - yield return Def.ButtonGlygh.Cheat32; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat11); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat12); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat21); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat22); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat31); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat32); break; - case Def.Phase.Pause: - yield return Def.ButtonGlygh.PauseMenu; + case Pause: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PauseMenu); if (mission != 1) { - yield return Def.ButtonGlygh.PauseBack; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PauseBack); } - yield return Def.ButtonGlygh.PauseSetup; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PauseSetup); if (mission != 1 && mission % 10 != 0) { - yield return Def.ButtonGlygh.PauseRestart; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PauseRestart); } - yield return Def.ButtonGlygh.PauseContinue; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.PauseContinue); break; - case Def.Phase.Resume: - yield return Def.ButtonGlygh.ResumeMenu; - yield return Def.ButtonGlygh.ResumeContinue; + case Resume: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.ResumeMenu); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.ResumeContinue); break; - case Def.Phase.Lost: - case Def.Phase.Win: - yield return Def.ButtonGlygh.WinLostReturn; + case Lost: + case Win: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.WinLostReturn); break; - case Def.Phase.Trial: - yield return Def.ButtonGlygh.TrialBuy; - yield return Def.ButtonGlygh.TrialCancel; + case Trial: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.TrialBuy); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.TrialCancel); break; - case Def.Phase.MainSetup: - yield return Def.ButtonGlygh.SetupSounds; - yield return Def.ButtonGlygh.SetupJump; - yield return Def.ButtonGlygh.SetupZoom; - yield return Def.ButtonGlygh.SetupAccel; - yield return Def.ButtonGlygh.SetupReset; - yield return Def.ButtonGlygh.SetupReturn; + case MainSetup: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupSounds); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupJump); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupZoom); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupAccel); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupReset); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupReturn); break; - case Def.Phase.PlaySetup: - yield return Def.ButtonGlygh.SetupSounds; - yield return Def.ButtonGlygh.SetupJump; - yield return Def.ButtonGlygh.SetupZoom; - yield return Def.ButtonGlygh.SetupAccel; - yield return Def.ButtonGlygh.SetupReturn; + case PlaySetup: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupSounds); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupJump); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupZoom); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupAccel); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.SetupReturn); break; - case Def.Phase.Ranking: - yield return Def.ButtonGlygh.RankingContinue; + case Ranking: + buttonGlyphs.YieldReturn(Def.ButtonGlygh.RankingContinue); break; } if (showCheatMenu) { - yield return Def.ButtonGlygh.Cheat1; - yield return Def.ButtonGlygh.Cheat2; - yield return Def.ButtonGlygh.Cheat3; - yield return Def.ButtonGlygh.Cheat4; - yield return Def.ButtonGlygh.Cheat5; - yield return Def.ButtonGlygh.Cheat6; - yield return Def.ButtonGlygh.Cheat7; - yield return Def.ButtonGlygh.Cheat8; - yield return Def.ButtonGlygh.Cheat9; + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat1); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat2); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat3); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat4); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat5); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat6); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat7); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat8); + buttonGlyphs.YieldReturn(Def.ButtonGlygh.Cheat9); } - } + return buttonGlyphs; + } - private TinyPoint PadCenter + private TinyPoint PadCenter() { - get - { - TinyRect drawBounds = pixmap.DrawBounds; - if (gameData.JumpRight) + TinyRect drawBounds = pixmap.DrawBounds(); + if (gameData.isJumpRight()) { - TinyPoint result = default(TinyPoint); + TinyPoint result = default_(new TinyPoint()); result.X = 100; - result.Y = drawBounds.Height - 100; + result.Y = drawBounds.Height() - 100; return result; } - TinyPoint result2 = default(TinyPoint); - result2.X = drawBounds.Width - 100; - result2.Y = drawBounds.Height - 100; + TinyPoint result2 = default_(new TinyPoint()); + result2.X = drawBounds.Width() - 100; + result2.Y = drawBounds.Height() - 100; return result2; - } + } public InputPad(Game1 game1, Decor decor, Pixmap pixmap, Sound sound, GameData gameData) @@ -214,18 +227,13 @@ namespace WindowsPhoneSpeedyBlupi this.pixmap = pixmap; this.sound = sound; this.gameData = gameData; - pressedGlyphs = new List(); + pressedGlyphs = new List_<>(); accelSensor = AccelerometerFactory.Create(); - accelSensor.CurrentValueChanged += HandleAccelSensorCurrentValueChanged; - accelSlider = new Slider - { - TopLeftCorner = new TinyPoint - { - X = 320, - Y = 400 - }, - Value = this.gameData.AccelSensitivity - }; + accelSensor.CurrentValueChanged().addEventListener((e) -> HandleAccelSensorCurrentValueChanged(null, e)); + accelSlider = new Slider( + new TinyPoint(320,400), + this.gameData.AccelSensitivity() + ); lastButtonDown = Def.ButtonGlygh.None; buttonPressed = Def.ButtonGlygh.None; } @@ -246,9 +254,9 @@ namespace WindowsPhoneSpeedyBlupi public void Update() { pressedGlyphs.Clear(); - if (accelActive != gameData.AccelActive) + if (accelActive != gameData.AccelActive()) { - accelActive = gameData.AccelActive; + accelActive = gameData.AccelActive(); if (accelActive) { StartAccel(); @@ -265,12 +273,12 @@ namespace WindowsPhoneSpeedyBlupi Def.ButtonGlygh buttonGlygh = Def.ButtonGlygh.None; TouchCollection touches = TouchPanel.GetState(); touchCount = touches.Count; - List touchesOrClicks = new List(); - foreach (TouchLocation item in touches) + List_ touchesOrClicks = new List_<>(); + for (TouchLocation item : touches) { if (item.State == TouchLocationState.Pressed || item.State == TouchLocationState.Moved) { - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = (int)item.Position.X; tinyPoint.Y = (int)item.Position.Y; touchesOrClicks.Add(tinyPoint); @@ -278,12 +286,12 @@ namespace WindowsPhoneSpeedyBlupi } MouseState mouseState = Mouse.GetState(); - if (mouseState.LeftButton == ButtonState.Pressed) + if (mouseState.LeftButton() == ButtonState.Pressed) { touchCount++; TinyPoint click = new TinyPoint(); - click.X = mouseState.X; - click.Y = mouseState.Y; + click.X = mouseState.X(); + click.Y = mouseState.Y(); touchesOrClicks.Add(click); } @@ -306,7 +314,7 @@ namespace WindowsPhoneSpeedyBlupi Boolean keyPressedDown = false; Boolean keyPressedLeft = false; Boolean keyPressedRight = false; - foreach (TinyPoint touchOrClick in touchesOrClicks) + for (TinyPoint touchOrClick : touchesOrClicks) { Boolean keyboardPressed = false; if (touchOrClick.X == -1) @@ -321,7 +329,7 @@ namespace WindowsPhoneSpeedyBlupi { TinyPoint tinyPoint2 = keyboardPressed ? createTinyPoint(1, 1) : touchOrClick; - if (!accelStarted && Misc.IsInside(GetPadBounds(PadCenter, padSize), tinyPoint2)) + if (!accelStarted && Misc.IsInside(GetPadBounds(PadCenter(), padSize), tinyPoint2)) { padPressed = true; padTouchPos = tinyPoint2; @@ -333,7 +341,7 @@ namespace WindowsPhoneSpeedyBlupi Debug.WriteLine("padPressed=" + padPressed); Def.ButtonGlygh buttonGlygh2 = ButtonDetect(tinyPoint2); Debug.WriteLine("buttonGlyph2 =" + buttonGlygh2); - if (buttonGlygh2 != 0) + if (buttonGlygh2.ordinal() != 0) { pressedGlyphs.Add(buttonGlygh2); } @@ -341,67 +349,67 @@ namespace WindowsPhoneSpeedyBlupi { switch (keyboardPress) { - case KeyboardPress.LeftControl: buttonGlygh2 = Def.ButtonGlygh.PlayJump; pressedGlyphs.Add(buttonGlygh2); break; - case KeyboardPress.Space: buttonGlygh2 = Def.ButtonGlygh.PlayAction; pressedGlyphs.Add(buttonGlygh2); break; + case LeftControl: buttonGlygh2 = Def.ButtonGlygh.PlayJump; pressedGlyphs.Add(buttonGlygh2); break; + case Space: buttonGlygh2 = Def.ButtonGlygh.PlayAction; pressedGlyphs.Add(buttonGlygh2); break; } } if ((Phase == Def.Phase.MainSetup || Phase == Def.Phase.PlaySetup) && accelSlider.Move(tinyPoint2)) { - gameData.AccelSensitivity = accelSlider.Value; + gameData.setAccelSensitivity(accelSlider.Value); } switch (buttonGlygh2) { - case Def.ButtonGlygh.PlayJump: + case PlayJump: Debug.WriteLine("Jumping detected"); accelWaitZero = false; num3 |= 1; break; - case Def.ButtonGlygh.PlayDown: + case PlayDown: accelWaitZero = false; num3 |= 4; break; - case Def.ButtonGlygh.InitGamerA: - case Def.ButtonGlygh.InitGamerB: - case Def.ButtonGlygh.InitGamerC: - case Def.ButtonGlygh.InitSetup: - case Def.ButtonGlygh.InitPlay: - case Def.ButtonGlygh.InitBuy: - case Def.ButtonGlygh.InitRanking: - case Def.ButtonGlygh.WinLostReturn: - case Def.ButtonGlygh.TrialBuy: - case Def.ButtonGlygh.TrialCancel: - case Def.ButtonGlygh.SetupSounds: - case Def.ButtonGlygh.SetupJump: - case Def.ButtonGlygh.SetupZoom: - case Def.ButtonGlygh.SetupAccel: - case Def.ButtonGlygh.SetupReset: - case Def.ButtonGlygh.SetupReturn: - case Def.ButtonGlygh.PauseMenu: - case Def.ButtonGlygh.PauseBack: - case Def.ButtonGlygh.PauseSetup: - case Def.ButtonGlygh.PauseRestart: - case Def.ButtonGlygh.PauseContinue: - case Def.ButtonGlygh.PlayPause: - case Def.ButtonGlygh.PlayAction: - case Def.ButtonGlygh.ResumeMenu: - case Def.ButtonGlygh.ResumeContinue: - case Def.ButtonGlygh.RankingContinue: - case Def.ButtonGlygh.Cheat11: - case Def.ButtonGlygh.Cheat12: - case Def.ButtonGlygh.Cheat21: - case Def.ButtonGlygh.Cheat22: - case Def.ButtonGlygh.Cheat31: - case Def.ButtonGlygh.Cheat32: - case Def.ButtonGlygh.Cheat1: - case Def.ButtonGlygh.Cheat2: - case Def.ButtonGlygh.Cheat3: - case Def.ButtonGlygh.Cheat4: - case Def.ButtonGlygh.Cheat5: - case Def.ButtonGlygh.Cheat6: - case Def.ButtonGlygh.Cheat7: - case Def.ButtonGlygh.Cheat8: - case Def.ButtonGlygh.Cheat9: + case InitGamerA: + case InitGamerB: + case InitGamerC: + case InitSetup: + case InitPlay: + case InitBuy: + case InitRanking: + case WinLostReturn: + case TrialBuy: + case TrialCancel: + case SetupSounds: + case SetupJump: + case SetupZoom: + case SetupAccel: + case SetupReset: + case SetupReturn: + case PauseMenu: + case PauseBack: + case PauseSetup: + case PauseRestart: + case PauseContinue: + case PlayPause: + case PlayAction: + case ResumeMenu: + case ResumeContinue: + case RankingContinue: + case Cheat11: + case Cheat12: + case Cheat21: + case Cheat22: + case Cheat31: + case Cheat32: + case Cheat1: + case Cheat2: + case Cheat3: + case Cheat4: + case Cheat5: + case Cheat6: + case Cheat7: + case Cheat8: + case Cheat9: accelWaitZero = false; buttonGlygh = buttonGlygh2; showCheatMenu = false; @@ -409,23 +417,23 @@ namespace WindowsPhoneSpeedyBlupi } } } - if (buttonGlygh != 0 && buttonGlygh != Def.ButtonGlygh.PlayAction && buttonGlygh != Def.ButtonGlygh.Cheat11 && buttonGlygh != Def.ButtonGlygh.Cheat12 && buttonGlygh != Def.ButtonGlygh.Cheat21 && buttonGlygh != Def.ButtonGlygh.Cheat22 && buttonGlygh != Def.ButtonGlygh.Cheat31 && buttonGlygh != Def.ButtonGlygh.Cheat32 && lastButtonDown == Def.ButtonGlygh.None) + if (buttonGlygh.ordinal() != 0 && buttonGlygh != Def.ButtonGlygh.PlayAction && buttonGlygh != Def.ButtonGlygh.Cheat11 && buttonGlygh != Def.ButtonGlygh.Cheat12 && buttonGlygh != Def.ButtonGlygh.Cheat21 && buttonGlygh != Def.ButtonGlygh.Cheat22 && buttonGlygh != Def.ButtonGlygh.Cheat31 && buttonGlygh != Def.ButtonGlygh.Cheat32 && lastButtonDown == Def.ButtonGlygh.None) { - TinyPoint tinyPoint3 = default(TinyPoint); + TinyPoint tinyPoint3 = default_(new TinyPoint()); tinyPoint3.X = 320; tinyPoint3.Y = 240; TinyPoint pos = tinyPoint3; sound.PlayImage(0, pos); } - if (buttonGlygh == Def.ButtonGlygh.None && lastButtonDown != 0) + if (buttonGlygh == Def.ButtonGlygh.None && lastButtonDown.ordinal() != 0) { buttonPressed = lastButtonDown; } lastButtonDown = buttonGlygh; if (padPressed) { - Debug.WriteLine("PadCenter.X=" + PadCenter.X); - Debug.WriteLine("PadCenter.Y=" + PadCenter.Y); + Debug.WriteLine("PadCenter.X=" + PadCenter().X); + Debug.WriteLine("PadCenter.Y=" + PadCenter().Y); Debug.WriteLine("padTouchPos.X=" + padTouchPos.X); Debug.WriteLine("padTouchPos.Y=" + padTouchPos.Y); Debug.WriteLine("keyPressedUp=" + keyPressedUp); @@ -435,32 +443,32 @@ namespace WindowsPhoneSpeedyBlupi { if (keyPressedUp) { - padTouchPos.Y = PadCenter.Y - 30; - padTouchPos.X = PadCenter.X; - if (keyPressedLeft) padTouchPos.X = PadCenter.X - 30; - if (keyPressedRight) padTouchPos.X = PadCenter.X + 30; + padTouchPos.Y = PadCenter().Y - 30; + padTouchPos.X = PadCenter().X; + if (keyPressedLeft) padTouchPos.X = PadCenter().X - 30; + if (keyPressedRight) padTouchPos.X = PadCenter().X + 30; } if (keyPressedDown) { - padTouchPos.Y = PadCenter.Y + 30; - padTouchPos.X = PadCenter.X; - if (keyPressedLeft) padTouchPos.X = PadCenter.X - 30; - if (keyPressedRight) padTouchPos.X = PadCenter.X + 30; + padTouchPos.Y = PadCenter().Y + 30; + padTouchPos.X = PadCenter().X; + if (keyPressedLeft) padTouchPos.X = PadCenter().X - 30; + if (keyPressedRight) padTouchPos.X = PadCenter().X + 30; } if (keyPressedLeft) { - padTouchPos.X = PadCenter.X - 30; - padTouchPos.Y = PadCenter.Y; - if (keyPressedUp) padTouchPos.Y = PadCenter.Y - 30; - if (keyPressedDown) padTouchPos.Y = PadCenter.Y + 30; + padTouchPos.X = PadCenter().X - 30; + padTouchPos.Y = PadCenter().Y; + if (keyPressedUp) padTouchPos.Y = PadCenter().Y - 30; + if (keyPressedDown) padTouchPos.Y = PadCenter().Y + 30; } if (keyPressedRight) { - padTouchPos.X = PadCenter.X + 30; - padTouchPos.Y = PadCenter.Y; - if (keyPressedUp) padTouchPos.Y = PadCenter.Y - 30; - if (keyPressedDown) padTouchPos.Y = PadCenter.Y + 30; + padTouchPos.X = PadCenter().X + 30; + padTouchPos.Y = PadCenter().Y; + if (keyPressedUp) padTouchPos.Y = PadCenter().Y - 30; + if (keyPressedDown) padTouchPos.Y = PadCenter().Y + 30; } } - double horizontalPosition = padTouchPos.X - PadCenter.X; - double verticalPosition = padTouchPos.Y - PadCenter.Y; + double horizontalPosition = padTouchPos.X - PadCenter().X; + double verticalPosition = padTouchPos.Y - PadCenter().Y; if (horizontalPosition > 20.0) { @@ -490,7 +498,7 @@ namespace WindowsPhoneSpeedyBlupi { horizontalChange = accelSpeedX; verticalChange = 0.0; - if (((uint)num3 & 4u) != 0) + if ((num3 & 4) != 0) { verticalChange = 1.0; } @@ -502,7 +510,7 @@ namespace WindowsPhoneSpeedyBlupi private Def.ButtonGlygh ButtonDetect(TinyPoint pos) { - foreach (Def.ButtonGlygh item in ButtonGlyphs.Reverse()) + for (Def.ButtonGlygh item : ButtonGlyphs().Reverse()) { int value = 0; if (item == Def.ButtonGlygh.PlayJump || item == Def.ButtonGlygh.PlayAction || item == Def.ButtonGlygh.PlayDown || item == Def.ButtonGlygh.PlayPause) @@ -522,38 +530,38 @@ namespace WindowsPhoneSpeedyBlupi { if (!accelStarted && Phase == Def.Phase.Play) { - pixmap.DrawIcon(14, 0, GetPadBounds(PadCenter, padSize / 2), 1.0, false); - TinyPoint center = (padPressed ? padTouchPos : PadCenter); + pixmap.DrawIcon(14, 0, GetPadBounds(PadCenter(), padSize / 2), 1.0, false); + TinyPoint center = (padPressed ? padTouchPos : PadCenter()); pixmap.DrawIcon(14, 1, GetPadBounds(center, padSize / 2), 1.0, false); } - foreach (Def.ButtonGlygh buttonGlyph in ButtonGlyphs) + for (Def.ButtonGlygh buttonGlyph : ButtonGlyphs()) { - bool pressed = pressedGlyphs.Contains(buttonGlyph); - bool selected = false; - if (buttonGlyph >= Def.ButtonGlygh.InitGamerA && buttonGlyph <= Def.ButtonGlygh.InitGamerC) + boolean pressed = pressedGlyphs.Contains(buttonGlyph); + boolean selected = false; + if (buttonGlyph.ordinal() >= Def.ButtonGlygh.InitGamerA.ordinal() && buttonGlyph.ordinal() <= Def.ButtonGlygh.InitGamerC.ordinal()) { - int num = (int)(buttonGlyph - 1); - selected = num == gameData.SelectedGamer; + int num = (int)(buttonGlyph.ordinal() - 1); + selected = num == gameData.SelectedGamer(); } if (buttonGlyph == Def.ButtonGlygh.SetupSounds) { - selected = gameData.Sounds; + selected = gameData.Sounds(); } if (buttonGlyph == Def.ButtonGlygh.SetupJump) { - selected = gameData.JumpRight; + selected = gameData.JumpRight(); } if (buttonGlyph == Def.ButtonGlygh.SetupZoom) { - selected = gameData.AutoZoom; + selected = gameData.AutoZoom(); } if (buttonGlyph == Def.ButtonGlygh.SetupAccel) { - selected = gameData.AccelActive; + selected = gameData.AccelActive(); } pixmap.DrawInputButton(GetButtonRect(buttonGlyph), buttonGlyph, pressed, selected); } - if ((Phase == Def.Phase.MainSetup || Phase == Def.Phase.PlaySetup) && gameData.AccelActive) + if ((Phase == Def.Phase.MainSetup || Phase == Def.Phase.PlaySetup) && gameData.AccelActive()) { accelSlider.Draw(pixmap); } @@ -561,7 +569,7 @@ namespace WindowsPhoneSpeedyBlupi private TinyRect GetPadBounds(TinyPoint center, int radius) { - TinyRect result = default(TinyRect); + TinyRect result = default_(new TinyRect()); result.Left = center.X - radius; result.Right = center.X + radius; result.Top = center.Y - radius; @@ -571,16 +579,16 @@ namespace WindowsPhoneSpeedyBlupi public TinyRect GetButtonRect(Def.ButtonGlygh glyph) { - TinyRect drawBounds = pixmap.DrawBounds; - double num = drawBounds.Width; - double num2 = drawBounds.Height; + TinyRect drawBounds = pixmap.DrawBounds(); + double num = drawBounds.Width(); + double num2 = drawBounds.Height(); double num3 = num2 / 5.0; double num4 = num2 * 140.0 / 480.0; double num5 = num2 / 3.5; - if (glyph >= Def.ButtonGlygh.Cheat1 && glyph <= Def.ButtonGlygh.Cheat9) + if (glyph.ordinal() >= Def.ButtonGlygh.Cheat1.ordinal()&& glyph.ordinal() <= Def.ButtonGlygh.Cheat9.ordinal()) { - int num6 = (int)(glyph - 35); - TinyRect result = default(TinyRect); + int num6 = (int)(glyph.ordinal() - 35); + TinyRect result = default_(new TinyRect()); result.Left = 80 * num6; result.Right = 80 * (num6 + 1); result.Top = 0; @@ -589,325 +597,325 @@ namespace WindowsPhoneSpeedyBlupi } switch (glyph) { - case Def.ButtonGlygh.InitGamerA: + case InitGamerA: { - TinyRect result19 = default(TinyRect); + TinyRect result19 = default_(new 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); return result19; } - case Def.ButtonGlygh.InitGamerB: + case InitGamerB: { - TinyRect result18 = default(TinyRect); + TinyRect result18 = default_(new 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); return result18; } - case Def.ButtonGlygh.InitGamerC: + case InitGamerC: { - TinyRect result15 = default(TinyRect); + TinyRect result15 = default_(new 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); return result15; } - case Def.ButtonGlygh.InitSetup: + case InitSetup: { - TinyRect result14 = default(TinyRect); + TinyRect result14 = default_(new 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); return result14; } - case Def.ButtonGlygh.InitPlay: + case InitPlay: { - TinyRect result11 = default(TinyRect); + TinyRect result11 = default_(new 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); return result11; } - case Def.ButtonGlygh.InitBuy: - case Def.ButtonGlygh.InitRanking: + case InitBuy: + case InitRanking: { - TinyRect result10 = default(TinyRect); + TinyRect result10 = default_(new 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); return result10; } - case Def.ButtonGlygh.PauseMenu: + case PauseMenu: { - TinyRect result37 = default(TinyRect); + TinyRect result37 = default_(new 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); return result37; } - case Def.ButtonGlygh.PauseBack: + case PauseBack: { - TinyRect result36 = default(TinyRect); + TinyRect result36 = default_(new 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); return result36; } - case Def.ButtonGlygh.PauseSetup: + case PauseSetup: { - TinyRect result35 = default(TinyRect); + TinyRect result35 = default_(new 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); return result35; } - case Def.ButtonGlygh.PauseRestart: + case PauseRestart: { - TinyRect result34 = default(TinyRect); + TinyRect result34 = default_(new 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); return result34; } - case Def.ButtonGlygh.PauseContinue: + case PauseContinue: { - TinyRect result33 = default(TinyRect); + TinyRect result33 = default_(new 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); return result33; } - case Def.ButtonGlygh.ResumeMenu: + case ResumeMenu: { - TinyRect result32 = default(TinyRect); + TinyRect result32 = default_(new 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); return result32; } - case Def.ButtonGlygh.ResumeContinue: + case ResumeContinue: { - TinyRect result31 = default(TinyRect); + TinyRect result31 = default_(new 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); return result31; } - case Def.ButtonGlygh.WinLostReturn: + case WinLostReturn: { - TinyRect result30 = default(TinyRect); + TinyRect result30 = default_(new 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); return result30; } - case Def.ButtonGlygh.TrialBuy: + case TrialBuy: { - TinyRect result29 = default(TinyRect); + TinyRect result29 = default_(new 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); return result29; } - case Def.ButtonGlygh.TrialCancel: + case TrialCancel: { - TinyRect result28 = default(TinyRect); + TinyRect result28 = default_(new 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); return result28; } - case Def.ButtonGlygh.RankingContinue: + case RankingContinue: { - TinyRect result27 = default(TinyRect); + TinyRect result27 = default_(new 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); return result27; } - case Def.ButtonGlygh.SetupSounds: + case SetupSounds: { - TinyRect result26 = default(TinyRect); + TinyRect result26 = default_(new 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); return result26; } - case Def.ButtonGlygh.SetupJump: + case SetupJump: { - TinyRect result25 = default(TinyRect); + TinyRect result25 = default_(new 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); return result25; } - case Def.ButtonGlygh.SetupZoom: + case SetupZoom: { - TinyRect result24 = default(TinyRect); + TinyRect result24 = default_(new 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); return result24; } - case Def.ButtonGlygh.SetupAccel: + case SetupAccel: { - TinyRect result23 = default(TinyRect); + TinyRect result23 = default_(new 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); return result23; } - case Def.ButtonGlygh.SetupReset: + case SetupReset: { - TinyRect result22 = default(TinyRect); + TinyRect result22 = default_(new 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); return result22; } - case Def.ButtonGlygh.SetupReturn: + case SetupReturn: { - TinyRect result21 = default(TinyRect); + TinyRect result21 = default_(new 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); return result21; } - case Def.ButtonGlygh.PlayPause: + case PlayPause: { - TinyRect result20 = default(TinyRect); + TinyRect result20 = default_(new 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); return result20; } - case Def.ButtonGlygh.PlayAction: + case PlayAction: { - if (gameData.JumpRight) + 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); + TinyRect result16 = default_(new 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); return result16; } - TinyRect result17 = default(TinyRect); + TinyRect result17 = default_(new 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); return result17; } - case Def.ButtonGlygh.PlayJump: + case PlayJump: { - if (gameData.JumpRight) + 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); + TinyRect result12 = default_(new 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); return result12; } - TinyRect result13 = default(TinyRect); + TinyRect result13 = default_(new 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); return result13; } - case Def.ButtonGlygh.PlayDown: + case PlayDown: { - if (gameData.JumpRight) + if (gameData.JumpRight()) { - TinyRect result8 = default(TinyRect); + TinyRect result8 = default_(new 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); return result8; } - TinyRect result9 = default(TinyRect); - result9.Left = (int)((double)drawBounds.Width - num3 * 1.2); - result9.Right = (int)((double)drawBounds.Width - num3 * 0.2); + TinyRect result9 = default_(new 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); return result9; } - case Def.ButtonGlygh.Cheat11: + case Cheat11: { - TinyRect result7 = default(TinyRect); + TinyRect result7 = default_(new 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); return result7; } - case Def.ButtonGlygh.Cheat12: + case Cheat12: { - TinyRect result6 = default(TinyRect); + TinyRect result6 = default_(new 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); return result6; } - case Def.ButtonGlygh.Cheat21: + case Cheat21: { - TinyRect result5 = default(TinyRect); + TinyRect result5 = default_(new 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); return result5; } - case Def.ButtonGlygh.Cheat22: + case Cheat22: { - TinyRect result4 = default(TinyRect); + TinyRect result4 = default_(new 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); return result4; } - case Def.ButtonGlygh.Cheat31: + case Cheat31: { - TinyRect result3 = default(TinyRect); + TinyRect result3 = default_(new 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); return result3; } - case Def.ButtonGlygh.Cheat32: + case Cheat32: { - TinyRect result2 = default(TinyRect); + TinyRect result2 = default_(new TinyRect()); result2.Left = (int)(num5 * 2.0); result2.Right = (int)(num5 * 3.0); result2.Top = (int)(num5 * 1.0); @@ -915,7 +923,7 @@ namespace WindowsPhoneSpeedyBlupi return result2; } default: - return default(TinyRect); + return default_(new TinyRect()); } } @@ -926,11 +934,11 @@ namespace WindowsPhoneSpeedyBlupi accelSensor.Start(); accelStarted = true; } - catch (AccelerometerFailedException) + catch (AccelerometerFailedException e) { accelStarted = false; } - catch (UnauthorizedAccessException) + catch (UnauthorizedAccessException e) { accelStarted = false; } @@ -944,7 +952,7 @@ namespace WindowsPhoneSpeedyBlupi { accelSensor.Stop(); } - catch (AccelerometerFailedException) + catch (AccelerometerFailedException e) { } accelStarted = false; @@ -952,21 +960,21 @@ namespace WindowsPhoneSpeedyBlupi } - private void HandleAccelSensorCurrentValueChanged(object sender, AccelerometerEventArgs e) + private void HandleAccelSensorCurrentValueChanged(Object sender, AccelerometerEventArgs e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) - float y = e.Y; - float num = (1f - (float)gameData.AccelSensitivity) * 0.06f + 0.04f; + float y = e.Y(); + float num = (1f - (float)gameData.AccelSensitivity()) * 0.06f + 0.04f; float num2 = (accelLastState ? (num * 0.6f) : num); if (y > num2) { - accelSpeedX = 0.0 - Math.Min((double)y * 0.25 / (double)num + 0.25, 1.0); + accelSpeedX = 0.0 - Math_.Min((double)y * 0.25 / (double)num + 0.25, 1.0); } else if (y < 0f - num2) { - accelSpeedX = Math.Min((double)(0f - y) * 0.25 / (double)num + 0.25, 1.0); + accelSpeedX = Math_.Min((double)(0f - y) * 0.25 / (double)num + 0.25, 1.0); } else { @@ -987,4 +995,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Jauge.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Jauge.java index c479539..6459546 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Jauge.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Jauge.java @@ -1,17 +1,22 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Jauge -using Microsoft.Xna.Framework.Media; -using WindowsPhoneSpeedyBlupi; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.Jauge +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Media.*; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; + + + + @namespace(name = "WindowsPhoneSpeedyBlupi") -namespace WindowsPhoneSpeedyBlupi -{ public class Jauge { private Pixmap m_pixmap; private Sound m_sound; - private bool m_bHide; + private boolean m_bHide; private TinyPoint m_pos; @@ -21,24 +26,21 @@ namespace WindowsPhoneSpeedyBlupi private int m_level; - private bool m_bMinimizeRedraw; + private boolean m_bMinimizeRedraw; - private bool m_bRedraw; + private boolean m_bRedraw; private double m_zoom; - public double Zoom - { - get - { - return m_zoom; - } - set - { - m_zoom = value; - } + public double getZoom() { + return m_zoom; } + public void setZoom(double value) { + m_zoom = value; + } + + public Jauge() { m_mode = 0; @@ -48,7 +50,7 @@ namespace WindowsPhoneSpeedyBlupi m_zoom = 1.0; } - public bool Create(Pixmap pixmap, Sound sound, TinyPoint pos, int mode, bool bMinimizeRedraw) + public boolean Create(Pixmap pixmap, Sound sound, TinyPoint pos, int mode, boolean bMinimizeRedraw) { m_pixmap = pixmap; m_sound = sound; @@ -65,7 +67,7 @@ namespace WindowsPhoneSpeedyBlupi public void Draw() { - TinyRect rect = default(TinyRect); + TinyRect rect = default_(new TinyRect()); if (m_bMinimizeRedraw && !m_bRedraw) { return; @@ -131,12 +133,12 @@ namespace WindowsPhoneSpeedyBlupi m_mode = mode; } - public bool GetHide() + public boolean GetHide() { return m_bHide; } - public void SetHide(bool bHide) + public void SetHide(boolean bHide) { if (m_bHide != bHide) { @@ -156,4 +158,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MarketPlace.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MarketPlace.java index bdf362e..586820b 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MarketPlace.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MarketPlace.java @@ -1,13 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Xna.Framework; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +import com.openeggbert.jdotnet.System.Diagnostics.Debug; +import com.openeggbert.jxna.Microsoft.Xna.Framework.PlayerIndex; -namespace WindowsPhoneSpeedyBlupi -{ public class MarketPlace { public static void Show(PlayerIndex playerIndex) @@ -16,4 +11,3 @@ namespace WindowsPhoneSpeedyBlupi Debug.Write("The Market Place should be shown."); } } -} diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Misc.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Misc.java index d8ca51b..eab9203 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Misc.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Misc.java @@ -1,40 +1,49 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 // WindowsPhoneSpeedyBlupi.Misc -using System; -using Microsoft.Xna.Framework; -using WindowsPhoneSpeedyBlupi; -using static WindowsPhoneSpeedyBlupi.Def; +import com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi.Def.KeyboardPress; +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Rectangle; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.out; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.static_; -namespace WindowsPhoneSpeedyBlupi -{ - public static class Misc +@namespace(name = "WindowsPhoneSpeedyBlupi") +@static_ + public class Misc { + private Misc() { + //Not meant to be instantiated. + } public static Rectangle RotateAdjust(Rectangle rect, double angle) { - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = rect.Width / 2; tinyPoint.Y = rect.Height / 2; TinyPoint p = tinyPoint; TinyPoint tinyPoint2 = RotatePointRad(angle, p); int num = tinyPoint2.X - p.X; int num2 = tinyPoint2.Y - p.Y; - return new Rectangle(rect.Left - num, rect.Top - num2, rect.Width, rect.Height); + return new Rectangle(rect.Left() - num, rect.Top() - num2, rect.Width, rect.Height); } public static TinyPoint RotatePointRad(double angle, TinyPoint p) { - return RotatePointRad(default(TinyPoint), angle, p); + return RotatePointRad(default_(new TinyPoint()), angle, p); } public static TinyPoint RotatePointRad(TinyPoint center, double angle, TinyPoint p) { - TinyPoint tinyPoint = default(TinyPoint); - TinyPoint result = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); + TinyPoint result = default_(new TinyPoint()); tinyPoint.X = p.X - center.X; tinyPoint.Y = p.Y - center.Y; - double num = Math.Sin(angle); - double num2 = Math.Cos(angle); + double num = Math_.Sin(angle); + double num2 = Math_.Cos(angle); result.X = (int)((double)tinyPoint.X * num2 - (double)tinyPoint.Y * num); result.Y = (int)((double)tinyPoint.X * num + (double)tinyPoint.Y * num2); result.X += center.X; @@ -44,18 +53,18 @@ namespace WindowsPhoneSpeedyBlupi public static double DegToRad(double angle) { - return angle * Math.PI / 180.0; + return angle * Math_.PI / 180.0; } - public static int Approch(int actual, int final, int step) + public static int Approch(int actual, int finalValue, int step) { - if (actual < final) + if (actual < finalValue) { - actual = Math.Min(actual + step, final); + actual = Math_.Min(actual + step, finalValue); } - else if (actual > final) + else if (actual > finalValue) { - actual = Math.Max(actual - step, final); + actual = Math_.Max(actual - step, finalValue); } return actual; } @@ -64,18 +73,18 @@ namespace WindowsPhoneSpeedyBlupi { if (speed > 0.0) { - return Math.Max((int)(speed * (double)max), 1); + return Math_.Max((int)(speed * (double)max), 1); } if (speed < 0.0) { - return Math.Min((int)(speed * (double)max), -1); + return Math_.Min((int)(speed * (double)max), -1); } return 0; } public static TinyRect Inflate(TinyRect rect, int value) { - TinyRect result = default(TinyRect); + TinyRect result = default_(new TinyRect()); result.Left = rect.Left - value; result.Right = rect.Right + value; result.Top = rect.Top - value; @@ -83,7 +92,7 @@ namespace WindowsPhoneSpeedyBlupi return result; } - public static bool IsInside(TinyRect rect, TinyPoint p) + public static boolean IsInside(TinyRect rect, TinyPoint p) { if (p.X >= rect.Left && p.X <= rect.Right && p.Y >= rect.Top) { @@ -92,27 +101,28 @@ namespace WindowsPhoneSpeedyBlupi return false; } - public static bool IntersectRect(out TinyRect dst, TinyRect src1, TinyRect src2) + public static boolean 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 = default_(dst); + 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); return !IsRectEmpty(dst); } - public static bool UnionRect(out TinyRect dst, TinyRect src1, TinyRect src2) + public static boolean 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 = default_(dst); + 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); return !IsRectEmpty(dst); } - private static bool IsRectEmpty(TinyRect rect) + private static boolean IsRectEmpty(TinyRect rect) { if (rect.Left < rect.Right) { @@ -133,24 +143,23 @@ namespace WindowsPhoneSpeedyBlupi case 6: return KeyboardPress.Space; case 7: return KeyboardPress.Escape; case 8: return KeyboardPress.Pause; - default: throw new Exception("Unsupported number for KeyboardPress: " + i); + default: throw new Exception_("Unsupported number for KeyboardPress: " + i); } } public static int keyboardPressToInt(KeyboardPress kp) { switch (kp) { - case KeyboardPress.None: return 0; - case KeyboardPress.Up: return 1; - case KeyboardPress.Right: return 2; - case KeyboardPress.Down: return 3; - case KeyboardPress.Left: return 4; - case KeyboardPress.LeftControl: return 5; - case KeyboardPress.Space: return 6; - case KeyboardPress.Escape: return 7; - case KeyboardPress.Pause: return 8; - default: throw new Exception("Unsupported KeyboardPress: " + kp); + case None: return 0; + case Up: return 1; + case Right: return 2; + case Down: return 3; + case Left: return 4; + case LeftControl: return 5; + case Space: return 6; + case Escape: return 7; + case Pause: return 8; + default: throw new Exception_("Unsupported KeyboardPress: " + kp); } } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MyResource.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MyResource.java index 459d4e4..66a3bdc 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MyResource.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/MyResource.java @@ -1,287 +1,296 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 // WindowsPhoneSpeedyBlupi.MyResource -using System.Collections.Generic; -using System.Globalization; - -namespace WindowsPhoneSpeedyBlupi -{ - public static class MyResource +import com.openeggbert.jdotnet.System.Collections.Generic.*; +import com.openeggbert.jdotnet.System.Globalization.*; +import java.util.HashMap; +import java.util.Map; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.readonly; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.static_; +@namespace(name = "WindowsPhoneSpeedyBlupi") +@static_ + public class MyResource { - public static readonly int TX_BUTTON_PLAY; + private MyResource() { + //Not meant to be instantiated. + } + public static @readonly final int TX_BUTTON_PLAY; - public static readonly int TX_BUTTON_MENU; + public static @readonly final int TX_BUTTON_MENU; - public static readonly int TX_BUTTON_BACK; + public static @readonly final int TX_BUTTON_BACK; - public static readonly int TX_BUTTON_RESTART; + public static @readonly final int TX_BUTTON_RESTART; - public static readonly int TX_BUTTON_CONTINUE; + public static @readonly final int TX_BUTTON_CONTINUE; - public static readonly int TX_BUTTON_BUY; + public static @readonly final int TX_BUTTON_BUY; - public static readonly int TX_BUTTON_SETUP; + public static @readonly final int TX_BUTTON_SETUP; - public static readonly int TX_BUTTON_SETUP_SOUNDS; + public static @readonly final int TX_BUTTON_SETUP_SOUNDS; - public static readonly int TX_BUTTON_SETUP_JUMP; + public static @readonly final int TX_BUTTON_SETUP_JUMP; - public static readonly int TX_BUTTON_SETUP_ZOOM; + public static @readonly final int TX_BUTTON_SETUP_ZOOM; - public static readonly int TX_BUTTON_SETUP_ACCEL; + public static @readonly final int TX_BUTTON_SETUP_ACCEL; - public static readonly int TX_BUTTON_SETUP_RESET; + public static @readonly final int TX_BUTTON_SETUP_RESET; - public static readonly int TX_BUTTON_RANKING; + public static @readonly final int TX_BUTTON_RANKING; - public static readonly int TX_GAMER_TITLE; + public static @readonly final int TX_GAMER_TITLE; - public static readonly int TX_GAMER_MDOORS; + public static @readonly final int TX_GAMER_MDOORS; - public static readonly int TX_GAMER_SDOORS; + public static @readonly final int TX_GAMER_SDOORS; - public static readonly int TX_GAMER_LIFES; + public static @readonly final int TX_GAMER_LIFES; - public static readonly int TX_TRIAL1; + public static @readonly final int TX_TRIAL1; - public static readonly int TX_TRIAL2; + public static @readonly final int TX_TRIAL2; - public static readonly int TX_TRIAL3; + public static @readonly final int TX_TRIAL3; - public static readonly int TX_TRIAL4; + public static @readonly final int TX_TRIAL4; - public static readonly int TX_TRIAL5; + public static @readonly final int TX_TRIAL5; - public static readonly int TX_TRIAL6; + public static @readonly final int TX_TRIAL6; - public static readonly int TX_TRAINING101; + public static @readonly final int TX_TRAINING101; - public static readonly int TX_TRAINING102; + public static @readonly final int TX_TRAINING102; - public static readonly int TX_TRAINING103; + public static @readonly final int TX_TRAINING103; - public static readonly int TX_TRAINING104; + public static @readonly final int TX_TRAINING104; - public static readonly int TX_TRAINING105; + public static @readonly final int TX_TRAINING105; - public static readonly int TX_TRAINING106; + public static @readonly final int TX_TRAINING106; - public static readonly int TX_TRAINING107; + public static @readonly final int TX_TRAINING107; - public static readonly int TX_TRAINING108; + public static @readonly final int TX_TRAINING108; - public static readonly int TX_TRAINING109; + public static @readonly final int TX_TRAINING109; - public static readonly int TX_TRAINING110; + public static @readonly final int TX_TRAINING110; - public static readonly int TX_TRAINING111; + public static @readonly final int TX_TRAINING111; - public static readonly int TX_TRAINING112; + public static @readonly final int TX_TRAINING112; - public static readonly int TX_TRAINING113; + public static @readonly final int TX_TRAINING113; - public static readonly int TX_TRAINING114; + public static @readonly final int TX_TRAINING114; - public static readonly int TX_TRAINING115; + public static @readonly final int TX_TRAINING115; - public static readonly int TX_TRAINING116; + public static @readonly final int TX_TRAINING116; - public static readonly int TX_TRAINING117; + public static @readonly final int TX_TRAINING117; - public static readonly int TX_TRAINING118; + public static @readonly final int TX_TRAINING118; - public static readonly int TX_TRAINING119; + public static @readonly final int TX_TRAINING119; - public static readonly int TX_TRAINING120; + public static @readonly final int TX_TRAINING120; - public static readonly int TX_TRAINING121; + public static @readonly final int TX_TRAINING121; - public static readonly int TX_TRAINING122; + public static @readonly final int TX_TRAINING122; - public static readonly int TX_TRAINING123; + public static @readonly final int TX_TRAINING123; - public static readonly int TX_TRAINING201; + public static @readonly final int TX_TRAINING201; - public static readonly int TX_TRAINING202; + public static @readonly final int TX_TRAINING202; - public static readonly int TX_TRAINING203; + public static @readonly final int TX_TRAINING203; - public static readonly int TX_TRAINING204; + public static @readonly final int TX_TRAINING204; - public static readonly int TX_TRAINING205; + public static @readonly final int TX_TRAINING205; - public static readonly int TX_TRAINING206; + public static @readonly final int TX_TRAINING206; - public static readonly int TX_TRAINING207; + public static @readonly final int TX_TRAINING207; - public static readonly int TX_TRAINING208; + public static @readonly final int TX_TRAINING208; - public static readonly int TX_TRAINING209; + public static @readonly final int TX_TRAINING209; - public static readonly int TX_TRAINING210; + public static @readonly final int TX_TRAINING210; - public static readonly int TX_TRAINING301; + public static @readonly final int TX_TRAINING301; - public static readonly int TX_TRAINING302; + public static @readonly final int TX_TRAINING302; - public static readonly int TX_TRAINING303; + public static @readonly final int TX_TRAINING303; - public static readonly int TX_TRAINING304; + public static @readonly final int TX_TRAINING304; - public static readonly int TX_TRAINING305; + public static @readonly final int TX_TRAINING305; - public static readonly int TX_TRAINING306; + public static @readonly final int TX_TRAINING306; - public static readonly int TX_TRAINING307; + public static @readonly final int TX_TRAINING307; - public static readonly int TX_TRAINING308; + public static @readonly final int TX_TRAINING308; - public static readonly int TX_TRAINING309; + public static @readonly final int TX_TRAINING309; - public static readonly int TX_TRAINING310; + public static @readonly final int TX_TRAINING310; - public static readonly int TX_TRAINING311; + public static @readonly final int TX_TRAINING311; - public static readonly int TX_TRAINING401; + public static @readonly final int TX_TRAINING401; - public static readonly int TX_TRAINING402; + public static @readonly final int TX_TRAINING402; - public static readonly int TX_TRAINING403; + public static @readonly final int TX_TRAINING403; - public static readonly int TX_TRAINING404; + public static @readonly final int TX_TRAINING404; - public static readonly int TX_TRAINING405; + public static @readonly final int TX_TRAINING405; - public static readonly int TX_TRAINING406; + public static @readonly final int TX_TRAINING406; - public static readonly int TX_TRAINING407; + public static @readonly final int TX_TRAINING407; - public static readonly int TX_TRAINING408; + public static @readonly final int TX_TRAINING408; - public static readonly int TX_TRAINING409; + public static @readonly final int TX_TRAINING409; - public static readonly int TX_TRAINING410; + public static @readonly final int TX_TRAINING410; - public static readonly int TX_TRAINING101a; + public static @readonly final int TX_TRAINING101a; - public static readonly int TX_TRAINING102a; + public static @readonly final int TX_TRAINING102a; - public static readonly int TX_TRAINING103a; + public static @readonly final int TX_TRAINING103a; - public static readonly int TX_TRAINING104a; + public static @readonly final int TX_TRAINING104a; - public static readonly int TX_TRAINING105a; + public static @readonly final int TX_TRAINING105a; - public static readonly int TX_TRAINING106a; + public static @readonly final int TX_TRAINING106a; - public static readonly int TX_TRAINING107a; + public static @readonly final int TX_TRAINING107a; - public static readonly int TX_TRAINING108a; + public static @readonly final int TX_TRAINING108a; - public static readonly int TX_TRAINING109a; + public static @readonly final int TX_TRAINING109a; - public static readonly int TX_TRAINING110a; + public static @readonly final int TX_TRAINING110a; - public static readonly int TX_TRAINING111a; + public static @readonly final int TX_TRAINING111a; - public static readonly int TX_TRAINING112a; + public static @readonly final int TX_TRAINING112a; - public static readonly int TX_TRAINING113a; + public static @readonly final int TX_TRAINING113a; - public static readonly int TX_TRAINING114a; + public static @readonly final int TX_TRAINING114a; - public static readonly int TX_TRAINING115a; + public static @readonly final int TX_TRAINING115a; - public static readonly int TX_TRAINING116a; + public static @readonly final int TX_TRAINING116a; - public static readonly int TX_TRAINING117a; + public static @readonly final int TX_TRAINING117a; - public static readonly int TX_TRAINING118a; + public static @readonly final int TX_TRAINING118a; - public static readonly int TX_TRAINING119a; + public static @readonly final int TX_TRAINING119a; - public static readonly int TX_TRAINING120a; + public static @readonly final int TX_TRAINING120a; - public static readonly int TX_TRAINING121a; + public static @readonly final int TX_TRAINING121a; - public static readonly int TX_TRAINING122a; + public static @readonly final int TX_TRAINING122a; - public static readonly int TX_TRAINING123a; + public static @readonly final int TX_TRAINING123a; - public static readonly int TX_TRAINING201a; + public static @readonly final int TX_TRAINING201a; - public static readonly int TX_TRAINING202a; + public static @readonly final int TX_TRAINING202a; - public static readonly int TX_TRAINING203a; + public static @readonly final int TX_TRAINING203a; - public static readonly int TX_TRAINING204a; + public static @readonly final int TX_TRAINING204a; - public static readonly int TX_TRAINING205a; + public static @readonly final int TX_TRAINING205a; - public static readonly int TX_TRAINING206a; + public static @readonly final int TX_TRAINING206a; - public static readonly int TX_TRAINING207a; + public static @readonly final int TX_TRAINING207a; - public static readonly int TX_TRAINING208a; + public static @readonly final int TX_TRAINING208a; - public static readonly int TX_TRAINING209a; + public static @readonly final int TX_TRAINING209a; - public static readonly int TX_TRAINING210a; + public static @readonly final int TX_TRAINING210a; - public static readonly int TX_TRAINING301a; + public static @readonly final int TX_TRAINING301a; - public static readonly int TX_TRAINING302a; + public static @readonly final int TX_TRAINING302a; - public static readonly int TX_TRAINING303a; + public static @readonly final int TX_TRAINING303a; - public static readonly int TX_TRAINING304a; + public static @readonly final int TX_TRAINING304a; - public static readonly int TX_TRAINING305a; + public static @readonly final int TX_TRAINING305a; - public static readonly int TX_TRAINING306a; + public static @readonly final int TX_TRAINING306a; - public static readonly int TX_TRAINING307a; + public static @readonly final int TX_TRAINING307a; - public static readonly int TX_TRAINING308a; + public static @readonly final int TX_TRAINING308a; - public static readonly int TX_TRAINING309a; + public static @readonly final int TX_TRAINING309a; - public static readonly int TX_TRAINING310a; + public static @readonly final int TX_TRAINING310a; - public static readonly int TX_TRAINING311a; + public static @readonly final int TX_TRAINING311a; - public static readonly int TX_TRAINING401a; + public static @readonly final int TX_TRAINING401a; - public static readonly int TX_TRAINING402a; + public static @readonly final int TX_TRAINING402a; - public static readonly int TX_TRAINING403a; + public static @readonly final int TX_TRAINING403a; - public static readonly int TX_TRAINING404a; + public static @readonly final int TX_TRAINING404a; - public static readonly int TX_TRAINING405a; + public static @readonly final int TX_TRAINING405a; - public static readonly int TX_TRAINING406a; + public static @readonly final int TX_TRAINING406a; - public static readonly int TX_TRAINING407a; + public static @readonly final int TX_TRAINING407a; - public static readonly int TX_TRAINING408a; + public static @readonly final int TX_TRAINING408a; - public static readonly int TX_TRAINING409a; + public static @readonly final int TX_TRAINING409a; - public static readonly int TX_TRAINING410a; + public static @readonly final int TX_TRAINING410a; - private static Dictionary resources; + private static Map resources; - public static string LoadString(int res) + public static String LoadString(int res) { - string value; - if (resources.TryGetValue(res, out value)) - { + String value = resources.get(res); + if (value != null) { return value; } return "???"; + } - static MyResource() + static { TX_BUTTON_PLAY = 100; TX_BUTTON_MENU = 101; @@ -414,9 +423,9 @@ namespace WindowsPhoneSpeedyBlupi TX_TRAINING408a = 14007; TX_TRAINING409a = 14008; TX_TRAINING410a = 14009; - resources = new Dictionary(); - string text = CultureInfo.CurrentCulture.TwoLetterISOLanguageName.ToLower(); - string text2; + resources = new HashMap<>(); + String text = CultureInfo.getCurrentCulture().getTwoLetterISOLanguageName().toLowerCase(); + String text2; if ((text2 = text) != null && text2 == "fr") { InitializeFR(); @@ -429,348 +438,347 @@ namespace WindowsPhoneSpeedyBlupi private static void InitializeFR() { - resources.Add(TX_BUTTON_PLAY, "Jouer"); - resources.Add(TX_BUTTON_MENU, "Menu"); - resources.Add(TX_BUTTON_BACK, "Retour"); - resources.Add(TX_BUTTON_RESTART, "Recommencer"); - resources.Add(TX_BUTTON_CONTINUE, "Continuer"); - resources.Add(TX_BUTTON_BUY, "Acheter"); - resources.Add(TX_BUTTON_RANKING, "Classement"); - resources.Add(TX_BUTTON_SETUP, "Réglages"); - resources.Add(TX_BUTTON_SETUP_SOUNDS, "Bruitages"); - resources.Add(TX_BUTTON_SETUP_JUMP, "Bouton de saut à droite"); - resources.Add(TX_BUTTON_SETUP_ZOOM, "Zoom automatique sur l'action"); - resources.Add(TX_BUTTON_SETUP_ACCEL, "Accéléromètre"); - resources.Add(TX_BUTTON_SETUP_RESET, "Joueur {0} :\nEffacer la progression"); - resources.Add(TX_GAMER_TITLE, "Joueur {0}"); - resources.Add(TX_GAMER_MDOORS, "Portes principales : {0}/12"); - resources.Add(TX_GAMER_SDOORS, "Portes secondaires : {0}/52"); - resources.Add(TX_GAMER_LIFES, "Blupi : {0}"); - resources.Add(TX_TRIAL1, "Achetez la version complète"); - resources.Add(TX_TRIAL2, "\u000e 64 niveaux passionnants"); - resources.Add(TX_TRIAL3, "\u000e Des décors variés"); - resources.Add(TX_TRIAL4, "\u000e Une difficulté progressive"); - resources.Add(TX_TRIAL5, "\u000e De nouveaux pièges"); - resources.Add(TX_TRIAL6, "\u000e Un challenge fun"); - resources.Add(TX_TRAINING101, "Utilise la roue directionnelle \0."); - resources.Add(TX_TRAINING102, "Appuie maintenant sur Saut \b."); - resources.Add(TX_TRAINING103, "Appuie à droite sur la roue directionnelle \0 et sur Saut \b."); - resources.Add(TX_TRAINING104, "Appuie sur Droite \0 et Saut \b."); - resources.Add(TX_TRAINING105, "Essaie de ne pas te mouiller avec \0 \b !"); - resources.Add(TX_TRAINING106, ""); - resources.Add(TX_TRAINING107, "Prend l'ascenseur calmement, sans sauter \0."); - resources.Add(TX_TRAINING108, "Saute sur l'ascenseur."); - resources.Add(TX_TRAINING109, ""); - resources.Add(TX_TRAINING110, "Avance sans sauter et sans t'arrêter \0 !"); - resources.Add(TX_TRAINING111, ""); - resources.Add(TX_TRAINING112, ""); - resources.Add(TX_TRAINING113, "Avance sur la plateforme \0."); - resources.Add(TX_TRAINING114, "Quitte la plateforme \0."); - resources.Add(TX_TRAINING115, "Encore une fois, mais plus vite..."); - resources.Add(TX_TRAINING116, "Avance sur la plateforme \0 puis saute \0 \b."); - resources.Add(TX_TRAINING117, "Saute lorsque tu es sur la plateforme \0 \b."); - resources.Add(TX_TRAINING118, "Passe par en haut \0 \b."); - resources.Add(TX_TRAINING119, "Les oeufs te redonnent des vies."); - resources.Add(TX_TRAINING120, "Arrivé en haut, avance sur l'autre plateforme sans tarder..."); - resources.Add(TX_TRAINING121, "Attrape le deuxième et dernier trésor."); - resources.Add(TX_TRAINING122, "Pour terminer, va sur la flèche rouge."); - resources.Add(TX_TRAINING201, "Pousse la caisse sur le point rouge avec \0."); - resources.Add(TX_TRAINING202, "Pratique, cette caisse, non ?"); - resources.Add(TX_TRAINING203, "Tire la caisse sur le point rouge avec \u0003."); - resources.Add(TX_TRAINING204, "Empile les 2 caisses sur le point rouge pour passer."); - resources.Add(TX_TRAINING205, "Empile 3 caisses sur le point rouge pour passer."); - resources.Add(TX_TRAINING206, ""); - resources.Add(TX_TRAINING207, ""); - resources.Add(TX_TRAINING208, ""); - resources.Add(TX_TRAINING209, ""); - resources.Add(TX_TRAINING210, ""); - resources.Add(TX_TRAINING301, "Prend un hélico avec \t."); - resources.Add(TX_TRAINING302, "Utilise \u0006 ou \b pour décoller. Dirige avec \u0004 et \0."); - resources.Add(TX_TRAINING303, "Quitte l'hélico avec \t, il n'aime pas l'eau !"); - resources.Add(TX_TRAINING304, "Plonge. Utilise \u0004 \0 \u0002 \u0006 pour te diriger."); - resources.Add(TX_TRAINING305, "Prend un hélico \t puis décole avec \u0006 ou \b."); - resources.Add(TX_TRAINING306, "Attrape les 3 trésors puis monte."); - resources.Add(TX_TRAINING307, "Pour passer, va chercher un skate en haut à gauche."); - resources.Add(TX_TRAINING308, "Prend un skate avec \t."); - resources.Add(TX_TRAINING309, "Tu peux passer sans crainte avec ton skate \0."); - resources.Add(TX_TRAINING310, "Ton skate n'aime pas l'eau ! Utilise \0 \b."); - resources.Add(TX_TRAINING311, "Pose ton skate avec \t."); - resources.Add(TX_TRAINING401, "Prend la dynamite avec \t."); - resources.Add(TX_TRAINING402, "Ne pose surtout pas la dynamite ici avec \t !"); - resources.Add(TX_TRAINING403, "Va chercher de la dynamite à gauche."); - resources.Add(TX_TRAINING404, "Pose la dynamite avec \t, puis barre-toi !"); - resources.Add(TX_TRAINING405, "Pose encore de la dynamite pour passer."); - resources.Add(TX_TRAINING406, ""); - resources.Add(TX_TRAINING407, ""); - resources.Add(TX_TRAINING408, ""); - resources.Add(TX_TRAINING409, ""); - resources.Add(TX_TRAINING410, ""); - resources.Add(TX_TRAINING101a, "Incline le téléphone à droite \v."); - resources.Add(TX_TRAINING102a, "Appuie maintenant sur Saut \b."); - resources.Add(TX_TRAINING103a, "\v et appuie sur Saut \b."); - resources.Add(TX_TRAINING104a, "\v et Saut \b."); - resources.Add(TX_TRAINING105a, "Essaie de ne pas te mouiller avec \v \b !"); - resources.Add(TX_TRAINING106a, ""); - resources.Add(TX_TRAINING107a, "Prend l'ascenseur calmement, sans sauter \v."); - resources.Add(TX_TRAINING108a, "Saute sur l'ascenseur."); - resources.Add(TX_TRAINING109a, ""); - resources.Add(TX_TRAINING110a, "Avance sans sauter et sans t'arrêter \v !"); - resources.Add(TX_TRAINING111a, ""); - resources.Add(TX_TRAINING112a, ""); - resources.Add(TX_TRAINING113a, "Avance sur la plateforme \v."); - resources.Add(TX_TRAINING114a, "Quitte la plateforme \v."); - resources.Add(TX_TRAINING115a, "Encore une fois, mais plus vite..."); - resources.Add(TX_TRAINING116a, "Avance sur la plateforme \v puis saute \v \b."); - resources.Add(TX_TRAINING117a, "Saute lorsque tu es sur la plateforme \v \b."); - resources.Add(TX_TRAINING118a, "Passe par en haut \v \b."); - resources.Add(TX_TRAINING119a, "Les oeufs te redonnent des vies."); - resources.Add(TX_TRAINING120a, "Arrivé en haut, avance sur l'autre plateforme sans tarder..."); - resources.Add(TX_TRAINING121a, "Attrape le deuxième et dernier trésor."); - resources.Add(TX_TRAINING122a, "Pour terminer, va sur la flèche rouge."); - resources.Add(TX_TRAINING201a, "Pousse la caisse sur le point rouge avec \v."); - resources.Add(TX_TRAINING202a, "Pratique, cette caisse, non ?"); - resources.Add(TX_TRAINING203a, "Tire la caisse sur le point rouge avec \f et \n."); - resources.Add(TX_TRAINING204a, "Empile les 2 caisses sur le point rouge pour passer."); - resources.Add(TX_TRAINING205a, "Empile 3 caisses sur le point rouge pour passer."); - resources.Add(TX_TRAINING206a, ""); - resources.Add(TX_TRAINING207a, ""); - resources.Add(TX_TRAINING208a, ""); - resources.Add(TX_TRAINING209a, ""); - resources.Add(TX_TRAINING210a, ""); - resources.Add(TX_TRAINING301a, "Prend un hélico avec \t."); - resources.Add(TX_TRAINING302a, "Utilise \b pour décoller. Dirige avec \f et \v."); - resources.Add(TX_TRAINING303a, "Quitte l'hélico avec \t, il n'aime pas l'eau !"); - resources.Add(TX_TRAINING304a, "Plonge. Utilise \f \v \b \n pour te diriger."); - resources.Add(TX_TRAINING305a, "Prend un hélico \t puis décole avec \b."); - resources.Add(TX_TRAINING306a, "Attrape les 3 trésors puis monte."); - resources.Add(TX_TRAINING307a, "Pour passer, va chercher un skate en haut à gauche."); - resources.Add(TX_TRAINING308a, "Prend un skate avec \t."); - resources.Add(TX_TRAINING309a, "Tu peux passer sans crainte avec ton skate \v."); - resources.Add(TX_TRAINING310a, "Ton skate n'aime pas l'eau ! Utilise \v \b."); - resources.Add(TX_TRAINING311a, "Pose ton skate avec \t."); - resources.Add(TX_TRAINING401a, "Prend la dynamite avec \t."); - resources.Add(TX_TRAINING402a, "Ne pose surtout pas la dynamite ici avec \t !"); - resources.Add(TX_TRAINING403a, "Va chercher de la dynamite à gauche."); - resources.Add(TX_TRAINING404a, "Pose la dynamite avec \t, puis barre-toi !"); - resources.Add(TX_TRAINING405a, "Pose encore de la dynamite pour passer."); - resources.Add(TX_TRAINING406a, ""); - resources.Add(TX_TRAINING407a, ""); - resources.Add(TX_TRAINING408a, ""); - resources.Add(TX_TRAINING409a, ""); - resources.Add(TX_TRAINING410a, ""); + resources.put(TX_BUTTON_PLAY, "Jouer"); + resources.put(TX_BUTTON_MENU, "Menu"); + resources.put(TX_BUTTON_BACK, "Retour"); + resources.put(TX_BUTTON_RESTART, "Recommencer"); + resources.put(TX_BUTTON_CONTINUE, "Continuer"); + resources.put(TX_BUTTON_BUY, "Acheter"); + resources.put(TX_BUTTON_RANKING, "Classement"); + resources.put(TX_BUTTON_SETUP, "Réglages"); + resources.put(TX_BUTTON_SETUP_SOUNDS, "Bruitages"); + resources.put(TX_BUTTON_SETUP_JUMP, "Bouton de saut à droite"); + resources.put(TX_BUTTON_SETUP_ZOOM, "Zoom automatique sur l'action"); + resources.put(TX_BUTTON_SETUP_ACCEL, "Accéléromètre"); + resources.put(TX_BUTTON_SETUP_RESET, "Joueur {0} :\nEffacer la progression"); + resources.put(TX_GAMER_TITLE, "Joueur {0}"); + resources.put(TX_GAMER_MDOORS, "Portes principales : {0}/12"); + resources.put(TX_GAMER_SDOORS, "Portes secondaires : {0}/52"); + resources.put(TX_GAMER_LIFES, "Blupi : {0}"); + resources.put(TX_TRIAL1, "Achetez la version complète"); + resources.put(TX_TRIAL2, "\u000e 64 niveaux passionnants"); + resources.put(TX_TRIAL3, "\u000e Des décors variés"); + resources.put(TX_TRIAL4, "\u000e Une difficulté progressive"); + resources.put(TX_TRIAL5, "\u000e De nouveaux pièges"); + resources.put(TX_TRIAL6, "\u000e Un challenge fun"); + resources.put(TX_TRAINING101, "Utilise la roue directionnelle \0."); + resources.put(TX_TRAINING102, "Appuie maintenant sur Saut \b."); + resources.put(TX_TRAINING103, "Appuie à droite sur la roue directionnelle \0 et sur Saut \b."); + resources.put(TX_TRAINING104, "Appuie sur Droite \0 et Saut \b."); + resources.put(TX_TRAINING105, "Essaie de ne pas te mouiller avec \0 \b !"); + resources.put(TX_TRAINING106, ""); + resources.put(TX_TRAINING107, "Prend l'ascenseur calmement, sans sauter \0."); + resources.put(TX_TRAINING108, "Saute sur l'ascenseur."); + resources.put(TX_TRAINING109, ""); + resources.put(TX_TRAINING110, "Avance sans sauter et sans t'arrêter \0 !"); + resources.put(TX_TRAINING111, ""); + resources.put(TX_TRAINING112, ""); + resources.put(TX_TRAINING113, "Avance sur la plateforme \0."); + resources.put(TX_TRAINING114, "Quitte la plateforme \0."); + resources.put(TX_TRAINING115, "Encore une fois, mais plus vite..."); + resources.put(TX_TRAINING116, "Avance sur la plateforme \0 puis saute \0 \b."); + resources.put(TX_TRAINING117, "Saute lorsque tu es sur la plateforme \0 \b."); + resources.put(TX_TRAINING118, "Passe par en haut \0 \b."); + resources.put(TX_TRAINING119, "Les oeufs te redonnent des vies."); + resources.put(TX_TRAINING120, "Arrivé en haut, avance sur l'autre plateforme sans tarder..."); + resources.put(TX_TRAINING121, "Attrape le deuxième et dernier trésor."); + resources.put(TX_TRAINING122, "Pour terminer, va sur la flèche rouge."); + resources.put(TX_TRAINING201, "Pousse la caisse sur le point rouge avec \0."); + resources.put(TX_TRAINING202, "Pratique, cette caisse, non ?"); + resources.put(TX_TRAINING203, "Tire la caisse sur le point rouge avec \u0003."); + resources.put(TX_TRAINING204, "Empile les 2 caisses sur le point rouge pour passer."); + resources.put(TX_TRAINING205, "Empile 3 caisses sur le point rouge pour passer."); + resources.put(TX_TRAINING206, ""); + resources.put(TX_TRAINING207, ""); + resources.put(TX_TRAINING208, ""); + resources.put(TX_TRAINING209, ""); + resources.put(TX_TRAINING210, ""); + resources.put(TX_TRAINING301, "Prend un hélico avec \t."); + resources.put(TX_TRAINING302, "Utilise \u0006 ou \b pour décoller. Dirige avec \u0004 et \0."); + resources.put(TX_TRAINING303, "Quitte l'hélico avec \t, il n'aime pas l'eau !"); + resources.put(TX_TRAINING304, "Plonge. Utilise \u0004 \0 \u0002 \u0006 pour te diriger."); + resources.put(TX_TRAINING305, "Prend un hélico \t puis décole avec \u0006 ou \b."); + resources.put(TX_TRAINING306, "Attrape les 3 trésors puis monte."); + resources.put(TX_TRAINING307, "Pour passer, va chercher un skate en haut à gauche."); + resources.put(TX_TRAINING308, "Prend un skate avec \t."); + resources.put(TX_TRAINING309, "Tu peux passer sans crainte avec ton skate \0."); + resources.put(TX_TRAINING310, "Ton skate n'aime pas l'eau ! Utilise \0 \b."); + resources.put(TX_TRAINING311, "Pose ton skate avec \t."); + resources.put(TX_TRAINING401, "Prend la dynamite avec \t."); + resources.put(TX_TRAINING402, "Ne pose surtout pas la dynamite ici avec \t !"); + resources.put(TX_TRAINING403, "Va chercher de la dynamite à gauche."); + resources.put(TX_TRAINING404, "Pose la dynamite avec \t, puis barre-toi !"); + resources.put(TX_TRAINING405, "Pose encore de la dynamite pour passer."); + resources.put(TX_TRAINING406, ""); + resources.put(TX_TRAINING407, ""); + resources.put(TX_TRAINING408, ""); + resources.put(TX_TRAINING409, ""); + resources.put(TX_TRAINING410, ""); + resources.put(TX_TRAINING101a, "Incline le téléphone à droite \u000B."); + resources.put(TX_TRAINING102a, "Appuie maintenant sur Saut \b."); + resources.put(TX_TRAINING103a, "\u000B et appuie sur Saut \b."); + resources.put(TX_TRAINING104a, "\u000B et Saut \b."); + resources.put(TX_TRAINING105a, "Essaie de ne pas te mouiller avec \u000B \b !"); + resources.put(TX_TRAINING106a, ""); + resources.put(TX_TRAINING107a, "Prend l'ascenseur calmement, sans sauter \u000B."); + resources.put(TX_TRAINING108a, "Saute sur l'ascenseur."); + resources.put(TX_TRAINING109a, ""); + resources.put(TX_TRAINING110a, "Avance sans sauter et sans t'arrêter \u000B !"); + resources.put(TX_TRAINING111a, ""); + resources.put(TX_TRAINING112a, ""); + resources.put(TX_TRAINING113a, "Avance sur la plateforme \u000B."); + resources.put(TX_TRAINING114a, "Quitte la plateforme \u000B."); + resources.put(TX_TRAINING115a, "Encore une fois, mais plus vite..."); + resources.put(TX_TRAINING116a, "Avance sur la plateforme \u000B puis saute \u000B \b."); + resources.put(TX_TRAINING117a, "Saute lorsque tu es sur la plateforme \u000B \b."); + resources.put(TX_TRAINING118a, "Passe par en haut \u000B \b."); + resources.put(TX_TRAINING119a, "Les oeufs te redonnent des vies."); + resources.put(TX_TRAINING120a, "Arrivé en haut, avance sur l'autre plateforme sans tarder..."); + resources.put(TX_TRAINING121a, "Attrape le deuxième et dernier trésor."); + resources.put(TX_TRAINING122a, "Pour terminer, va sur la flèche rouge."); + resources.put(TX_TRAINING201a, "Pousse la caisse sur le point rouge avec \u000B."); + resources.put(TX_TRAINING202a, "Pratique, cette caisse, non ?"); + resources.put(TX_TRAINING203a, "Tire la caisse sur le point rouge avec \f et \n."); + resources.put(TX_TRAINING204a, "Empile les 2 caisses sur le point rouge pour passer."); + resources.put(TX_TRAINING205a, "Empile 3 caisses sur le point rouge pour passer."); + resources.put(TX_TRAINING206a, ""); + resources.put(TX_TRAINING207a, ""); + resources.put(TX_TRAINING208a, ""); + resources.put(TX_TRAINING209a, ""); + resources.put(TX_TRAINING210a, ""); + resources.put(TX_TRAINING301a, "Prend un hélico avec \t."); + resources.put(TX_TRAINING302a, "Utilise \b pour décoller. Dirige avec \f et \u000B."); + resources.put(TX_TRAINING303a, "Quitte l'hélico avec \t, il n'aime pas l'eau !"); + resources.put(TX_TRAINING304a, "Plonge. Utilise \f \u000B \b \n pour te diriger."); + resources.put(TX_TRAINING305a, "Prend un hélico \t puis décole avec \b."); + resources.put(TX_TRAINING306a, "Attrape les 3 trésors puis monte."); + resources.put(TX_TRAINING307a, "Pour passer, va chercher un skate en haut à gauche."); + resources.put(TX_TRAINING308a, "Prend un skate avec \t."); + resources.put(TX_TRAINING309a, "Tu peux passer sans crainte avec ton skate \u000B."); + resources.put(TX_TRAINING310a, "Ton skate n'aime pas l'eau ! Utilise \u000B \b."); + resources.put(TX_TRAINING311a, "Pose ton skate avec \t."); + resources.put(TX_TRAINING401a, "Prend la dynamite avec \t."); + resources.put(TX_TRAINING402a, "Ne pose surtout pas la dynamite ici avec \t !"); + resources.put(TX_TRAINING403a, "Va chercher de la dynamite à gauche."); + resources.put(TX_TRAINING404a, "Pose la dynamite avec \t, puis barre-toi !"); + resources.put(TX_TRAINING405a, "Pose encore de la dynamite pour passer."); + resources.put(TX_TRAINING406a, ""); + resources.put(TX_TRAINING407a, ""); + resources.put(TX_TRAINING408a, ""); + resources.put(TX_TRAINING409a, ""); + resources.put(TX_TRAINING410a, ""); } private static void InitializeEN() { - resources.Add(TX_BUTTON_PLAY, "Play"); - resources.Add(TX_BUTTON_MENU, "Home"); - resources.Add(TX_BUTTON_BACK, "Back"); - resources.Add(TX_BUTTON_RESTART, "Restart"); - resources.Add(TX_BUTTON_CONTINUE, "Continue"); - resources.Add(TX_BUTTON_BUY, "Buy"); - resources.Add(TX_BUTTON_RANKING, "Ranking"); - resources.Add(TX_BUTTON_SETUP, "Setup"); - resources.Add(TX_BUTTON_SETUP_SOUNDS, "Sound effects"); - resources.Add(TX_BUTTON_SETUP_JUMP, "Jump button on the right"); - resources.Add(TX_BUTTON_SETUP_ZOOM, "Automatic zoom on action"); - resources.Add(TX_BUTTON_SETUP_ACCEL, "Accelerometer"); - resources.Add(TX_BUTTON_SETUP_RESET, "Player {0} :\nErase progress"); - resources.Add(TX_GAMER_TITLE, "Player {0}"); - resources.Add(TX_GAMER_MDOORS, "Main gates : {0}/12"); - resources.Add(TX_GAMER_SDOORS, "Secondary gates : {0}/52"); - resources.Add(TX_GAMER_LIFES, "Blupi : {0}"); - resources.Add(TX_TRIAL1, "Buy the full version"); - resources.Add(TX_TRIAL2, "\u000e 64 exciting stages"); - resources.Add(TX_TRIAL3, "\u000e Varied backgrounds"); - resources.Add(TX_TRIAL4, "\u000e An increasing difficulty"); - resources.Add(TX_TRIAL5, "\u000e New traps"); - resources.Add(TX_TRIAL6, "\u000e Challenge and fun"); - resources.Add(TX_TRAINING101, "Use the directional wheel \0."); - resources.Add(TX_TRAINING102, "Press Jump \b."); - resources.Add(TX_TRAINING103, "Press Right \0 and Jump \b."); - resources.Add(TX_TRAINING104, "Press Right \0 and Jump \b."); - resources.Add(TX_TRAINING105, "Don't fall into the water \0 \b !"); - resources.Add(TX_TRAINING106, ""); - resources.Add(TX_TRAINING107, "Take the elevator quietly, without jumping \0."); - resources.Add(TX_TRAINING108, "Jump on the elevator."); - resources.Add(TX_TRAINING109, ""); - resources.Add(TX_TRAINING110, "Move forward without jumping nor stopping \0 !"); - resources.Add(TX_TRAINING111, ""); - resources.Add(TX_TRAINING112, ""); - resources.Add(TX_TRAINING113, "Move forward on the platform \0."); - resources.Add(TX_TRAINING114, "Leave the platform \0."); - resources.Add(TX_TRAINING115, "Once again, but faster..."); - resources.Add(TX_TRAINING116, "Move forward on the platform \0, then jump \0 \b."); - resources.Add(TX_TRAINING117, "Jump when you are on the platform \0 \b."); - resources.Add(TX_TRAINING118, "Choose the upper path \0 \b."); - resources.Add(TX_TRAINING119, "Eggs give you extra lives."); - resources.Add(TX_TRAINING120, "Once on the top, move forward on the other platform without delay..."); - resources.Add(TX_TRAINING121, "Catch the second and last treasure."); - resources.Add(TX_TRAINING122, "Join the red arrow."); - resources.Add(TX_TRAINING201, "Push the box forward until the red dot with \0."); - resources.Add(TX_TRAINING202, "Practical, right?"); - resources.Add(TX_TRAINING203, "Pull the box backward until the red dot with \u0003."); - resources.Add(TX_TRAINING204, "Stack both boxes up on the red dot to move on."); - resources.Add(TX_TRAINING205, "Stack the three boxes up on the red dot to move on."); - resources.Add(TX_TRAINING206, ""); - resources.Add(TX_TRAINING207, ""); - resources.Add(TX_TRAINING208, ""); - resources.Add(TX_TRAINING209, ""); - resources.Add(TX_TRAINING210, ""); - resources.Add(TX_TRAINING301, "Take a helicopter with \t."); - resources.Add(TX_TRAINING302, "Use \u0006 or \b to take off. Direct with \u0004 and \0."); - resources.Add(TX_TRAINING303, "Leave the helicopter with \t, it dislikes water!"); - resources.Add(TX_TRAINING304, "Plunge. Use \u0004 \0 \u0002 \u0006 to direct."); - resources.Add(TX_TRAINING305, "Take a helicopter \t then take off with \u0006 or \b."); - resources.Add(TX_TRAINING306, "Grab the three treasures, then go up."); - resources.Add(TX_TRAINING307, "Go and get a skate in the top left corner."); - resources.Add(TX_TRAINING308, "Take a skate with \t."); - resources.Add(TX_TRAINING309, "You can move on with your skate without fear \0."); - resources.Add(TX_TRAINING310, "Your skate dislikes water! Jump!"); - resources.Add(TX_TRAINING311, "Leave your skate with \t."); - resources.Add(TX_TRAINING401, "Take the dynamite sticks with \t."); - resources.Add(TX_TRAINING402, "Do not put down the dynamite here!"); - resources.Add(TX_TRAINING403, "Go and get the dynamite sticks on the left."); - resources.Add(TX_TRAINING404, "Put down the dynamite with \t, then clear off!"); - resources.Add(TX_TRAINING405, "Put down another stick of dynamite here to move on."); - resources.Add(TX_TRAINING406, ""); - resources.Add(TX_TRAINING407, ""); - resources.Add(TX_TRAINING408, ""); - resources.Add(TX_TRAINING409, ""); - resources.Add(TX_TRAINING410, ""); - resources.Add(TX_TRAINING101a, "Tilt the phone \v."); - resources.Add(TX_TRAINING102a, "Press Jump \b."); - resources.Add(TX_TRAINING103a, "\v and Jump \b."); - resources.Add(TX_TRAINING104a, "\v and Jump \b."); - resources.Add(TX_TRAINING105a, "Don't fall into the water \v \b !"); - resources.Add(TX_TRAINING106a, ""); - resources.Add(TX_TRAINING107a, "Take the elevator quietly, without jumping \v."); - resources.Add(TX_TRAINING108a, "Jump on the elevator."); - resources.Add(TX_TRAINING109a, ""); - resources.Add(TX_TRAINING110a, "Move forward without jumping nor stopping \v !"); - resources.Add(TX_TRAINING111a, ""); - resources.Add(TX_TRAINING112a, ""); - resources.Add(TX_TRAINING113a, "Move forward on the platform \v."); - resources.Add(TX_TRAINING114a, "Leave the platform \v."); - resources.Add(TX_TRAINING115a, "Once again, but faster..."); - resources.Add(TX_TRAINING116a, "Move forward on the platform \v, then jump \v \b."); - resources.Add(TX_TRAINING117a, "Jump when you are on the platform \v \b."); - resources.Add(TX_TRAINING118a, "Choose the upper path \v \b."); - resources.Add(TX_TRAINING119a, "Eggs give you extra lives."); - resources.Add(TX_TRAINING120a, "Once on the top, move forward on the other platform without delay..."); - resources.Add(TX_TRAINING121a, "Catch the second and last treasure."); - resources.Add(TX_TRAINING122a, "Join the red arrow."); - resources.Add(TX_TRAINING201a, "Push the box forward until the red dot with \v."); - resources.Add(TX_TRAINING202a, "Practical, right?"); - resources.Add(TX_TRAINING203a, "Pull the box backward until the red dot with \f and \n."); - resources.Add(TX_TRAINING204a, "Stack both boxes up on the red dot to move on."); - resources.Add(TX_TRAINING205a, "Stack the three boxes up on the red dot to move on."); - resources.Add(TX_TRAINING206a, ""); - resources.Add(TX_TRAINING207a, ""); - resources.Add(TX_TRAINING208a, ""); - resources.Add(TX_TRAINING209a, ""); - resources.Add(TX_TRAINING210a, ""); - resources.Add(TX_TRAINING301a, "Take a helicopter with \t."); - resources.Add(TX_TRAINING302a, "Use \b to take off. Direct with \f and \v."); - resources.Add(TX_TRAINING303a, "Leave the helicopter with \t, it dislikes water!"); - resources.Add(TX_TRAINING304a, "Plunge. Use \f \v \b \n to direct."); - resources.Add(TX_TRAINING305a, "Take a helicopter \t then take off with \b."); - resources.Add(TX_TRAINING306a, "Grab the three treasures, then go up."); - resources.Add(TX_TRAINING307a, "Go and get a skate in the top left corner."); - resources.Add(TX_TRAINING308a, "Take a skate with \t."); - resources.Add(TX_TRAINING309a, "You can move on with your skate without fear \v."); - resources.Add(TX_TRAINING310a, "Your skate dislikes water! Jump!"); - resources.Add(TX_TRAINING311a, "Leave your skate with \t."); - resources.Add(TX_TRAINING401a, "Take the dynamite sticks with \t."); - resources.Add(TX_TRAINING402a, "Do not put down the dynamite here!"); - resources.Add(TX_TRAINING403a, "Go and get the dynamite sticks on the left."); - resources.Add(TX_TRAINING404a, "Put down the dynamite with \t, then clear off!"); - resources.Add(TX_TRAINING405a, "Put down another stick of dynamite here to move on."); - resources.Add(TX_TRAINING406a, ""); - resources.Add(TX_TRAINING407a, ""); - resources.Add(TX_TRAINING408a, ""); - resources.Add(TX_TRAINING409a, ""); - resources.Add(TX_TRAINING410a, ""); + resources.put(TX_BUTTON_PLAY, "Play"); + resources.put(TX_BUTTON_MENU, "Home"); + resources.put(TX_BUTTON_BACK, "Back"); + resources.put(TX_BUTTON_RESTART, "Restart"); + resources.put(TX_BUTTON_CONTINUE, "Continue"); + resources.put(TX_BUTTON_BUY, "Buy"); + resources.put(TX_BUTTON_RANKING, "Ranking"); + resources.put(TX_BUTTON_SETUP, "Setup"); + resources.put(TX_BUTTON_SETUP_SOUNDS, "Sound effects"); + resources.put(TX_BUTTON_SETUP_JUMP, "Jump button on the right"); + resources.put(TX_BUTTON_SETUP_ZOOM, "Automatic zoom on action"); + resources.put(TX_BUTTON_SETUP_ACCEL, "Accelerometer"); + resources.put(TX_BUTTON_SETUP_RESET, "Player {0} :\nErase progress"); + resources.put(TX_GAMER_TITLE, "Player {0}"); + resources.put(TX_GAMER_MDOORS, "Main gates : {0}/12"); + resources.put(TX_GAMER_SDOORS, "Secondary gates : {0}/52"); + resources.put(TX_GAMER_LIFES, "Blupi : {0}"); + resources.put(TX_TRIAL1, "Buy the full version"); + resources.put(TX_TRIAL2, "\u000e 64 exciting stages"); + resources.put(TX_TRIAL3, "\u000e Varied backgrounds"); + resources.put(TX_TRIAL4, "\u000e An increasing difficulty"); + resources.put(TX_TRIAL5, "\u000e New traps"); + resources.put(TX_TRIAL6, "\u000e Challenge and fun"); + resources.put(TX_TRAINING101, "Use the directional wheel \0."); + resources.put(TX_TRAINING102, "Press Jump \b."); + resources.put(TX_TRAINING103, "Press Right \0 and Jump \b."); + resources.put(TX_TRAINING104, "Press Right \0 and Jump \b."); + resources.put(TX_TRAINING105, "Don't fall into the water \0 \b !"); + resources.put(TX_TRAINING106, ""); + resources.put(TX_TRAINING107, "Take the elevator quietly, without jumping \0."); + resources.put(TX_TRAINING108, "Jump on the elevator."); + resources.put(TX_TRAINING109, ""); + resources.put(TX_TRAINING110, "Move forward without jumping nor stopping \0 !"); + resources.put(TX_TRAINING111, ""); + resources.put(TX_TRAINING112, ""); + resources.put(TX_TRAINING113, "Move forward on the platform \0."); + resources.put(TX_TRAINING114, "Leave the platform \0."); + resources.put(TX_TRAINING115, "Once again, but faster..."); + resources.put(TX_TRAINING116, "Move forward on the platform \0, then jump \0 \b."); + resources.put(TX_TRAINING117, "Jump when you are on the platform \0 \b."); + resources.put(TX_TRAINING118, "Choose the upper path \0 \b."); + resources.put(TX_TRAINING119, "Eggs give you extra lives."); + resources.put(TX_TRAINING120, "Once on the top, move forward on the other platform without delay..."); + resources.put(TX_TRAINING121, "Catch the second and last treasure."); + resources.put(TX_TRAINING122, "Join the red arrow."); + resources.put(TX_TRAINING201, "Push the box forward until the red dot with \0."); + resources.put(TX_TRAINING202, "Practical, right?"); + resources.put(TX_TRAINING203, "Pull the box backward until the red dot with \u0003."); + resources.put(TX_TRAINING204, "Stack both boxes up on the red dot to move on."); + resources.put(TX_TRAINING205, "Stack the three boxes up on the red dot to move on."); + resources.put(TX_TRAINING206, ""); + resources.put(TX_TRAINING207, ""); + resources.put(TX_TRAINING208, ""); + resources.put(TX_TRAINING209, ""); + resources.put(TX_TRAINING210, ""); + resources.put(TX_TRAINING301, "Take a helicopter with \t."); + resources.put(TX_TRAINING302, "Use \u0006 or \b to take off. Direct with \u0004 and \0."); + resources.put(TX_TRAINING303, "Leave the helicopter with \t, it dislikes water!"); + resources.put(TX_TRAINING304, "Plunge. Use \u0004 \0 \u0002 \u0006 to direct."); + resources.put(TX_TRAINING305, "Take a helicopter \t then take off with \u0006 or \b."); + resources.put(TX_TRAINING306, "Grab the three treasures, then go up."); + resources.put(TX_TRAINING307, "Go and get a skate in the top left corner."); + resources.put(TX_TRAINING308, "Take a skate with \t."); + resources.put(TX_TRAINING309, "You can move on with your skate without fear \0."); + resources.put(TX_TRAINING310, "Your skate dislikes water! Jump!"); + resources.put(TX_TRAINING311, "Leave your skate with \t."); + resources.put(TX_TRAINING401, "Take the dynamite sticks with \t."); + resources.put(TX_TRAINING402, "Do not put down the dynamite here!"); + resources.put(TX_TRAINING403, "Go and get the dynamite sticks on the left."); + resources.put(TX_TRAINING404, "Put down the dynamite with \t, then clear off!"); + resources.put(TX_TRAINING405, "Put down another stick of dynamite here to move on."); + resources.put(TX_TRAINING406, ""); + resources.put(TX_TRAINING407, ""); + resources.put(TX_TRAINING408, ""); + resources.put(TX_TRAINING409, ""); + resources.put(TX_TRAINING410, ""); + resources.put(TX_TRAINING101a, "Tilt the phone u000B."); + resources.put(TX_TRAINING102a, "Press Jump \b."); + resources.put(TX_TRAINING103a, "u000B and Jump \b."); + resources.put(TX_TRAINING104a, "u000B and Jump \b."); + resources.put(TX_TRAINING105a, "Don't fall into the water \u000B \b !"); + resources.put(TX_TRAINING106a, ""); + resources.put(TX_TRAINING107a, "Take the elevator quietly, without jumping \0."); + resources.put(TX_TRAINING108a, "Jump on the elevator."); + resources.put(TX_TRAINING109a, ""); + resources.put(TX_TRAINING110a, "Move forward without jumping nor stopping u000B !"); + resources.put(TX_TRAINING111a, ""); + resources.put(TX_TRAINING112a, ""); + resources.put(TX_TRAINING113a, "Move forward on the platform u000B."); + resources.put(TX_TRAINING114a, "Leave the platform u000B."); + resources.put(TX_TRAINING115a, "Once again, but faster..."); + resources.put(TX_TRAINING116a, "Move forward on the platform u000B, then jump u000B \b."); + resources.put(TX_TRAINING117a, "Jump when you are on the platform u000B \b."); + resources.put(TX_TRAINING118a, "Choose the upper path u000B \b."); + resources.put(TX_TRAINING119a, "Eggs give you extra lives."); + resources.put(TX_TRAINING120a, "Once on the top, move forward on the other platform without delay..."); + resources.put(TX_TRAINING121a, "Catch the second and last treasure."); + resources.put(TX_TRAINING122a, "Join the red arrow."); + resources.put(TX_TRAINING201a, "Push the box forward until the red dot with u000B."); + resources.put(TX_TRAINING202a, "Practical, right?"); + resources.put(TX_TRAINING203a, "Pull the box backward until the red dot with \f and \n."); + resources.put(TX_TRAINING204a, "Stack both boxes up on the red dot to move on."); + resources.put(TX_TRAINING205a, "Stack the three boxes up on the red dot to move on."); + resources.put(TX_TRAINING206a, ""); + resources.put(TX_TRAINING207a, ""); + resources.put(TX_TRAINING208a, ""); + resources.put(TX_TRAINING209a, ""); + resources.put(TX_TRAINING210a, ""); + resources.put(TX_TRAINING301a, "Take a helicopter with \t."); + resources.put(TX_TRAINING302a, "Use \b to take off. Direct with \f and u000B."); + resources.put(TX_TRAINING303a, "Leave the helicopter with \t, it dislikes water!"); + resources.put(TX_TRAINING304a, "Plunge. Use \f u000B \b \n to direct."); + resources.put(TX_TRAINING305a, "Take a helicopter \t then take off with \b."); + resources.put(TX_TRAINING306a, "Grab the three treasures, then go up."); + resources.put(TX_TRAINING307a, "Go and get a skate in the top left corner."); + resources.put(TX_TRAINING308a, "Take a skate with \t."); + resources.put(TX_TRAINING309a, "You can move on with your skate without fear u000B."); + resources.put(TX_TRAINING310a, "Your skate dislikes water! Jump!"); + resources.put(TX_TRAINING311a, "Leave your skate with \t."); + resources.put(TX_TRAINING401a, "Take the dynamite sticks with \t."); + resources.put(TX_TRAINING402a, "Do not put down the dynamite here!"); + resources.put(TX_TRAINING403a, "Go and get the dynamite sticks on the left."); + resources.put(TX_TRAINING404a, "Put down the dynamite with \t, then clear off!"); + resources.put(TX_TRAINING405a, "Put down another stick of dynamite here to move on."); + resources.put(TX_TRAINING406a, ""); + resources.put(TX_TRAINING407a, ""); + resources.put(TX_TRAINING408a, ""); + resources.put(TX_TRAINING409a, ""); + resources.put(TX_TRAINING410a, ""); } private static void InitializeDE() { - resources.Add(TX_BUTTON_PLAY, "Play"); - resources.Add(TX_BUTTON_MENU, "Home"); - resources.Add(TX_BUTTON_BACK, "Back"); - resources.Add(TX_BUTTON_RESTART, "Restart"); - resources.Add(TX_BUTTON_CONTINUE, "Continue"); - resources.Add(TX_BUTTON_BUY, "Buy"); - resources.Add(TX_BUTTON_RANKING, "Ranking"); - resources.Add(TX_BUTTON_SETUP, "Setup"); - resources.Add(TX_BUTTON_SETUP_SOUNDS, "Sounds"); - resources.Add(TX_BUTTON_SETUP_JUMP, "Jump button to the right"); - resources.Add(TX_BUTTON_SETUP_ZOOM, "Automatically zoom action"); - resources.Add(TX_BUTTON_SETUP_ACCEL, "Accelerometer"); - resources.Add(TX_BUTTON_SETUP_RESET, "Gamer {0} :\nReset progression"); - resources.Add(TX_GAMER_TITLE, "Gamer {0}"); - resources.Add(TX_GAMER_MDOORS, "Main doors : {0}/12"); - resources.Add(TX_GAMER_SDOORS, "Secondary doors : {0}/52"); - resources.Add(TX_GAMER_LIFES, "Blupi : {0}"); - resources.Add(TX_TRIAL1, "Buy the full version"); - resources.Add(TX_TRIAL2, "\u000e 64 niveaux passionnants"); - resources.Add(TX_TRIAL3, "\u000e Des décors variés"); - resources.Add(TX_TRIAL4, "\u000e Une difficulté progressive"); - resources.Add(TX_TRIAL5, "\u000e De nouveaux pièges"); - resources.Add(TX_TRIAL6, "\u000e Un challenge fun"); - resources.Add(TX_TRAINING101, "Utilise la roue directionnelle \0 pour faire avancer Blupi."); - resources.Add(TX_TRAINING102, "Appuie maintenant sur le bouton de saut \b."); - resources.Add(TX_TRAINING103, "Appuie à droite sur la roue directionnelle \0 et sur Saut \b."); - resources.Add(TX_TRAINING104, "Appuie sur Droite \0 et Saut \b."); - resources.Add(TX_TRAINING105, "Essaie de ne pas te mouiller avec \0 \b !"); - resources.Add(TX_TRAINING106, ""); - resources.Add(TX_TRAINING107, "Prend l'ascenseur calmement, sans sauter \0."); - resources.Add(TX_TRAINING108, "Saute sur l'ascenseur."); - resources.Add(TX_TRAINING109, ""); - resources.Add(TX_TRAINING110, "Avance sans sauter et sans t'arrêter \0 !"); - resources.Add(TX_TRAINING111, ""); - resources.Add(TX_TRAINING112, ""); - resources.Add(TX_TRAINING113, "Avance sur la plateforme \0."); - resources.Add(TX_TRAINING114, "Quitte la plateforme \0."); - resources.Add(TX_TRAINING115, "Encore une fois, mais plus vite..."); - resources.Add(TX_TRAINING116, "Avance sur la plateforme \0 puis saute \0 \b."); - resources.Add(TX_TRAINING117, "Saute lorsque tu es sur la plateforme \0 \b."); - resources.Add(TX_TRAINING118, "Passe par en haut \0 \b."); - resources.Add(TX_TRAINING119, "Les oeufs te redonnent des vies."); - resources.Add(TX_TRAINING120, "Arrivé en haut, avance sur l'autre plateforme sans tarder..."); - resources.Add(TX_TRAINING121, "Attrape le deuxième et dernier trésor."); - resources.Add(TX_TRAINING122, "Pour terminer, va sur la flèche rouge."); - resources.Add(TX_TRAINING201, "Pousse la caisse sur le point rouge avec \0."); - resources.Add(TX_TRAINING202, "Utilise la caisse pour passer l'obstacle avec \0 \b."); - resources.Add(TX_TRAINING203, "Tire la caisse sur le point rouge avec \u0003."); - resources.Add(TX_TRAINING204, "Empile les 2 caisses sur le point rouge pour passer."); - resources.Add(TX_TRAINING205, "Empile 3 caisses sur le point rouge pour passer."); - resources.Add(TX_TRAINING206, ""); - resources.Add(TX_TRAINING207, ""); - resources.Add(TX_TRAINING208, ""); - resources.Add(TX_TRAINING209, ""); - resources.Add(TX_TRAINING210, ""); - resources.Add(TX_TRAINING301, "Prend un hélico avec \t."); - resources.Add(TX_TRAINING302, "Utilise \u0006 ou \b pour décoler. Dirige avec \u0004 et \0."); - resources.Add(TX_TRAINING303, "Quitte l'hélico avec \t, il n'aime pas l'eau !"); - resources.Add(TX_TRAINING304, "Plonge. Utilise \u0004 \0 \u0002 \u0006 pour te diriger."); - resources.Add(TX_TRAINING305, "Prend un hélico \t puis décole avec \u0006 ou \b."); - resources.Add(TX_TRAINING306, "Attrape les 3 trésors puis monte."); - resources.Add(TX_TRAINING307, "Pour passer, va chercher un skate en haut à gauche."); - resources.Add(TX_TRAINING308, "Prend un skate avec \t."); - resources.Add(TX_TRAINING309, "Tu peux passer sans crainte avec ton skate \0."); - resources.Add(TX_TRAINING310, "Ton skate n'aime pas l'eau ! Utilise \0 \b."); - resources.Add(TX_TRAINING311, "Pose ton skate avec \t."); - resources.Add(TX_TRAINING401, "Prend la dynamite avec \t."); - resources.Add(TX_TRAINING402, "Ne pose surtout pas la dynamite ici avec \t !"); - resources.Add(TX_TRAINING403, "Va chercher de la dynamite à gauche."); - resources.Add(TX_TRAINING404, "Pose la dynamite avec \t, puis barre-toi !"); - resources.Add(TX_TRAINING405, "Pose encore de la dynamite pour passer."); - resources.Add(TX_TRAINING406, ""); - resources.Add(TX_TRAINING407, ""); - resources.Add(TX_TRAINING408, ""); - resources.Add(TX_TRAINING409, ""); - resources.Add(TX_TRAINING410, ""); + resources.put(TX_BUTTON_PLAY, "Play"); + resources.put(TX_BUTTON_MENU, "Home"); + resources.put(TX_BUTTON_BACK, "Back"); + resources.put(TX_BUTTON_RESTART, "Restart"); + resources.put(TX_BUTTON_CONTINUE, "Continue"); + resources.put(TX_BUTTON_BUY, "Buy"); + resources.put(TX_BUTTON_RANKING, "Ranking"); + resources.put(TX_BUTTON_SETUP, "Setup"); + resources.put(TX_BUTTON_SETUP_SOUNDS, "Sounds"); + resources.put(TX_BUTTON_SETUP_JUMP, "Jump button to the right"); + resources.put(TX_BUTTON_SETUP_ZOOM, "Automatically zoom action"); + resources.put(TX_BUTTON_SETUP_ACCEL, "Accelerometer"); + resources.put(TX_BUTTON_SETUP_RESET, "Gamer {0} :\nReset progression"); + resources.put(TX_GAMER_TITLE, "Gamer {0}"); + resources.put(TX_GAMER_MDOORS, "Main doors : {0}/12"); + resources.put(TX_GAMER_SDOORS, "Secondary doors : {0}/52"); + resources.put(TX_GAMER_LIFES, "Blupi : {0}"); + resources.put(TX_TRIAL1, "Buy the full version"); + resources.put(TX_TRIAL2, "\u000e 64 niveaux passionnants"); + resources.put(TX_TRIAL3, "\u000e Des décors variés"); + resources.put(TX_TRIAL4, "\u000e Une difficulté progressive"); + resources.put(TX_TRIAL5, "\u000e De nouveaux pièges"); + resources.put(TX_TRIAL6, "\u000e Un challenge fun"); + resources.put(TX_TRAINING101, "Utilise la roue directionnelle \0 pour faire avancer Blupi."); + resources.put(TX_TRAINING102, "Appuie maintenant sur le bouton de saut \b."); + resources.put(TX_TRAINING103, "Appuie à droite sur la roue directionnelle \0 et sur Saut \b."); + resources.put(TX_TRAINING104, "Appuie sur Droite \0 et Saut \b."); + resources.put(TX_TRAINING105, "Essaie de ne pas te mouiller avec \0 \b !"); + resources.put(TX_TRAINING106, ""); + resources.put(TX_TRAINING107, "Prend l'ascenseur calmement, sans sauter \0."); + resources.put(TX_TRAINING108, "Saute sur l'ascenseur."); + resources.put(TX_TRAINING109, ""); + resources.put(TX_TRAINING110, "Avance sans sauter et sans t'arrêter \0 !"); + resources.put(TX_TRAINING111, ""); + resources.put(TX_TRAINING112, ""); + resources.put(TX_TRAINING113, "Avance sur la plateforme \0."); + resources.put(TX_TRAINING114, "Quitte la plateforme \0."); + resources.put(TX_TRAINING115, "Encore une fois, mais plus vite..."); + resources.put(TX_TRAINING116, "Avance sur la plateforme \0 puis saute \0 \b."); + resources.put(TX_TRAINING117, "Saute lorsque tu es sur la plateforme \0 \b."); + resources.put(TX_TRAINING118, "Passe par en haut \0 \b."); + resources.put(TX_TRAINING119, "Les oeufs te redonnent des vies."); + resources.put(TX_TRAINING120, "Arrivé en haut, avance sur l'autre plateforme sans tarder..."); + resources.put(TX_TRAINING121, "Attrape le deuxième et dernier trésor."); + resources.put(TX_TRAINING122, "Pour terminer, va sur la flèche rouge."); + resources.put(TX_TRAINING201, "Pousse la caisse sur le point rouge avec \0."); + resources.put(TX_TRAINING202, "Utilise la caisse pour passer l'obstacle avec \0 \b."); + resources.put(TX_TRAINING203, "Tire la caisse sur le point rouge avec \u0003."); + resources.put(TX_TRAINING204, "Empile les 2 caisses sur le point rouge pour passer."); + resources.put(TX_TRAINING205, "Empile 3 caisses sur le point rouge pour passer."); + resources.put(TX_TRAINING206, ""); + resources.put(TX_TRAINING207, ""); + resources.put(TX_TRAINING208, ""); + resources.put(TX_TRAINING209, ""); + resources.put(TX_TRAINING210, ""); + resources.put(TX_TRAINING301, "Prend un hélico avec \t."); + resources.put(TX_TRAINING302, "Utilise \u0006 ou \b pour décoler. Dirige avec \u0004 et \0."); + resources.put(TX_TRAINING303, "Quitte l'hélico avec \t, il n'aime pas l'eau !"); + resources.put(TX_TRAINING304, "Plonge. Utilise \u0004 \0 \u0002 \u0006 pour te diriger."); + resources.put(TX_TRAINING305, "Prend un hélico \t puis décole avec \u0006 ou \b."); + resources.put(TX_TRAINING306, "Attrape les 3 trésors puis monte."); + resources.put(TX_TRAINING307, "Pour passer, va chercher un skate en haut à gauche."); + resources.put(TX_TRAINING308, "Prend un skate avec \t."); + resources.put(TX_TRAINING309, "Tu peux passer sans crainte avec ton skate \0."); + resources.put(TX_TRAINING310, "Ton skate n'aime pas l'eau ! Utilise \0 \b."); + resources.put(TX_TRAINING311, "Pose ton skate avec \t."); + resources.put(TX_TRAINING401, "Prend la dynamite avec \t."); + resources.put(TX_TRAINING402, "Ne pose surtout pas la dynamite ici avec \t !"); + resources.put(TX_TRAINING403, "Va chercher de la dynamite à gauche."); + resources.put(TX_TRAINING404, "Pose la dynamite avec \t, puis barre-toi !"); + resources.put(TX_TRAINING405, "Pose encore de la dynamite pour passer."); + resources.put(TX_TRAINING406, ""); + resources.put(TX_TRAINING407, ""); + resources.put(TX_TRAINING408, ""); + resources.put(TX_TRAINING409, ""); + resources.put(TX_TRAINING410, ""); } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Pixmap.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Pixmap.java index 85c5cbf..d213ea9 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Pixmap.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Pixmap.java @@ -1,18 +1,26 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Pixmap -using System; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using WindowsPhoneSpeedyBlupi; -using static System.Net.Mime.MediaTypeNames; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.Pixmap +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Color; +import com.openeggbert.jxna.Microsoft.Xna.Framework.GraphicsDeviceManager; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Graphics.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Rectangle; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Vector2; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +//import static com.openeggbert.jdotnet.System.Net.Mime.MediaTypeNames.*; + + + + @namespace(name = "WindowsPhoneSpeedyBlupi") -namespace WindowsPhoneSpeedyBlupi -{ public class Pixmap { - private readonly Game1 game1; + private final Game1 game1; - private readonly GraphicsDeviceManager graphics; + private final GraphicsDeviceManager graphics; private double zoom; @@ -58,13 +66,14 @@ namespace WindowsPhoneSpeedyBlupi private SpriteEffects effect; - public TinyRect DrawBounds + public TinyRect DrawBounds() {return getDrawBounds();} + public TinyRect getDrawBounds() { - get + { - TinyRect result = default(TinyRect); - double num = graphics.GraphicsDevice.Viewport.Width; - double num2 = graphics.GraphicsDevice.Viewport.Height; + TinyRect result = default_(new TinyRect()); + double num = graphics.GraphicsDevice().Viewport().Width(); + double num2 = graphics.GraphicsDevice().Viewport().Height(); if (num != 0.0 && num2 != 0.0) { double num3; @@ -88,11 +97,11 @@ namespace WindowsPhoneSpeedyBlupi } } - public TinyPoint Origin + public TinyPoint Origin() { - get + { - TinyPoint result = default(TinyPoint); + TinyPoint result = default_(new TinyPoint()); result.X = (int)originX; result.Y = (int)originY; return result; @@ -109,7 +118,7 @@ namespace WindowsPhoneSpeedyBlupi public TinyPoint HotSpotToHud(TinyPoint pos) { - TinyPoint result = default(TinyPoint); + TinyPoint result = default_(new TinyPoint()); result.X = (int)((double)(pos.X - (int)hotSpotX) / hotSpotZoom) + (int)hotSpotX - (int)originX; result.Y = (int)((double)(pos.Y - (int)hotSpotY) / hotSpotZoom) + (int)hotSpotY - (int)originY; return result; @@ -122,166 +131,166 @@ namespace WindowsPhoneSpeedyBlupi hotSpotY = y; } - public void DrawInputButton(TinyRect rect, Def.ButtonGlygh glyph, bool pressed, bool selected) + public void DrawInputButton(TinyRect rect, Def.ButtonGlygh glyph, boolean pressed, boolean selected) { switch (glyph) { - case Def.ButtonGlygh.InitGamerA: + case InitGamerA: DrawIcon(14, selected ? 16 : 4, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.InitGamerB: + case InitGamerB: DrawIcon(14, selected ? 17 : 5, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.InitGamerC: + case InitGamerC: DrawIcon(14, selected ? 18 : 6, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.InitSetup: - case Def.ButtonGlygh.PauseSetup: + case InitSetup: + case PauseSetup: DrawIcon(14, 19, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.InitPlay: + case InitPlay: DrawIcon(14, 7, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.PauseMenu: - case Def.ButtonGlygh.ResumeMenu: + case PauseMenu: + case ResumeMenu: DrawIcon(14, 11, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.PauseBack: + case PauseBack: DrawIcon(14, 8, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.PauseRestart: + case PauseRestart: DrawIcon(14, 9, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.PauseContinue: - case Def.ButtonGlygh.ResumeContinue: + case PauseContinue: + case ResumeContinue: DrawIcon(14, 10, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.WinLostReturn: + case WinLostReturn: DrawIcon(14, 3, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.InitBuy: - case Def.ButtonGlygh.TrialBuy: + case InitBuy: + case TrialBuy: DrawIcon(14, 22, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.InitRanking: + case InitRanking: DrawIcon(14, 12, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.TrialCancel: - case Def.ButtonGlygh.RankingContinue: + case TrialCancel: + case RankingContinue: DrawIcon(14, 8, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.SetupSounds: - case Def.ButtonGlygh.SetupJump: - case Def.ButtonGlygh.SetupZoom: - case Def.ButtonGlygh.SetupAccel: + case SetupSounds: + case SetupJump: + case SetupZoom: + case SetupAccel: DrawIcon(14, selected ? 13 : 21, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.SetupReset: + case SetupReset: DrawIcon(14, 20, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.SetupReturn: + case SetupReturn: DrawIcon(14, 8, rect, pressed ? 0.8 : 1.0, false); break; - case Def.ButtonGlygh.PlayJump: + case PlayJump: DrawIcon(14, 2, rect, pressed ? 0.6 : 1.0, false); break; - case Def.ButtonGlygh.PlayAction: + case PlayAction: DrawIcon(14, 12, rect, pressed ? 0.6 : 1.0, false); break; - case Def.ButtonGlygh.PlayDown: + case PlayDown: DrawIcon(14, 23, rect, pressed ? 0.6 : 1.0, false); break; - case Def.ButtonGlygh.PlayPause: + case PlayPause: DrawIcon(14, 3, rect, pressed ? 0.6 : 1.0, false); break; - case Def.ButtonGlygh.Cheat1: - case Def.ButtonGlygh.Cheat2: - case Def.ButtonGlygh.Cheat3: - case Def.ButtonGlygh.Cheat4: - case Def.ButtonGlygh.Cheat5: - case Def.ButtonGlygh.Cheat6: - case Def.ButtonGlygh.Cheat7: - case Def.ButtonGlygh.Cheat8: - case Def.ButtonGlygh.Cheat9: + case Cheat1: + case Cheat2: + case Cheat3: + case Cheat4: + case Cheat5: + case Cheat6: + case Cheat7: + case Cheat8: + case Cheat9: { DrawIcon(14, 0, rect, pressed ? 0.6 : 1.0, false); - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = rect.Left + rect.Width / 2 - (int)originX; + TinyPoint tinyPoint = default_(new TinyPoint()); + tinyPoint.X = rect.Left + rect.Width() / 2 - (int)originX; tinyPoint.Y = rect.Top + 28; TinyPoint pos = tinyPoint; Text.DrawTextCenter(this, pos, Decor.GetCheatTinyText(glyph), 1.0); break; } - case Def.ButtonGlygh.Cheat11: - case Def.ButtonGlygh.Cheat12: - case Def.ButtonGlygh.Cheat21: - case Def.ButtonGlygh.Cheat22: - case Def.ButtonGlygh.Cheat31: - case Def.ButtonGlygh.Cheat32: + case Cheat11: + case Cheat12: + case Cheat21: + case Cheat22: + case Cheat31: + case Cheat32: break; } } public void LoadContent() { - spriteBatch = new SpriteBatch(game1.GraphicsDevice); - bitmapText = game1.Content.Load("icons/text"); - bitmapButton = game1.Content.Load("icons/button"); - bitmapJauge = game1.Content.Load("icons/jauge"); - bitmapBlupi = game1.Content.Load("icons/blupi"); - bitmapBlupi1 = game1.Content.Load("icons/blupi1"); - bitmapObject = game1.Content.Load("icons/object-m"); - bitmapElement = game1.Content.Load("icons/element"); - bitmapExplo = game1.Content.Load("icons/explo"); - bitmapPad = game1.Content.Load("icons/pad"); - bitmapSpeedyBlupi = game1.Content.Load("backgrounds/speedyblupi"); - bitmapBlupiYoupie = game1.Content.Load("backgrounds/blupiyoupie"); - bitmapGear = game1.Content.Load("backgrounds/gear"); + spriteBatch = new SpriteBatch(game1.GraphicsDevice()); + bitmapText = game1.Content.Load("icons/text", Texture2D.class); + bitmapButton = game1.Content.Load("icons/button", Texture2D.class); + bitmapJauge = game1.Content.Load("icons/jauge", Texture2D.class); + bitmapBlupi = game1.Content.Load("icons/blupi", Texture2D.class); + bitmapBlupi1 = game1.Content.Load("icons/blupi1", Texture2D.class); + bitmapObject = game1.Content.Load("icons/object-m", Texture2D.class); + bitmapElement = game1.Content.Load("icons/element", Texture2D.class); + bitmapExplo = game1.Content.Load("icons/explo", Texture2D.class); + bitmapPad = game1.Content.Load("icons/pad", Texture2D.class); + bitmapSpeedyBlupi = game1.Content.Load("backgrounds/speedyblupi", Texture2D.class); + bitmapBlupiYoupie = game1.Content.Load("backgrounds/blupiyoupie", Texture2D.class); + bitmapGear = game1.Content.Load("backgrounds/gear", Texture2D.class); UpdateGeometry(); } private void UpdateGeometry() { - double num = graphics.GraphicsDevice.Viewport.Width; - double num2 = graphics.GraphicsDevice.Viewport.Height; + double num = graphics.GraphicsDevice().Viewport().Width(); + double num2 = graphics.GraphicsDevice().Viewport().Height(); double val = num / 640.0; double val2 = num2 / 480.0; - zoom = Math.Min(val, val2); + zoom = Math_.Min(val, val2); originX = (num - 640.0 * zoom) / 2.0; originY = (num2 - 480.0 * zoom) / 2.0; } - public void BackgroundCache(string name) + public void BackgroundCache(String name) { - bitmapBackground = game1.Content.Load("backgrounds/" + name); + bitmapBackground = game1.Content.Load("backgrounds/" + name, Texture2D.class); } - public bool Start() + public boolean Start() { - graphics.GraphicsDevice.Clear(Color.CornflowerBlue); + graphics.GraphicsDevice().Clear(Color.CornflowerBlue); return true; } - public bool Finish() + public boolean Finish() { return true; } public void DrawBackground() { - double num = graphics.GraphicsDevice.Viewport.Width; - double num2 = graphics.GraphicsDevice.Viewport.Height; + double num = graphics.GraphicsDevice().Viewport().Width(); + double num2 = graphics.GraphicsDevice().Viewport().Height(); Texture2D bitmap = GetBitmap(3); Rectangle srcRectangle = GetSrcRectangle(bitmap, 10, 10, 10, 10, 0, 0); Rectangle destinationRectangle = new Rectangle(0, 0, (int)num, (int)num2); spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend); spriteBatch.Draw(bitmap, destinationRectangle, srcRectangle, Color.White); spriteBatch.End(); - TinyPoint tinyPoint = default(TinyPoint); + TinyPoint tinyPoint = default_(new TinyPoint()); tinyPoint.X = (int)originX; tinyPoint.Y = (int)originY; TinyPoint dest = tinyPoint; - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = 0; tinyRect.Top = 0; tinyRect.Right = 640; @@ -294,7 +303,7 @@ namespace WindowsPhoneSpeedyBlupi { pos.X = (int)((double)pos.X + originX); pos.Y = (int)((double)pos.Y + originY); - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = pos.X; tinyRect.Top = pos.Y; tinyRect.Right = pos.X + (int)(32.0 * size); @@ -307,7 +316,7 @@ namespace WindowsPhoneSpeedyBlupi { pos.X = (int)((double)pos.X + originX); pos.Y = (int)((double)pos.Y + originY); - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = pos.X; tinyRect.Top = pos.Y; tinyRect.Right = pos.X; @@ -318,7 +327,7 @@ namespace WindowsPhoneSpeedyBlupi public void QuickIcon(int channel, int rank, TinyPoint pos) { - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = pos.X; tinyRect.Top = pos.Y; tinyRect.Right = pos.X; @@ -329,7 +338,7 @@ namespace WindowsPhoneSpeedyBlupi public void QuickIcon(int channel, int rank, TinyPoint pos, double opacity, double rotation) { - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = pos.X; tinyRect.Top = pos.Y; tinyRect.Right = pos.X; @@ -338,12 +347,12 @@ namespace WindowsPhoneSpeedyBlupi DrawIcon(channel, rank, rect, opacity, rotation, true); } - public bool DrawPart(int channel, TinyPoint dest, TinyRect rect) + public boolean DrawPart(int channel, TinyPoint dest, TinyRect rect) { return DrawPart(channel, dest, rect, 1.0); } - public bool DrawPart(int channel, TinyPoint dest, TinyRect rect, double zoom) + public boolean DrawPart(int channel, TinyPoint dest, TinyRect rect, double zoom) { Texture2D bitmap = GetBitmap(channel); if (bitmap == null) @@ -355,20 +364,20 @@ 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 destinationRectangle = new Rectangle(dest.X, dest.Y, (int)((double)rect.Width * zoom), (int)((double)rect.Height * zoom)); + Rectangle value = new Rectangle(rect.Left, rect.Top, 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); spriteBatch.End(); return true; } - public void DrawIcon(int channel, int icon, TinyRect rect, double opacity, bool useHotSpot) + public void DrawIcon(int channel, int icon, TinyRect rect, double opacity, boolean useHotSpot) { DrawIcon(channel, icon, rect, opacity, 0.0, useHotSpot); } - public void DrawIcon(int channel, int icon, TinyRect rect, double opacity, double rotation, bool useHotSpot) + public void DrawIcon(int channel, int icon, TinyRect rect, double opacity, double rotation, boolean useHotSpot) { if (icon == -1) { @@ -414,7 +423,7 @@ namespace WindowsPhoneSpeedyBlupi num = 144; bitmapGridY = 144; num2 = Tables.table_explo_size[icon]; - iconWidth = Math.Max(num2, 128); + iconWidth = Math_.Max(num2, 128); gap = 0; break; case 6: @@ -485,8 +494,8 @@ namespace WindowsPhoneSpeedyBlupi private Rectangle GetSrcRectangle(Texture2D bitmap, int bitmapGridX, int bitmapGridY, int iconWidth, int iconHeight, int gap, int icon) { - int width = bitmap.Bounds.Width; - int height = bitmap.Bounds.Height; + int width = bitmap.Bounds().Width; + int height = bitmap.Bounds().Height; int num = icon % (width / bitmapGridX); int num2 = icon / (width / bitmapGridX); bitmapGridX += gap; @@ -494,10 +503,10 @@ namespace WindowsPhoneSpeedyBlupi return new Rectangle(gap + num * bitmapGridX, gap + num2 * bitmapGridY, iconWidth, iconHeight); } - private Rectangle GetDstRectangle(TinyRect rect, int iconWidth, int iconHeight, bool useHotSpot) + private Rectangle GetDstRectangle(TinyRect rect, int iconWidth, int iconHeight, boolean useHotSpot) { - int num = ((rect.Width == 0) ? iconWidth : rect.Width); - int num2 = ((rect.Height == 0) ? iconHeight : rect.Height); + 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 num5 = (int)((double)num3 + (double)num * zoom); @@ -558,4 +567,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Program.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Program.java index 802d40f..34c3a62 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Program.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Program.java @@ -1,2 +1,17 @@ -using var game = new WindowsPhoneSpeedyBlupi.Game1(); -game.Run(); +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +import com.openeggbert.jxna.Microsoft.Xna.Framework.*; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; + + + +@namespace(name = "WindowsPhoneSpeedyBlupi") + + public class Program { + public static void main(String[] args) { + Game game = new com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi.Game1(); + game.Run(); + } + + +} diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Properties/AssemblyInfo.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Properties/AssemblyInfo.java index 7b1a1af..3a6e9ca 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Properties/AssemblyInfo.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Properties/AssemblyInfo.java @@ -1,41 +1,46 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Resources; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi.Properties; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -//[assembly: AssemblyTitle("Speedy Blupi")] -//[assembly: AssemblyProduct("Speedy Blupi")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("Dada Games")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en-US")] +public class AssemblyInfo { +} -// Configuration -//[assembly: AssemblyConfiguration("")] -[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] -[assembly: CompilationRelaxations(8)] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4b6c546f-6967-447a-8eda-c3236043dcf7")] - -// Version information for an assembly consists of the following four values: +//using System.Reflection; +//using System.Runtime.CompilerServices; +//using System.Runtime.InteropServices; +//using System.Resources; // -// Major Version -// Minor Version -// Build Number -// Revision +//// General Information about an assembly is controlled through the following +//// set of attributes. Change these attribute values to modify the information +//// associated with an assembly. +////[assembly: AssemblyTitle("Speedy Blupi")] +////[assembly: AssemblyProduct("Speedy Blupi")] +//[assembly: AssemblyDescription("")] +//[assembly: AssemblyCompany("Dada Games")] +//[assembly: AssemblyCopyright("Copyright © 2013")] +//[assembly: AssemblyTrademark("")] +//[assembly: AssemblyCulture("")] +//[assembly: NeutralResourcesLanguage("en-US")] // -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.5")] -[assembly: AssemblyFileVersion("1.0.0.0")] +//// Configuration +////[assembly: AssemblyConfiguration("")] +//[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] +//[assembly: CompilationRelaxations(8)] +// +//// Setting ComVisible to false makes the types in this assembly not visible +//// to COM components. If you need to access a type in this assembly from +//// COM, set the ComVisible attribute to true on that type. +//[assembly: ComVisible(false)] +// +//// The following GUID is for the ID of the typelib if this project is exposed to COM +//[assembly: Guid("4b6c546f-6967-447a-8eda-c3236043dcf7")] +// +//// Version information for an assembly consists of the following four values: +//// +//// Major Version +//// Minor Version +//// Build Number +//// Revision +//// +//// You can specify all the values or you can default the Revision and Build Numbers +//// by using the '*' as shown below: +//[assembly: AssemblyVersion("1.0.0.5")] +//[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Resource.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Resource.java index e9ff8bd..2dde272 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Resource.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Resource.java @@ -1,63 +1,66 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 // WindowsPhoneSpeedyBlupi.Resource -using System.CodeDom.Compiler; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Resources; -using System.Runtime.CompilerServices; -using WindowsPhoneSpeedyBlupi; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.internal; +//import com.openeggbert.jdotnet.System.CodeDom.Compiler.*; +//import com.openeggbert.jdotnet.System.ComponentModel.*; +import com.openeggbert.jdotnet.System.Diagnostics.*; +import com.openeggbert.jdotnet.System.Globalization.*; +import com.openeggbert.jdotnet.System.Resources.*; +//import com.openeggbert.jdotnet.System.Runtime.CompilerServices.*; +import static com.openeggbert.jdotnet.System.Type.typeof; +import com.openeggbert.jdotnet.System.object; //[DebuggerNonUserCode] //[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] //[CompilerGenerated] -namespace WindowsPhoneSpeedyBlupi -{ - internal class Resource + + + @internal class Resource { private static ResourceManager resourceMan; private static CultureInfo resourceCulture; - [EditorBrowsable(EditorBrowsableState.Advanced)] - internal static ResourceManager ResourceManager + //[EditorBrowsable(EditorBrowsableState.Advanced)] + @internal static ResourceManager ResourceManager() { - get + { if (object.ReferenceEquals(resourceMan, null)) { - ResourceManager resourceManager = new ResourceManager("WindowsPhoneSpeedyBlupi.Resource", typeof(Resource).Assembly); + ResourceManager resourceManager = new ResourceManager("WindowsPhoneSpeedyBlupi.Resource", typeof(Resource.class).Assembly()); resourceMan = resourceManager; } return resourceMan; } } - [EditorBrowsable(EditorBrowsableState.Advanced)] - internal static CultureInfo Culture + //[EditorBrowsable(EditorBrowsableState.Advanced)] + @internal static CultureInfo Culture() { - get + { return resourceCulture; } - set - { - resourceCulture = value; - } + } + @internal + static void setCultureInfo(CultureInfo value) { + resourceCulture = value; } - internal static string Title + @internal static String Title() { - get + { return ResourceManager.GetString("Title", resourceCulture); } } - internal Resource() + @internal private Resource() { } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Slider.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Slider.java index ff6f9b5..213e5a4 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Slider.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Slider.java @@ -1,63 +1,77 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Slider -using System; -using WindowsPhoneSpeedyBlupi; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.Slider +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jdotnet.System.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; + + @namespace(name = "WindowsPhoneSpeedyBlupi") + @AllArgsConstructor public class Slider { - public TinyPoint TopLeftCorner { get; set; } - - public double Value { get; set; } - - private int PosLeft - { - get - { - return TopLeftCorner.X + 22; - } + public TinyPoint TopLeftCorner() { + return getTopLeftCorner(); } + @Getter @Setter + public TinyPoint TopLeftCorner; - private int PosRight + public double Value() { + return getValue(); + } + + @Getter @Setter + public double Value; + + private int PosLeft() { + return getPosLeft(); + } + private int getPosLeft() { - get - { - return TopLeftCorner.X + 248 - 22; - } + return TopLeftCorner.X + 22; + } + private int PosRight() { + return getPosRight(); + } + private int getPosRight() + { + return TopLeftCorner.X + 248 - 22; } public void Draw(Pixmap pixmap) { - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = TopLeftCorner.X - pixmap.Origin.X; - tinyPoint.Y = TopLeftCorner.Y - pixmap.Origin.Y; + TinyPoint tinyPoint = default_(new TinyPoint()); + tinyPoint.X = TopLeftCorner.X - pixmap.Origin().X; + tinyPoint.Y = TopLeftCorner.Y - pixmap.Origin().Y; TinyPoint dest = tinyPoint; - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = 0; tinyRect.Right = 124; tinyRect.Top = 0; tinyRect.Bottom = 22; TinyRect rect = tinyRect; pixmap.DrawPart(5, dest, rect, 2.0); - int num = (int)((double)(PosRight - PosLeft) * Value); + 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; + TinyRect tinyRect2 = default_(new TinyRect()); + tinyRect2.Left = PosLeft() + num - num3 / 2; + tinyRect2.Right = PosLeft() + num + num3 / 2; tinyRect2.Top = num2 - num3 / 2; tinyRect2.Bottom = num2 + num3 / 2; rect = tinyRect2; pixmap.DrawIcon(14, 1, rect, 1.0, false); - TinyRect tinyRect3 = default(TinyRect); + TinyRect tinyRect3 = default_(new TinyRect()); tinyRect3.Left = TopLeftCorner.X - 65; tinyRect3.Right = TopLeftCorner.X - 65 + 60; tinyRect3.Top = TopLeftCorner.Y - 10; tinyRect3.Bottom = TopLeftCorner.Y - 10 + 60; rect = tinyRect3; pixmap.DrawIcon(10, 37, rect, 1.0, false); - TinyRect tinyRect4 = default(TinyRect); + TinyRect tinyRect4 = default_(new TinyRect()); tinyRect4.Left = TopLeftCorner.X + 248 + 5; tinyRect4.Right = TopLeftCorner.X + 248 + 5 + 60; tinyRect4.Top = TopLeftCorner.Y - 10; @@ -66,9 +80,9 @@ namespace WindowsPhoneSpeedyBlupi pixmap.DrawIcon(10, 38, rect, 1.0, false); } - public bool Move(TinyPoint pos) + public boolean Move(TinyPoint pos) { - TinyRect tinyRect = default(TinyRect); + TinyRect tinyRect = default_(new TinyRect()); tinyRect.Left = TopLeftCorner.X - 50; tinyRect.Right = TopLeftCorner.X + 248 + 50; tinyRect.Top = TopLeftCorner.Y - 50; @@ -76,9 +90,9 @@ namespace WindowsPhoneSpeedyBlupi TinyRect rect = tinyRect; if (Misc.IsInside(rect, pos)) { - double val = ((double)pos.X - (double)PosLeft) / (double)(PosRight - PosLeft); - val = Math.Max(val, 0.0); - val = Math.Min(val, 1.0); + double val = ((double)pos.X - (double)PosLeft()) / (double)(PosRight() - PosLeft()); + val = Math_.Max(val, 0.0); + val = Math_.Min(val, 1.0); if (Value != val) { Value = val; @@ -89,4 +103,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Sound.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Sound.java index 966287e..46e3a37 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Sound.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Sound.java @@ -1,42 +1,39 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Sound -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Xna.Framework.Audio; -using WindowsPhoneSpeedyBlupi; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.Sound +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jdotnet.System.Collections.Generic.*; +import com.openeggbert.jdotnet.System.Linq.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.Audio.*; +import java.util.ArrayList; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.readonly; + + + + @namespace(name = "WindowsPhoneSpeedyBlupi") -namespace WindowsPhoneSpeedyBlupi -{ public class Sound { private class Play { - private readonly SoundEffectInstance sei; + private final SoundEffectInstance sei; - private readonly int channel; + private final int channel; + + public int Channel() { return channel;} - public int Channel + public boolean IsFree() { - get - { - return channel; - } + return sei.State == SoundState.Stopped; } - public bool IsFree - { - get - { - return sei.State == SoundState.Stopped; - } - } - - public Play(SoundEffect se, int channel, double volume, double balance, double? pitch, bool isLooped) + public Play(SoundEffect se, int channel, double volume, double balance, Double pitch, boolean isLooped) { this.channel = channel; int num = channel * 2; - if (num >= 0 && num < tableVolumePitch.Length) + if (num >= 0 && num < tableVolumePitch.length) { volume *= tableVolumePitch[num]; pitch = tableVolumePitch[num + 1]; @@ -44,7 +41,7 @@ namespace WindowsPhoneSpeedyBlupi sei = se.CreateInstance(); sei.Volume = (float)volume; sei.Pan = (float)balance; - sei.Pitch = (float)(pitch ?? 0.0); + sei.Pitch = (float)(pitch == null ? 0.0d : pitch); sei.IsLooped = isLooped; sei.Play(); } @@ -55,7 +52,7 @@ namespace WindowsPhoneSpeedyBlupi } } - private static double[] tableVolumePitch = new double[200] + private static double[] tableVolumePitch = new double[] { 1.0, 0.0, 0.5, 1.0, 0.5, 1.0, 1.0, 0.2, 1.0, 0.2, 1.0, 0.1, 1.0, 0.3, 1.0, 0.2, 1.0, 0.3, 1.0, 0.5, @@ -79,15 +76,15 @@ namespace WindowsPhoneSpeedyBlupi 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2 }; - public static readonly int MAXVOLUME = 20; + public static final int MAXVOLUME = 20; - private readonly Game1 game1; + private final Game1 game1; - private readonly GameData gameData; + private final GameData gameData; - private readonly List soundEffects; + private @readonly final List_ soundEffects; - private readonly List plays; + private final List_ plays; private double volume; @@ -95,39 +92,39 @@ namespace WindowsPhoneSpeedyBlupi { this.game1 = game1; this.gameData = gameData; - soundEffects = new List(); - plays = new List(); + soundEffects = new List_<>(); + plays = new List_<>(); volume = 1.0; SoundEffect.MasterVolume = 1f; } public void LoadContent() { - if (Def.HasSound) + if (Def.HasSound()) { for (int i = 0; i <= 92; i++) { - string assetName = string.Format("sounds/sound{0}", i.ToString("d3")); - SoundEffect item = game1.Content.Load(assetName); + String assetName = string.Format("sounds/sound{0}", int_.of(i).ToString("d3")); + SoundEffect item = game1.Content.Load(assetName, SoundEffect.class); soundEffects.Add(item); } } } - public bool Create() + public boolean Create() { return true; } - public void SetState(bool bState) + public void SetState(boolean bState) { } - public void SetCDAudio(bool bAudio) + public void SetCDAudio(boolean bAudio) { } - public bool GetEnable() + public boolean GetEnable() { return true; } @@ -150,39 +147,40 @@ namespace WindowsPhoneSpeedyBlupi { return 0; } - + public void StopAll() { while (plays.Any()) { - plays[0].Stop(); + plays.ElementAt(0).Stop(); plays.RemoveAt(0); } } - public bool PlayImage(int channel, TinyPoint pos) + public boolean PlayImage(int channel, TinyPoint pos) { return PlayImage(channel, pos, -1, false); } - public bool PlayImage(int channel, TinyPoint pos, int rank, bool bLoop) + public boolean PlayImage(int channel, TinyPoint pos, int rank, boolean bLoop) { - if (!gameData.Sounds) + if (!gameData.Sounds()) { return true; } - if (channel >= 0 && channel < soundEffects.Count) + if (channel >= 0 && channel < soundEffects.Count()) { - if (channel != 10 && plays.Where((Play x) => x.Channel == channel && !x.IsFree).Any()) - { + + if (channel != 10 && plays.stream() + .anyMatch(x -> x.Channel() == channel && !x.IsFree())) { return true; } - if (plays.Count >= 10) + if (plays.Count() >= 10) { int num = 0; - while (num < plays.Count) + while (num < plays.Count()) { - if (plays[num].IsFree) + if (plays.ElementAt(num).IsFree()) { plays.RemoveAt(num); } @@ -192,25 +190,25 @@ namespace WindowsPhoneSpeedyBlupi } } } - Play item = new Play(soundEffects[channel], channel, (float)GetVolume(pos), (float)GetBalance(pos), null, bLoop); + Play item = new Play(soundEffects.ElementAt(channel), channel, (float)GetVolume(pos), (float)GetBalance(pos), null, bLoop); plays.Add(item); } return true; } - public bool PosImage(int channel, TinyPoint pos) + public boolean PosImage(int channel, TinyPoint pos) { return true; } - public bool Stop(int channel) + public boolean Stop(int channel) { int num = 0; - while (num < plays.Count) + while (num < plays.Count()) { - if (plays[num].Channel == channel) + if (plays.ElementAt(num).Channel() == channel) { - plays[num].Stop(); + plays.ElementAt(num).Stop(); plays.RemoveAt(num); } else @@ -233,8 +231,8 @@ namespace WindowsPhoneSpeedyBlupi pos.X -= 640; val = 1.0 - (double)(pos.X / 640) * 2.0; } - val = Math.Max(val, 0.0); - val = Math.Min(val, 1.0); + val = Math_.Max(val, 0.0); + val = Math_.Min(val, 1.0); double val2 = 1.0; if (pos.Y < 0) { @@ -245,16 +243,15 @@ namespace WindowsPhoneSpeedyBlupi pos.Y -= 480; val2 = 1.0 - (double)(pos.Y / 480) * 3.0; } - val2 = Math.Max(val2, 0.0); - val2 = Math.Min(val2, 1.0); - return Math.Min(val, val2) * volume; + val2 = Math_.Max(val2, 0.0); + val2 = Math_.Min(val2, 1.0); + return Math_.Min(val, val2) * volume; } private double GetBalance(TinyPoint pos) { double val = (double)pos.X * 2.0 / 640.0 - 1.0; - val = Math.Max(val, -1.0); - return Math.Min(val, 1.0); + val = Math_.Max(val, -1.0); + return Math_.Min(val, 1.0); } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables.java index 622248a..9e136d9 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables.java @@ -1,11 +1,21 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Tables -using WindowsPhoneSpeedyBlupi; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public static class Tables +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 + +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.static_; + +// WindowsPhoneSpeedyBlupi.Tables + + + + @namespace(name = "WindowsPhoneSpeedyBlupi") + @static_ + public class Tables { + private Tables() { + //Not meant to be instantiated. + } public enum CheatCodes { BuildOfficialMissions, @@ -32,303 +42,9 @@ namespace WindowsPhoneSpeedyBlupi WeelKeys } - public static int[] table_blupi = new int[2911] - { - 35, 9, 0, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 1, 330, 0, 0, 0, 0, 0, 0, - 23, 23, 23, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 23, 23, 23, 23, 23, 23, 0, 0, - 0, 0, 0, 0, 0, 0, 23, 23, 23, 23, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 23, 23, 23, 23, 23, 0, 0, 0, 23, 23, - 23, 0, 0, 0, 0, 0, 0, 133, 133, 0, - 0, 0, 133, 133, 0, 0, 0, 0, 0, 0, - 0, 133, 133, 0, 0, 0, 0, 23, 23, 23, - 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 23, 23, 0, 0, 0, 0, 0, 23, - 23, 23, 0, 0, 0, 135, 135, 136, 136, 137, - 137, 137, 137, 137, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 137, 137, 137, - 136, 136, 135, 135, 135, 0, 0, 0, 0, 0, - 23, 23, 23, 0, 0, 133, 133, 0, 0, 0, - 23, 23, 23, 23, 0, 0, 0, 0, 0, 0, - 0, 23, 23, 0, 0, 0, 0, 0, 0, 0, - 0, 133, 133, 0, 0, 0, 0, 0, 23, 23, - 23, 23, 0, 0, 0, 135, 135, 136, 136, 137, - 137, 137, 137, 137, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, - 137, 137, 138, 138, 137, 137, 137, 137, 137, 137, - 136, 136, 135, 135, 135, 0, 0, 0, 0, 0, - 23, 23, 23, 0, 0, 133, 133, 0, 0, 0, - 23, 23, 23, 23, 0, 0, 0, 0, 0, 0, - 0, 23, 23, 0, 0, 0, 0, 0, 0, 0, - 0, 133, 133, 0, 0, 0, 0, 0, 23, 23, - 23, 23, 0, 0, 0, 2, 6, 0, 5, 6, - 7, 8, 9, 10, 60, 3, 0, 19, 18, 19, - 3, 6, 0, 1, 1, 2, 2, 3, 3, 4, - 3, 0, 17, 18, 19, 5, 5, 4, 169, 26, - 170, 170, 27, 59, 6, 0, 3, 3, 2, 2, - 1, 1, 61, 5, 0, 34, 35, 34, 34, 33, - 62, 2, 0, 35, 34, 6, 3, 2, 33, 34, - 35, 7, 1, 0, 44, 8, 8, 0, 0, 169, - 26, 170, 27, 171, 28, 172, 9, 6, 0, 5, - 6, 7, 8, 9, 10, 10, 6, 0, 5, 6, - 7, 8, 9, 10, 13, 6, 0, 41, 41, 42, - 42, 43, 43, 86, 18, 0, 1, 1, 2, 2, - 41, 41, 42, 42, 43, 43, 42, 42, 41, 41, - 2, 2, 1, 1, 87, 26, 0, 135, 135, 137, - 137, 231, 231, 231, 231, 230, 230, 231, 231, 231, - 231, 230, 230, 231, 231, 231, 231, 230, 230, 137, - 137, 135, 135, 11, 70, 0, 40, 40, 40, 40, - 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, - 40, 41, 41, 41, 40, 40, 40, 40, 40, 40, - 40, 41, 41, 41, 40, 40, 42, 42, 42, 43, - 43, 43, 44, 44, 44, 45, 45, 45, 46, 46, - 47, 47, 46, 46, 47, 47, 46, 46, 47, 47, - 46, 46, 47, 47, 46, 46, 47, 47, 46, 46, - 47, 47, 46, 46, 47, 47, 75, 1, 0, -1, - 76, 70, 0, 40, 40, 40, 40, 41, 41, 41, - 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, - 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, - 41, 40, 40, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 77, 110, 0, 324, 325, 324, 325, - 324, 325, 324, 325, 324, 325, 324, 325, 324, 325, - 324, 325, 324, 325, 324, 325, 324, 324, 325, 325, - 326, 326, 327, 327, 328, 328, 329, 329, 330, 330, - 331, 331, 332, 332, 333, 333, 334, 334, 333, 333, - 332, 332, 331, 331, 330, 330, 329, 329, 329, 330, - 330, 330, 331, 331, 331, 332, 332, 332, 333, 333, - 333, 334, 334, 334, 333, 333, 333, 332, 332, 332, - 331, 331, 331, 330, 330, 330, 329, 329, 329, 329, - 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, - 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, - 329, 329, 329, 329, 329, 329, 78, 1, 0, -1, - 79, 1, 0, -1, 80, 1, 0, -1, 81, 1, - 0, -1, 14, 6, 0, 49, 50, 51, 52, 53, - 54, 29, 6, 0, 126, 125, 124, 123, 122, 121, - 28, 6, 0, 122, 122, 122, 125, 125, 125, 15, - 1, 0, 61, 16, 8, 0, 61, 62, 63, 62, - 61, 64, 65, 64, 17, 10, 0, 71, 71, 72, - 72, 73, 73, 74, 74, 75, 75, 67, 1, 0, - 315, 68, 12, 0, 296, 297, 298, 299, 300, 301, - 302, 301, 300, 299, 298, 297, 69, 7, 0, 296, - 310, 311, 312, 313, 314, 303, 18, 10, 0, 76, - 76, 76, 76, 76, 76, 77, 77, 77, 77, 19, - 14, 0, 76, 76, 77, 77, 78, 78, 79, 79, - 80, 80, 81, 81, 39, 39, 20, 10, 0, 88, - 88, 89, 89, 90, 90, 91, 91, 92, 92, 21, - 12, 0, 93, 93, 94, 94, 95, 95, 96, 96, - 97, 97, 98, 98, 22, 12, 0, 93, 93, 94, - 94, 95, 95, 96, 96, 97, 97, 98, 98, 23, - 10, 0, 105, 105, 106, 106, 107, 107, 108, 108, - 109, 109, 24, 90, 0, 93, 96, 98, 94, 95, - 93, 95, 98, 93, 94, 96, 96, 94, 94, 98, - 98, 93, 93, 97, 97, 94, 94, 94, 96, 96, - 96, 93, 93, 93, 93, 94, 94, 94, 94, 94, - 97, 97, 97, 97, 97, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 79, 79, 76, 76, 76, - 76, 79, 79, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 25, 8, 0, 111, 111, - 110, 110, 111, 111, 112, 112, 26, 8, 0, 111, - 111, 110, 110, 111, 111, 112, 112, 27, 7, 0, - 112, 113, 114, 115, 116, 117, 118, 30, 12, 0, - 25, 25, 29, 29, 46, 46, 47, 47, 46, 46, - 29, 29, 31, 328, 0, 156, 156, 156, 156, 157, - 157, 157, 157, 158, 158, 158, 158, 157, 157, 157, - 157, 156, 156, 156, 156, 157, 157, 157, 157, 158, - 158, 158, 158, 157, 157, 157, 157, 156, 156, 156, - 156, 157, 157, 157, 157, 158, 158, 158, 158, 157, - 157, 157, 157, 156, 156, 156, 156, 157, 157, 157, - 157, 158, 158, 158, 158, 157, 157, 157, 157, 156, - 156, 156, 156, 157, 157, 157, 157, 158, 158, 158, - 158, 157, 157, 157, 157, 156, 156, 156, 156, 157, - 157, 157, 157, 158, 158, 158, 158, 157, 157, 157, - 157, 156, 156, 156, 156, 157, 157, 157, 157, 158, - 158, 158, 158, 157, 157, 157, 157, 144, 144, 143, - 143, 151, 151, 162, 162, 163, 163, 164, 164, 163, - 163, 162, 162, 163, 163, 164, 164, 163, 163, 162, - 162, 163, 163, 164, 164, 163, 163, 162, 162, 163, - 163, 164, 164, 163, 163, 162, 162, 151, 151, 143, - 143, 144, 144, 157, 157, 156, 156, 156, 156, 157, - 157, 157, 157, 158, 158, 158, 158, 157, 157, 157, - 157, 156, 156, 156, 156, 157, 157, 157, 157, 158, - 158, 158, 158, 157, 157, 157, 157, 156, 156, 156, - 156, 157, 157, 157, 157, 158, 158, 158, 158, 157, - 157, 157, 157, 156, 156, 156, 156, 157, 157, 157, - 157, 158, 158, 158, 158, 157, 157, 157, 157, 144, - 144, 143, 143, 151, 151, 162, 162, 163, 163, 164, - 164, 163, 163, 162, 162, 163, 163, 164, 164, 163, - 163, 162, 162, 163, 163, 164, 164, 163, 163, 162, - 162, 163, 163, 164, 164, 163, 163, 162, 162, 151, - 151, 143, 143, 151, 151, 162, 162, 163, 163, 164, - 164, 163, 163, 162, 162, 163, 163, 164, 164, 163, - 163, 162, 162, 163, 163, 164, 164, 163, 163, 162, - 162, 163, 163, 164, 164, 163, 163, 162, 162, 163, - 163, 164, 164, 163, 163, 162, 162, 163, 163, 164, - 164, 163, 163, 162, 162, 151, 151, 143, 143, 144, - 144, 157, 157, 32, 12, 0, 144, 144, 145, 145, - 146, 146, 145, 145, 144, 144, 143, 143, 33, 10, - 0, 151, 151, 152, 152, 153, 153, 154, 154, 155, - 155, 34, 10, 0, 157, 157, 165, 165, 165, 165, - 166, 166, 166, 166, 36, 32, 0, 135, 177, 177, - 178, 178, 179, 179, 180, 180, 179, 179, 178, 178, - 179, 179, 180, 180, 179, 179, 178, 178, 179, 179, - 180, 180, 179, 179, 178, 178, 177, 177, 135, 37, - 140, 0, 182, 182, 182, 182, 208, 208, 208, 208, - 208, 182, 182, 182, 182, 182, 182, 208, 208, 208, - 208, 208, 194, 194, 194, 182, 182, 182, 182, 208, - 208, 208, 208, 208, 182, 182, 182, 182, 182, 182, - 208, 208, 208, 208, 182, 182, 182, 182, 182, 182, - 182, 182, 194, 194, 194, 195, 195, 195, 196, 196, - 196, 197, 197, 197, 198, 198, 198, 198, 197, 197, - 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, - 182, 182, 182, 182, 208, 208, 208, 208, 182, 182, - 182, 182, 194, 194, 194, 195, 195, 195, 196, 196, - 196, 197, 197, 197, 198, 198, 198, 198, 197, 197, - 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, - 182, 182, 182, 182, 208, 208, 208, 208, 182, 182, - 182, 182, 210, 210, 211, 211, 211, 211, 211, 211, - 210, 210, 85, 1, 0, 211, 38, 96, 0, 182, - 183, 184, 185, 186, 187, 182, 183, 184, 185, 186, - 187, 182, 183, 184, 185, 186, 187, 182, 182, 182, - 182, 182, 182, 182, 183, 184, 185, 186, 187, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 183, 184, 185, 186, 187, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 183, 184, 185, 186, - 187, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 39, 14, 0, 194, 194, - 195, 195, 196, 196, 197, 197, 198, 198, 199, 199, - 200, 200, 40, 3, 0, 210, 211, 212, 41, 8, - 0, 213, 213, 214, 214, 215, 215, 214, 214, 42, - 20, 0, 17, 17, 18, 18, 19, 19, 1, 1, - 215, 215, 214, 214, 213, 213, 212, 212, 211, 211, - 210, 210, 43, 20, 0, 210, 210, 211, 211, 212, - 212, 213, 213, 214, 214, 215, 215, 1, 1, 19, - 19, 18, 18, 17, 17, 44, 29, 0, 1, 1, - 222, 222, 222, 222, 223, 223, 224, 224, 225, 225, - 225, 225, 225, 224, 223, 222, 222, 222, 223, 223, - 224, 224, 225, 225, 225, 1, 1, 45, 29, 0, - 1, 1, 222, 222, 222, 222, 223, 223, 224, 224, - 225, 225, 225, 225, 225, 224, 223, 222, 222, 222, - 223, 223, 224, 224, 225, 225, 225, 1, 1, 46, - 32, 0, 1, 1, 227, 227, 228, 228, 229, 229, - 228, 228, 227, 227, 226, 226, 227, 227, 228, 228, - 229, 229, 228, 228, 227, 227, 226, 226, 227, 227, - 228, 228, 1, 1, 47, 34, 0, 135, 135, 136, - 136, 137, 137, 231, 231, 231, 231, 230, 230, 231, - 231, 231, 231, 230, 230, 231, 231, 231, 231, 230, - 230, 231, 231, 231, 231, 137, 137, 136, 136, 135, - 135, 48, 40, 0, 0, 0, 135, 135, 136, 136, - 137, 137, 232, 233, 232, 233, 232, 233, 232, 233, - 232, 233, 232, 233, 232, 233, 232, 233, 232, 233, - 232, 233, 232, 233, 232, 233, 137, 137, 136, 136, - 135, 135, 0, 0, 65, 44, 0, 1, 1, 288, - 288, 289, 289, 290, 290, 290, 289, 288, 288, 289, - 289, 290, 290, 290, 289, 288, 288, 289, 289, 290, - 290, 290, 289, 288, 288, 289, 289, 290, 290, 290, - 289, 288, 288, 289, 289, 290, 290, 290, 289, 1, - 1, 49, 32, 0, 234, 234, 235, 235, 236, 236, - 235, 235, 234, 234, 235, 235, 236, 236, 235, 235, - 234, 234, 235, 235, 236, 236, 235, 235, 234, 234, - 235, 235, 236, 236, 235, 235, 50, 64, 0, 238, - 238, 239, 239, 240, 240, 241, 241, 241, 241, 241, - 241, 241, 241, 241, 241, 240, 240, 241, 241, 240, - 240, 241, 241, 241, 241, 241, 241, 241, 241, 241, - 241, 241, 241, 240, 240, 241, 241, 240, 240, 241, - 241, 241, 241, 241, 241, 241, 241, 240, 240, 239, - 239, 238, 238, 238, 238, 238, 238, 237, 237, 238, - 238, 237, 237, 51, 8, 0, 238, 238, 237, 237, - 238, 238, 239, 239, 52, 12, 0, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 53, - 6, 0, 251, 251, 238, 238, 238, 238, 54, 25, - 0, 168, 168, 169, 169, 170, 170, 171, 171, 170, - 170, 169, 169, 168, 168, 169, 169, 169, 168, 168, - 169, 169, 170, 170, 169, 168, 55, 4, 0, 253, - 253, 254, 254, 56, 64, 0, 1, 3, 270, 268, - 1, 3, 270, 268, 1, 3, 270, 268, 1, 3, - 270, 268, 1, 3, 270, 268, 1, 3, 270, 268, - 1, 3, 270, 268, 1, 3, 270, 268, 1, 2, - 3, 4, 270, 269, 268, 0, 1, 2, 3, 4, - 270, 269, 268, 0, 1, 1, 2, 2, 3, 3, - 4, 4, 270, 270, 269, 269, 268, 268, 0, 0, - 57, 90, 0, 266, 267, 266, 267, 266, 267, 266, - 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, - 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, - 267, 266, 267, 40, 40, 40, 40, 41, 41, 41, - 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, - 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, - 41, 40, 40, 42, 42, 42, 43, 43, 43, 44, - 44, 44, 45, 45, 45, 46, 46, 47, 47, 46, - 46, 47, 47, 46, 46, 47, 47, 46, 46, 47, - 47, 46, 46, 82, 10, 0, 0, 268, 268, 269, - 269, 269, 269, 268, 268, 0, 58, 14, 0, 274, - 274, 271, 271, 271, 271, 272, 272, 273, 273, 273, - 273, 274, 274, 66, 16, 0, 291, 291, 292, 292, - 293, 293, 294, 294, 295, 295, 294, 294, 293, 293, - 292, 292, 72, 1, 0, 320, 73, 24, 0, 319, - 319, 318, 318, 317, 317, 318, 318, 319, 319, 320, - 320, 321, 321, 322, 322, 323, 323, 322, 322, 321, - 321, 320, 320, 74, 128, 0, 1, 1, 2, 2, - 3, 3, 4, 4, 270, 270, 269, 269, 268, 268, - 0, 0, 1, 2, 3, 4, 270, 269, 268, 0, - 1, 2, 3, 4, 270, 269, 268, 0, 1, 3, - 270, 268, 2, 4, 269, 0, 1, 3, 270, 268, - 2, 4, 269, 0, -1, 3, 270, -1, 2, -1, - 269, 0, 1, -1, -1, 268, -1, -1, 269, -1, - -1, -1, -1, 270, -1, -1, 2, -1, -1, -1, - -1, -1, -1, 29, 46, 47, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 63, 92, 0, 263, 264, 265, - 264, 263, 264, 265, 264, 263, 264, 265, 264, 263, - 264, 265, 264, 263, 264, 265, 264, 263, 264, 265, - 264, 263, 264, 265, 264, 263, 264, 265, 264, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, - 23, 23, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 23, 23, 0, 0, 0, 0, 0, 0, - 0, 133, 133, 0, 0, 0, 133, 133, 0, 0, - 0, 0, 0, 0, 0, 133, 133, 0, 0, 0, - 0, 23, 23, 23, 23, 0, 0, 0, 0, 64, - 104, 0, 1, 1, 2, 2, 3, 3, 285, 286, - 287, 286, 285, 286, 287, 286, 285, 286, 287, 286, - 285, 286, 287, 286, 285, 286, 287, 286, 285, 286, - 287, 286, 285, 286, 287, 286, 285, 286, 287, 286, - 3, 3, 2, 2, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 23, 23, 23, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, - 23, 0, 0, 0, 0, 0, 0, 0, 133, 133, - 0, 0, 0, 133, 133, 0, 0, 0, 0, 0, - 0, 0, 133, 133, 0, 0, 0, 0, 23, 23, - 23, 23, 0, 0, 0, 0, 83, 60, 0, 1, - 1, 288, 288, 289, 289, 290, 290, 290, 289, 288, - 288, 289, 289, 290, 290, 290, 289, 288, 288, 289, - 289, 290, 290, 290, 289, 288, 288, 289, 289, 290, - 290, 290, 289, 288, 288, 289, 289, 290, 290, 290, - 289, 288, 288, 289, 289, 290, 290, 290, 290, 290, - 290, 290, 290, 290, 290, 290, 290, 1, 1, 84, - 18, 0, 1, 1, 227, 227, 228, 228, 229, 229, - 228, 228, 227, 227, 226, 226, 227, 227, 1, 1, - 0 - }; + public static int[] table_blupi = Tables_table_blupi.table_blupi; - public static int[] table_mirror = new int[335] + public static int[] table_mirror = new int[] { 4, 3, 2, 1, 0, 11, 12, 13, 14, 15, 16, 5, 6, 7, 8, 9, 10, 20, 21, 22, @@ -366,13 +82,13 @@ namespace WindowsPhoneSpeedyBlupi 330, 331, 332, 333, 334 }; - public static int[] table_vitesse_march = new int[4] { 2, 4, 6, 8 }; + public static int[] table_vitesse_march = new int[] { 2, 4, 6, 8 }; - public static int[] table_vitesse_nage = new int[7] { 2, 1, 5, 10, 8, 6, 4 }; + public static int[] table_vitesse_nage = new int[] { 2, 1, 5, 10, 8, 6, 4 }; - public static int[] table_vitesse_surf = new int[6] { 0, 2, 5, 8, 3, 0 }; + public static int[] table_vitesse_surf = new int[] { 0, 2, 5, 8, 3, 0 }; - public static short[] table_decor_quart = new short[7056] + public static short[] table_decor_quart = new short[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1082,29 +798,29 @@ namespace WindowsPhoneSpeedyBlupi 1, 0, 0, 1, 1, 0 }; - public static int[] table_bulldozer_left = new int[8] { 66, 66, 67, 67, 66, 66, 65, 65 }; + public static int[] table_bulldozer_left = new int[] { 66, 66, 67, 67, 66, 66, 65, 65 }; - public static int[] table_bulldozer_right = new int[8] { 58, 58, 57, 57, 58, 58, 59, 59 }; + public static int[] table_bulldozer_right = new int[] { 58, 58, 57, 57, 58, 58, 59, 59 }; - public static int[] table_bulldozer_turn2l = new int[22] + public static int[] table_bulldozer_turn2l = new int[] { 58, 59, 59, 59, 60, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 64, 65, 65, 65, 66, 66, 66 }; - public static int[] table_bulldozer_turn2r = new int[22] + public static int[] table_bulldozer_turn2r = new int[] { 66, 65, 65, 65, 64, 64, 64, 63, 63, 62, 62, 61, 61, 60, 60, 60, 59, 59, 59, 58, 58, 58 }; - public static int[] table_poisson_left = new int[8] { 82, 82, 81, 81, 82, 82, 83, 83 }; + public static int[] table_poisson_left = new int[] { 82, 82, 81, 81, 82, 82, 83, 83 }; - public static int[] table_poisson_right = new int[8] { 79, 79, 78, 78, 79, 79, 80, 80 }; + public static int[] table_poisson_right = new int[] { 79, 79, 78, 78, 79, 79, 80, 80 }; - public static int[] table_poisson_turn2l = new int[48] + public static int[] table_poisson_turn2l = new int[] { 79, 79, 80, 80, 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, 83, 83, 82, 82, 83, 83, @@ -1113,7 +829,7 @@ namespace WindowsPhoneSpeedyBlupi 86, 86, 87, 87, 88, 88, 83, 83 }; - public static int[] table_poisson_turn2r = new int[48] + public static int[] table_poisson_turn2r = new int[] { 82, 82, 83, 83, 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, 79, 79, 79, 79, 80, 80, @@ -1122,27 +838,27 @@ namespace WindowsPhoneSpeedyBlupi 86, 86, 85, 85, 84, 84, 79, 79 }; - public static int[] table_oiseau_left = new int[8] { 98, 99, 100, 101, 102, 103, 104, 105 }; + public static int[] table_oiseau_left = new int[] { 98, 99, 100, 101, 102, 103, 104, 105 }; - public static int[] table_oiseau_right = new int[8] { 90, 91, 92, 93, 94, 95, 96, 97 }; + public static int[] table_oiseau_right = new int[] { 90, 91, 92, 93, 94, 95, 96, 97 }; - public static int[] table_oiseau_turn2l = new int[10] { 106, 107, 108, 109, 110, 111, 112, 113, 105, 105 }; + public static int[] table_oiseau_turn2l = new int[] { 106, 107, 108, 109, 110, 111, 112, 113, 105, 105 }; - public static int[] table_oiseau_turn2r = new int[10] { 114, 115, 116, 117, 118, 119, 120, 121, 97, 97 }; + public static int[] table_oiseau_turn2r = new int[] { 114, 115, 116, 117, 118, 119, 120, 121, 97, 97 }; - public static int[] table_guepe_left = new int[6] { 195, 196, 197, 198, 197, 196 }; + public static int[] table_guepe_left = new int[] { 195, 196, 197, 198, 197, 196 }; - public static int[] table_guepe_right = new int[6] { 199, 200, 201, 202, 201, 200 }; + public static int[] table_guepe_right = new int[] { 199, 200, 201, 202, 201, 200 }; - public static int[] table_guepe_turn2l = new int[5] { 207, 206, 205, 204, 203 }; + public static int[] table_guepe_turn2l = new int[] { 207, 206, 205, 204, 203 }; - public static int[] table_guepe_turn2r = new int[5] { 203, 204, 205, 206, 207 }; + public static int[] table_guepe_turn2r = new int[] { 203, 204, 205, 206, 207 }; - public static int[] table_creature_left = new int[8] { 247, 248, 249, 250, 251, 250, 249, 248 }; + public static int[] table_creature_left = new int[] { 247, 248, 249, 250, 251, 250, 249, 248 }; - public static int[] table_creature_right = new int[8] { 247, 248, 249, 250, 251, 250, 249, 248 }; + public static int[] table_creature_right = new int[] { 247, 248, 249, 250, 251, 250, 249, 248 }; - public static int[] table_creature_turn2 = new int[152] + public static int[] table_creature_turn2 = new int[] { 244, 244, 244, 244, 244, 244, 244, 244, 243, 243, 242, 242, 242, 242, 242, 242, 242, 242, 243, 243, @@ -1162,43 +878,43 @@ namespace WindowsPhoneSpeedyBlupi 244, 244 }; - public static int[] table_blupih_left = new int[8] { 66, 67, 68, 67, 66, 69, 70, 69 }; + public static int[] table_blupih_left = new int[] { 66, 67, 68, 67, 66, 69, 70, 69 }; - public static int[] table_blupih_right = new int[8] { 61, 62, 63, 62, 61, 64, 65, 64 }; + public static int[] table_blupih_right = new int[] { 61, 62, 63, 62, 61, 64, 65, 64 }; - public static int[] table_blupih_turn2l = new int[26] + public static int[] table_blupih_turn2l = new int[] { 71, 71, 72, 72, 73, 73, 74, 74, 75, 75, 68, 68, 275, 275, 271, 271, 271, 271, 272, 272, 273, 273, 273, 273, 275, 275 }; - public static int[] table_blupih_turn2r = new int[26] + public static int[] table_blupih_turn2r = new int[] { 75, 75, 74, 74, 73, 73, 72, 72, 71, 71, 63, 63, 274, 274, 271, 271, 271, 271, 272, 272, 273, 273, 273, 273, 274, 274 }; - public static int[] table_blupit_left = new int[8] { 249, 249, 250, 250, 249, 249, 248, 248 }; + public static int[] table_blupit_left = new int[] { 249, 249, 250, 250, 249, 249, 248, 248 }; - public static int[] table_blupit_right = new int[8] { 238, 238, 237, 237, 238, 238, 239, 239 }; + public static int[] table_blupit_right = new int[] { 238, 238, 237, 237, 238, 238, 239, 239 }; - public static int[] table_blupit_turn2l = new int[24] + public static int[] table_blupit_turn2l = new int[] { 238, 238, 251, 251, 238, 238, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 249, 249, 252, 252, 249, 249 }; - public static int[] table_blupit_turn2r = new int[24] + public static int[] table_blupit_turn2r = new int[] { 249, 249, 252, 252, 249, 249, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 238, 238, 251, 251, 238, 238 }; - public static int[] table_explo1 = new int[39] + public static int[] table_explo1 = new int[] { 0, 0, 1, 1, 2, 2, 3, 3, 4, 3, 4, 4, 3, 4, 3, 3, 4, 4, 5, 5, @@ -1206,29 +922,29 @@ namespace WindowsPhoneSpeedyBlupi 7, 8, 8, 9, 9, 10, 10, 11, 11 }; - public static int[] table_explo2 = new int[20] + public static int[] table_explo2 = new int[] { 12, -1, 13, 14, -1, 15, 13, -1, 14, 15, 12, -1, 13, 15, 14, 14, -1, 14, 15, 13 }; - public static int[] table_explo3 = new int[20] + public static int[] table_explo3 = new int[] { 32, 32, 34, 34, 32, 32, 34, 34, 32, 32, 34, 34, 32, 32, 35, 35, 32, 32, 35, 35 }; - public static int[] table_explo4 = new int[9] { 12, 13, 14, 15, 7, 8, 9, 10, 11 }; + public static int[] table_explo4 = new int[] { 12, 13, 14, 15, 7, 8, 9, 10, 11 }; - public static int[] table_explo5 = new int[12] + public static int[] table_explo5 = new int[] { 54, -1, 55, -1, 56, -1, 57, -1, 58, -1, 59, -1 }; - public static int[] table_explo6 = new int[6] { 54, 55, 56, 57, 58, 59 }; + public static int[] table_explo6 = new int[] { 54, 55, 56, 57, 58, 59 }; - public static int[] table_explo7 = new int[128] + public static int[] table_explo7 = new int[] { 60, 61, -1, 63, 64, 65, 62, 64, 62, 60, 62, -1, 65, -1, 60, 65, 63, 61, 62, -1, @@ -1245,23 +961,23 @@ namespace WindowsPhoneSpeedyBlupi -1, 61, -1, -1, -1, 60, -1, -1 }; - public static int[] table_explo8 = new int[5] { 7, 8, 9, 10, 11 }; + public static int[] table_explo8 = new int[] { 7, 8, 9, 10, 11 }; - public static int[] table_sploutch1 = new int[10] { 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 }; + public static int[] table_sploutch1 = new int[] { 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 }; - public static int[] table_sploutch2 = new int[13] + public static int[] table_sploutch2 = new int[] { -1, -1, -1, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 }; - public static int[] table_sploutch3 = new int[18] + public static int[] table_sploutch3 = new int[] { -1, -1, -1, -1, -1, -1, -1, -1, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 }; - public static int[] table_tentacule = new int[45] + public static int[] table_tentacule = new int[] { 86, 85, 84, 83, 84, 85, 86, -1, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, @@ -1270,7 +986,7 @@ namespace WindowsPhoneSpeedyBlupi 83, 84, 85, 86, -1 }; - public static int[] table_bridge = new int[157] + public static int[] table_bridge = new int[] { 365, 366, 365, 366, 365, 366, 365, 366, 365, 366, 365, 366, 365, 366, 365, 366, 367, 367, 368, 368, @@ -1290,58 +1006,58 @@ namespace WindowsPhoneSpeedyBlupi 367, 367, 366, 366, 365, 365, 364 }; - public static int[] table_pollution = new int[8] { 179, 180, 181, 182, 183, 184, 185, 186 }; + public static int[] table_pollution = new int[] { 179, 180, 181, 182, 183, 184, 185, 186 }; - public static int[] table_invertstart = new int[8] { 179, 180, 181, 182, 183, 184, 185, 186 }; + public static int[] table_invertstart = new int[] { 179, 180, 181, 182, 183, 184, 185, 186 }; - public static int[] table_invertstop = new int[8] { 186, 185, 184, 183, 182, 181, 180, 179 }; + public static int[] table_invertstop = new int[] { 186, 185, 184, 183, 182, 181, 180, 179 }; - public static int[] table_invertpanel = new int[8] { 187, 188, 189, 190, 191, 192, 193, 194 }; + public static int[] table_invertpanel = new int[] { 187, 188, 189, 190, 191, 192, 193, 194 }; - public static int[] table_plouf = new int[7] { 99, 100, 101, 102, 101, 100, 99 }; + public static int[] table_plouf = new int[] { 99, 100, 101, 102, 101, 100, 99 }; - public static int[] table_tiplouf = new int[3] { 244, 99, 244 }; + public static int[] table_tiplouf = new int[] { 244, 99, 244 }; - public static int[] table_blup = new int[20] + public static int[] table_blup = new int[] { 103, 104, 105, 106, 104, 103, 106, 105, 103, 104, 103, 105, 106, 103, 105, 106, 103, 104, 106, 105 }; - public static int[] table_follow1 = new int[26] + public static int[] table_follow1 = new int[] { 256, 256, 256, 257, 257, 258, 259, 260, 261, 262, 263, 264, 264, 265, 265, 265, 264, 264, 263, 262, 261, 260, 259, 258, 257, 257 }; - public static int[] table_follow2 = new int[5] { 256, 258, 260, 262, 264 }; + public static int[] table_follow2 = new int[] { 256, 258, 260, 262, 264 }; - public static int[] table_cle = new int[12] + public static int[] table_cle = new int[] { 122, 123, 124, 125, 126, 127, 128, 127, 126, 125, 124, 123 }; - public static int[] table_cle1 = new int[12] + public static int[] table_cle1 = new int[] { 209, 210, 211, 212, 213, 214, 215, 214, 213, 212, 211, 210 }; - public static int[] table_cle2 = new int[12] + public static int[] table_cle2 = new int[] { 220, 221, 222, 221, 220, 219, 218, 217, 216, 217, 218, 219 }; - public static int[] table_cle3 = new int[12] + public static int[] table_cle3 = new int[] { 229, 228, 227, 226, 225, 224, 223, 224, 225, 226, 227, 228 }; - public static int[] table_dynamitef = new int[100] + public static int[] table_dynamitef = new int[] { 253, 252, 254, 252, 252, 255, 252, 254, 253, 252, 253, 254, 255, 252, 255, 253, 252, 254, 252, 255, @@ -1355,7 +1071,7 @@ namespace WindowsPhoneSpeedyBlupi 255, 253, 253, 254, 255, 254, 252, 253, 254, 255 }; - public static int[] table_skate = new int[34] + public static int[] table_skate = new int[] { 129, 129, 129, 129, 130, 130, 130, 131, 131, 132, 132, 133, 133, 134, 134, 134, 135, 135, 135, 135, @@ -1363,14 +1079,14 @@ namespace WindowsPhoneSpeedyBlupi 130, 130, 130, 130 }; - public static int[] table_glu = new int[25] + public static int[] table_glu = new int[] { 168, 168, 169, 169, 170, 170, 171, 171, 170, 170, 169, 169, 168, 168, 169, 169, 169, 168, 168, 169, 169, 170, 170, 169, 168 }; - public static int[] table_clear = new int[70] + public static int[] table_clear = new int[] { 40, 40, 40, 40, 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 40, 40, @@ -1381,7 +1097,7 @@ namespace WindowsPhoneSpeedyBlupi 47, 47, 46, 46, 47, 47, 46, 46, 47, 47 }; - public static int[] table_electro = new int[90] + public static int[] table_electro = new int[] { 266, 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, 267, @@ -1394,11 +1110,11 @@ namespace WindowsPhoneSpeedyBlupi 46, 46, 47, 47, 46, 46, 47, 47, 46, 46 }; - public static int[] table_chenille = new int[6] { 311, 312, 313, 314, 315, 316 }; + public static int[] table_chenille = new int[] { 311, 312, 313, 314, 315, 316 }; - public static int[] table_chenillei = new int[6] { 316, 315, 314, 313, 312, 311 }; + public static int[] table_chenillei = new int[] { 316, 315, 314, 313, 312, 311 }; - public static int[] table_adapt_decor = new int[144] + public static int[] table_adapt_decor = new int[] { 153, 147, 148, 146, 40, 151, 150, 144, 39, 152, 149, 145, 38, 36, 37, 35, 153, 147, 148, 146, @@ -1417,7 +1133,7 @@ namespace WindowsPhoneSpeedyBlupi 251, 250, 256, 250 }; - public static int[] table_adapt_fromage = new int[32] + public static int[] table_adapt_fromage = new int[] { -1, 265, 264, 268, 267, 273, 271, 275, 266, 272, 270, 274, 269, 277, 276, 278, -1, 286, 285, 289, @@ -1425,66 +1141,66 @@ namespace WindowsPhoneSpeedyBlupi 297, 299 }; - public static int[] table_shield = new int[16] + public static int[] table_shield = new int[] { 144, 145, 146, 147, 148, 149, 150, 151, 266, 267, 268, 269, 270, 271, 272, 273 }; - public static int[] table_shield_blupi = new int[16] + public static int[] table_shield_blupi = new int[] { 144, 145, 146, 147, 148, 149, 150, 151, 266, 267, 268, 269, 270, 271, 272, 273 }; - public static int[] table_power = new int[8] { 136, 137, 138, 139, 140, 141, 142, 143 }; + public static int[] table_power = new int[] { 136, 137, 138, 139, 140, 141, 142, 143 }; - public static int[] table_invert = new int[20] + public static int[] table_invert = new int[] { 187, 187, 187, 188, 189, 190, 191, 192, 193, 194, 187, 187, 187, 194, 193, 192, 191, 190, 189, 188 }; - public static int[] table_charge = new int[6] { 238, 239, 240, 241, 242, 243 }; + public static int[] table_charge = new int[] { 238, 239, 240, 241, 242, 243 }; - public static int[] table_magicloop = new int[5] { 152, 153, 154, 155, 156 }; + public static int[] table_magicloop = new int[] { 152, 153, 154, 155, 156 }; - public static int[] table_magictrack = new int[24] + public static int[] table_magictrack = new int[] { 152, 153, 154, 155, 156, 152, 153, 154, 155, 156, 157, 158, 159, 160, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166 }; - public static int[] table_shieldloop = new int[5] { 274, 275, 276, 277, 278 }; + public static int[] table_shieldloop = new int[] { 274, 275, 276, 277, 278 }; - public static int[] table_shieldtrack = new int[20] + public static int[] table_shieldtrack = new int[] { 274, 275, 276, 277, 278, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288 }; - public static int[] table_drinkeffect = new int[5] { 274, 275, 276, 277, 278 }; + public static int[] table_drinkeffect = new int[] { 274, 275, 276, 277, 278 }; - public static int[] table_drinkoffset = new int[3] { 0, 7, 22 }; + public static int[] table_drinkoffset = new int[] { 0, 7, 22 }; - public static int[] table_tresortrack = new int[11] + public static int[] table_tresortrack = new int[] { 166, 165, 164, 163, 162, 161, 162, 163, 164, 165, 166 }; - public static int[] table_decor_lave = new int[8] { 68, 69, 70, 71, 72, 71, 70, 69 }; + public static int[] table_decor_lave = new int[] { 68, 69, 70, 71, 72, 71, 70, 69 }; - public static int[] table_decor_piege1 = new int[16] + public static int[] table_decor_piege1 = new int[] { 374, 374, 373, 347, 373, 374, 374, 374, 373, 347, 347, 373, 374, 374, 374, 374 }; - public static int[] table_decor_piege2 = new int[4] { 374, 373, 347, 373 }; + public static int[] table_decor_piege2 = new int[] { 374, 373, 347, 373 }; - public static int[] table_decor_goutte = new int[48] + public static int[] table_decor_goutte = new int[] { 410, 409, 410, -1, -1, -1, -1, -1, -1, 410, 409, 408, 409, 410, -1, -1, -1, -1, -1, -1, @@ -1493,43 +1209,43 @@ namespace WindowsPhoneSpeedyBlupi -1, 410, 409, 410, -1, -1, -1, -1 }; - public static int[] table_decor_ecraseur = new int[10] { 317, 317, 318, 319, 320, 321, 322, 323, 323, 323 }; + public static int[] table_decor_ecraseur = new int[] { 317, 317, 318, 319, 320, 321, 322, 323, 323, 323 }; - public static int[] table_decor_scie = new int[6] { 378, 379, 380, 381, 382, 383 }; + public static int[] table_decor_scie = new int[] { 378, 379, 380, 381, 382, 383 }; - public static int[] table_decor_temp = new int[20] + public static int[] table_decor_temp = new int[] { 328, 328, 327, 327, 326, 326, 325, 325, 324, 324, 325, 325, 326, 326, 327, 329, 328, 328, -1, -1 }; - public static int[] table_decor_eau1 = new int[6] { 92, 93, 94, 95, 94, 93 }; + public static int[] table_decor_eau1 = new int[] { 92, 93, 94, 95, 94, 93 }; - public static int[] table_decor_eau2 = new int[6] { 91, 96, 97, 98, 97, 96 }; + public static int[] table_decor_eau2 = new int[] { 91, 96, 97, 98, 97, 96 }; - public static int[] table_decor_ventillog = new int[3] { 126, 127, 128 }; + public static int[] table_decor_ventillog = new int[] { 126, 127, 128 }; - public static int[] table_decor_ventillod = new int[3] { 129, 130, 131 }; + public static int[] table_decor_ventillod = new int[] { 129, 130, 131 }; - public static int[] table_decor_ventilloh = new int[3] { 132, 133, 134 }; + public static int[] table_decor_ventilloh = new int[] { 132, 133, 134 }; - public static int[] table_decor_ventillob = new int[3] { 135, 136, 137 }; + public static int[] table_decor_ventillob = new int[] { 135, 136, 137 }; - public static int[] table_decor_ventg = new int[4] { 110, 111, 112, 113 }; + public static int[] table_decor_ventg = new int[] { 110, 111, 112, 113 }; - public static int[] table_decor_ventd = new int[4] { 114, 115, 116, 117 }; + public static int[] table_decor_ventd = new int[] { 114, 115, 116, 117 }; - public static int[] table_decor_venth = new int[4] { 118, 119, 120, 121 }; + public static int[] table_decor_venth = new int[] { 118, 119, 120, 121 }; - public static int[] table_decor_ventb = new int[4] { 122, 123, 124, 125 }; + public static int[] table_decor_ventb = new int[] { 122, 123, 124, 125 }; - public static int[] table_marine = new int[11] + public static int[] table_marine = new int[] { 203, 204, 205, 206, 207, 208, 207, 206, 205, 204, 203 }; - public static int[] table_ressort = new int[8] { 209, 210, 211, 212, 213, 212, 211, 210 }; + public static int[] table_ressort = new int[] { 209, 210, 211, 212, 213, 212, 211, 210 }; public static int[] table_training1; @@ -1545,9 +1261,9 @@ namespace WindowsPhoneSpeedyBlupi public static int[] world_terminal; - static Tables() + static { - int[] array = new int[133] + int[] array = new int[] { 1, 3, 0, 50, -1, 0, 4, 4, 0, 50, 0, 0, 6, 6, 0, 50, 1, 0, 9, 9, @@ -1587,7 +1303,7 @@ namespace WindowsPhoneSpeedyBlupi array[125] = MyResource.TX_TRAINING121; array[131] = MyResource.TX_TRAINING122; table_training1 = array; - int[] array2 = new int[31] + int[] array2 = new int[] { 9, 15, 0, 100, -1, 0, 16, 16, 0, 100, -1, 0, 19, 21, 0, 100, -1, 0, 24, 31, @@ -1600,7 +1316,7 @@ namespace WindowsPhoneSpeedyBlupi array2[23] = MyResource.TX_TRAINING204; array2[29] = MyResource.TX_TRAINING205; table_training2 = array2; - int[] array3 = new int[67] + int[] array3 = new int[] { 16, 24, 36, 40, -2, 0, 16, 24, 36, 40, -3, 0, 22, 25, 34, 34, -3, 0, 22, 31, @@ -1622,7 +1338,7 @@ namespace WindowsPhoneSpeedyBlupi array3[59] = MyResource.TX_TRAINING310; array3[65] = MyResource.TX_TRAINING311; table_training3 = array3; - int[] array4 = new int[31] + int[] array4 = new int[] { 7, 14, 0, 100, -4, 0, 7, 19, 0, 100, -5, 0, 20, 22, 0, 100, -4, 0, 20, 22, @@ -1635,7 +1351,7 @@ namespace WindowsPhoneSpeedyBlupi array4[23] = MyResource.TX_TRAINING404; array4[29] = MyResource.TX_TRAINING405; table_training4 = array4; - table_decor_action = new int[519] + table_decor_action = new int[] { 1, 32, -4, 4, 4, -3, -4, 2, 4, 5, -4, -1, 4, 2, -4, -4, 4, -3, -3, 2, @@ -1690,7 +1406,7 @@ namespace WindowsPhoneSpeedyBlupi -5, 0, -6, 0, -7, 0, -7, 0, -6, 0, -5, 0, -4, 0, -2, 0, -1, 0, 0 }; - table_explo_size = new int[100] + table_explo_size = new int[] { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, @@ -1703,7 +1419,7 @@ namespace WindowsPhoneSpeedyBlupi 64, 64, 64, 64, 64, 64, 64, 128, 128, 128, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }; - world_terminal = new int[30] + world_terminal = new int[] { 0, 0, 158, 166, 159, 167, 160, 168, 161, 169, 162, 170, 163, 171, 164, 172, 165, 173, 309, 310, @@ -1712,4 +1428,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables_table_blupi.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables_table_blupi.java new file mode 100644 index 0000000..abecb49 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Tables_table_blupi.java @@ -0,0 +1,318 @@ +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 + +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.static_; + +// WindowsPhoneSpeedyBlupi.Tables + + + + @namespace(name = "WindowsPhoneSpeedyBlupi") + @static_ + class Tables_table_blupi + { + private Tables_table_blupi() { + //Not meant to be instantiated. + } + + + public static int[] table_blupi = new int[] + { + 35, 9, 0, 276, 277, 278, 279, 280, 281, 282, + 283, 284, 1, 330, 0, 0, 0, 0, 0, 0, + 23, 23, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 23, 23, 23, 23, 23, 23, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 23, 23, 23, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 23, 23, 23, 23, 23, 0, 0, 0, 23, 23, + 23, 0, 0, 0, 0, 0, 0, 133, 133, 0, + 0, 0, 133, 133, 0, 0, 0, 0, 0, 0, + 0, 133, 133, 0, 0, 0, 0, 23, 23, 23, + 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 23, 23, 0, 0, 0, 0, 0, 23, + 23, 23, 0, 0, 0, 135, 135, 136, 136, 137, + 137, 137, 137, 137, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 137, 137, 137, + 136, 136, 135, 135, 135, 0, 0, 0, 0, 0, + 23, 23, 23, 0, 0, 133, 133, 0, 0, 0, + 23, 23, 23, 23, 0, 0, 0, 0, 0, 0, + 0, 23, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 133, 133, 0, 0, 0, 0, 0, 23, 23, + 23, 23, 0, 0, 0, 135, 135, 136, 136, 137, + 137, 137, 137, 137, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 138, 138, 137, + 137, 137, 138, 138, 137, 137, 137, 137, 137, 137, + 136, 136, 135, 135, 135, 0, 0, 0, 0, 0, + 23, 23, 23, 0, 0, 133, 133, 0, 0, 0, + 23, 23, 23, 23, 0, 0, 0, 0, 0, 0, + 0, 23, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 133, 133, 0, 0, 0, 0, 0, 23, 23, + 23, 23, 0, 0, 0, 2, 6, 0, 5, 6, + 7, 8, 9, 10, 60, 3, 0, 19, 18, 19, + 3, 6, 0, 1, 1, 2, 2, 3, 3, 4, + 3, 0, 17, 18, 19, 5, 5, 4, 169, 26, + 170, 170, 27, 59, 6, 0, 3, 3, 2, 2, + 1, 1, 61, 5, 0, 34, 35, 34, 34, 33, + 62, 2, 0, 35, 34, 6, 3, 2, 33, 34, + 35, 7, 1, 0, 44, 8, 8, 0, 0, 169, + 26, 170, 27, 171, 28, 172, 9, 6, 0, 5, + 6, 7, 8, 9, 10, 10, 6, 0, 5, 6, + 7, 8, 9, 10, 13, 6, 0, 41, 41, 42, + 42, 43, 43, 86, 18, 0, 1, 1, 2, 2, + 41, 41, 42, 42, 43, 43, 42, 42, 41, 41, + 2, 2, 1, 1, 87, 26, 0, 135, 135, 137, + 137, 231, 231, 231, 231, 230, 230, 231, 231, 231, + 231, 230, 230, 231, 231, 231, 231, 230, 230, 137, + 137, 135, 135, 11, 70, 0, 40, 40, 40, 40, + 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, + 40, 41, 41, 41, 40, 40, 40, 40, 40, 40, + 40, 41, 41, 41, 40, 40, 42, 42, 42, 43, + 43, 43, 44, 44, 44, 45, 45, 45, 46, 46, + 47, 47, 46, 46, 47, 47, 46, 46, 47, 47, + 46, 46, 47, 47, 46, 46, 47, 47, 46, 46, + 47, 47, 46, 46, 47, 47, 75, 1, 0, -1, + 76, 70, 0, 40, 40, 40, 40, 41, 41, 41, + 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, + 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, + 41, 40, 40, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 77, 110, 0, 324, 325, 324, 325, + 324, 325, 324, 325, 324, 325, 324, 325, 324, 325, + 324, 325, 324, 325, 324, 325, 324, 324, 325, 325, + 326, 326, 327, 327, 328, 328, 329, 329, 330, 330, + 331, 331, 332, 332, 333, 333, 334, 334, 333, 333, + 332, 332, 331, 331, 330, 330, 329, 329, 329, 330, + 330, 330, 331, 331, 331, 332, 332, 332, 333, 333, + 333, 334, 334, 334, 333, 333, 333, 332, 332, 332, + 331, 331, 331, 330, 330, 330, 329, 329, 329, 329, + 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, + 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, + 329, 329, 329, 329, 329, 329, 78, 1, 0, -1, + 79, 1, 0, -1, 80, 1, 0, -1, 81, 1, + 0, -1, 14, 6, 0, 49, 50, 51, 52, 53, + 54, 29, 6, 0, 126, 125, 124, 123, 122, 121, + 28, 6, 0, 122, 122, 122, 125, 125, 125, 15, + 1, 0, 61, 16, 8, 0, 61, 62, 63, 62, + 61, 64, 65, 64, 17, 10, 0, 71, 71, 72, + 72, 73, 73, 74, 74, 75, 75, 67, 1, 0, + 315, 68, 12, 0, 296, 297, 298, 299, 300, 301, + 302, 301, 300, 299, 298, 297, 69, 7, 0, 296, + 310, 311, 312, 313, 314, 303, 18, 10, 0, 76, + 76, 76, 76, 76, 76, 77, 77, 77, 77, 19, + 14, 0, 76, 76, 77, 77, 78, 78, 79, 79, + 80, 80, 81, 81, 39, 39, 20, 10, 0, 88, + 88, 89, 89, 90, 90, 91, 91, 92, 92, 21, + 12, 0, 93, 93, 94, 94, 95, 95, 96, 96, + 97, 97, 98, 98, 22, 12, 0, 93, 93, 94, + 94, 95, 95, 96, 96, 97, 97, 98, 98, 23, + 10, 0, 105, 105, 106, 106, 107, 107, 108, 108, + 109, 109, 24, 90, 0, 93, 96, 98, 94, 95, + 93, 95, 98, 93, 94, 96, 96, 94, 94, 98, + 98, 93, 93, 97, 97, 94, 94, 94, 96, 96, + 96, 93, 93, 93, 93, 94, 94, 94, 94, 94, + 97, 97, 97, 97, 97, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 79, 79, 76, 76, 76, + 76, 79, 79, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 25, 8, 0, 111, 111, + 110, 110, 111, 111, 112, 112, 26, 8, 0, 111, + 111, 110, 110, 111, 111, 112, 112, 27, 7, 0, + 112, 113, 114, 115, 116, 117, 118, 30, 12, 0, + 25, 25, 29, 29, 46, 46, 47, 47, 46, 46, + 29, 29, 31, 328, 0, 156, 156, 156, 156, 157, + 157, 157, 157, 158, 158, 158, 158, 157, 157, 157, + 157, 156, 156, 156, 156, 157, 157, 157, 157, 158, + 158, 158, 158, 157, 157, 157, 157, 156, 156, 156, + 156, 157, 157, 157, 157, 158, 158, 158, 158, 157, + 157, 157, 157, 156, 156, 156, 156, 157, 157, 157, + 157, 158, 158, 158, 158, 157, 157, 157, 157, 156, + 156, 156, 156, 157, 157, 157, 157, 158, 158, 158, + 158, 157, 157, 157, 157, 156, 156, 156, 156, 157, + 157, 157, 157, 158, 158, 158, 158, 157, 157, 157, + 157, 156, 156, 156, 156, 157, 157, 157, 157, 158, + 158, 158, 158, 157, 157, 157, 157, 144, 144, 143, + 143, 151, 151, 162, 162, 163, 163, 164, 164, 163, + 163, 162, 162, 163, 163, 164, 164, 163, 163, 162, + 162, 163, 163, 164, 164, 163, 163, 162, 162, 163, + 163, 164, 164, 163, 163, 162, 162, 151, 151, 143, + 143, 144, 144, 157, 157, 156, 156, 156, 156, 157, + 157, 157, 157, 158, 158, 158, 158, 157, 157, 157, + 157, 156, 156, 156, 156, 157, 157, 157, 157, 158, + 158, 158, 158, 157, 157, 157, 157, 156, 156, 156, + 156, 157, 157, 157, 157, 158, 158, 158, 158, 157, + 157, 157, 157, 156, 156, 156, 156, 157, 157, 157, + 157, 158, 158, 158, 158, 157, 157, 157, 157, 144, + 144, 143, 143, 151, 151, 162, 162, 163, 163, 164, + 164, 163, 163, 162, 162, 163, 163, 164, 164, 163, + 163, 162, 162, 163, 163, 164, 164, 163, 163, 162, + 162, 163, 163, 164, 164, 163, 163, 162, 162, 151, + 151, 143, 143, 151, 151, 162, 162, 163, 163, 164, + 164, 163, 163, 162, 162, 163, 163, 164, 164, 163, + 163, 162, 162, 163, 163, 164, 164, 163, 163, 162, + 162, 163, 163, 164, 164, 163, 163, 162, 162, 163, + 163, 164, 164, 163, 163, 162, 162, 163, 163, 164, + 164, 163, 163, 162, 162, 151, 151, 143, 143, 144, + 144, 157, 157, 32, 12, 0, 144, 144, 145, 145, + 146, 146, 145, 145, 144, 144, 143, 143, 33, 10, + 0, 151, 151, 152, 152, 153, 153, 154, 154, 155, + 155, 34, 10, 0, 157, 157, 165, 165, 165, 165, + 166, 166, 166, 166, 36, 32, 0, 135, 177, 177, + 178, 178, 179, 179, 180, 180, 179, 179, 178, 178, + 179, 179, 180, 180, 179, 179, 178, 178, 179, 179, + 180, 180, 179, 179, 178, 178, 177, 177, 135, 37, + 140, 0, 182, 182, 182, 182, 208, 208, 208, 208, + 208, 182, 182, 182, 182, 182, 182, 208, 208, 208, + 208, 208, 194, 194, 194, 182, 182, 182, 182, 208, + 208, 208, 208, 208, 182, 182, 182, 182, 182, 182, + 208, 208, 208, 208, 182, 182, 182, 182, 182, 182, + 182, 182, 194, 194, 194, 195, 195, 195, 196, 196, + 196, 197, 197, 197, 198, 198, 198, 198, 197, 197, + 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, + 182, 182, 182, 182, 208, 208, 208, 208, 182, 182, + 182, 182, 194, 194, 194, 195, 195, 195, 196, 196, + 196, 197, 197, 197, 198, 198, 198, 198, 197, 197, + 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, + 182, 182, 182, 182, 208, 208, 208, 208, 182, 182, + 182, 182, 210, 210, 211, 211, 211, 211, 211, 211, + 210, 210, 85, 1, 0, 211, 38, 96, 0, 182, + 183, 184, 185, 186, 187, 182, 183, 184, 185, 186, + 187, 182, 183, 184, 185, 186, 187, 182, 182, 182, + 182, 182, 182, 182, 183, 184, 185, 186, 187, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 183, 184, 185, 186, 187, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 183, 184, 185, 186, + 187, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 39, 14, 0, 194, 194, + 195, 195, 196, 196, 197, 197, 198, 198, 199, 199, + 200, 200, 40, 3, 0, 210, 211, 212, 41, 8, + 0, 213, 213, 214, 214, 215, 215, 214, 214, 42, + 20, 0, 17, 17, 18, 18, 19, 19, 1, 1, + 215, 215, 214, 214, 213, 213, 212, 212, 211, 211, + 210, 210, 43, 20, 0, 210, 210, 211, 211, 212, + 212, 213, 213, 214, 214, 215, 215, 1, 1, 19, + 19, 18, 18, 17, 17, 44, 29, 0, 1, 1, + 222, 222, 222, 222, 223, 223, 224, 224, 225, 225, + 225, 225, 225, 224, 223, 222, 222, 222, 223, 223, + 224, 224, 225, 225, 225, 1, 1, 45, 29, 0, + 1, 1, 222, 222, 222, 222, 223, 223, 224, 224, + 225, 225, 225, 225, 225, 224, 223, 222, 222, 222, + 223, 223, 224, 224, 225, 225, 225, 1, 1, 46, + 32, 0, 1, 1, 227, 227, 228, 228, 229, 229, + 228, 228, 227, 227, 226, 226, 227, 227, 228, 228, + 229, 229, 228, 228, 227, 227, 226, 226, 227, 227, + 228, 228, 1, 1, 47, 34, 0, 135, 135, 136, + 136, 137, 137, 231, 231, 231, 231, 230, 230, 231, + 231, 231, 231, 230, 230, 231, 231, 231, 231, 230, + 230, 231, 231, 231, 231, 137, 137, 136, 136, 135, + 135, 48, 40, 0, 0, 0, 135, 135, 136, 136, + 137, 137, 232, 233, 232, 233, 232, 233, 232, 233, + 232, 233, 232, 233, 232, 233, 232, 233, 232, 233, + 232, 233, 232, 233, 232, 233, 137, 137, 136, 136, + 135, 135, 0, 0, 65, 44, 0, 1, 1, 288, + 288, 289, 289, 290, 290, 290, 289, 288, 288, 289, + 289, 290, 290, 290, 289, 288, 288, 289, 289, 290, + 290, 290, 289, 288, 288, 289, 289, 290, 290, 290, + 289, 288, 288, 289, 289, 290, 290, 290, 289, 1, + 1, 49, 32, 0, 234, 234, 235, 235, 236, 236, + 235, 235, 234, 234, 235, 235, 236, 236, 235, 235, + 234, 234, 235, 235, 236, 236, 235, 235, 234, 234, + 235, 235, 236, 236, 235, 235, 50, 64, 0, 238, + 238, 239, 239, 240, 240, 241, 241, 241, 241, 241, + 241, 241, 241, 241, 241, 240, 240, 241, 241, 240, + 240, 241, 241, 241, 241, 241, 241, 241, 241, 241, + 241, 241, 241, 240, 240, 241, 241, 240, 240, 241, + 241, 241, 241, 241, 241, 241, 241, 240, 240, 239, + 239, 238, 238, 238, 238, 238, 238, 237, 237, 238, + 238, 237, 237, 51, 8, 0, 238, 238, 237, 237, + 238, 238, 239, 239, 52, 12, 0, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 53, + 6, 0, 251, 251, 238, 238, 238, 238, 54, 25, + 0, 168, 168, 169, 169, 170, 170, 171, 171, 170, + 170, 169, 169, 168, 168, 169, 169, 169, 168, 168, + 169, 169, 170, 170, 169, 168, 55, 4, 0, 253, + 253, 254, 254, 56, 64, 0, 1, 3, 270, 268, + 1, 3, 270, 268, 1, 3, 270, 268, 1, 3, + 270, 268, 1, 3, 270, 268, 1, 3, 270, 268, + 1, 3, 270, 268, 1, 3, 270, 268, 1, 2, + 3, 4, 270, 269, 268, 0, 1, 2, 3, 4, + 270, 269, 268, 0, 1, 1, 2, 2, 3, 3, + 4, 4, 270, 270, 269, 269, 268, 268, 0, 0, + 57, 90, 0, 266, 267, 266, 267, 266, 267, 266, + 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, + 267, 266, 267, 266, 267, 266, 267, 266, 267, 266, + 267, 266, 267, 40, 40, 40, 40, 41, 41, 41, + 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, + 41, 40, 40, 40, 40, 40, 40, 40, 41, 41, + 41, 40, 40, 42, 42, 42, 43, 43, 43, 44, + 44, 44, 45, 45, 45, 46, 46, 47, 47, 46, + 46, 47, 47, 46, 46, 47, 47, 46, 46, 47, + 47, 46, 46, 82, 10, 0, 0, 268, 268, 269, + 269, 269, 269, 268, 268, 0, 58, 14, 0, 274, + 274, 271, 271, 271, 271, 272, 272, 273, 273, 273, + 273, 274, 274, 66, 16, 0, 291, 291, 292, 292, + 293, 293, 294, 294, 295, 295, 294, 294, 293, 293, + 292, 292, 72, 1, 0, 320, 73, 24, 0, 319, + 319, 318, 318, 317, 317, 318, 318, 319, 319, 320, + 320, 321, 321, 322, 322, 323, 323, 322, 322, 321, + 321, 320, 320, 74, 128, 0, 1, 1, 2, 2, + 3, 3, 4, 4, 270, 270, 269, 269, 268, 268, + 0, 0, 1, 2, 3, 4, 270, 269, 268, 0, + 1, 2, 3, 4, 270, 269, 268, 0, 1, 3, + 270, 268, 2, 4, 269, 0, 1, 3, 270, 268, + 2, 4, 269, 0, -1, 3, 270, -1, 2, -1, + 269, 0, 1, -1, -1, 268, -1, -1, 269, -1, + -1, -1, -1, 270, -1, -1, 2, -1, -1, -1, + -1, -1, -1, 29, 46, 47, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 63, 92, 0, 263, 264, 265, + 264, 263, 264, 265, 264, 263, 264, 265, 264, 263, + 264, 265, 264, 263, 264, 265, 264, 263, 264, 265, + 264, 263, 264, 265, 264, 263, 264, 265, 264, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 23, 23, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 23, 23, 0, 0, 0, 0, 0, 0, + 0, 133, 133, 0, 0, 0, 133, 133, 0, 0, + 0, 0, 0, 0, 0, 133, 133, 0, 0, 0, + 0, 23, 23, 23, 23, 0, 0, 0, 0, 64, + 104, 0, 1, 1, 2, 2, 3, 3, 285, 286, + 287, 286, 285, 286, 287, 286, 285, 286, 287, 286, + 285, 286, 287, 286, 285, 286, 287, 286, 285, 286, + 287, 286, 285, 286, 287, 286, 285, 286, 287, 286, + 3, 3, 2, 2, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 23, 23, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 23, 0, 0, 0, 0, 0, 0, 0, 133, 133, + 0, 0, 0, 133, 133, 0, 0, 0, 0, 0, + 0, 0, 133, 133, 0, 0, 0, 0, 23, 23, + 23, 23, 0, 0, 0, 0, 83, 60, 0, 1, + 1, 288, 288, 289, 289, 290, 290, 290, 289, 288, + 288, 289, 289, 290, 290, 290, 289, 288, 288, 289, + 289, 290, 290, 290, 289, 288, 288, 289, 289, 290, + 290, 290, 289, 288, 288, 289, 289, 290, 290, 290, + 289, 288, 288, 289, 289, 290, 290, 290, 290, 290, + 290, 290, 290, 290, 290, 290, 290, 1, 1, 84, + 18, 0, 1, 1, 227, 227, 228, 228, 229, 229, + 228, 228, 227, 227, 226, 226, 227, 227, 1, 1, + 0 + }; + + } + diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Text.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Text.java index 9726691..d87f190 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Text.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Text.java @@ -1,12 +1,23 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Text -using WindowsPhoneSpeedyBlupi; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public static class Text +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 + +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import com.openeggbert.jdotnet.System.string; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.ref; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.static_; + +// WindowsPhoneSpeedyBlupi.Text + + @namespace(name = "WindowsPhoneSpeedyBlupi") + @static_ + public class Text { - private static short[] table_char = new short[1536] + private Text() { + //Not meant to be instantiated; + } + private static short[] table_char = new short[] { 0, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 2, 0, 0, -1, 0, 0, 3, 0, @@ -164,13 +175,13 @@ namespace WindowsPhoneSpeedyBlupi 1, 0, 0, -1, 0, 0 }; - private static short[] table_accents = new short[15] + private static short[] table_accents = new short[] { 252, 224, 226, 233, 232, 235, 234, 239, 238, 244, 249, 251, 228, 246, 231 }; - private static short[] table_width = new short[128] + private static short[] table_width = new short[] { 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 14, 13, 15, 15, 15, 15, @@ -187,7 +198,7 @@ namespace WindowsPhoneSpeedyBlupi 16, 15, 14, 10, 5, 11, 16, 0 }; - public static void DrawTextLeft(Pixmap pixmap, TinyPoint pos, string text, double size) + public static void DrawTextLeft(Pixmap pixmap, TinyPoint pos, String text, double size) { if (!string.IsNullOrEmpty(text)) { @@ -195,52 +206,52 @@ namespace WindowsPhoneSpeedyBlupi } } - public static void DrawText(Pixmap pixmap, TinyPoint pos, string text, double size) + public static void DrawText(Pixmap pixmap, TinyPoint pos, String text, double size) { if (!string.IsNullOrEmpty(text)) { - foreach (char car in text) + for (char car : text.toCharArray()) { - DrawChar(pixmap, ref pos, car, size); + DrawChar(pixmap, pos, car, size); } } } - public static void DrawTextPente(Pixmap pixmap, TinyPoint pos, string text, int pente, double size) + public static void DrawTextPente(Pixmap pixmap, TinyPoint pos, String text, int pente, double size) { if (!string.IsNullOrEmpty(text)) { int y = pos.Y; int num = 0; - foreach (char c in text) + for (char c : text.toCharArray()) { int charWidth = GetCharWidth(c, size); - DrawChar(pixmap, ref pos, c, size); + DrawChar(pixmap, pos, c, size); num += charWidth; pos.Y = y + num / pente; } } } - public static void DrawTextCenter(Pixmap pixmap, TinyPoint pos, string text, double size) + public static void DrawTextCenter(Pixmap pixmap, TinyPoint pos, String text, double size) { if (!string.IsNullOrEmpty(text)) { - TinyPoint pos2 = default(TinyPoint); + TinyPoint pos2 = default_(new TinyPoint()); pos2.X = pos.X - GetTextWidth(text, size) / 2; pos2.Y = pos.Y; DrawText(pixmap, pos2, text, size); } } - public static int GetTextWidth(string text, double size) + public static int GetTextWidth(String text, double size) { if (string.IsNullOrEmpty(text)) { return 0; } int num = 0; - foreach (char c in text) + for (char c : text.toCharArray()) { num += GetCharWidth(c, size); } @@ -263,9 +274,9 @@ namespace WindowsPhoneSpeedyBlupi return c; } - private static void DrawChar(Pixmap pixmap, ref TinyPoint pos, char car, double size) + private static void DrawChar(Pixmap pixmap, @ref TinyPoint pos, char car, double size) { - TinyPoint pos2 = default(TinyPoint); + TinyPoint pos2 = default_(new TinyPoint()); int num = (short)car * 6; int rank = table_char[num]; pos2.X = pos.X + table_char[num + 1]; @@ -292,4 +303,3 @@ namespace WindowsPhoneSpeedyBlupi } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyPoint.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyPoint.java index 2c306e6..be92a6b 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyPoint.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyPoint.java @@ -1,18 +1,35 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +import lombok.AllArgsConstructor; +import lombok.NoArgsConstructor; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; + // WindowsPhoneSpeedyBlupi.TinyPoint +@namespace(name = "WindowsPhoneSpeedyBlupi") +@AllArgsConstructor +@NoArgsConstructor +public class TinyPoint extends com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.struct { -namespace WindowsPhoneSpeedyBlupi -{ - public struct TinyPoint - { - public int X; + public int X; - public int Y; + public int Y; - public override string ToString() - { - return string.Format("{0};{1}", X, Y); - } + @Override + public String toString() { + return X + ";" + Y; } -} \ No newline at end of file + @Override + public TinyPoint copy() { + return new TinyPoint(X, Y); + } + + + @Override + public TinyPoint reset() { + this.X = 0; + this.Y = 0; + return this; + } +} diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyRect.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyRect.java index d3678de..ae4f6db 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyRect.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TinyRect.java @@ -1,38 +1,46 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439\ +import lombok.AllArgsConstructor; +import lombok.NoArgsConstructor; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import lombok.ToString; + // WindowsPhoneSpeedyBlupi.TinyRect +@namespace(name = "WindowsPhoneSpeedyBlupi") +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class TinyRect extends com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.struct { -namespace WindowsPhoneSpeedyBlupi -{ - public struct TinyRect - { - public int Left; + public int Left; - public int Right; + public int Right; - public int Top; + public int Top; - public int Bottom; + public int Bottom; - public int Width - { - get - { - return Right - Left; - } - } - - public int Height - { - get - { - return Bottom - Top; - } - } - - public override string ToString() - { - return string.Format("{0};{1};{2};{3}", Left, Top, Right, Bottom); - } + public int Width() { + return Right - Left; } -} \ No newline at end of file + public int Height() { + return Bottom - Top; + + } + + @Override + public TinyRect copy() { + return new TinyRect(Left, Right, Top, Bottom); + } + + @Override + public TinyRect reset() { + this.Left = 0; + this.Right = 0; + this.Top = 0; + this.Bottom = 0; + return this; + } +} diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TrialMode.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TrialMode.java index b423f70..1a0a60c 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TrialMode.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/TrialMode.java @@ -1,70 +1,75 @@ -using System; -using System.IO; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; + +//import com.openeggbert.jdotnet.System.*; +//import com.openeggbert.jdotnet.System.IO.*; + + -namespace WindowsPhoneSpeedyBlupi -{ public class TrialMode { - private static DateTime trialStartTime; - public static void InitializeTrialMode() - { - // Assuming trial mode starts when the game is launched - trialStartTime = DateTime.Now; - } - - public static Boolean IsTrialModeExpired() - { - return IsTrialMode7DaysLimitExpired() || IsTrialMode10MinutesLimitExpired(); - } - private static bool IsTrialMode10MinutesLimitExpired() - { - // Example: Trial expires after 10 minutes - var expired = (DateTime.Now - trialStartTime).TotalMinutes > 10; - return expired; - } - private static bool IsTrialMode7DaysLimitExpired() - { - // Save trial expiration status to a file or settings - const string TRIAL_END_TIME_TXT = "trialEndTime.txt"; - var trialEndTime = File.Exists(TRIAL_END_TIME_TXT) ? DateTime.Parse(File.ReadAllText(TRIAL_END_TIME_TXT)) : DateTime.MinValue; - - var expired = trialEndTime != DateTime.MinValue && DateTime.Now > trialEndTime; - if (expired) - { - return true; // Trial period is over - } - - // Example of setting trial end time (e.g., 7 days from now) - if (!File.Exists(TRIAL_END_TIME_TXT)) - { - File.WriteAllText(TRIAL_END_TIME_TXT, DateTime.Now.AddDays(7).ToString()); - } - - return false; // Trial period still active - } - private static int trialModeEnabled = -1; - public static bool IsTrialModeEnabled() - { - if(trialModeEnabled == 1) - { - return true; - } - - if (trialModeEnabled == 0) - { - return false; - } - - const string TRIAL_MODE_ENABLED_TXT = "trialModeEnabled.txt"; - var trialModeEnabledString = File.Exists(TRIAL_MODE_ENABLED_TXT) ? File.ReadAllText(TRIAL_MODE_ENABLED_TXT) : "0"; - var trialModeEnabledLocal = trialModeEnabledString.Equals("1"); - trialModeEnabled = trialModeEnabledLocal ? 1 : 0; - - return trialModeEnabledLocal; - } + static boolean IsTrialModeEnabled() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } +// private static DateTime trialStartTime; +// +// public static void InitializeTrialMode() +// { +// // Assuming trial mode starts when the game is launched +// trialStartTime = DateTime.Now; +// } +// +// public static Boolean IsTrialModeExpired() +// { +// return IsTrialMode7DaysLimitExpired() || IsTrialMode10MinutesLimitExpired(); +// } +// private static boolean IsTrialMode10MinutesLimitExpired() +// { +// // Example: Trial expires after 10 minutes +// var expired = (DateTime.Now - trialStartTime).TotalMinutes > 10; +// return expired; +// } +// private static boolean IsTrialMode7DaysLimitExpired() +// { +// // Save trial expiration status to a file or settings +// const string TRIAL_END_TIME_TXT = "trialEndTime.txt"; +// var trialEndTime = File.Exists(TRIAL_END_TIME_TXT) ? DateTime.Parse(File.ReadAllText(TRIAL_END_TIME_TXT)) : DateTime.MinValue; +// +// var expired = trialEndTime != DateTime.MinValue && DateTime.Now > trialEndTime; +// if (expired) +// { +// return true; // Trial period is over +// } +// +// // Example of setting trial end time (e.g., 7 days from now) +// if (!File.Exists(TRIAL_END_TIME_TXT)) +// { +// File.WriteAllText(TRIAL_END_TIME_TXT, DateTime.Now.AddDays(7).ToString()); +// } +// +// return false; // Trial period still active +// } +// private static int trialModeEnabled = -1; +// public static boolean IsTrialModeEnabled() +// { +// if(trialModeEnabled == 1) +// { +// return true; +// } +// +// if (trialModeEnabled == 0) +// { +// return false; +// } +// +// const string TRIAL_MODE_ENABLED_TXT = "trialModeEnabled.txt"; +// var trialModeEnabledString = File.Exists(TRIAL_MODE_ENABLED_TXT) ? File.ReadAllText(TRIAL_MODE_ENABLED_TXT) : "0"; +// var trialModeEnabledLocal = trialModeEnabledString.Equals("1"); +// trialModeEnabled = trialModeEnabledLocal ? 1 : 0; +// +// return trialModeEnabledLocal; +// } } -} \ No newline at end of file diff --git a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Worlds.java b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Worlds.java index 941e919..cb122f2 100644 --- a/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Worlds.java +++ b/core/src/main/java/com/openeggbert/core/phone/WindowsPhoneSpeedyBlupi/Worlds.java @@ -1,40 +1,42 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Worlds -using System; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.IO.IsolatedStorage; -using System.Text; -using Microsoft.Xna.Framework; -using WindowsPhoneSpeedyBlupi; +package com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi; -namespace WindowsPhoneSpeedyBlupi -{ - public static class Worlds +// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 +// WindowsPhoneSpeedyBlupi.Worlds +import com.openeggbert.jdotnet.System.*; +import com.openeggbert.jdotnet.System.Diagnostics.*; +import com.openeggbert.jdotnet.System.Globalization.*; +import com.openeggbert.jdotnet.System.IO.*; +import com.openeggbert.jdotnet.System.IO.IsolatedStorage.*; +import com.openeggbert.jdotnet.System.Text.*; +import com.openeggbert.jxna.Microsoft.Xna.Framework.*; +import com.openeggbert.core.phone.WindowsPhoneSpeedyBlupi.*; +import static com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.default_.default_; +import java.util.Locale; +import lombok.Getter; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.namespace; +import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.static_; + + + +@namespace(name = "WindowsPhoneSpeedyBlupi") +@static_ + public class Worlds { + private Worlds() { + //Not meant to be instantiated. + } private static StringBuilder output = new StringBuilder(); - private static string GameDataFilename - { - get - { - return "SpeedyBlupi"; - } - } + @Getter + private static final String GameDataFilename = "SpeedyBlupi"; - private static string CurrentGameFilename - { - get - { - return "CurrentGame"; - } - } + @Getter + private static final String CurrentGameFilename = "CurrentGame"; - public static string[] ReadWorld(int gamer, int rank) + public static String[] ReadWorld(int gamer, int rank) { - string worldFilename = GetWorldFilename(gamer, rank); - string text = null; + String worldFilename = GetWorldFilename(gamer, rank); + String text = null; try { Stream stream = TitleContainer.OpenStream(worldFilename); @@ -42,7 +44,7 @@ namespace WindowsPhoneSpeedyBlupi text = streamReader.ReadToEnd(); stream.Close(); } - catch + catch (Exception_ e) { Debug.Write("Fatal error. Loading world failed: " + worldFilename + "\n"); Environment.Exit(1); @@ -51,15 +53,15 @@ namespace WindowsPhoneSpeedyBlupi { return null; } - return text.Split('\n'); + return text.split("\n"); } - private static string GetWorldFilename(int gamer, int rank) + private static String GetWorldFilename(int gamer, int rank) { - return string.Format("worlds/world{0}.txt", rank.ToString("d3")); + return string.Format("worlds/world{0}.txt", int_.of(rank).ToString("d3")); } - public static bool ReadGameData(byte[] data) + public static boolean ReadGameData(byte[] data) { IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication(); if (userStoreForApplication.FileExists(GameDataFilename)) @@ -69,13 +71,13 @@ namespace WindowsPhoneSpeedyBlupi { isolatedStorageFileStream = userStoreForApplication.OpenFile(GameDataFilename, FileMode.Open); } - catch (IsolatedStorageException) + catch (IsolatedStorageException e) { return false; } if (isolatedStorageFileStream != null) { - int count = Math.Min(data.Length, (int)isolatedStorageFileStream.Length); + int count = Math_.Min(data.length, (int)isolatedStorageFileStream.Length); isolatedStorageFileStream.Read(data, 0, count); isolatedStorageFileStream.Close(); return true; @@ -90,7 +92,7 @@ namespace WindowsPhoneSpeedyBlupi IsolatedStorageFileStream isolatedStorageFileStream = userStoreForApplication.OpenFile(GameDataFilename, FileMode.Create); if (isolatedStorageFileStream != null) { - isolatedStorageFileStream.Write(data, 0, data.Length); + isolatedStorageFileStream.Write(data, 0, data.length); isolatedStorageFileStream.Close(); } } @@ -102,12 +104,12 @@ namespace WindowsPhoneSpeedyBlupi { userStoreForApplication.DeleteFile(CurrentGameFilename); } - catch + catch (Exception_ e) { } } - public static string ReadCurrentGame() + public static String ReadCurrentGame() { IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication(); if (userStoreForApplication.FileExists(CurrentGameFilename)) @@ -117,348 +119,354 @@ namespace WindowsPhoneSpeedyBlupi { isolatedStorageFileStream = userStoreForApplication.OpenFile(CurrentGameFilename, FileMode.Open); } - catch (IsolatedStorageException) + catch (IsolatedStorageException e) { return null; } if (isolatedStorageFileStream != null) { byte[] array = new byte[isolatedStorageFileStream.Length]; - isolatedStorageFileStream.Read(array, 0, array.Length); + isolatedStorageFileStream.Read(array, 0, array.length); isolatedStorageFileStream.Close(); - return Encoding.UTF8.GetString(array, 0, array.Length); + return Encoding.UTF8.GetString(array, 0, array.length); } } return null; } - public static void WriteCurrentGame(string data) + public static void WriteCurrentGame(String data) { IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication(); IsolatedStorageFileStream isolatedStorageFileStream = userStoreForApplication.OpenFile(CurrentGameFilename, FileMode.Create); if (isolatedStorageFileStream != null) { - isolatedStorageFileStream.Write(Encoding.UTF8.GetBytes(data), 0, data.Length); + isolatedStorageFileStream.Write(Encoding.UTF8.GetBytes(data), 0, data.length()); isolatedStorageFileStream.Close(); } } - public static void GetIntArrayField(string[] lines, string section, int rank, string name, int[] array) + public static void GetIntArrayField(String[] lines, String section, int rank, String name, int[] array) { - foreach (string text in lines) + for (String text : lines) { - if (!text.StartsWith(section + ":") || rank-- != 0) + if (!text.startsWith(section + ":") || rank-- != 0) { continue; } - int num = text.IndexOf(name + "="); + int num = text.indexOf(name + "="); if (num == -1) { break; } - num += name.Length + 1; - int num2 = text.IndexOf(" ", num); + num += name.length() + 1; + int num2 = text.indexOf(" ", num); if (num2 == -1) { break; } - string[] array2 = text.Substring(num, num2 - num).Split(','); - for (int j = 0; j < array2.Length; j++) + String[] array2 = text.substring(num, num2 - num).split(","); + for (int j = 0; j < array2.length; j++) { - int result; - if (int.TryParse(array2[j], out result)) - { + + try { + int result = Integer.parseInt(array2[j]); array[j] = result; - } - else - { + } catch (NumberFormatException e) { array[j] = 0; + } + } } } - public static bool GetBoolField(string[] lines, string section, int rank, string name) + public static boolean GetBoolField(String[] lines, String section, int rank, String name) { - foreach (string text in lines) + for (String text : lines) { - if (text.StartsWith(section + ":") && rank-- == 0) + if (text.startsWith(section + ":") && rank-- == 0) { - int num = text.IndexOf(name + "="); + int num = text.indexOf(name + "="); if (num == -1) { return false; } - num += name.Length + 1; - int num2 = text.IndexOf(" ", num); + num += name.length() + 1; + int num2 = text.indexOf(" ", num); if (num2 == -1) { return false; } - string value = text.Substring(num, num2 - num); - bool result; - if (bool.TryParse(value, out result)) - { + String value = text.substring(num, num2 - num); + + boolean result; + try { + result = Boolean.parseBoolean(value); return result; + } catch (Exception_ e) { + } return false; + } } return false; } - public static int GetIntField(string[] lines, string section, int rank, string name) + public static int GetIntField(String[] lines, String section, int rank, String name) { - foreach (string text in lines) + for (String text : lines) { - if (text.StartsWith(section + ":") && rank-- == 0) + if (text.startsWith(section + ":") && rank-- == 0) { - int num = text.IndexOf(name + "="); + int num = text.indexOf(name + "="); if (num == -1) { return 0; } - num += name.Length + 1; - int num2 = text.IndexOf(" ", num); + num += name.length() + 1; + int num2 = text.indexOf(" ", num); if (num2 == -1) { return 0; } - string s = text.Substring(num, num2 - num); - int result; - if (int.TryParse(s, out result)) - { - return result; + String s = text.substring(num, num2 - num); + try { + return Integer.parseInt(s); + } catch (NumberFormatException e) { + return 0; } - return 0; + } } return 0; } - public static double GetDoubleField(string[] lines, string section, int rank, string name) + public static double GetDoubleField(String[] lines, String section, int rank, String name) { - foreach (string text in lines) + for (String text : lines) { - if (text.StartsWith(section + ":") && rank-- == 0) + if (text.startsWith(section + ":") && rank-- == 0) { - int num = text.IndexOf(name + "="); + int num = text.indexOf(name + "="); if (num == -1) { return 0.0; } - num += name.Length + 1; - int num2 = text.IndexOf(" ", num); + num += name.length() + 1; + int num2 = text.indexOf(" ", num); if (num2 == -1) { return 0.0; } - string s = text.Substring(num, num2 - num); - double result; - if (double.TryParse(s, out result)) - { - return result; + String s = text.substring(num, num2 - num); + try { + return Double.parseDouble(s); + } catch (NumberFormatException e) { + return 0.0; } - return 0.0; + } } return 0.0; } - public static TinyPoint GetPointField(string[] lines, string section, int rank, string name) + public static TinyPoint GetPointField(String[] lines, String section, int rank, String name) { - foreach (string text in lines) + for (String text : lines) { - if (text.StartsWith(section + ":") && rank-- == 0) + if (text.startsWith(section + ":") && rank-- == 0) { - int num = text.IndexOf(name + "="); + int num = text.indexOf(name + "="); if (num == -1) { - return default(TinyPoint); + return default_(new TinyPoint()); } - num += name.Length + 1; - int num2 = text.IndexOf(";", num); + num += name.length() + 1; + int num2 = text.indexOf(";", num); if (num2 == -1) { - return default(TinyPoint); + return default_(new TinyPoint()); } - int num3 = text.IndexOf(" ", num); + int num3 = text.indexOf(" ", num); if (num3 == -1) { - return default(TinyPoint); + return default_(new TinyPoint()); } - string s = text.Substring(num, num2 - num); - string s2 = text.Substring(num2 + 1, num3 - num2 - 1); + String s = text.substring(num, num2 - num); + String s2 = text.substring(num2 + 1, num3 - num2 - 1); int result; - if (!int.TryParse(s, out result)) - { - return default(TinyPoint); + try { + result = Integer.parseInt(s); + } catch (NumberFormatException e) { + return new TinyPoint(); } int result2; - if (!int.TryParse(s2, out result2)) - { - return default(TinyPoint); + try { + result2 = Integer.parseInt(s2); + } catch (NumberFormatException e) { + return new TinyPoint(); } - TinyPoint result3 = default(TinyPoint); + + TinyPoint result3 = default_(new TinyPoint()); result3.X = result; result3.Y = result2; return result3; } } - return default(TinyPoint); + /**/ + return default_(new TinyPoint()); } - public static int? GetDecorField(string[] lines, string section, int x, int y) - { - for (int i = 0; i < lines.Length; i++) - { - string text = lines[i]; - if (text.StartsWith(section + ":")) - { - text = lines[i + 1 + x]; - string[] array = text.Split(','); - if (string.IsNullOrEmpty(array[y])) - { - return -1; - } - int result; - if (int.TryParse(array[y], out result)) - { - return result; - } + public static Integer GetDecorField(String[] lines, String section, int x, int y) { + for (int i = 0; i < lines.length; i++) { + String text = lines[i]; + if (text.startsWith(section + ":")) { + text = lines[i + 1 + x]; + String[] array = text.split(","); + if (string.IsNullOrEmpty(array[y])) { + return -1; + } + try { + return Integer.parseInt(array[y]); + } catch (NumberFormatException e) { return null; } } - return null; } + return null; + } - public static void GetDoorsField(string[] lines, string section, int[] doors) + public static void GetDoorsField(String[] lines, String section, int[] doors) { - foreach (string text in lines) + for (String text : lines) { - if (!text.StartsWith(section + ":")) + if (!text.startsWith(section + ":")) { continue; } - string[] array = text.Substring(section.Length + 2).Split(','); - for (int j = 0; j < array.Length; j++) + String[] array = text.substring(section.length() + 2).split(","); + for (int j = 0; j < array.length; j++) { int result; if (string.IsNullOrEmpty(array[j])) { doors[j] = 1; } - else if (int.TryParse(array[j], out result)) - { - doors[j] = result; + else { + try { + doors[j] = Integer.parseInt(array[j]); + } catch (NumberFormatException e) { + } } + } } } public static void WriteClear() { - output.Clear(); + output.setLength(0); } - public static void WriteSection(string section) + public static void WriteSection(String section) { - output.Append(section); - output.Append(": "); + output.append(section); + output.append(": "); } - public static void WriteIntArrayField(string name, int[] array) + public static void WriteIntArrayField(String name, int[] array) { - output.Append(name); - output.Append("="); - for (int i = 0; i < array.Length; i++) + output.append(name); + output.append("="); + for (int i = 0; i < array.length; i++) { if (array[i] != 0) { - output.Append(array[i].ToString(CultureInfo.InvariantCulture)); + output.append(string.Format(Locale.US, "%s", array[i])); } - if (i < array.Length - 1) + if (i < array.length- 1) { - output.Append(","); + output.append(","); } } - output.Append(" "); + output.append(" "); } - public static void WriteBoolField(string name, bool n) + public static void WriteBoolField(String name, boolean n) { - output.Append(name); - output.Append("="); - output.Append(n.ToString(CultureInfo.InvariantCulture)); - output.Append(" "); + output.append(name); + output.append("="); + output.append(string.Format(Locale.US, "%f", n)); + output.append(" "); } - public static void WriteIntField(string name, int n) + public static void WriteIntField(String name, int n) { - output.Append(name); - output.Append("="); - output.Append(n.ToString(CultureInfo.InvariantCulture)); - output.Append(" "); + output.append(name); + output.append("="); + output.append(string.Format(Locale.US, "%f", n)); + output.append(" "); } - public static void WriteDoubleField(string name, double n) + public static void WriteDoubleField(String name, double n) { - output.Append(name); - output.Append("="); - output.Append(n.ToString(CultureInfo.InvariantCulture)); - output.Append(" "); + output.append(name); + output.append("="); + output.append(string.Format(Locale.US, "%f", n)); + output.append(" "); } - public static void WritePointField(string name, TinyPoint p) + public static void WritePointField(String name, TinyPoint p) { - output.Append(name); - output.Append("="); - output.Append(p.X.ToString(CultureInfo.InvariantCulture)); - output.Append(";"); - output.Append(p.Y.ToString(CultureInfo.InvariantCulture)); - output.Append(" "); + output.append(name); + output.append("="); + output.append(string.Format(Locale.US, "%f", p.X)); + output.append(";"); + output.append(string.Format(Locale.US, "%f", p.Y)); + output.append(" "); } public static void WriteDecorField(int[] line) { - for (int i = 0; i < line.Length; i++) + for (int i = 0; i < line.length; i++) { if (line[i] != -1) { - output.Append(line[i].ToString(CultureInfo.InvariantCulture)); + output.append(string.Format(Locale.US, "%d", line[i])); + } - if (i < line.Length - 1) + if (i < line.length - 1) { - output.Append(","); + output.append(","); } } - output.Append("\n"); + output.append("\n"); } public static void WriteDoorsField(int[] doors) { - for (int i = 0; i < doors.Length; i++) + for (int i = 0; i < doors.length; i++) { if (doors[i] != 1) { - output.Append(doors[i].ToString(CultureInfo.InvariantCulture)); + output.append(string.Format(Locale.US, "%d", doors[i])); } - if (i < doors.Length - 1) + if (i < doors.length - 1) { - output.Append(","); + output.append(","); } } - output.Append("\n"); + output.append("\n"); } public static void WriteEndSection() { - output.Append("\n"); + output.append("\n"); } - public static string GetWriteString() + public static String GetWriteString() { - return output.ToString(); + return output.toString(); } } -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index a904cac..a7be10f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,6 +21,8 @@ gdxVersion=1.12.1 pixelVersion=0.0.0-SNAPSHOT gdxTeaVMVersion=1.0.3 teaVMVersion=0.10.2 -netbeans.hint.jdkPlatform=JDK_17 +netbeans.hint.jdkPlatform=JDK_jdk-17.0.2_from__home_robertvokac_Desktop_jdk-17.0.2 shapeDrawerVersion=2.6.0 netbeans.org-netbeans-modules-javascript2-requirejs.enabled=true +jdotnetVersion=0.0.0-SNAPSHOT +jxnaVersion=0.0.0-SNAPSHOT diff --git a/html/build.gradle b/html/build.gradle index 88511c2..3ca4b18 100644 --- a/html/build.gradle +++ b/html/build.gradle @@ -52,6 +52,13 @@ dependencies { implementation "com.pixelgamelibrary:pixel:$pixelVersion:sources" api "com.pixelgamelibrary:pixel-backend-libgdx:$pixelVersion" implementation "com.pixelgamelibrary:pixel-backend-libgdx:$pixelVersion:sources" + + implementation "com.openeggbert.jdotnet:jdotnet:$jdotnetVersion:sources" + api "com.openeggbert.jdotnet:jdotnet:$jdotnetVersion" + + implementation "com.openeggbert.jxna:jxna:$jxnaVersion:sources" + api "com.openeggbert.jxna:jxna:$jxnaVersion" + implementation("com.badlogicgames.gdx-controllers:gdx-controllers-gwt:$gdxControllersVersion:sources"){exclude group: "com.badlogicgames.gdx", module: "gdx-backend-gwt"} implementation("com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources") {exclude group: "com.google.gwt", module: "gwt-user"} implementation("com.github.crykn.guacamole:gdx-gwt:$guacamoleVersion:sources"){exclude group: "com.badlogicgames.gdx", module: "gdx-backend-gwt"} diff --git a/html/src/main/java/com/openeggbert/GdxDefinition.gwt.xml b/html/src/main/java/com/openeggbert/GdxDefinition.gwt.xml index 207912b..d17484f 100644 --- a/html/src/main/java/com/openeggbert/GdxDefinition.gwt.xml +++ b/html/src/main/java/com/openeggbert/GdxDefinition.gwt.xml @@ -25,6 +25,8 @@ + +