diff --git a/Accelerometer.cs b/Accelerometer.cs deleted file mode 100644 index 40729a6..0000000 --- a/Accelerometer.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WindowsPhoneSpeedyBlupi -{ - public interface Accelerometer - { - void Start(); - void Stop(); - event EventHandler CurrentValueChanged; - } -} diff --git a/AccelerometerDummyImpl.cs b/AccelerometerDummyImpl.cs deleted file mode 100644 index ffa1524..0000000 --- a/AccelerometerDummyImpl.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WindowsPhoneSpeedyBlupi -{ - public class AccelerometerDummyImpl : Accelerometer - { - public event EventHandler CurrentValueChanged; - - public void Start() - { - //throw new AccelerometerFailedException(); - } - - public void Stop() - { - //throw new AccelerometerFailedException(); - } - } -} diff --git a/AccelerometerEventArgs.cs b/AccelerometerEventArgs.cs deleted file mode 100644 index c70753e..0000000 --- a/AccelerometerEventArgs.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WindowsPhoneSpeedyBlupi -{ - public class AccelerometerEventArgs : EventArgs - { - - public float X { get; } - public float Y { get; } - public float Z { get; } - - public AccelerometerEventArgs(float x, float y, float z) - { - X = x; - Y = y; - Z = z; - } - } -} diff --git a/AccelerometerFactory.cs b/AccelerometerFactory.cs deleted file mode 100644 index 5097a8c..0000000 --- a/AccelerometerFactory.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WindowsPhoneSpeedyBlupi -{ - public class AccelerometerFactory - { - public static Accelerometer Create() { return new AccelerometerDummyImpl(); } - } -} diff --git a/AccelerometerFailedException.cs b/AccelerometerFailedException.cs deleted file mode 100644 index d388fa7..0000000 --- a/AccelerometerFailedException.cs +++ /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/Decor.cs b/Decor.cs deleted file mode 100644 index 2d236d7..0000000 --- a/Decor.cs +++ /dev/null @@ -1,10597 +0,0 @@ -// 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; - - -namespace WindowsPhoneSpeedyBlupi -{ - public class Decor - { - private struct Cellule - { - public int icon; - } - - private struct MoveObject - { - public int type; - - public int stepAdvance; - - public int stepRecede; - - public int timeStopStart; - - public int timeStopEnd; - - public TinyPoint posStart; - - public TinyPoint posEnd; - - public TinyPoint posCurrent; - - public int step; - - public int time; - - public int phase; - - public int channel; - - public int icon; - } - - private class ByeByeObject - { - public int channel; - - public int icon; - - public double posX; - - public double posY; - - public double rotation; - - public double phase; - - public double animationSpeed; - - public double rotationSpeed; - - public double speedX; - } - - private static readonly int MAXMOVEOBJECT = 200; - - private static readonly int MAXQUART = 441; - - private static readonly int SCROLL_SPEED = 8; - - private static readonly int SCROLL_MARGX = 80; - - private static readonly int SCROLL_MARGY = 40; - - private static readonly int BLUPIFLOOR = 2; - - private static readonly int BLUPIOFFY = 4 + BLUPIFLOOR; - - private static readonly int BLUPISURF = 12; - - private static readonly int BLUPISUSPEND = 12; - - private static readonly int OVERHEIGHT = 80; - - private Sound m_sound; - - private Pixmap m_pixmap; - - private GameData m_gameData; - - private Cellule[,] m_decor = new Cellule[100, 100]; - - private Cellule[,] m_bigDecor = new Cellule[100, 100]; - - private int[] m_balleTraj = new int[1300]; - - private int[] m_moveTraj = new int[1300]; - - private MoveObject[] m_moveObject = new MoveObject[MAXMOVEOBJECT]; - - private int m_keyPress; - - private int m_lastKeyPress; - - private TinyPoint m_posDecor; - - private TinyPoint m_dimDecor; - - private int m_term; - - private int m_music; - - private int m_region; - - private int m_time; - - private bool m_bPause; - - private TinyRect m_drawBounds; - - private int m_nbRankCaisse; - - private int[] m_rankCaisse = new int[MAXMOVEOBJECT]; - - private int m_nbLinkCaisse; - - private int[] m_linkCaisse = new int[MAXMOVEOBJECT]; - - private TinyPoint m_blupiPos; - - private TinyPoint m_blupiLastPos; - - private TinyPoint m_blupiValidPos; - - private int m_blupiAction; - - private int m_blupiDir; - - private int m_blupiPhase; - - private double m_blupiVitesseX; - - private double m_blupiVitesseY; - - private int m_blupiIcon; - - private int m_blupiSec; - - private int m_blupiChannel; - - private TinyPoint m_blupiVector; - - private int m_blupiTransport; - - private bool m_blupiFocus; - - private bool m_blupiAir; - - private bool m_blupiHelico; - - private bool m_blupiOver; - - private bool m_blupiJeep; - - private bool m_blupiTank; - - private bool m_blupiSkate; - - private bool m_blupiNage; - - private bool m_blupiSurf; - - private bool m_blupiVent; - - private bool m_blupiSuspend; - - private bool m_blupiJumpAie; - - private bool m_blupiShield; - - private bool m_blupiPower; - - private bool m_blupiCloud; - - private bool m_blupiHide; - - private bool m_blupiInvert; - - private bool m_blupiBalloon; - - private bool m_blupiEcrase; - - private bool m_blupiMotorHigh; - - private int m_blupiMotorSound; - - private TinyPoint m_blupiPosHelico; - - private TinyPoint m_blupiPosMagic; - - private bool m_blupiRestart; - - private bool m_blupiFront; - - private int m_blupiBullet; - - private int m_blupiCle; - - private int m_blupiPerso; - - private int m_blupiDynamite; - - private int m_blupiNoBarre; - - private int m_blupiTimeShield; - - private int m_blupiTimeFire; - - private int m_blupiTimeNoAsc; - - private int m_blupiTimeMockery; - - private int m_blupiTimeOuf; - - private int m_blupiActionOuf; - - private int m_blupiFifoNb; - - private TinyPoint[] m_blupiFifoPos = new TinyPoint[10]; - - private TinyPoint m_blupiStartPos; - - private int m_blupiStartDir; - - private double m_blupiSpeedX; - - private double m_blupiSpeedY; - - private double m_blupiLastSpeedX; - - private double m_blupiLastSpeedY; - - private Jauge[] m_jauges = new Jauge[2]; - - private int m_blupiLevel; - - private bool m_bFoundCle; - - private bool m_bPrivate; - - private bool m_bCheatDoors; - - private bool m_bSuperBlupi; - - private bool m_bDrawSecret; - - private bool m_buildOfficialMissions; - - private int m_mission; - - private int[] m_doors = new int[200]; - - private int m_nbVies; - - private int m_nbTresor; - - private int m_totalTresor; - - private int m_goalPhase; - - private int m_detectIcon; - - private TinyPoint m_sucettePos; - - private int m_sucetteType; - - private int m_blupiLogicRotation; - - private int m_blupiRealRotation; - - private int m_blupiOffsetY; - - private TinyPoint m_scrollPoint; - - private TinyPoint m_scrollAdd; - - private int m_voyageIcon; - - private int m_voyageChannel; - - private int m_voyagePhase; - - private int m_voyageTotal; - - private TinyPoint m_voyageStart; - - private TinyPoint m_voyageEnd; - - private int m_decorAction; - - private int m_decorPhase; - - private int[] m_lastDecorIcon = new int[200]; - - private double m_hotSpotFinalZoom; - - private double m_hotSpotFinalX; - - private double m_hotSpotFinalY; - - private double m_hotSpotCurrentZoom; - - private double m_hotSpotCurrentX; - - private double m_hotSpotCurrentY; - - private double m_hotSpotStepZoom; - - private double m_hotSpotStepX; - - private double m_hotSpotStepY; - - private double m_hotSpotOutLag; - - private Random m_random; - - private List byeByeObjects; - - public TinyRect DrawBounds - { - get - { - return m_drawBounds; - } - set - { - m_drawBounds = value; - } - } - - public Def.ButtonGlygh ButtonPressed { get; set; } - - private static void MoveObjectCopy(ref 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.step = src.step; - dst.time = src.time; - dst.phase = src.phase; - dst.channel = src.channel; - dst.icon = src.icon; - } - - public Decor() - { - for (int i = 0; i < 200; i++) - { - m_lastDecorIcon[i] = 0; - } - m_drawBounds.Left = 0; - m_drawBounds.Right = 640; - m_drawBounds.Top = 0; - m_drawBounds.Bottom = 480; - m_time = 0; - m_bCheatDoors = false; - m_bSuperBlupi = false; - m_bDrawSecret = false; - m_buildOfficialMissions = false; - m_hotSpotFinalZoom = 1.0; - m_hotSpotFinalX = 320.0; - m_hotSpotFinalY = 240.0; - m_hotSpotCurrentZoom = 1.0; - m_hotSpotCurrentX = 320.0; - m_hotSpotCurrentY = 240.0; - m_random = new Random(); - byeByeObjects = new List(); - } - - public void Create(Sound sound, Pixmap pixmap, GameData gameData) - { - m_sound = sound; - m_pixmap = pixmap; - m_gameData = gameData; - m_keyPress = 0; - m_lastKeyPress = 0; - m_blupiMotorSound = 0; - InitDecor(); - TinyPoint pos = default(TinyPoint); - pos.X = 90; - pos.Y = 450; - m_jauges[0] = new Jauge(); - m_jauges[0].Create(m_pixmap, m_sound, pos, 1, false); - m_jauges[0].SetHide(true); - pos.X = 90; - pos.Y = 428; - m_jauges[1] = new Jauge(); - m_jauges[1].Create(m_pixmap, m_sound, pos, 3, false); - m_jauges[1].SetHide(true); - } - - public bool LoadImages() - { - string name = string.Format("decor{0}", m_region.ToString("d3")); - m_pixmap.BackgroundCache(name); - return true; - } - - private void InitDecor() - { - m_posDecor.X = 0; - m_posDecor.Y = 0; - m_dimDecor.X = 100; - m_dimDecor.Y = 100; - m_music = 1; - m_region = 2; - m_decorAction = 0; - for (int i = 0; i < 100; i++) - { - for (int j = 0; j < 100; j++) - { - 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; - for (int k = 0; k < MAXMOVEOBJECT; k++) - { - m_moveObject[k].type = 0; - } - FlushBalleTraj(); - FlushMoveTraj(); - m_moveObject[0].type = 5; - m_moveObject[0].stepAdvance = 1; - m_moveObject[0].stepRecede = 1; - m_moveObject[0].timeStopStart = 0; - m_moveObject[0].timeStopEnd = 0; - m_moveObject[0].posStart.X = 258; - m_moveObject[0].posStart.Y = 196; - m_moveObject[0].posEnd = m_moveObject[0].posStart; - m_moveObject[0].posCurrent = m_moveObject[0].posStart; - m_moveObject[0].phase = 0; - m_moveObject[0].step = 1; - m_moveObject[0].time = 0; - m_moveObject[0].channel = 10; - m_moveObject[0].icon = 0; - m_moveObject[1].type = 7; - m_moveObject[1].stepAdvance = 1; - m_moveObject[1].stepRecede = 1; - m_moveObject[1].timeStopStart = 0; - m_moveObject[1].timeStopEnd = 0; - m_moveObject[1].posStart.X = 450; - m_moveObject[1].posStart.Y = 196; - m_moveObject[1].posEnd = m_moveObject[1].posStart; - m_moveObject[1].posCurrent = m_moveObject[1].posStart; - m_moveObject[1].phase = 0; - m_moveObject[1].step = 1; - m_moveObject[1].time = 0; - m_moveObject[1].channel = 10; - m_moveObject[1].icon = 29; - m_blupiStartPos.X = 66; - m_blupiStartPos.Y = 192 + BLUPIOFFY; - m_blupiStartDir = 2; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiIcon = 0; - m_blupiChannel = 2; - m_blupiFocus = true; - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiInvert = false; - m_blupiBalloon = false; - m_blupiEcrase = false; - m_blupiMotorHigh = false; - m_blupiPosHelico.X = -1; - m_blupiActionOuf = 0; - m_blupiTimeNoAsc = 0; - m_blupiTimeMockery = 0; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - m_blupiValidPos = m_blupiStartPos; - m_blupiFront = false; - m_blupiBullet = 0; - m_blupiCle = 0; - m_blupiPerso = 0; - m_blupiDynamite = 0; - m_nbTresor = 0; - m_totalTresor = 1; - m_goalPhase = 0; - m_scrollPoint = m_blupiStartPos; - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_term = 0; - byeByeObjects.Clear(); - } - - public void PlayPrepare(bool bTest) - { - if (bTest) - { - m_nbVies = 3; - } - m_blupiPos = m_blupiStartPos; - m_blupiDir = m_blupiStartDir; - if (m_blupiDir == 1) - { - m_blupiIcon = 4; - } - else - { - m_blupiIcon = 0; - } - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiInvert = false; - m_blupiBalloon = false; - m_blupiEcrase = false; - m_blupiMotorHigh = false; - m_blupiActionOuf = 0; - m_blupiTimeNoAsc = 0; - m_blupiTimeMockery = 0; - m_blupiValidPos = m_blupiPos; - m_blupiBullet = 0; - m_blupiCle = 0; - m_blupiPerso = 0; - m_blupiDynamite = 0; - m_nbTresor = 0; - m_totalTresor = 0; - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 5) - { - m_totalTresor++; - } - m_moveObject[i].posCurrent = m_moveObject[i].posStart; - m_moveObject[i].step = 1; - m_moveObject[i].phase = 0; - m_moveObject[i].time = 0; - if (m_moveObject[i].type == 5 || m_moveObject[i].type == 6 || m_moveObject[i].type == 25 || m_moveObject[i].type == 26 || m_moveObject[i].type == 40 || m_moveObject[i].type == 2 || m_moveObject[i].type == 3 || m_moveObject[i].type == 96 || m_moveObject[i].type == 97) - { - m_moveObject[i].phase = m_random.Next(23); - } - if (m_moveObject[i].type == 23) - { - m_moveObject[i].type = 0; - } - } - m_goalPhase = 0; - MoveObjectSort(); - m_scrollPoint = m_blupiPos; - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_blupiPosHelico.X = -1; - m_blupiMotorSound = 0; - m_blupiFront = false; - m_blupiNoBarre = 0; - m_blupiValidPos = m_blupiPos; - m_blupiFifoNb = 0; - m_blupiTimeFire = 0; - m_voyageIcon = -1; - m_jauges[0].SetHide(true); - m_jauges[1].SetHide(true); - m_bFoundCle = false; - m_term = 0; - m_time = 0; - m_bPause = false; - MoveStep(); - m_scrollPoint.X = m_blupiPos.X + 30 + m_scrollAdd.X; - m_scrollPoint.Y = m_blupiPos.Y + 30 + m_scrollAdd.Y; - } - - private void BuildPrepare() - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - m_moveObject[i].posCurrent = m_moveObject[i].posStart; - m_moveObject[i].step = 1; - m_moveObject[i].time = 0; - m_moveObject[i].phase = 0; - if (m_moveObject[i].type == 23) - { - m_moveObject[i].type = 0; - } - } - m_voyageIcon = -1; - m_time = 0; - m_bPause = false; - } - - public int IsTerminated() - { - return m_term; - } - - public void MoveStep() - { - try - { - MoveObjectStep(); - ByeByeStep(); - BlupiStep(); - MoveHotSpot(); - AdaptMotorVehicleSound(); - } - catch - { - } - } - - private void ResetHotSpot() - { - m_pixmap.SetHotSpot(1.0, DrawBounds.Width / 2, DrawBounds.Height / 2); - } - - private void MoveHotSpot() - { - bool flag = false; - if (m_blupiSpeedX != 0.0) - { - flag = true; - } - if (!m_blupiFocus) - { - flag = false; - } - if (m_blupiHelico || m_blupiPower) - { - flag = false; - } - if (!m_gameData.AutoZoom) - { - flag = false; - } - if (flag) - { - m_hotSpotOutLag = 30.0; - } - else if (m_hotSpotOutLag > 0.0) - { - if (!m_blupiFocus || m_blupiSpeedY != 0.0) - { - m_hotSpotOutLag = 0.0; - } - else - { - m_hotSpotOutLag -= 1.0; - } - if (m_hotSpotOutLag > 0.0) - { - flag = true; - } - } - if (flag) - { - m_hotSpotFinalZoom = 1.3; - m_hotSpotFinalX = m_blupiPos.X + 30 - m_posDecor.X; - m_hotSpotFinalY = m_blupiPos.Y + 30 - m_posDecor.Y; - } - else - { - m_hotSpotFinalZoom = 1.0; - m_hotSpotFinalX = DrawBounds.Width / 2; - m_hotSpotFinalY = DrawBounds.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); - } - if (m_hotSpotCurrentZoom > 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); - } - if (m_hotSpotCurrentX > 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) - { - TinyPoint pos = default(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) - { - PlaySound(69, pos); - } - if (num % 2 == 0) - { - return num < 50; - } - return false; - } - - public void Build() - { - TinyPoint posDecor = DecorNextAction(); - TinyPoint pos = default(TinyPoint); - pos.X = posDecor.X * 2 / 3; - pos.Y = posDecor.Y * 2 / 3; - int num = 1; - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = m_drawBounds.Left; - TinyRect rect = default(TinyRect); - rect.Left = pos.X % 640; - rect.Right = 640; - for (int i = 0; i < 3; i++) - { - tinyPoint.Y = m_drawBounds.Top; - rect.Top = pos.Y % 480; - rect.Bottom = 480; - for (int j = 0; j < 2; j++) - { - m_pixmap.DrawPart(3, tinyPoint, rect); - tinyPoint.Y += rect.Height - num; - rect.Top = 0; - rect.Bottom = 480; - } - tinyPoint.X += rect.Width - num; - rect.Left = 0; - rect.Right = 640; - if (tinyPoint.X > m_drawBounds.Right) - { - break; - } - } - 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++) - { - 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++) - { - if (i >= 0 && i < 100 && j >= 0 && j < 100) - { - int num2 = m_bigDecor[i, j].icon; - int channel = 9; - if (num2 != -1) - { - pos.X = tinyPoint.X; - pos.Y = tinyPoint.Y; - if (num2 == 203) - { - num2 = Tables.table_marine[m_time / 3 % 11]; - channel = 1; - } - if (num2 >= 66 && num2 <= 68) - { - pos.Y -= 13; - } - if (num2 >= 87 && num2 <= 89) - { - pos.Y -= 2; - } - m_pixmap.QuickIcon(channel, num2, pos); - } - } - tinyPoint.Y += 64; - } - 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++) - { - tinyPoint.Y = m_drawBounds.Top - posDecor.Y % 64; - 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) - { - int num2 = m_decor[i, j].icon; - if (num2 == 384 || num2 == 385) - { - m_pixmap.QuickIcon(1, num2, tinyPoint); - } - } - tinyPoint.Y += 64; - } - tinyPoint.X += 64; - } - m_blupiSec = 0; - if (!m_blupiFront) - { - double rotation = 0.0; - if (m_blupiNage || m_blupiSurf || m_blupiHelico || m_blupiJeep) - { - rotation = m_blupiRealRotation; - } - tinyPoint.X = m_drawBounds.Left + m_blupiPos.X - posDecor.X; - tinyPoint.Y = m_drawBounds.Top + m_blupiPos.Y - posDecor.Y; - if (m_blupiJeep) - { - tinyPoint.Y += m_blupiOffsetY; - } - if (m_blupiShield) - { - m_blupiSec = 1; - if (m_blupiTimeShield > 25 || m_time % 4 < 2) - { - int num2 = Tables.table_shield_blupi[m_time / 2 % 16]; - tinyPoint.Y -= 2; - m_pixmap.QuickIcon(10, num2, tinyPoint); - tinyPoint.Y += 2; - num2 = Tables.table_shieldloop[m_time / 2 % 5]; - m_pixmap.QuickIcon(10, num2, tinyPoint); - } - m_pixmap.QuickIcon(m_blupiChannel, m_blupiIcon, tinyPoint, 1.0, rotation); - } - else if (m_blupiPower) - { - m_blupiSec = 2; - if (m_blupiTimeShield > 25 || m_time % 4 < 2) - { - int num2 = Tables.table_magicloop[m_time / 2 % 5]; - m_pixmap.QuickIcon(10, num2, tinyPoint); - } - m_pixmap.QuickIcon(m_blupiChannel, m_blupiIcon, tinyPoint, 1.0, rotation); - } - else if (m_blupiCloud) - { - m_blupiSec = 3; - if (m_blupiTimeShield > 25 || m_time % 4 < 2) - { - for (int k = 0; k < 3; k++) - { - int num2 = 48 + (m_time + k) / 1 % 6; - pos.X = tinyPoint.X - 34; - pos.Y = tinyPoint.Y - 34; - m_pixmap.QuickIcon(9, num2, pos); - } - } - m_pixmap.QuickIcon(m_blupiChannel, m_blupiIcon, tinyPoint, 1.0, rotation); - } - else if (m_blupiHide) - { - m_blupiSec = 4; - if (m_blupiTimeShield > 25 || m_time % 4 < 2) - { - m_pixmap.QuickIcon(m_blupiChannel, m_blupiIcon, tinyPoint, 0.3, rotation); - } - else - { - m_pixmap.QuickIcon(m_blupiChannel, m_blupiIcon, tinyPoint, 1.0, rotation); - } - } - else - { - m_pixmap.QuickIcon(m_blupiChannel, m_blupiIcon, tinyPoint, 1.0, rotation); - } - } - 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) - { - tinyPoint.X = m_drawBounds.Left + m_moveObject[num3].posCurrent.X - posDecor.X; - tinyPoint.Y = m_drawBounds.Top + m_moveObject[num3].posCurrent.Y - posDecor.Y; - if (m_moveObject[num3].type == 4 || m_moveObject[num3].type == 32 || m_moveObject[num3].type == 33) - { - tinyPoint.X += 2; - tinyPoint.Y += BLUPIOFFY; - } - if (m_moveObject[num3].type == 54) - { - tinyPoint.Y += BLUPIOFFY; - } - double opacity = 1.0; - if (m_moveObject[num3].type == 58) - { - opacity = (double)(20 - m_moveObject[num3].phase) * 0.3 / 20.0; - } - 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++) - { - int num4 = (m_time + Tables.table_drinkoffset[l]) % 50; - int rank = Tables.table_drinkeffect[num4 % 5]; - TinyPoint tinyPoint2 = default(TinyPoint); - tinyPoint2.X = tinyPoint.X + 2; - tinyPoint2.Y = tinyPoint.Y - num4 * 3; - TinyPoint pos2 = tinyPoint2; - double opacity2 = (50.0 - (double)num4) / 50.0; - m_pixmap.QuickIcon(10, rank, pos2, opacity2, 0.0); - } - } - if (m_bDrawSecret && m_moveObject[num3].type == 12 && m_moveObject[num3].icon != 32 && m_moveObject[num3].icon != 33 && m_moveObject[num3].icon != 34) - { - m_pixmap.QuickIcon(1, 214, tinyPoint); - } - } - } - tinyPoint.X = m_drawBounds.Left - posDecor.X % 64; - 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++) - { - if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i, j].icon != -1) - { - int num2 = m_decor[i, j].icon; - pos.X = tinyPoint.X; - pos.Y = tinyPoint.Y; - if ((num2 >= 107 && num2 <= 109) || num2 == 157) - { - pos.Y -= 7; - } - if (num2 == 211) - { - num2 = Tables.table_ressort[(m_time / 2 + i * 7) % 8]; - } - if (num2 == 214 && !m_bDrawSecret) - { - num2 = -1; - } - if (num2 == 364) - { - pos.Y -= 2; - } - switch (num2) - { - default: - m_pixmap.QuickIcon(1, num2, pos); - break; - case 68: - case 91: - case 92: - case 110: - case 111: - case 112: - case 113: - case 114: - case 115: - case 116: - case 117: - case 118: - case 119: - case 120: - case 121: - case 122: - case 123: - case 124: - case 125: - case 126: - case 127: - case 128: - case 129: - case 130: - case 131: - case 132: - case 133: - case 134: - case 135: - case 136: - case 137: - case 305: - case 317: - case 324: - case 373: - case 378: - case 384: - case 385: - case 404: - case 410: - break; - } - } - tinyPoint.Y += 64; - } - tinyPoint.X += 64; - } - 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) - { - tinyPoint.X = m_drawBounds.Left + m_moveObject[num3].posCurrent.X - posDecor.X; - tinyPoint.Y = m_drawBounds.Top + m_moveObject[num3].posCurrent.Y - posDecor.Y; - m_pixmap.QuickIcon(m_moveObject[num3].channel, m_moveObject[num3].icon, tinyPoint); - } - } - tinyPoint.X = m_drawBounds.Left - posDecor.X % 64; - 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++) - { - if (i >= 0 && i < 100 && j >= 0 && j < 100 && m_decor[i, j].icon != -1) - { - int num2 = m_decor[i, j].icon; - pos = tinyPoint; - if (num2 == 68) - { - num2 = Tables.table_decor_lave[(i * 13 + j * 7 + m_time / 2) % 8]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 373) - { - num2 = ((!m_blupiFocus) ? Tables.table_decor_piege2[(i * 13 + j * 7 + m_time / 2) % 4] : Tables.table_decor_piege1[(i * 13 + j * 7 + m_time / 4) % 16]); - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 404 || num2 == 410) - { - num2 = Tables.table_decor_goutte[(i * 13 + j * 7 + m_time / 2) % 48]; - pos.Y -= 9; - m_pixmap.QuickIcon(1, num2, pos); - if (num2 >= 404 && num2 <= 407) - { - m_decor[i, j].icon = 404; - } - else - { - m_decor[i, j].icon = 410; - } - } - if (num2 == 317) - { - num2 = Tables.table_decor_ecraseur[m_time / 3 % 10]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 378) - { - num2 = Tables.table_decor_scie[(i * 13 + j * 7 + m_time / 1) % 6]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 324) - { - num2 = Tables.table_decor_temp[m_time / 4 % 20]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 92) - { - num2 = Tables.table_decor_eau1[(i * 13 + j * 7 + m_time / 3) % 6]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 91) - { - int num5 = 3 + (i * 17 + j * 13) % 3; - num2 = Tables.table_decor_eau2[(i * 11 + j * 7 + m_time / num5) % 6]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 305 && BlitzActif(i, j)) - { - num2 = m_random.Next(305, 308); - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 110) - { - num2 = Tables.table_decor_ventg[m_time / 1 % 4]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 114) - { - num2 = Tables.table_decor_ventd[m_time / 1 % 4]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 118) - { - num2 = Tables.table_decor_venth[m_time / 1 % 4]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 122) - { - num2 = Tables.table_decor_ventb[m_time / 1 % 4]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 126) - { - num2 = Tables.table_decor_ventillog[m_time / 2 % 3]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 129) - { - num2 = Tables.table_decor_ventillod[m_time / 2 % 3]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 132) - { - num2 = Tables.table_decor_ventilloh[m_time / 2 % 3]; - m_pixmap.QuickIcon(1, num2, pos); - } - if (num2 == 135) - { - num2 = Tables.table_decor_ventillob[m_time / 2 % 3]; - m_pixmap.QuickIcon(1, num2, pos); - } - } - tinyPoint.Y += 64; - } - tinyPoint.X += 64; - } - 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)) - { - tinyPoint.X = m_drawBounds.Left + m_moveObject[num3].posCurrent.X - posDecor.X; - tinyPoint.Y = m_drawBounds.Top + m_moveObject[num3].posCurrent.Y - posDecor.Y; - m_pixmap.QuickIcon(m_moveObject[num3].channel, m_moveObject[num3].icon, tinyPoint); - } - } - if (m_blupiFront) - { - tinyPoint.X = m_drawBounds.Left + m_blupiPos.X - posDecor.X; - tinyPoint.Y = m_drawBounds.Top + m_blupiPos.Y - posDecor.Y; - m_pixmap.QuickIcon(m_blupiChannel, m_blupiIcon, tinyPoint); - } - DrawInfo(); - VoyageDraw(); - m_time++; - } - - private void DrawInfo() - { - TinyPoint pos = default(TinyPoint); - pos.X = 210; - pos.Y = 417; - for (int i = 0; i < m_nbVies; i++) - { - m_pixmap.HudIcon(2, 48, pos); - pos.X += 16; - } - pos.X = 570; - pos.Y = 442; - for (int i = 0; i < m_blupiBullet; i++) - { - m_pixmap.HudIcon(10, 176, pos); - pos.X += 4; - } - if (m_blupiPerso > 0) - { - pos.X = 0; - pos.Y = 438; - m_pixmap.HudIcon(4, 108, pos); - string text = string.Format("= {0}", m_blupiPerso.ToString()); - pos.X = 32; - pos.Y = 452; - Text.DrawText(m_pixmap, pos, text, 0.7); - } - if (m_blupiDynamite > 0) - { - pos.X = 505; - pos.Y = 414; - m_pixmap.HudIcon(10, 252, pos); - } - if (((uint)m_blupiCle & (true ? 1u : 0u)) != 0) - { - pos.X = 520; - pos.Y = 418; - m_pixmap.HudIcon(10, 215, pos); - } - if (((uint)m_blupiCle & 2u) != 0) - { - pos.X = 530; - pos.Y = 418; - m_pixmap.HudIcon(10, 222, pos); - } - if (((uint)m_blupiCle & 4u) != 0) - { - pos.X = 540; - pos.Y = 418; - m_pixmap.HudIcon(10, 229, pos); - } - 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.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()); - pos.X = 460; - pos.Y = 450; - Text.DrawTextCenter(m_pixmap, pos, text, 1.0); - } - for (int i = 0; i < 2; i++) - { - if (!m_jauges[i].GetHide()) - { - m_jauges[i].Draw(); - } - } - int[] array = null; - if (m_mission == 11) - { - array = Tables.table_training1; - } - if (m_mission == 12) - { - array = Tables.table_training2; - } - if (m_mission == 13) - { - array = Tables.table_training3; - } - if (m_mission == 14) - { - array = Tables.table_training4; - } - if (array == null || m_bPrivate) - { - return; - } - int num = (m_blupiPos.X + 30) / 64; - int num2 = (m_blupiPos.Y + 30) / 64; - for (int i = 0; array[i] != -1; i += 6) - { - 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) - { - num3 = 10000; - } - string text = MyResource.LoadString(array[i + 5] + num3); - if (!string.IsNullOrEmpty(text)) - { - TinyRect drawBounds = m_pixmap.DrawBounds; - TinyRect tinyRect2 = default(TinyRect); - tinyRect2.Left = 0; - 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); - pos.X = 320; - pos.Y = 5 + (int)((1.0 - num5) * 35.0 * 0.6); - Text.DrawTextCenter(m_pixmap, pos, text, num5); - } - break; - } - } - } - - private bool IsDisplayInfo(int tableTresor) - { - if (tableTresor >= 0) - { - return m_nbTresor == tableTresor; - } - switch (tableTresor) - { - case -2: - if (!m_blupiHelico && !m_blupiSkate && !m_blupiTank) - { - return !m_blupiJeep; - } - return false; - case -3: - if (!m_blupiHelico && !m_blupiSkate && !m_blupiTank) - { - return m_blupiJeep; - } - return true; - case -4: - return m_blupiDynamite == 0; - case -5: - return m_blupiDynamite > 0; - default: - return true; - } - } - - private TinyPoint DecorNextAction() - { - int i = 0; - if (m_decorAction == 0 || m_bPause) - { - return m_posDecor; - } - TinyPoint posDecor = m_posDecor; - for (; Tables.table_decor_action[i] != 0; i += 2 + Tables.table_decor_action[i + 1] * 2) - { - if (m_decorAction != Tables.table_decor_action[i]) - { - continue; - } - if (m_decorPhase < Tables.table_decor_action[i + 1]) - { - 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); - if (posDecor.X < 0) - { - posDecor.X = 0; - } - if (posDecor.X > num) - { - posDecor.X = num; - } - num = ((m_dimDecor.Y != 0) ? (6400 - m_drawBounds.Height) : 0); - if (posDecor.Y < 0) - { - posDecor.Y = 0; - } - if (posDecor.Y > num) - { - posDecor.Y = num; - } - m_decorPhase++; - } - else - { - m_decorAction = 0; - } - break; - } - return posDecor; - } - - public void SetSpeedX(double speed) - { - if (m_blupiInvert) - { - speed = 0.0 - speed; - } - m_blupiSpeedX = speed; - } - - public void SetSpeedY(double speed) - { - m_blupiSpeedY = speed; - } - - public void KeyChange(int keyPress) - { - 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; - } - - private int SoundEnviron(int sound, int obstacle) - { - if ((obstacle >= 32 && obstacle <= 34) || (obstacle >= 41 && obstacle <= 47) || (obstacle >= 139 && obstacle <= 143)) - { - switch (sound) - { - case 4: - return 79; - case 3: - return 78; - } - } - if ((obstacle >= 1 && obstacle <= 28) || (obstacle >= 78 && obstacle <= 90) || (obstacle >= 250 && obstacle <= 260) || (obstacle >= 311 && obstacle <= 316) || (obstacle >= 324 && obstacle <= 329)) - { - switch (sound) - { - case 4: - return 81; - case 3: - return 80; - } - } - if ((obstacle >= 284 && obstacle <= 303) || obstacle == 338) - { - switch (sound) - { - case 4: - return 83; - case 3: - return 82; - } - } - if (obstacle >= 341 && obstacle <= 363) - { - switch (sound) - { - case 4: - return 85; - case 3: - return 84; - } - } - if (obstacle >= 215 && obstacle <= 234) - { - switch (sound) - { - case 4: - return 87; - case 3: - return 86; - } - } - if (obstacle >= 246 && obstacle <= 249) - { - switch (sound) - { - case 4: - return 89; - case 3: - return 88; - } - } - if (obstacle >= 107 && obstacle <= 109) - { - switch (sound) - { - case 4: - return 91; - case 3: - return 90; - } - } - return sound; - } - - private void PlaySound(int sound, TinyPoint pos) - { - if (!m_blupiHide || (sound != 1 && sound != 2 && sound != 3 && sound != 4 && sound != 5 && sound != 6 && sound != 7 && sound != 20 && sound != 21 && sound != 22 && sound != 23 && sound != 24 && sound != 25 && sound != 27 && sound != 32 && sound != 34 && sound != 35 && sound != 36 && sound != 37 && sound != 38 && sound != 39 && sound != 40 && sound != 46 && sound != 47 && sound != 48 && sound != 49 && sound != 64 && sound != 65 && sound != 78 && sound != 79 && sound != 80 && sound != 81 && sound != 82 && sound != 83 && sound != 84 && sound != 85 && sound != 86 && sound != 87 && sound != 88 && sound != 89 && sound != 90 && sound != 91)) - { - pos.X -= m_posDecor.X; - pos.Y -= m_posDecor.Y; - m_sound.PlayImage(sound, pos); - } - } - - public void StopSound() - { - m_blupiMotorSound = 0; - m_sound.StopAll(); - } - - public void StartSound() - { - AdaptMotorVehicleSound(); - } - - private void StopSound(int sound) - { - m_sound.Stop(sound); - } - - private void AdaptMotorVehicleSound() - { - int num = 0; - int channel = 0; - int channel2 = 0; - if (m_blupiHelico) - { - num = (m_blupiMotorHigh ? 16 : 18); - channel = 15; - channel2 = 17; - } - else if (m_blupiJeep || m_blupiOver || m_blupiTank) - { - num = (m_blupiMotorHigh ? 29 : 31); - channel = 28; - channel2 = 30; - } - if (m_blupiMotorSound != num) - { - TinyPoint blupiPos = m_blupiPos; - blupiPos.X -= m_posDecor.X; - blupiPos.Y -= m_posDecor.Y; - if (m_blupiMotorSound == 0 && num != 0) - { - m_sound.PlayImage(channel, blupiPos); - } - if (m_blupiMotorSound != 0 && num == 0) - { - m_sound.PlayImage(channel2, blupiPos); - } - if (m_blupiMotorSound != 0) - { - m_sound.Stop(m_blupiMotorSound); - } - m_blupiMotorSound = num; - if (m_blupiMotorSound != 0) - { - m_sound.PlayImage(m_blupiMotorSound, blupiPos, -1, true); - } - } - } - - private void PosSound(TinyPoint pos) - { - if (m_blupiMotorSound != 0) - { - pos.X -= m_posDecor.X; - pos.Y -= m_posDecor.Y; - m_sound.PosImage(m_blupiMotorSound, pos); - } - } - - private int GetRegion() - { - return m_region; - } - - private void SetRegion(int region) - { - m_region = region; - } - - private int GetMusic() - { - return m_music; - } - - private void SetMusic(int music) - { - m_music = music; - } - - public TinyPoint GetDim() - { - return m_dimDecor; - } - - public void SetDim(TinyPoint dim) - { - m_dimDecor = dim; - } - - public int GetMission() - { - return m_mission; - } - - public void SetMission(int mission) - { - m_mission = mission; - } - - public int GetNbVies() - { - return m_nbVies; - } - - public void SetNbVies(int nbVies) - { - m_nbVies = nbVies; - } - - public void InitializeDoors(GameData gameData) - { - gameData.GetDoors(m_doors); - } - - public void MemorizeDoors(GameData gameData) - { - gameData.SetDoors(m_doors); - } - - public static string GetCheatTinyText(Def.ButtonGlygh glyph) - { - switch (glyph) - { - case Def.ButtonGlygh.Cheat1: - return "D"; - case Def.ButtonGlygh.Cheat2: - return "B"; - case Def.ButtonGlygh.Cheat3: - return "S"; - case Def.ButtonGlygh.Cheat4: - return "E"; - case Def.ButtonGlygh.Cheat5: - return "R"; - case Def.ButtonGlygh.Cheat6: - return "T"; - case Def.ButtonGlygh.Cheat7: - return "C"; - case Def.ButtonGlygh.Cheat8: - return "T"; - case Def.ButtonGlygh.Cheat9: - return "G"; - default: - return ""; - } - } - - public void CheatAction(Tables.CheatCodes cheat) - { - if (cheat == Tables.CheatCodes.OpenDoors) - { - m_bCheatDoors = !m_bCheatDoors; - AdaptDoors(m_bPrivate); - } - if (cheat == Tables.CheatCodes.ShowSecret) - { - m_bDrawSecret = !m_bDrawSecret; - } - if (cheat == Tables.CheatCodes.SuperBlupi) - { - m_bSuperBlupi = !m_bSuperBlupi; - } - if (cheat == Tables.CheatCodes.LayEgg) - { - m_nbVies = 9; - } - if (cheat == Tables.CheatCodes.CleanAll) - { - for (int 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 == 16 || m_moveObject[i].type == 17 || m_moveObject[i].type == 20 || m_moveObject[i].type == 44 || m_moveObject[i].type == 54 || m_moveObject[i].type == 32 || m_moveObject[i].type == 33) - { - m_decorAction = 1; - m_decorPhase = 0; - m_moveObject[i].type = 8; - m_moveObject[i].phase = 0; - m_moveObject[i].posCurrent.X -= 34; - m_moveObject[i].posCurrent.Y -= 34; - m_moveObject[i].posStart = m_moveObject[i].posCurrent; - m_moveObject[i].posEnd = m_moveObject[i].posCurrent; - MoveObjectStepIcon(i); - PlaySound(10, m_moveObject[i].posCurrent); - } - } - } - if (cheat == Tables.CheatCodes.Skate) - { - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = true; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiVent = false; - m_blupiSuspend = false; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - } - if (cheat == Tables.CheatCodes.Copter) - { - m_blupiAir = false; - m_blupiHelico = true; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiVent = false; - m_blupiSuspend = false; - } - if (cheat == Tables.CheatCodes.Jeep) - { - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = true; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiVent = false; - m_blupiSuspend = false; - m_blupiCloud = false; - m_blupiHide = false; - } - if (cheat == Tables.CheatCodes.AllTreasure) - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 5) - { - m_moveObject[i].type = 0; - m_nbTresor++; - OpenDoorsTresor(); - PlaySound(11, m_moveObject[i].posCurrent); - } - } - } - if (cheat == Tables.CheatCodes.EndGoal) - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type != 7 && m_moveObject[i].type != 21) - { - continue; - } - m_blupiPos = m_moveObject[i].posCurrent; - if (m_nbTresor >= m_totalTresor) - { - if (m_moveObject[i].type == 21) - { - m_bFoundCle = true; - } - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(14, m_moveObject[i].posCurrent); - m_blupiAction = 13; - m_blupiPhase = 0; - m_blupiFocus = false; - m_blupiFront = true; - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiVent = false; - m_blupiSuspend = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiInvert = false; - m_blupiBalloon = false; - m_blupiEcrase = false; - } - else - { - PlaySound(13, m_moveObject[i].posCurrent); - } - m_goalPhase = 50; - } - } - if (cheat == Tables.CheatCodes.RoundShield) - { - PlaySound(42, m_blupiPos); - m_blupiShield = true; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(false); - } - if (cheat == Tables.CheatCodes.Lollipop) - { - m_blupiAction = 49; - m_blupiPhase = 0; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiFocus = false; - PlaySound(50, m_blupiPos); - } - if (cheat == Tables.CheatCodes.Bombs) - { - m_blupiPerso = 10; - PlaySound(60, m_blupiPos); - } - if (cheat == Tables.CheatCodes.BirdLime) - { - m_blupiBullet = 10; - } - if (cheat == Tables.CheatCodes.Tank) - { - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = true; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiVent = false; - m_blupiSuspend = false; - m_blupiCloud = false; - m_blupiHide = false; - } - if (cheat == Tables.CheatCodes.PowerCharge) - { - m_blupiAction = 56; - m_blupiPhase = 0; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiJumpAie = false; - m_blupiFocus = false; - PlaySound(58, m_blupiPos); - } - if (cheat == Tables.CheatCodes.Drink) - { - m_blupiAction = 55; - m_blupiPhase = 0; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiJumpAie = false; - m_blupiFocus = false; - PlaySound(57, m_blupiPos); - } - if (cheat == Tables.CheatCodes.Overcraft) - { - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = true; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiVent = false; - m_blupiSuspend = false; - } - if (cheat == Tables.CheatCodes.Dynamite) - { - m_blupiDynamite = 1; - PlaySound(60, m_blupiPos); - } - if (cheat == Tables.CheatCodes.WeelKeys) - { - m_blupiCle |= 7; - } - if (!m_blupiShield && !m_blupiHide && !m_blupiCloud && !m_blupiPower) - { - m_jauges[1].SetHide(true); - } - if (!m_blupiHelico && !m_blupiOver) - { - StopSound(16); - StopSound(18); - } - if (!m_blupiJeep && !m_blupiTank) - { - StopSound(29); - StopSound(31); - } - } - - private void SetBuildOfficialMissions(bool bMode) - { - m_buildOfficialMissions = bMode; - } - - private void BlupiSearchIcon() - { - int i = 0; - int num = 2; - int num2 = m_blupiAction; - if (m_blupiVent && !m_blupiHelico && !m_blupiOver) - { - if (num2 == 1) - { - num2 = 8; - } - if (num2 == 2) - { - num2 = 14; - } - } - if (m_blupiHelico) - { - if (num2 == 1) - { - num2 = 15; - } - if (num2 == 2) - { - num2 = 16; - } - if (num2 == 3) - { - num2 = 17; - } - if (num2 == 10) - { - num2 = 15; - } - if (num2 == 9) - { - num2 = 15; - } - m_blupiRealRotation = (int)(m_blupiVitesseX * 2.0); - } - if (m_blupiOver) - { - if (num2 == 1) - { - num2 = 67; - } - if (num2 == 2) - { - num2 = 68; - } - if (num2 == 3) - { - num2 = 69; - } - if (num2 == 10) - { - num2 = 67; - } - if (num2 == 9) - { - num2 = 67; - } - } - if (m_blupiJeep) - { - if (num2 == 1) - { - num2 = 25; - } - if (num2 == 2) - { - num2 = 26; - } - if (num2 == 10) - { - num2 = 26; - } - if (num2 == 3) - { - num2 = 27; - } - } - if (m_blupiTank) - { - if (num2 == 1) - { - num2 = 50; - } - if (num2 == 2) - { - num2 = 51; - } - if (num2 == 10) - { - num2 = 51; - } - if (num2 == 3) - { - num2 = 52; - } - } - if (m_blupiSkate) - { - if (num2 == 1) - { - num2 = 37; - } - if (num2 == 2) - { - num2 = 38; - } - if (num2 == 10) - { - num2 = 38; - } - if (num2 == 3) - { - num2 = 39; - } - if (num2 == 59) - { - num2 = 39; - } - if (num2 == 4) - { - num2 = 40; - } - if (num2 == 5) - { - num2 = 41; - } - if (num2 == 38 && m_blupiSpeedX == 0.0 && Math.Abs(m_blupiVitesseX) > 5.0) - { - num2 = 85; - } - } - if (m_blupiNage) - { - if (num2 == 1) - { - num2 = 18; - } - if (num2 == 2) - { - num2 = 19; - } - if (num2 == 3) - { - num2 = 20; - } - int num3 = 0; - int num4 = 0; - if (m_blupiPos.X > m_blupiLastPos.X) - { - num3 = 1; - } - if (m_blupiPos.X < m_blupiLastPos.X) - { - num3 = -1; - } - if (m_blupiPos.Y > m_blupiLastPos.Y) - { - num4 = 1; - } - if (m_blupiPos.Y < m_blupiLastPos.Y) - { - num4 = -1; - } - int num5 = ((num4 >= 0 || num3 != 0) ? ((num4 < 0 && num3 != 0) ? 45 : ((num4 == 0 && num3 != 0) ? 90 : ((num4 > 0 && num3 != 0) ? 135 : ((num4 > 0 && num3 == 0) ? 180 : 0)))) : 0); - num5 += 15; - if (num2 == 20) - { - num5 = 90; - } - m_blupiLogicRotation = Misc.Approch(m_blupiLogicRotation, num5, 10); - if (m_blupiDir == 2) - { - m_blupiRealRotation = m_blupiLogicRotation - 90; - } - else - { - m_blupiRealRotation = 90 - m_blupiLogicRotation; - } - m_blupiRealRotation += (int)(Math.Sin((double)m_time / 6.0) * 20.0); - } - if (m_blupiSurf) - { - if (num2 == 1) - { - num2 = 21; - } - if (num2 == 2) - { - num2 = 22; - } - if (num2 == 3) - { - num2 = 23; - } - m_blupiLogicRotation = Misc.Approch(m_blupiLogicRotation, 0, 10); - m_blupiRealRotation = m_blupiLogicRotation; - m_blupiRealRotation += (int)(Math.Sin((double)m_time / 10.0) * 10.0); - } - if (m_blupiSuspend) - { - if (num2 == 1) - { - num2 = 31; - } - if (num2 == 2) - { - num2 = 32; - } - if (num2 == 3) - { - num2 = 33; - } - if (num2 == 4) - { - num2 = 34; - } - } - if (m_blupiBalloon) - { - num2 = 66; - } - if (m_blupiEcrase) - { - if (num2 == 1) - { - num2 = 72; - } - if (num2 == 2) - { - num2 = 73; - } - if (num2 == 3) - { - num2 = 73; - } - } - if (num2 == 1 && (m_blupiPhase % 330 == 125 || m_blupiPhase % 330 == 129 || m_blupiPhase % 330 == 135 || m_blupiPhase % 330 == 139 || m_blupiPhase % 330 == 215 || m_blupiPhase % 330 == 219 || m_blupiPhase % 330 == 225 || m_blupiPhase % 330 == 229 || m_blupiPhase % 330 == 235 || m_blupiPhase % 330 == 239 || m_blupiPhase % 330 == 245 || m_blupiPhase % 330 == 249 || m_blupiPhase % 330 == 255 || m_blupiPhase % 330 == 259 || m_blupiPhase % 330 == 265 || m_blupiPhase % 330 == 269)) - { - PlaySound(37, m_blupiPos); - } - if (num2 == 31 && (m_blupiPhase % 328 == 118 || m_blupiPhase % 328 == 230 || m_blupiPhase % 328 == 278)) - { - PlaySound(36, m_blupiPos); - } - if ((num2 == 21 || num2 == 22) && m_blupiPhase % 12 == 0 && m_blupiSurf) - { - MoveObjectTiplouf(m_blupiPos); - } - int num6 = m_blupiPhase; - if (!m_blupiHelico && ((m_blupiSpeedX > 0.1 && m_blupiSpeedX < 0.75) || (m_blupiSpeedX < -0.1 && m_blupiSpeedX > -0.75))) - { - num6 /= 2; - } - for (; Tables.table_blupi[i] != 0; i += Tables.table_blupi[i + 1] + 3) - { - if (num2 == Tables.table_blupi[i]) - { - int num7 = ((Tables.table_blupi[i + 2] == 0 || num6 <= Tables.table_blupi[i + 2]) ? (num6 % Tables.table_blupi[i + 1]) : Tables.table_blupi[i + 2]); - num = Tables.table_blupi[i + 3 + num7]; - break; - } - } - if (num2 == 11 || num2 == 75 || num2 == 76 || num2 == 54 || (num2 == 57 && num < 266)) - { - m_blupiChannel = 10; - } - else - { - m_blupiChannel = 2; - } - int num8 = m_blupiDir; - if (m_blupiInvert) - { - if (m_blupiDir == 2) - { - num8 = 1; - } - if (m_blupiDir == 1) - { - num8 = 2; - } - } - if (num8 == 1 && m_blupiChannel == 2) - { - if (num2 == 31) - { - if (num == 144) - { - num = 158; - } - if (num == 143) - { - num = 145; - } - if (num == 151) - { - num = 146; - } - } - if (num >= 0 && num < 335) - { - num = Tables.table_mirror[num]; - } - } - if (num8 == 1 && m_blupiChannel == 10 && num >= 168 && num <= 171) - { - num += 4; - } - m_blupiIcon = num; - m_blupiPhase++; - } - - private bool BlupiIsGround() - { - if (m_blupiTransport == -1) - { - TinyRect rect = BlupiRect(m_blupiPos); - rect.Top = m_blupiPos.Y + 60 - 2; - rect.Bottom = m_blupiPos.Y + 60 - 1; - return DecorDetect(rect); - } - return false; - } - - private TinyRect BlupiRect(TinyPoint pos) - { - TinyRect result = default(TinyRect); - if (m_blupiNage || m_blupiSurf) - { - result.Left = pos.X + 12; - result.Right = pos.X + 60 - 12; - if (m_blupiAction == 1) - { - result.Top = pos.Y + 5; - result.Bottom = pos.Y + 60 - 10; - } - else - { - result.Top = pos.Y + 15; - result.Bottom = pos.Y + 60 - 10; - } - } - else if (m_blupiJeep) - { - result.Left = pos.X + 2; - result.Right = pos.X + 60 - 2; - result.Top = pos.Y + 10; - result.Bottom = pos.Y + 60 - 2; - } - else if (m_blupiTank) - { - result.Left = pos.X + 2; - result.Right = pos.X + 60 - 2; - result.Top = pos.Y + 10; - result.Bottom = pos.Y + 60 - 2; - } - else if (m_blupiOver) - { - result.Left = pos.X + 2; - result.Right = pos.X + 60 - 2; - result.Top = pos.Y + 2; - result.Bottom = pos.Y + 60 - 2; - } - else if (m_blupiBalloon) - { - result.Left = pos.X + 10; - result.Right = pos.X + 60 - 10; - result.Top = pos.Y + 5; - result.Bottom = pos.Y + 60 - 2; - } - else if (m_blupiEcrase) - { - result.Left = pos.X + 5; - result.Right = pos.X + 60 - 5; - result.Top = pos.Y + 39; - result.Bottom = pos.Y + 60 - 2; - } - else - { - result.Left = pos.X + 12; - result.Right = pos.X + 60 - 12; - result.Top = pos.Y + 11; - result.Bottom = pos.Y + 60 - 2; - } - return result; - } - - private void BlupiAdjust() - { - TinyRect tinyRect = BlupiRect(m_blupiPos); - if (!DecorDetect(tinyRect)) - { - return; - } - for (int i = 0; i < 50; i++) - { - TinyRect rect = tinyRect; - rect.Bottom = rect.Top + 2; - rect.Left = m_blupiPos.X + 12; - rect.Right = m_blupiPos.X + 60 - 12; - if (!DecorDetect(rect)) - { - break; - } - tinyRect.Top += 2; - tinyRect.Bottom += 2; - m_blupiPos.Y += 2; - } - for (int i = 0; i < 50; i++) - { - TinyRect rect = tinyRect; - rect.Right = rect.Left + 2; - rect.Top = m_blupiPos.Y + 11; - rect.Bottom = m_blupiPos.Y + 60 - 2; - if (!DecorDetect(rect)) - { - break; - } - tinyRect.Left += 2; - tinyRect.Right += 2; - m_blupiPos.X += 2; - } - for (int i = 0; i < 50; i++) - { - TinyRect rect = tinyRect; - rect.Left = rect.Right - 2; - rect.Top = m_blupiPos.Y + 11; - rect.Bottom = m_blupiPos.Y + 60 - 2; - if (!DecorDetect(rect)) - { - break; - } - tinyRect.Left -= 2; - tinyRect.Right -= 2; - m_blupiPos.X -= 2; - } - for (int i = 0; i < 50; i++) - { - TinyRect rect = tinyRect; - rect.Right = rect.Left + 2; - if (!DecorDetect(rect)) - { - break; - } - tinyRect.Left += 2; - tinyRect.Right += 2; - m_blupiPos.X += 2; - } - for (int i = 0; i < 50; i++) - { - TinyRect rect = tinyRect; - rect.Left = rect.Right - 2; - if (!DecorDetect(rect)) - { - break; - } - tinyRect.Left -= 2; - tinyRect.Right -= 2; - m_blupiPos.X -= 2; - } - } - - private bool BlupiBloque(TinyPoint pos, int dir) - { - TinyRect rect = BlupiRect(pos); - rect.Top = rect.Bottom - 20; - rect.Bottom -= 2; - if (dir > 0) - { - rect.Left = rect.Right - 2; - } - if (dir < 0) - { - rect.Right = rect.Left + 2; - } - return DecorDetect(rect); - } - - private void BlupiStep() - { - TinyPoint celSwitch = default(TinyPoint); - TinyPoint celBridge = default(TinyPoint); - BlupiAdjust(); - m_blupiLastPos = m_blupiPos; - TinyPoint end = m_blupiPos; - bool flag = m_blupiAir; - int blupiAction = m_blupiAction; - bool bVertigoLeft = false; - bool bVertigoRight = false; - end.X += m_blupiVector.X; - end.Y += m_blupiVector.Y; - if (m_blupiFocus && (end.Y + 30) / 64 >= 99) - { - BlupiDead(75, -1); - m_blupiRestart = true; - m_blupiAir = true; - m_blupiPos.Y = m_blupiPos.Y / 64 * 64 + BLUPIOFFY; - PlaySound(8, m_blupiPos); - return; - } - TinyRect rect = default(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); - } - 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; - if (icon == 110) - { - end.X -= 9; - } - if (icon == 114) - { - end.X += 9; - } - if (icon == 118) - { - end.Y -= 20; - } - if (icon == 122) - { - end.Y += 20; - } - if (icon >= 110 && icon <= 125) - { - m_blupiVent = true; - rect.Left = m_blupiPos.X + 12; - 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); - } - } - bool flag2; - if (m_blupiTransport == -1) - { - rect = BlupiRect(end); - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60 - 1; - flag2 = !DecorDetect(rect); - } - else - { - flag2 = false; - } - rect = BlupiRect(end); - rect.Top = end.Y + 10; - rect.Bottom = end.Y + 20; - bool 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) - { - if (m_blupiFocus) - { - m_blupiAction = 5; - m_blupiPhase = 0; - } - m_blupiVitesseY = 1.0; - m_blupiAir = true; - flag = true; - } - if (!m_blupiNage && !m_blupiSurf && !m_blupiSuspend && !m_blupiAir && IsRessort(end)) - { - if ((m_blupiHelico || m_blupiOver) && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - m_blupiHelico = false; - m_blupiOver = false; - celSwitch.X = end.X - 34; - celSwitch.Y = end.Y - 34; - ObjectStart(celSwitch, 9, 0); - m_decorAction = 1; - m_decorPhase = 0; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_blupiPos); - } - if (m_blupiJeep && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - m_blupiJeep = false; - celSwitch.X = end.X - 34; - celSwitch.Y = end.Y - 34; - ObjectStart(celSwitch, 9, 0); - m_decorAction = 1; - m_decorPhase = 0; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_blupiPos); - } - if (m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - m_blupiTank = false; - celSwitch.X = end.X - 34; - celSwitch.Y = end.Y - 34; - ObjectStart(celSwitch, 9, 0); - m_decorAction = 1; - m_decorPhase = 0; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_blupiPos); - } - if (m_blupiSkate && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - m_blupiSkate = false; - celSwitch.X = end.X - 34; - celSwitch.Y = end.Y - 34; - ObjectStart(celSwitch, 9, 0); - m_decorAction = 1; - m_decorPhase = 0; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_blupiPos); - } - if (m_blupiFocus && m_blupiAction != 11 && m_blupiAction != 75 && m_blupiAction != 76 && m_blupiAction != 77 && m_blupiAction != 78 && m_blupiAction != 79 && m_blupiAction != 80 && m_blupiAction != 81) - { - m_blupiAction = 5; - m_blupiPhase = 0; - } - if (((uint)m_keyPress & (true ? 1u : 0u)) != 0 && m_blupiFocus) - { - m_blupiVitesseY = (m_blupiPower ? (-25) : (-19)); - } - else - { - m_blupiVitesseY = (m_blupiPower ? (-16) : (-10)); - } - m_blupiAir = true; - 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_blupiAction != 4 && m_blupiAction != 3 && !m_blupiAir) - { - m_blupiAction = 4; - m_blupiPhase = 0; - } - if (m_blupiAction == 4 && m_blupiPhase == 3) - { - m_blupiAction = 5; - m_blupiPhase = 0; - if (m_blupiSkate) - { - PlaySound(1, end); - m_blupiVitesseY = (m_blupiPower ? (-17) : (-13)); - } - else - { - PlaySound(1, end); - if (IsNormalJump(end)) - { - m_blupiVitesseY = (m_blupiPower ? (-26) : (-16)); - } - else - { - m_blupiVitesseY = (m_blupiPower ? (-16) : (-12)); - } - } - m_blupiAir = true; - flag = true; - } - } - if (m_blupiAir) - { - if (flag3 && m_blupiVitesseY < 0.0) - { - if (m_blupiVitesseY < -14.0 && m_blupiAction != 11 && m_blupiAction != 75 && m_blupiAction != 76 && m_blupiAction != 77 && m_blupiAction != 78 && m_blupiAction != 79 && m_blupiAction != 80 && m_blupiAction != 81 && !m_blupiSkate) - { - m_blupiJumpAie = true; - PlaySound(40, end); - } - else - { - PlaySound(SoundEnviron(4, detectIcon), end); - } - m_blupiVitesseY = 1.0; - } - end.Y += (int)(m_blupiVitesseY * 2.0); - if (m_blupiVitesseY < 20.0) - { - m_blupiVitesseY += 2.0; - } - rect = BlupiRect(end); - rect.Top = end.Y + 60 - 30; - rect.Bottom = end.Y + 60 - 1; - if (m_blupiVitesseY >= 0.0 && DecorDetect(rect)) - { - end.Y = end.Y / 32 * 32 + BLUPIOFFY; - if (!IsRessort(end)) - { - PlaySound(SoundEnviron(3, m_detectIcon), end); - } - if (m_blupiFocus) - { - if (m_blupiVitesseY > 20.0) - { - m_blupiAction = 61; - } - else - { - m_blupiAction = 61; - } - m_blupiPhase = 0; - } - m_blupiAir = false; - if (m_blupiJumpAie) - { - m_blupiJumpAie = false; - m_blupiAction = 36; - m_blupiPhase = 0; - } - } - rect.Left = end.X + 20; - rect.Right = end.X + 60 - 20; - rect.Top = end.Y + 60 - 33; - rect.Bottom = end.Y + 60 - 1; - icon = AscenseurDetect(rect, m_blupiPos, end); - if (m_blupiVitesseY >= 0.0 && icon != -1) - { - m_blupiTransport = icon; - flag2 = false; - PlaySound(3, end); - end.Y = m_moveObject[icon].posCurrent.Y - 64 + BLUPIOFFY; - if (m_blupiFocus) - { - if (m_blupiVitesseY > 20.0) - { - m_blupiAction = 61; - } - else - { - m_blupiAction = 61; - } - m_blupiPhase = 0; - } - m_blupiAir = false; - if (m_blupiJumpAie) - { - m_blupiJumpAie = false; - m_blupiAction = 36; - m_blupiPhase = 0; - } - } - } - if (m_blupiAction == 36 && m_blupiPhase == 30) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (m_blupiAction == 56 && m_blupiPhase == 64) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - m_blupiCloud = true; - m_blupiTimeShield = 100; - m_jauges[1].SetHide(false); - PlaySound(55, end); - } - if (m_blupiAction == 58) - { - if (m_blupiPhase == 8) - { - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y + 40; - if (m_blupiVitesseY > 0.0) - { - celSwitch.Y += (int)(m_blupiVitesseY * 4.0); - } - m_blupiVitesseY -= 10.0; - if (ObjectStart(celSwitch, 23, 55) != -1) - { - PlaySound(52, m_blupiPos); - m_blupiTimeFire = 10; - m_blupiBullet--; - } - } - if (m_blupiPhase == 14) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - } - if ((m_blupiAction == 44 || m_blupiAction == 45) && m_blupiPhase == 29) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (m_blupiAction == 46 && m_blupiPhase == 32) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (m_blupiAction == 47 && m_blupiPhase == 34) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - bool bNear; - if (m_blupiAction == 48 && m_blupiPhase == 40) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - icon = MoveObjectDetect(end, out bNear); - 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); - if (num == -1) - { - m_blupiAction = 9; - m_blupiPhase = 0; - } - } - if (m_blupiDir == 1 && end.X > m_moveObject[icon].posCurrent.X) - { - celSwitch.X = end.X + 16; - celSwitch.Y = end.Y; - int num = MoveObjectDetect(celSwitch, out bNear); - if (num == -1) - { - m_blupiAction = 9; - m_blupiPhase = 0; - } - } - } - } - if (m_blupiAction == 65) - { - if (m_blupiPhase == 4) - { - PlaySound(47, m_blupiPos); - } - if (m_blupiPhase == 44) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - } - if (m_blupiAction == 63) - { - if (m_blupiPhase == 1) - { - PlaySound(65, m_blupiPos); - m_blupiTimeMockery = 300; - } - if (m_blupiPhase == 92) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - } - if (m_blupiAction == 64) - { - if (m_blupiPhase == 6) - { - PlaySound(65, m_blupiPos); - m_blupiTimeMockery = 300; - } - if (m_blupiPhase == 104) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - } - if (m_blupiAction == 83) - { - if (m_blupiPhase == 4) - { - PlaySound(47, m_blupiPos); - } - if (m_blupiPhase == 60) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - } - if (m_blupiAction == 84 && m_blupiPhase == 18) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (m_blupiAction == 60 && m_blupiPhase == 3) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiAction == 61 && m_blupiPhase == 5) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiAction == 62 && m_blupiPhase == 2) - { - m_blupiAction = 5; - m_blupiPhase = 0; - m_blupiVitesseY = -12.0; - m_blupiAir = true; - flag = true; - } - if (m_blupiAction == 49 && m_blupiPhase == 32) - { - ObjectStart(m_sucettePos, m_sucetteType, 0); - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - m_blupiPower = true; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(false); - PlaySound(44, end); - } - if (m_blupiAction == 55 && m_blupiPhase == 36) - { - ObjectStart(m_sucettePos, m_sucetteType, 0); - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - m_blupiHide = true; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(false); - PlaySound(62, end); - } - if (m_blupiSpeedY < 0.0 && m_blupiLastSpeedY == 0.0 && m_blupiAction != 3 && m_blupiAction != 4 && m_blupiAction != 5 && m_blupiAction != 8 && m_blupiAction != 10 && m_blupiAction != 9 && !m_blupiAir && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - m_blupiAction = 7; - m_blupiPhase = 0; - } - if (m_blupiSpeedY == 0.0 && m_blupiLastSpeedY < 0.0 && m_blupiAction != 3 && m_blupiAction != 4 && m_blupiAction != 5 && m_blupiAction != 8 && m_blupiAction != 10 && m_blupiAction != 9 && !m_blupiAir && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiSpeedY > 0.0 && m_blupiLastSpeedY == 0.0 && m_blupiAction != 3 && m_blupiAction != 4 && m_blupiAction != 5 && m_blupiAction != 6 && m_blupiAction != 28 && m_blupiAction != 8 && m_blupiAction != 10 && m_blupiAction != 9 && !m_blupiAir && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - m_blupiAction = 6; - m_blupiPhase = 0; - } - if (m_blupiSpeedY > 0.0 && m_blupiSpeedX == 0.0 && (m_keyPress & 1) == 0 && m_blupiAction != 3 && m_blupiAction != 4 && m_blupiAction != 5 && m_blupiAction != 6 && m_blupiAction != 28 && m_blupiAction != 8 && m_blupiAction != 10 && m_blupiAction != 9 && !m_blupiAir && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - m_blupiAction = 6; - m_blupiPhase = 0; - } - if (m_blupiSpeedY == 0.0 && m_blupiLastSpeedY > 0.0 && m_blupiAction != 3 && m_blupiAction != 4 && m_blupiAction != 5 && m_blupiAction != 8 && m_blupiAction != 10 && m_blupiAction != 9 && !m_blupiAir && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiAction == 7 && m_blupiPhase == 4) - { - m_scrollAdd.Y = -150; - PlaySound(21, end); - } - if (m_blupiAction == 6 && m_blupiPhase == 4) - { - m_scrollAdd.Y = 150; - PlaySound(7, end); - } - if (!m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - if (m_blupiSpeedY > 0.0 && m_blupiSpeedX == 0.0 && (m_keyPress & 1) == 0 && m_blupiAction != 28 && m_blupiDir == 1 && (icon = CaisseInFront()) != -1) - { - end.X = m_moveObject[icon].posCurrent.X + 64 - 5; - m_blupiAction = 28; - m_blupiPhase = 0; - m_scrollAdd.Y = 0; - PlaySound(39, end); - } - if (m_blupiSpeedY > 0.0 && m_blupiSpeedX > 0.0 && (m_keyPress & 1) == 0 && m_blupiAction != 29 && m_blupiDir == 1 && (icon = CaisseInFront()) != -1) - { - m_blupiAction = 29; - m_blupiPhase = 0; - m_scrollAdd.Y = 0; - PlaySound(39, end); - } - if (m_blupiSpeedY > 0.0 && m_blupiSpeedX == 0.0 && (m_keyPress & 1) == 0 && m_blupiAction != 28 && m_blupiDir == 2 && (icon = CaisseInFront()) != -1) - { - end.X = m_moveObject[icon].posCurrent.X - 60 + 5; - m_blupiAction = 28; - m_blupiPhase = 0; - m_scrollAdd.Y = 0; - PlaySound(39, end); - } - if (m_blupiSpeedY > 0.0 && m_blupiSpeedX < 0.0 && (m_keyPress & 1) == 0 && m_blupiAction != 29 && m_blupiDir == 2 && (icon = CaisseInFront()) != -1) - { - m_blupiAction = 29; - m_blupiPhase = 0; - m_scrollAdd.Y = 0; - PlaySound(39, end); - } - if (m_blupiAction == 29 && m_blupiActionOuf != 47) - { - m_blupiActionOuf = 47; - m_blupiTimeOuf = 0; - } - } - if (m_blupiAction != 28 && m_blupiAction != 29 && m_blupiFocus) - { - if (m_blupiSpeedX < 0.0 && m_blupiLastSpeedX == 0.0 && !m_blupiAir && m_blupiSpeedY != 0.0) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiSpeedX == 0.0 && m_blupiLastSpeedX < 0.0 && m_blupiSpeedY != 0.0) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiSpeedX > 0.0 && m_blupiLastSpeedX == 0.0 && !m_blupiAir && m_blupiSpeedY != 0.0) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiSpeedX == 0.0 && m_blupiLastSpeedX > 0.0 && m_blupiSpeedY != 0.0) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - } - int num2; - 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_blupiAir) - { - PlaySound(5, end); - m_blupiAction = 59; - m_blupiPhase = 0; - m_blupiDir = 1; - } - else - { - PlaySound(5, end); - m_blupiAction = 3; - m_blupiPhase = 0; - } - } - if (m_blupiDir == 1 && m_blupiAction != 2 && m_blupiAction != 14 && m_blupiAction != 4 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && !m_blupiAir) - { - m_blupiAction = 2; - m_blupiPhase = 0; - } - if (m_blupiDir == 1 && m_blupiAction != 3 && m_blupiAction != 4 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend) - { - if (m_blupiAction == 14) - { - end.X -= CaisseGetMove(5); - } - else - { - num2 = m_blupiPhase; - if (num2 > 3 || m_blupiAir) - { - num2 = 3; - } - num3 = Tables.table_vitesse_march[num2]; - if (m_blupiPower) - { - num3 *= 3; - num3 /= 2; - } - end.X += Misc.Speed(m_blupiSpeedX, num3); - } - } - if (m_blupiDir == 2 && m_blupiAction == 29) - { - end.X -= CaisseGetMove(3); - } - } - 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_blupiAir) - { - PlaySound(5, end); - m_blupiAction = 59; - m_blupiPhase = 0; - m_blupiDir = 2; - } - else - { - PlaySound(5, end); - m_blupiAction = 3; - m_blupiPhase = 0; - } - } - if (m_blupiDir == 2 && m_blupiAction != 2 && m_blupiAction != 14 && m_blupiAction != 4 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && !m_blupiAir) - { - m_blupiAction = 2; - m_blupiPhase = 0; - } - if (m_blupiDir == 2 && m_blupiAction != 3 && m_blupiAction != 4 && m_blupiAction != 7 && m_blupiAction != 6 && m_blupiAction != 29 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend) - { - if (m_blupiAction == 14) - { - end.X += CaisseGetMove(5); - } - else - { - num2 = m_blupiPhase; - if (num2 > 3 || m_blupiAir) - { - num2 = 3; - } - num3 = Tables.table_vitesse_march[num2]; - if (m_blupiPower) - { - num3 *= 3; - num3 /= 2; - } - end.X += Misc.Speed(m_blupiSpeedX, num3); - } - } - if (m_blupiDir == 1 && m_blupiAction == 29) - { - end.X += CaisseGetMove(3); - } - } - if (m_blupiHelico) - { - if (m_blupiAction == 3 && m_blupiPhase == 10) - { - m_blupiAction = 2; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - } - else if (m_blupiOver) - { - if (m_blupiAction == 3 && m_blupiPhase == 7) - { - m_blupiAction = 2; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - } - else if (m_blupiJeep) - { - if (m_blupiAction == 3 && m_blupiPhase == 7) - { - m_blupiAction = 1; - m_blupiPhase = 0; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - } - else if (m_blupiTank) - { - if (m_blupiAction == 3 && m_blupiPhase == 12) - { - m_blupiAction = 1; - m_blupiPhase = 0; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - } - else if (m_blupiSkate) - { - if (m_blupiAction == 3 && m_blupiPhase == 14) - { - m_blupiAction = 1; - m_blupiPhase = 0; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - } - else if (m_blupiNage || m_blupiSurf) - { - if (m_blupiAction == 3 && m_blupiPhase == 10) - { - m_blupiAction = 2; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - } - else if (m_blupiSuspend) - { - if (m_blupiAction == 3 && m_blupiPhase == 10) - { - m_blupiAction = 1; - m_blupiPhase = 0; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - } - else - { - if (m_blupiAction == 3 && m_blupiPhase == 6) - { - m_blupiAction = 1; - m_blupiPhase = 0; - if (m_blupiDir == 1) - { - m_blupiDir = 2; - } - else - { - m_blupiDir = 1; - } - } - if (m_blupiAction == 59 && m_blupiPhase == 6) - { - m_blupiAction = 5; - m_blupiPhase = 0; - } - } - if (!m_blupiSuspend && m_blupiAction == 4 && m_blupiPhase == 3) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiSpeedX == 0.0 && m_blupiSpeedY == 0.0 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && m_blupiFocus) - { - if (m_blupiAction == 14 || m_blupiAction == 7) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiAction == 2) - { - if (m_blupiSuspend || m_blupiPhase < 10) - { - m_blupiAction = 1; - } - else - { - m_blupiAction = 60; - } - m_blupiPhase = 0; - } - if (m_blupiAction == 6) - { - m_blupiAction = 1; - m_blupiPhase = 0; - PlaySound(20, end); - } - m_scrollAdd.Y = 0; - if (blupiAction == 14) - { - StopSound(38); - } - if (blupiAction == 29 || blupiAction == 28) - { - StopSound(39); - } - } - if (!m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && m_blupiFocus) - { - if (m_blupiAction == 9 && m_blupiDir == 1) - { - end.X += 4; - } - if (m_blupiAction == 9 && m_blupiDir == 2) - { - end.X -= 4; - } - if (m_blupiAction == 10 && m_blupiDir == 1) - { - end.X -= 4; - } - if (m_blupiAction == 10 && m_blupiDir == 2) - { - end.X += 4; - } - } - if ((m_keyPress & -3) == 0 && m_blupiSpeedX == 0.0 && m_blupiSpeedY == 0.0 && (m_blupiJeep || m_blupiTank || m_blupiSkate) && m_blupiFocus) - { - if (m_blupiAction == 10 && m_blupiDir == 1) - { - end.X -= 5; - } - if (m_blupiAction == 10 && m_blupiDir == 2) - { - end.X += 5; - } - } - if ((m_keyPress & -3) == 0 && m_blupiSpeedX == 0.0 && m_blupiSpeedY == 0.0 && m_blupiNage && m_blupiFocus && m_blupiAction == 2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if ((m_keyPress & -3) == 0 && m_blupiSpeedX == 0.0 && m_blupiSpeedY == 0.0 && m_blupiSurf && m_blupiFocus && m_blupiAction == 2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - 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_blupiBullet == 0) - { - PlaySound(53, m_blupiPos); - } - else - { - m_blupiAction = 58; - m_blupiPhase = 0; - m_blupiFocus = false; - } - } - m_blupiMotorHigh = flag2; - if (m_blupiAction != 3 && m_blupiAction != 58) - { - if (flag2) - { - m_blupiAction = 2; - } - else - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiVitesseY = 0.0; - } - } - if (Def.EasyMove) - { - if (m_blupiSpeedY <= -1.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) - { - if (m_blupiVitesseY > -7.0) - { - m_blupiVitesseY -= 0.5; - } - if (m_blupiVitesseY == -0.5) - { - m_blupiVitesseY = -1.0; - } - } - else if (m_blupiSpeedY >= 1.0) - { - if (m_blupiVitesseY < 8.0) - { - m_blupiVitesseY += 0.5; - } - } - else - { - if (m_blupiVitesseY > 1.0) - { - m_blupiVitesseY -= 1.0; - } - if (m_blupiVitesseY < 1.0) - { - m_blupiVitesseY += 1.0; - } - } - end.Y += (int)m_blupiVitesseY; - } - else - { - if (m_blupiSpeedY <= -1.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) - { - if (m_blupiVitesseY > -10.0) - { - m_blupiVitesseY -= 0.5; - } - } - else if (m_blupiSpeedY >= 1.0) - { - if (m_blupiVitesseY < 12.0) - { - m_blupiVitesseY += 0.5; - } - } - else - { - if (m_blupiVitesseY > 1.0) - { - m_blupiVitesseY -= 1.0; - } - if (m_blupiVitesseY < 1.0) - { - m_blupiVitesseY += 1.0; - } - } - end.Y += (int)m_blupiVitesseY; - } - if (Def.EasyMove) - { - if (m_blupiSpeedX <= -1.0) - { - int num4 = (int)(m_blupiSpeedX * 12.0); - if (m_blupiVitesseX > (double)num4) - { - m_blupiVitesseX -= 0.5; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, -1)) - { - m_blupiVitesseX = 0.0; - } - } - else if (m_blupiSpeedX >= 1.0) - { - int num5 = (int)(m_blupiSpeedX * 12.0); - if (m_blupiVitesseX < (double)num5) - { - m_blupiVitesseX += 0.5; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, 1)) - { - m_blupiVitesseX = 0.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 2.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 2.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - end.X += (int)m_blupiVitesseX; - } - else - { - if (m_blupiSpeedX <= -1.0) - { - int num6 = (int)(m_blupiSpeedX * 16.0); - if (m_blupiVitesseX > (double)num6) - { - m_blupiVitesseX -= 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, -1)) - { - m_blupiVitesseX = 0.0; - } - } - else if (m_blupiSpeedX >= 1.0) - { - int num7 = (int)(m_blupiSpeedX * 16.0); - if (m_blupiVitesseX < (double)num7) - { - m_blupiVitesseX += 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, 1)) - { - m_blupiVitesseX = 0.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 2.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 2.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - end.X += (int)m_blupiVitesseX; - } - MoveObjectPollution(); - if (ButtonPressed == Def.ButtonGlygh.PlayAction && !flag2 && m_blupiTransport == -1) - { - ButtonPressed = Def.ButtonGlygh.None; - rect.Left = m_blupiPos.X + 20; - rect.Right = m_blupiPos.X + 22; - rect.Top = m_blupiPos.Y + 60 - 2; - rect.Bottom = m_blupiPos.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = m_blupiPos.X + 60 - 22; - rect.Right = m_blupiPos.X + 60 - 20; - rect.Top = m_blupiPos.Y + 60 - 2; - rect.Bottom = m_blupiPos.Y + 60; - bVertigoRight = !DecorDetect(rect); - if (!bVertigoLeft && !bVertigoRight) - { - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y - BLUPIFLOOR; - ObjectStart(celSwitch, 13, 0); - m_blupiHelico = false; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiPosHelico = m_blupiPos; - m_blupiFocus = true; - StopSound(16); - StopSound(18); - PlaySound(17, m_blupiPos); - } - } - } - if (m_blupiOver && (m_blupiFocus || m_blupiAction == 58)) - { - m_blupiMotorHigh = flag2; - if (m_blupiAction != 3) - { - if (flag2) - { - m_blupiAction = 2; - } - else - { - if (m_blupiAction != 1) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - m_blupiVitesseY = 0.0; - } - } - rect = BlupiRect(end); - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60 + OVERHEIGHT - 1; - bool 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_blupiVitesseY == 0.0 && icon != -1) - { - m_blupiVitesseY = -5.0; - } - else if (m_blupiVitesseY > -5.0) - { - m_blupiVitesseY -= 1.0; - } - } - else if (m_blupiSpeedY > 0.0) - { - if (m_blupiVitesseY < 12.0) - { - m_blupiVitesseY += 5.0; - } - } - else if (m_blupiVitesseY < 12.0 && m_time % 2 == 0) - { - m_blupiVitesseY += 1.0; - } - end.Y += (int)m_blupiVitesseY; - if (m_blupiSpeedX < 0.0 && flag2) - { - int num8 = (int)(m_blupiSpeedX * 12.0); - if (m_blupiVitesseX > (double)num8) - { - m_blupiVitesseX -= 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, -1)) - { - m_blupiVitesseX = 0.0; - } - } - else if (m_blupiSpeedX > 0.0 && flag2) - { - int num9 = (int)(m_blupiSpeedX * 12.0); - if (m_blupiVitesseX < (double)num9) - { - m_blupiVitesseX += 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, 1)) - { - m_blupiVitesseX = 0.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 1.0; - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 1.0; - } - } - end.X += (int)m_blupiVitesseX; - MoveObjectPollution(); - if (ButtonPressed == Def.ButtonGlygh.PlayAction && !flag2 && m_blupiTransport == -1) - { - ButtonPressed = Def.ButtonGlygh.None; - rect.Left = m_blupiPos.X + 20; - rect.Right = m_blupiPos.X + 22; - rect.Top = m_blupiPos.Y + 60 - 2; - rect.Bottom = m_blupiPos.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = m_blupiPos.X + 60 - 22; - rect.Right = m_blupiPos.X + 60 - 20; - rect.Top = m_blupiPos.Y + 60 - 2; - rect.Bottom = m_blupiPos.Y + 60; - bVertigoRight = !DecorDetect(rect); - if (!bVertigoLeft && !bVertigoRight) - { - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y - BLUPIFLOOR; - ObjectStart(celSwitch, 46, 0); - m_blupiOver = false; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiPosHelico = m_blupiPos; - m_blupiFocus = true; - StopSound(16); - StopSound(18); - PlaySound(17, m_blupiPos); - } - } - } - if (m_blupiBalloon && m_blupiFocus) - { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) - { - if (m_blupiVitesseY > -5.0 && m_time % 6 == 0) - { - m_blupiVitesseY -= 1.0; - } - } - else if (m_blupiSpeedY > 0.0) - { - if (m_blupiVitesseY < 0.0 && m_time % 6 == 0) - { - m_blupiVitesseY += 1.0; - } - } - else if (m_blupiVitesseY > -3.0 && m_time % 6 == 0) - { - m_blupiVitesseY -= 1.0; - } - end.Y += (int)m_blupiVitesseY; - if (m_blupiSpeedX < 0.0) - { - int num10 = (int)(m_blupiSpeedX * 10.0); - if (m_blupiVitesseX > (double)num10) - { - m_blupiVitesseX -= 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, -1)) - { - m_blupiVitesseX = 0.0; - } - } - else if (m_blupiSpeedX > 0.0) - { - int num11 = (int)(m_blupiSpeedX * 10.0); - if (m_blupiVitesseX < (double)num11) - { - m_blupiVitesseX += 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, 1)) - { - m_blupiVitesseX = 0.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 2.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 2.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - end.X += (int)m_blupiVitesseX; - } - if (m_blupiEcrase && m_blupiFocus) - { - if (flag2) - { - if (m_blupiVitesseY < 2.0) - { - m_blupiVitesseY += 1.0; - } - } - else - { - m_blupiVitesseY = 0.0; - } - end.Y += (int)m_blupiVitesseY; - num2 = ((!flag2) ? 4 : 7); - num2 = (int)((double)num2 * m_blupiSpeedX); - if (m_blupiSpeedX < 0.0) - { - if (m_blupiVitesseX > (double)num2) - { - m_blupiVitesseX -= 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, -1)) - { - m_blupiVitesseX = 0.0; - } - } - else if (m_blupiSpeedX > 0.0) - { - if (m_blupiVitesseX < (double)num2) - { - m_blupiVitesseX += 1.0; - } - celSwitch.X = end.X + (int)m_blupiVitesseX; - celSwitch.Y = end.Y; - if (BlupiBloque(celSwitch, 1)) - { - m_blupiVitesseX = 0.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 2.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 2.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - if (m_blupiVitesseX == 0.0 && !flag2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - end.X += (int)m_blupiVitesseX; - } - if (m_blupiJeep && m_blupiFocus) - { - if (m_blupiVitesseX == 0.0 && m_blupiAction == 2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - m_blupiMotorHigh = m_blupiAction != 1; - rect = BlupiRect(end); - rect.Right -= 40; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60 - 1; - bool flag5 = !DecorDetect(rect); - rect.Left += 40; - rect.Right += 40; - bool flag6 = !DecorDetect(rect); - if (flag2) - { - if (m_blupiVitesseY < 50.0) - { - m_blupiVitesseY += 5.0; - } - } - else - { - if (m_blupiVitesseY != 0.0) - { - PlaySound(3, m_blupiPos); - } - m_blupiVitesseY = 0.0; - } - end.Y += (int)m_blupiVitesseY; - if (m_blupiTransport == -1) - { - rect.Left = end.X + 20; - rect.Right = end.X + 60 - 20; - rect.Top = end.Y + 60 - 35; - rect.Bottom = end.Y + 60 - 1; - icon = AscenseurDetect(rect, m_blupiPos, end); - if (m_blupiVitesseY >= 0.0 && icon != -1) - { - m_blupiTransport = icon; - flag2 = false; - PlaySound(3, end); - end.Y = m_moveObject[icon].posCurrent.Y - 64 + BLUPIOFFY; - } - } - if (flag5 && !flag6) - { - int num12 = -20; - if (m_blupiVitesseX > (double)num12) - { - m_blupiVitesseX -= 1.0; - } - } - else if (!flag5 && flag6) - { - int num13 = 20; - if (m_blupiVitesseX < (double)num13) - { - m_blupiVitesseX += 1.0; - } - } - else if (m_blupiSpeedX < 0.0) - { - int num14 = (int)(m_blupiSpeedX * 20.0); - if (m_blupiVitesseX > (double)num14) - { - m_blupiVitesseX -= 1.0; - } - } - else if (m_blupiSpeedX > 0.0) - { - int num15 = (int)(m_blupiSpeedX * 20.0); - if (m_blupiVitesseX < (double)num15) - { - m_blupiVitesseX += 1.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 2.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 2.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - if (m_blupiAction == 3) - { - m_blupiVitesseX = 0.0; - } - end.X += (int)m_blupiVitesseX; - if (flag5 && !flag6) - { - m_blupiRealRotation = Misc.Approch(m_blupiRealRotation, -45, 5); - } - else if (!flag5 && flag6) - { - m_blupiRealRotation = Misc.Approch(m_blupiRealRotation, 45, 5); - } - else if (!flag2) - { - m_blupiRealRotation = 0; - } - m_blupiOffsetY = Math.Abs(m_blupiRealRotation / 2); - MoveObjectPollution(); - if (ButtonPressed == Def.ButtonGlygh.PlayAction && !flag2 && m_blupiTransport == -1) - { - ButtonPressed = Def.ButtonGlygh.None; - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y - BLUPIFLOOR; - ObjectStart(celSwitch, 19, 0); - m_blupiJeep = false; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiPosHelico = m_blupiPos; - StopSound(29); - StopSound(31); - PlaySound(30, m_blupiPos); - } - } - if (m_blupiTank && m_blupiFocus) - { - if (m_blupiAction == 53 && m_blupiPhase == 6) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (((uint)m_keyPress & 2u) != 0 && m_blupiTimeFire == 0 && m_blupiAction != 3) - { - if (m_blupiBullet == 0) - { - PlaySound(53, m_blupiPos); - } - else - { - if (m_blupiDir == 1) - { - celSwitch.X = m_blupiPos.X - 35; - celSwitch.Y = m_blupiPos.Y; - num3 = -5; - m_blupiVitesseX += 12.0; - } - else - { - celSwitch.X = m_blupiPos.X + 35; - celSwitch.Y = m_blupiPos.Y; - num3 = 5; - m_blupiVitesseX -= 12.0; - } - if (ObjectStart(celSwitch, 23, num3) != -1) - { - m_blupiAction = 53; - m_blupiPhase = 0; - PlaySound(52, m_blupiPos); - m_blupiTimeFire = 10; - m_blupiBullet--; - } - } - } - if (m_blupiVitesseX == 0.0 && m_blupiAction == 2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - m_blupiMotorHigh = m_blupiAction != 1; - if (flag2) - { - if (m_blupiVitesseY < 50.0) - { - m_blupiVitesseY += 5.0; - } - } - else - { - if (m_blupiVitesseY != 0.0) - { - PlaySound(3, m_blupiPos); - } - m_blupiVitesseY = 0.0; - } - end.Y += (int)m_blupiVitesseY; - if (m_blupiTransport == -1) - { - rect.Left = end.X + 20; - rect.Right = end.X + 60 - 20; - rect.Top = end.Y + 60 - 35; - rect.Bottom = end.Y + 60 - 1; - icon = AscenseurDetect(rect, m_blupiPos, end); - if (m_blupiVitesseY >= 0.0 && icon != -1) - { - m_blupiTransport = icon; - flag2 = false; - PlaySound(3, end); - end.Y = m_moveObject[icon].posCurrent.Y - 64 + BLUPIOFFY; - } - } - if (m_blupiSpeedX < 0.0) - { - int num16 = (int)(m_blupiSpeedX * 12.0); - if (m_blupiVitesseX > (double)num16) - { - m_blupiVitesseX -= 1.0; - } - } - else if (m_blupiSpeedX > 0.0) - { - int num17 = (int)(m_blupiSpeedX * 12.0); - if (m_blupiVitesseX < (double)num17) - { - m_blupiVitesseX += 1.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 3.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 3.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - if (m_blupiAction == 3) - { - m_blupiVitesseX = 0.0; - } - end.X += (int)m_blupiVitesseX; - MoveObjectPollution(); - if (ButtonPressed == Def.ButtonGlygh.PlayAction && !flag2 && m_blupiTransport == -1) - { - ButtonPressed = Def.ButtonGlygh.None; - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y; - ObjectStart(celSwitch, 28, 0); - m_blupiTank = false; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiPosHelico = m_blupiPos; - StopSound(29); - StopSound(31); - PlaySound(30, m_blupiPos); - } - } - if (m_blupiSkate && m_blupiFocus) - { - if (m_blupiVitesseX == 0.0 && m_blupiAction == 2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiSpeedX < 0.0) - { - int num18 = (int)(m_blupiSpeedX * 15.0); - if (m_blupiVitesseX > (double)num18) - { - m_blupiVitesseX -= 1.0; - } - } - else if (m_blupiSpeedX > 0.0) - { - int num19 = (int)(m_blupiSpeedX * 15.0); - if (m_blupiVitesseX < (double)num19) - { - m_blupiVitesseX += 1.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 1.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 1.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - if (m_blupiAction == 3) - { - m_blupiVitesseX = 0.0; - } - end.X += (int)m_blupiVitesseX; - if (ButtonPressed == Def.ButtonGlygh.PlayAction && !flag2 && !m_blupiAir && m_blupiTransport == -1 && m_blupiVitesseX < 8.0) - { - ButtonPressed = Def.ButtonGlygh.None; - m_blupiSkate = false; - m_blupiAction = 43; - m_blupiPhase = 0; - m_blupiFocus = false; - m_blupiPosHelico = m_blupiPos; - } - } - if (m_blupiAction == 42) - { - if (m_blupiPhase == 8) - { - icon = MoveObjectDetect(m_blupiPos, out bNear); - if (icon != -1) - { - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - } - } - if (m_blupiPhase == 20) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - } - if (m_blupiAction == 43) - { - if (m_blupiPhase == 12) - { - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y - BLUPIFLOOR + 1; - ObjectStart(celSwitch, 24, 0); - } - if (m_blupiPhase == 20) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - } - if (m_blupiNage && m_blupiFocus) - { - if (m_blupiTransport == -1) - { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) - { - if (m_blupiVitesseY > -5.0) - { - m_blupiVitesseY -= 1.0; - } - } - else if (m_blupiSpeedY > 0.0) - { - if (m_blupiVitesseY < 5.0) - { - m_blupiVitesseY += 1.0; - } - } - else - { - num2 = ((m_blupiAction == 1) ? (-1) : 0); - if (m_blupiVitesseY > (double)num2) - { - m_blupiVitesseY -= 1.0; - } - if (m_blupiVitesseY < (double)num2) - { - m_blupiVitesseY += 1.0; - } - } - end.Y += (int)m_blupiVitesseY; - } - if (m_blupiSpeedX < 0.0) - { - int num20 = (int)(m_blupiSpeedX * 8.0); - if (m_blupiVitesseX > (double)num20) - { - m_blupiVitesseX -= 1.0; - } - } - else if (m_blupiSpeedX > 0.0) - { - int num21 = (int)(m_blupiSpeedX * 8.0); - if (m_blupiVitesseX < (double)num21) - { - m_blupiVitesseX += 1.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 2.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 2.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - icon = Tables.table_vitesse_nage[m_blupiPhase % 14 / 2]; - end.X += (int)(m_blupiVitesseX * (double)icon / 7.0); - if (m_time % 70 == 0 || m_time % 70 == 28) - { - MoveObjectBlup(end); - } - if (m_time % 5 == 0) - { - if (!m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - m_blupiLevel--; - } - if (m_blupiLevel == 25) - { - m_jauges[0].SetMode(1); - } - m_jauges[0].SetLevel(m_blupiLevel); - if (m_blupiLevel == 0) - { - m_blupiAction = 24; - m_blupiPhase = 0; - m_blupiFocus = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiInvert = false; - m_blupiBalloon = false; - m_blupiEcrase = false; - m_blupiAir = false; - m_blupiRestart = true; - m_blupiActionOuf = 0; - m_jauges[0].SetHide(true); - m_jauges[1].SetHide(true); - PlaySound(26, end); - } - } - } - if (m_blupiSurf && m_blupiFocus) - { - if (m_blupiTransport == -1) - { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 0) - { - if (m_blupiVitesseY > -5.0) - { - m_blupiVitesseY -= 1.0; - } - } - else if (m_blupiSpeedY > 0.0) - { - if (m_blupiVitesseY < 5.0) - { - m_blupiVitesseY += 1.0; - } - } - else - { - if (m_blupiVitesseY > -2.0) - { - m_blupiVitesseY -= 1.0; - } - if (m_blupiVitesseY < -2.0) - { - m_blupiVitesseY += 1.0; - } - } - end.Y += (int)m_blupiVitesseY; - end.Y += BLUPISURF; - if (end.Y % 64 > 30) - { - end.Y += 64 - end.Y % 64; - } - end.Y -= BLUPISURF; - } - if (m_blupiSpeedX < 0.0) - { - int num22 = (int)(m_blupiSpeedX * 8.0); - if (m_blupiVitesseX > (double)num22) - { - m_blupiVitesseX -= 1.0; - } - } - else if (m_blupiSpeedX > 0.0) - { - int num23 = (int)(m_blupiSpeedX * 8.0); - if (m_blupiVitesseX < (double)num23) - { - m_blupiVitesseX += 1.0; - } - } - else - { - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX -= 2.0; - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX = 0.0; - } - } - if (m_blupiVitesseX < 0.0) - { - m_blupiVitesseX += 2.0; - if (m_blupiVitesseX > 0.0) - { - m_blupiVitesseX = 0.0; - } - } - } - icon = Tables.table_vitesse_surf[m_blupiPhase % 12 / 2]; - end.X += (int)(m_blupiVitesseX * (double)icon / 10.0); - } - TinyPoint tinyPoint = default(TinyPoint); - if (m_blupiSuspend && m_blupiFocus) - { - if (m_blupiSpeedX < 0.0 && m_blupiAction == 2) - { - int num24 = (int)(m_blupiSpeedX * 5.0); - end.X += num24; - } - if (m_blupiSpeedX > 0.0 && m_blupiAction == 2) - { - int num25 = (int)(m_blupiSpeedX * 5.0); - end.X += num25; - } - icon = GetTypeBarre(end); - if (icon == 2) - { - tinyPoint.X = end.X; - tinyPoint.Y = end.Y / 64 * 64 + BLUPIOFFY; - rect = BlupiRect(tinyPoint); - if (!DecorDetect(rect, true)) - { - m_blupiSuspend = false; - m_blupiAction = 1; - m_blupiPhase = 0; - end = (m_blupiPos = tinyPoint); - } - } - if ((m_blupiSpeedY > 0.0 && m_blupiPhase > 5) || icon == 0) - { - m_blupiSuspend = false; - m_blupiAir = true; - m_blupiAction = 5; - end.Y = end.Y;//Todo : check : Assignment made to same variable; did you mean to assign something else? - m_blupiVitesseY = 0.0; - m_blupiNoBarre = 5; - m_blupiActionOuf = 65; - m_blupiTimeOuf = 0; - } - if ((((uint)m_keyPress & (true ? 1u : 0u)) != 0 || m_blupiSpeedY < 0.0) && m_blupiAction != 4 && m_blupiAction != 3) - { - m_blupiAction = 4; - m_blupiPhase = 0; - } - if ((m_keyPress & 1) == 0 && m_blupiSpeedY == 0.0 && m_blupiAction == 4) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - if (m_blupiAction == 4 && m_blupiPhase == 10) - { - m_blupiSuspend = false; - m_blupiAir = true; - m_blupiAction = 5; - m_blupiPhase = 0; - end.Y -= 2; - m_blupiVitesseY = -11.0; - m_blupiNoBarre = 5; - PlaySound(35, end); - } - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiTank && !m_blupiJeep && !m_blupiSkate && !flag2 && m_blupiTransport == -1 && m_blupiFocus) - { - if (m_blupiDynamite > 0) - { - ButtonPressed = Def.ButtonGlygh.None; - rect.Left = end.X + 18; - rect.Right = end.X + 20; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = end.X + 60 - 20; - rect.Right = end.X + 60 - 18; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoRight = !DecorDetect(rect); - if (!bVertigoLeft && !bVertigoRight && ObjectStart(end, 56, 0) != -1) - { - m_blupiAction = 87; - m_blupiPhase = 0; - m_blupiFocus = false; - PlaySound(61, end); - m_blupiDynamite--; - } - } - else if (m_blupiPerso > 0) - { - ButtonPressed = Def.ButtonGlygh.None; - icon = MoveObjectDetect(end, out bNear); - if (icon == -1 || m_moveObject[icon].type != 200) - { - rect.Left = end.X + 18; - rect.Right = end.X + 20; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = end.X + 60 - 20; - rect.Right = end.X + 60 - 18; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoRight = !DecorDetect(rect); - icon = MoveChargeDetect(end); - if (icon == -1 && !bVertigoLeft && !bVertigoRight && ObjectStart(end, 200, 0) != -1) - { - m_blupiAction = 46; - m_blupiPhase = 0; - m_blupiFocus = false; - PlaySound(61, end); - m_blupiPerso--; - } - } - if (m_blupiFocus) - { - m_blupiAction = 47; - m_blupiPhase = 0; - PlaySound(27, end); - } - } - } - rect = BlupiRect(m_blupiPos); - tinyPoint = end; - TestPath(rect, m_blupiPos, ref end); - if (flag && m_blupiPos.X == end.X && m_blupiPos.X != tinyPoint.X) - { - end.Y = tinyPoint.Y; - TestPath(rect, m_blupiPos, ref end); - } - if (m_blupiVent && m_blupiPos.Y == end.Y && m_blupiPos.Y != tinyPoint.Y) - { - end.X = tinyPoint.X; - TestPath(rect, m_blupiPos, ref 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); - } - 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); - } - else if (m_blupiPos.Y == end.Y && m_blupiPos.Y != tinyPoint.Y) - { - end.X = tinyPoint.X; - TestPath(rect, m_blupiPos, ref end); - } - } - TinyPoint blupiPos = m_blupiPos; - m_blupiPos = end; - if ((m_blupiAction == 1 || m_blupiAction == 60 || m_blupiAction == 7 || m_blupiAction == 6) && !m_blupiAir && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - if (m_blupiTransport != -1) - { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); - } - else - { - rect.Left = end.X + 24; - rect.Right = end.X + 26; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = end.X + 60 - 26; - rect.Right = end.X + 60 - 24; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoRight = !DecorDetect(rect); - } - if (m_blupiDir == 1 && bVertigoLeft && !bVertigoRight) - { - if (m_blupiHelico || m_blupiOver || AscenseurShift(m_blupiTransport)) - { - m_blupiAction = 9; - m_blupiPhase = 0; - } - else - { - PlaySound(6, end); - m_blupiAction = 8; - m_blupiPhase = 0; - } - } - if (m_blupiDir == 2 && !bVertigoLeft && bVertigoRight) - { - if (m_blupiHelico || m_blupiOver || AscenseurShift(m_blupiTransport)) - { - m_blupiAction = 9; - m_blupiPhase = 0; - } - else - { - PlaySound(6, end); - m_blupiAction = 8; - m_blupiPhase = 0; - } - } - if (m_blupiAction != 8 && m_blupiAction != 10 && m_blupiAction != 9 && (bVertigoLeft || bVertigoRight)) - { - if (!m_blupiHelico && !m_blupiOver) - { - PlaySound(6, end); - } - m_blupiAction = 10; - m_blupiPhase = 0; - } - } - if (m_blupiAction == 1 && m_blupiJeep && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - if (m_blupiTransport != -1) - { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); - } - else - { - rect.Left = end.X + 2; - rect.Right = end.X + 18; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = end.X + 60 - 18; - rect.Right = end.X + 60 - 2; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoRight = !DecorDetect(rect); - } - if (bVertigoLeft && !bVertigoRight) - { - m_blupiAction = 10; - m_blupiPhase = 0; - } - if (bVertigoRight && !bVertigoLeft) - { - m_blupiAction = 10; - m_blupiPhase = 0; - } - } - if (m_blupiAction == 1 && m_blupiTank && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - if (m_blupiTransport != -1) - { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); - } - else - { - rect.Left = end.X + 2; - rect.Right = end.X + 18; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = end.X + 60 - 18; - rect.Right = end.X + 60 - 2; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoRight = !DecorDetect(rect); - } - if (bVertigoLeft && !bVertigoRight) - { - m_blupiAction = 10; - m_blupiPhase = 0; - } - if (bVertigoRight && !bVertigoLeft) - { - m_blupiAction = 10; - m_blupiPhase = 0; - } - } - if (m_blupiAction == 1 && m_blupiSkate && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - if (m_blupiTransport != -1) - { - AscenseurVertigo(m_blupiTransport, out bVertigoLeft, out bVertigoRight); - } - else - { - rect.Left = end.X + 12; - rect.Right = end.X + 19; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoLeft = !DecorDetect(rect); - rect.Left = end.X + 60 - 19; - rect.Right = end.X + 60 - 12; - rect.Top = end.Y + 60 - 2; - rect.Bottom = end.Y + 60; - bVertigoRight = !DecorDetect(rect); - } - if (bVertigoLeft && !bVertigoRight) - { - m_blupiAction = 10; - m_blupiPhase = 0; - } - if (bVertigoRight && !bVertigoLeft) - { - m_blupiAction = 10; - m_blupiPhase = 0; - } - } - if (m_blupiFocus) - { - if (m_blupiAction == 8 && m_blupiPhase == 16) - { - m_blupiAction = 9; - m_blupiPhase = 0; - } - if (m_blupiAction == 9 && m_blupiPhase == 3) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiActionOuf = 0; - } - num2 = 5; - if (m_blupiJeep) - { - num2 = 10; - } - if (m_blupiTank) - { - num2 = 10; - } - if (m_blupiSkate) - { - num2 = 10; - } - if (m_blupiAction == 10 && m_blupiPhase == num2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - } - BlupiSearchIcon(); - if (m_blupiShield) - { - if (m_blupiTimeShield == 10) - { - PlaySound(43, m_blupiPos); - } - if (m_blupiTimeShield == 0) - { - m_blupiShield = false; - m_jauges[1].SetHide(true); - } - else if (m_time % 5 == 0) - { - m_blupiTimeShield--; - m_jauges[1].SetLevel(m_blupiTimeShield); - } - } - if (m_blupiPower) - { - if (m_blupiTimeShield == 20) - { - PlaySound(45, m_blupiPos); - } - if (m_blupiTimeShield == 0) - { - m_blupiPower = false; - m_jauges[1].SetHide(true); - } - else if (m_time % 3 == 0) - { - m_blupiTimeShield--; - m_jauges[1].SetLevel(m_blupiTimeShield); - } - } - if (m_blupiCloud) - { - if (m_blupiTimeShield == 25) - { - PlaySound(56, m_blupiPos); - } - if (m_blupiTimeShield == 0) - { - m_blupiCloud = false; - m_jauges[1].SetHide(true); - } - else if (m_time % 4 == 0) - { - m_blupiTimeShield--; - m_jauges[1].SetLevel(m_blupiTimeShield); - } - } - if (m_blupiHide) - { - if (m_blupiTimeShield == 20) - { - PlaySound(63, m_blupiPos); - } - if (m_blupiTimeShield == 0) - { - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - else if (m_time % 4 == 0) - { - m_blupiTimeShield--; - m_jauges[1].SetLevel(m_blupiTimeShield); - } - } - if (m_blupiInvert) - { - if (m_blupiTimeShield == 0) - { - m_blupiInvert = false; - m_jauges[1].SetHide(true); - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y + 100; - ObjectStart(celSwitch, 42, -60); - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y - 100; - ObjectStart(celSwitch, 42, 60); - celSwitch.X = m_blupiPos.X - 100; - celSwitch.Y = m_blupiPos.Y; - ObjectStart(celSwitch, 42, 10); - celSwitch.X = m_blupiPos.X + 100; - celSwitch.Y = m_blupiPos.Y; - ObjectStart(celSwitch, 42, -10); - PlaySound(67, end); - } - else if (m_time % 3 == 0) - { - m_blupiTimeShield--; - m_jauges[1].SetLevel(m_blupiTimeShield); - } - } - if (m_blupiBalloon) - { - if (m_blupiTimeShield == 0) - { - m_blupiBalloon = false; - m_jauges[1].SetHide(true); - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 91, 0); - PlaySound(41, m_blupiPos); - } - else if (m_time % 2 == 0) - { - m_blupiTimeShield--; - m_jauges[1].SetLevel(m_blupiTimeShield); - } - } - if (m_blupiEcrase) - { - if (m_blupiTimeShield == 0) - { - m_blupiEcrase = false; - m_blupiAir = true; - m_jauges[1].SetHide(true); - ObjectStart(m_blupiPos, 41, -60); - ObjectStart(m_blupiPos, 41, 60); - ObjectStart(m_blupiPos, 41, 10); - ObjectStart(m_blupiPos, 41, -10); - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 90, 0); - PlaySound(41, m_blupiPos); - } - else if (m_time % 2 == 0) - { - m_blupiTimeShield--; - 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) - { - icon = MoveObjectFree(); - if (icon != -1) - { - m_moveObject[icon].type = 27; - m_moveObject[icon].phase = 0; - m_moveObject[icon].posCurrent = m_blupiPos; - m_moveObject[icon].posStart = m_moveObject[icon].posCurrent; - m_moveObject[icon].posEnd = m_moveObject[icon].posCurrent; - m_moveObject[icon].step = 1; - m_moveObject[icon].time = 0; - MoveObjectStepIcon(icon); - m_blupiPosMagic = m_blupiPos; - } - } - 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) - { - m_moveObject[icon].type = 57; - m_moveObject[icon].phase = 0; - m_moveObject[icon].posCurrent = m_blupiPos; - m_moveObject[icon].posStart = m_moveObject[icon].posCurrent; - m_moveObject[icon].posEnd = m_moveObject[icon].posCurrent; - m_moveObject[icon].step = 1; - m_moveObject[icon].time = 0; - MoveObjectStepIcon(icon); - m_blupiPosMagic = m_blupiPos; - } - } - 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) - { - m_moveObject[icon].type = 58; - m_moveObject[icon].icon = m_blupiIcon; - m_moveObject[icon].channel = 2; - m_moveObject[icon].phase = 0; - m_moveObject[icon].posCurrent = m_blupiPos; - m_moveObject[icon].posStart = m_moveObject[icon].posCurrent; - m_moveObject[icon].posEnd = m_moveObject[icon].posCurrent; - m_moveObject[icon].step = 1; - m_moveObject[icon].time = 0; - MoveObjectStepIcon(icon); - m_blupiPosMagic = m_blupiPos; - } - } - if (m_blupiTimeNoAsc > 0) - { - m_blupiTimeNoAsc--; - } - if (m_blupiHelico && m_blupiPos.Y > 2 && m_blupiFocus && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - rect = BlupiRect(end); - rect.Top = end.Y + 4; - rect.Bottom = end.Y + 20; - if (DecorDetect(rect)) - { - ByeByeHelico(); - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiHelico = false; - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 9, 0); - m_decorAction = 1; - m_decorPhase = 0; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_blupiPos); - } - } - if (!m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && m_blupiFocus) - { - if (!m_blupiNage && !m_blupiSurf && IsSurfWater(m_blupiPos)) - { - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_blupiAir = false; - m_blupiNage = false; - m_blupiSurf = true; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - MoveObjectPlouf(m_blupiPos); - if (m_blupiTransport != -1) - { - m_blupiPos.Y -= 10; - m_blupiTransport = -1; - } - if (m_blupiCloud) - { - m_blupiCloud = false; - m_jauges[1].SetHide(true); - } - } - if (!m_blupiNage && !IsSurfWater(m_blupiPos) && IsDeepWater(m_blupiPos)) - { - if (!m_blupiSurf) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - MoveObjectPlouf(m_blupiPos); - } - m_blupiAir = false; - m_blupiSurf = false; - m_blupiNage = true; - m_blupiLevel = 100; - m_jauges[0].SetLevel(m_blupiLevel); - m_jauges[0].SetMode(2); - m_jauges[0].SetHide(false); - } - if (m_blupiNage && IsSurfWater(m_blupiPos)) - { - m_blupiAir = false; - m_blupiNage = false; - m_blupiSurf = true; - PlaySound(25, m_blupiPos); - m_jauges[0].SetHide(true); - } - 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) - { - m_blupiNage = false; - m_blupiSurf = false; - m_blupiAir = true; - m_blupiAction = 5; - m_blupiPhase = 0; - m_blupiVitesseX = 0.0; - if (m_blupiPower) - { - m_blupiVitesseY = -16.0; - } - else - { - m_blupiVitesseY = -12.0; - } - MoveObjectTiplouf(m_blupiPos); - PlaySound(22, m_blupiPos); - m_jauges[0].SetHide(true); - } - if ((m_blupiSurf || m_blupiNage) && IsOutWater(m_blupiPos)) - { - if (m_blupiVitesseY < 0.0) - { - if (m_blupiTransport == -1) - { - m_blupiPos = blupiPos; - } - else - { - m_blupiTransport = -1; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiAir = true; - m_blupiAction = 5; - m_blupiPhase = 0; - m_blupiPos.Y -= 10; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = -10.0; - PlaySound(22, m_blupiPos); - m_jauges[0].SetHide(true); - } - } - else if (m_blupiVitesseY > 0.0) - { - m_blupiNage = false; - m_blupiSurf = false; - m_blupiAir = false; - m_blupiAction = 5; - m_blupiPhase = 0; - m_blupiPos.Y += 30; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - PlaySound(22, m_blupiPos); - m_jauges[0].SetHide(true); - } - else - { - m_blupiNage = false; - m_blupiSurf = false; - m_blupiAir = false; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiPos.Y -= 10; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - PlaySound(22, m_blupiPos); - m_jauges[0].SetHide(true); - } - } - if ((m_blupiSurf || m_blupiNage) && m_blupiActionOuf != 44) - { - m_blupiActionOuf = 44; - m_blupiTimeOuf = 0; - } - } - if ((m_blupiHelico || m_blupiOver || m_blupiJeep || m_blupiTank || m_blupiSkate) && m_blupiFocus && (IsSurfWater(m_blupiPos) || IsDeepWater(m_blupiPos))) - { - ByeByeHelico(); - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 9, 0); - m_decorAction = 1; - m_decorPhase = 0; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_blupiPos); - } - if (m_blupiFocus && !m_blupiSuspend && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && m_blupiNoBarre == 0 && GetTypeBarre(m_blupiPos) == 1) - { - tinyPoint.X = m_blupiPos.X; - tinyPoint.Y = (m_blupiPos.Y + 22) / 64 * 64 + BLUPISUSPEND; - rect = BlupiRect(tinyPoint); - if (!DecorDetect(rect, true)) - { - m_blupiPos = tinyPoint; - m_blupiSuspend = true; - m_blupiAir = false; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiActionOuf = 0; - PlaySound(34, m_blupiPos); - } - } - if (m_blupiNoBarre > 0) - { - m_blupiNoBarre--; - } - if (IsVentillo(m_blupiPos)) - { - if (m_blupiFocus && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - BlupiDead(11, 75); - } - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 11, 0); - m_decorAction = 2; - m_decorPhase = 0; - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_blupiPos); - } - if (m_blupiAction != 30 && m_blupiFocus) - { - icon = IsWorld(m_blupiPos); - if (icon != -1) - { - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(32, m_blupiPos); - m_blupiAction = 30; - m_blupiPhase = 0; - m_blupiFocus = false; - m_blupiFront = true; - } - } - int num26 = MoveObjectDetect(m_blupiPos, out bNear); - TinyPoint tinyPoint2 = default(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) - { - BlupiDead(76, -1); - m_blupiRestart = true; - m_blupiPos.Y = m_blupiPos.Y / 64 * 64 + BLUPIOFFY; - PlaySound(8, m_blupiPos); - } - if (IsPiege(m_blupiPos) && !m_blupiOver && !m_blupiJeep && !m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) - { - BlupiDead(54, -1); - m_blupiRestart = true; - m_blupiAir = true; - ObjectStart(m_blupiPos, 53, 0); - PlaySound(51, m_blupiPos); - } - if (IsGoutte(m_blupiPos, false) && !m_blupiOver && !m_blupiJeep && !m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) - { - BlupiDead(54, -1); - m_blupiRestart = true; - m_blupiAir = true; - PlaySound(51, m_blupiPos); - } - if (IsScie(m_blupiPos) && !m_blupiOver && !m_blupiJeep && !m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) - { - BlupiDead(77, -1); - m_blupiFront = true; - 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) - { - ButtonPressed = Def.ButtonGlygh.None; - ActiveSwitch(m_decor[celSwitch.X, celSwitch.Y].icon == 385, celSwitch); - m_blupiAction = 82; - m_blupiPhase = 0; - m_blupiFocus = false; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - } - if (IsBlitz(m_blupiPos, false) && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - BlupiDead(11, -1); - m_blupiRestart = true; - m_blupiAir = true; - m_blupiPos.Y = m_blupiPos.Y / 64 * 64 + BLUPIOFFY; - PlaySound(8, m_blupiPos); - } - if (IsEcraseur(m_blupiPos) && !m_blupiEcrase && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - m_blupiEcrase = true; - m_blupiBalloon = false; - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(false); - if (!m_blupiJeep && !m_blupiTank) - { - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - } - PlaySound(70, m_blupiPos); - ObjectStart(m_blupiPos, 41, -60); - ObjectStart(m_blupiPos, 41, 60); - ObjectStart(m_blupiPos, 41, 10); - ObjectStart(m_blupiPos, 41, -10); - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 90, 0); - m_decorAction = 2; - m_decorPhase = 0; - } - if (IsTeleporte(m_blupiPos) != -1 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiAir && m_blupiFocus && m_blupiPosHelico.X == -1) - { - m_blupiAction = 74; - m_blupiPhase = 0; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - m_blupiFocus = false; - m_blupiPos.X = m_blupiPos.X / 64 * 64; - PlaySound(71, m_blupiPos); - celSwitch.X = m_blupiPos.X; - celSwitch.Y = m_blupiPos.Y - 5; - ObjectStart(celSwitch, 92, 0); - } - if (IsBridge(m_blupiPos, ref celBridge) && m_blupiFocus) - { - celBridge.X *= 64; - celBridge.Y *= 64; - ObjectStart(celBridge, 52, 0); - } - int num = IsDoor(m_blupiPos, ref celBridge); - if (num != -1 && (m_blupiCle & (1 << num - 334)) != 0) - { - OpenDoor(celBridge); - m_blupiCle &= ~(1 << num - 334); - celSwitch.X = 520; - celSwitch.Y = 418; - tinyPoint2.X = celBridge.X * 64 - m_posDecor.X; - tinyPoint2.Y = celBridge.Y * 64 - m_posDecor.Y; - VoyageInit(celSwitch, m_pixmap.HotSpotToHud(tinyPoint2), 214 + (num - 334) * 7, 10); - } - } - if (!m_blupiHelico && !m_blupiSuspend && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiSkate && !m_blupiJeep && !m_blupiTank && !m_blupiJeep && m_blupiFocus) - { - icon = MockeryDetect(m_blupiPos); - if (icon != 0) - { - m_blupiActionOuf = icon; - m_blupiTimeOuf = 0; - } - } - MoveObjectFollow(m_blupiPos); - icon = num26; - if (icon != -1 && !bNear && m_moveObject[icon].type == 2 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && !m_blupiShield && !m_bSuperBlupi && m_blupiFocus) - { - m_blupiActionOuf = 48; - m_blupiTimeOuf = 0; - } - if (icon != -1 && bNear) - { - if (m_moveObject[icon].type == 13 && (ButtonPressed == Def.ButtonGlygh.PlayAction || IsFloatingObject(icon)) && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - ButtonPressed = Def.ButtonGlygh.None; - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_blupiAir = false; - m_blupiHelico = true; - m_blupiRealRotation = 0; - m_blupiVitesseX = 0.0; - if (m_blupiCloud || m_blupiHide) - { - m_blupiCloud = false; - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && m_moveObject[icon].type == 46 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - ButtonPressed = Def.ButtonGlygh.None; - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_blupiAir = false; - m_blupiOver = true; - m_blupiVitesseX = 0.0; - if (m_blupiCloud || m_blupiHide) - { - m_blupiCloud = false; - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && m_moveObject[icon].type == 19 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - ButtonPressed = Def.ButtonGlygh.None; - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiAir = false; - m_blupiJeep = true; - m_blupiVitesseX = 0.0; - if (m_blupiCloud || m_blupiHide) - { - m_blupiCloud = false; - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && m_moveObject[icon].type == 28 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - ButtonPressed = Def.ButtonGlygh.None; - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiAir = false; - m_blupiTank = true; - m_blupiVitesseX = 0.0; - if (m_blupiCloud || m_blupiHide) - { - m_blupiCloud = false; - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - } - if (m_moveObject[icon].type == 29 && m_blupiFocus && m_blupiBullet < 10) - { - 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; - tinyPoint2.X = 570; - tinyPoint2.Y = 430; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), tinyPoint2, 177, 10); - m_blupiBullet += 10; - if (m_blupiBullet > 10) - { - m_blupiBullet = 10; - } - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && m_moveObject[icon].type == 24 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus) - { - ButtonPressed = Def.ButtonGlygh.None; - m_scrollAdd.X = 0; - m_scrollAdd.Y = 0; - m_blupiAction = 42; - m_blupiPhase = 0; - m_blupiPos.Y = m_moveObject[icon].posCurrent.Y / 64 * 64 + BLUPIOFFY; - m_blupiFocus = false; - m_blupiAir = false; - m_blupiSkate = true; - m_blupiVitesseX = 0.0; - if (m_blupiCloud || m_blupiHide) - { - m_blupiCloud = false; - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - } - if ((m_moveObject[icon].type == 3 || m_moveObject[icon].type == 16 || m_moveObject[icon].type == 96 || m_moveObject[icon].type == 97) && m_blupiBalloon && m_blupiPosHelico.X == -1) - { - m_blupiBalloon = false; - m_blupiAir = true; - m_blupiTimeShield = 0; - m_jauges[1].SetHide(true); - m_decorAction = 0; - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 91, 0); - PlaySound(41, m_blupiPos); - m_blupiPos.Y += 4; - m_blupiVitesseY = 0.0; - m_blupiPosHelico = m_blupiPos; - } - else if ((m_moveObject[icon].type == 2 || m_moveObject[icon].type == 3 || m_moveObject[icon].type == 96 || m_moveObject[icon].type == 97 || m_moveObject[icon].type == 16 || m_moveObject[icon].type == 4 || m_moveObject[icon].type == 17 || m_moveObject[icon].type == 20) && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiPosHelico.X == -1) - { - if (!m_blupiJeep && !m_blupiTank && !m_blupiSkate && (m_blupiFocus || m_blupiAction == 5 || m_blupiAction == 36)) - { - if (m_blupiHelico || m_blupiOver || m_blupiBalloon || m_blupiEcrase) - { - m_blupiAir = true; - } - BlupiDead(11, 75); - } - if (m_moveObject[icon].type == 17 || m_moveObject[icon].type == 20) - { - celSwitch = m_moveObject[icon].posCurrent; - ObjectDelete(celSwitch, m_moveObject[icon].type); - celSwitch.X -= 34; - celSwitch.Y -= 34; - ObjectStart(celSwitch, 10, 0); - m_decorAction = 2; - m_decorPhase = 0; - } - else - { - celSwitch = m_moveObject[icon].posCurrent; - ObjectDelete(celSwitch, m_moveObject[icon].type); - celSwitch.X -= 34; - celSwitch.Y -= 34; - ObjectStart(celSwitch, 8, 0); - m_decorAction = 1; - m_decorPhase = 0; - } - if (!m_blupiJeep && !m_blupiTank) - { - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - } - PlaySound(10, m_moveObject[icon].posCurrent); - } - if (m_moveObject[icon].type == 44 && m_blupiFocus && !m_blupiBalloon && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - ByeByeHelico(); - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiVitesseX = 0.0; - m_blupiVitesseY = 0.0; - m_blupiBalloon = true; - m_blupiEcrase = false; - m_blupiAir = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(false); - if (!m_blupiJeep && !m_blupiTank) - { - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - } - PlaySound(40, m_moveObject[icon].posCurrent); - celSwitch.X = m_blupiPos.X - 34; - celSwitch.Y = m_blupiPos.Y - 34; - ObjectStart(celSwitch, 90, 0); - m_decorAction = 5; - m_decorPhase = 0; - } - if (m_moveObject[icon].type == 54 && m_moveObject[icon].step != 2 && m_moveObject[icon].step != 4 && m_blupiFocus && !m_blupiBalloon && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - ByeByeHelico(); - celSwitch.X = m_blupiPos.X; - celSwitch.Y = (m_blupiPos.Y + 64 - 10) / 64 * 64 + 4; - ObjectStart(celSwitch, 53, 0); - m_blupiAction = 54; - m_blupiPhase = 0; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiFocus = false; - m_blupiRestart = true; - if (flag2) - { - m_blupiAir = true; - } - if (m_blupiHelico || m_blupiOver || m_blupiBalloon || m_blupiEcrase || m_blupiJeep || m_blupiTank || m_blupiSkate) - { - m_blupiHelico = false; - m_blupiOver = false; - m_blupiBalloon = false; - m_blupiEcrase = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - celSwitch = m_moveObject[icon].posCurrent; - celSwitch.X -= 34; - celSwitch.Y -= 34; - ObjectStart(celSwitch, 10, 0); - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(10, m_moveObject[icon].posCurrent); - m_decorAction = 1; - m_decorPhase = 0; - } - else - { - PlaySound(51, m_moveObject[icon].posCurrent); - } - m_blupiCloud = false; - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - if (m_moveObject[icon].type == 23 && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiAction != 13 && m_blupiAction != 30 && m_blupiAction != 11 && m_blupiAction != 75 && m_blupiAction != 76 && m_blupiAction != 77 && m_blupiAction != 78 && m_blupiAction != 79 && m_blupiAction != 80 && m_blupiAction != 81 && m_blupiAction != 54 && m_blupiAction != 57 && m_blupiAction != 35) - { - ByeByeHelico(); - celSwitch = m_moveObject[icon].posCurrent; - ObjectDelete(celSwitch, m_moveObject[icon].type); - m_blupiAction = 54; - m_blupiPhase = 0; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiFocus = false; - m_blupiRestart = true; - if (flag2) - { - m_blupiAir = true; - } - if (m_blupiHelico || m_blupiOver || m_blupiBalloon || m_blupiEcrase || m_blupiJeep || m_blupiTank || m_blupiSkate) - { - m_blupiHelico = false; - m_blupiOver = false; - m_blupiBalloon = false; - m_blupiEcrase = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - } - StartSploutchGlu(m_moveObject[icon].posCurrent); - m_blupiCloud = false; - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - if (m_moveObject[icon].type == 5) - { - 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); - end2.X = 430; - end2.Y = 430; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end2, 6, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -10); - } - if (m_moveObject[icon].type == 49 && (m_voyageIcon != 215 || m_voyageChannel != 10) && (m_blupiCle & 1) == 0) - { - 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); - end3.X = 520; - end3.Y = 418; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end3, 215, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -10); - } - if (m_moveObject[icon].type == 50 && (m_voyageIcon != 222 || m_voyageChannel != 10) && (m_blupiCle & 2) == 0) - { - 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); - end4.X = 530; - end4.Y = 418; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end4, 222, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -10); - } - if (m_moveObject[icon].type == 51 && (m_voyageIcon != 229 || m_voyageChannel != 10) && (m_blupiCle & 4) == 0) - { - 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); - end5.X = 540; - end5.Y = 418; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), end5, 229, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 60); - ObjectStart(m_moveObject[icon].posCurrent, 39, 10); - ObjectStart(m_moveObject[icon].posCurrent, 39, -10); - } - if (m_moveObject[icon].type == 6 && m_nbVies < 10 && m_blupiFocus) - { - 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; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), VoyageGetPosVie(m_nbVies + 1), 21, 10); - } - if (m_moveObject[icon].type == 25 && !m_blupiShield && !m_blupiHide && !m_blupiPower && m_blupiFocus) - { - PlaySound(42, m_moveObject[icon].posCurrent); - m_blupiShield = true; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(false); - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && m_moveObject[icon].type == 26 && !m_blupiShield && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && m_blupiFocus) - { - ButtonPressed = Def.ButtonGlygh.None; - m_sucettePos = m_moveObject[icon].posCurrent; - m_sucetteType = m_moveObject[icon].type; - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - m_blupiAction = 49; - m_blupiPhase = 0; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiFocus = false; - PlaySound(50, end); - } - if (m_moveObject[icon].type == 40 && !m_blupiHide && m_blupiFocus) - { - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - m_blupiInvert = true; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(false); - PlaySound(66, end); - ObjectStart(m_blupiPos, 41, -60); - ObjectStart(m_blupiPos, 41, 60); - ObjectStart(m_blupiPos, 41, 10); - ObjectStart(m_blupiPos, 41, -10); - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && m_moveObject[icon].type == 30 && !m_blupiShield && !m_blupiCloud && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && m_blupiFocus) - { - ButtonPressed = Def.ButtonGlygh.None; - m_sucettePos = m_moveObject[icon].posCurrent; - m_sucetteType = m_moveObject[icon].type; - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - m_blupiAction = 55; - m_blupiPhase = 0; - m_blupiShield = false; - m_blupiPower = false; - m_blupiJumpAie = false; - m_blupiFocus = false; - PlaySound(57, end); - } - if (m_moveObject[icon].type == 31 && !m_blupiShield && !m_blupiHide && !m_blupiPower && !m_blupiCloud && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && m_blupiFocus) - { - m_blupiAction = 56; - m_blupiPhase = 0; - m_blupiShield = false; - m_blupiPower = false; - m_blupiJumpAie = false; - m_blupiFocus = false; - m_blupiCloud = true; - m_blupiTimeShield = 100; - PlaySound(58, end); - if (m_blupiHide) - { - m_blupiHide = false; - m_jauges[1].SetHide(true); - } - } - if (m_moveObject[icon].type >= 200 && m_moveObject[icon].type <= 203 && m_blupiFocus) - { - if (m_moveObject[icon].type == 200) - { - if (m_blupiPerso < 5 && ButtonPressed == Def.ButtonGlygh.PlayAction) - { - ButtonPressed = Def.ButtonGlygh.None; - 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; - tinyPoint2.X = 0; - tinyPoint2.Y = 438; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), tinyPoint2, 108, 4); - } - } - else if (!m_blupiShield && !m_blupiHide && !m_bSuperBlupi) - { - ObjectDelete(m_moveObject[icon].posCurrent, m_moveObject[icon].type); - BlupiDead(11, 75); - celSwitch = m_moveObject[icon].posCurrent; - celSwitch.X -= 34; - celSwitch.Y -= 34; - ObjectStart(celSwitch, 10, 0); - PlaySound(10, m_moveObject[icon].posCurrent); - m_decorAction = 1; - m_decorPhase = 0; - } - } - if (m_moveObject[icon].type == 55 && m_blupiFocus && m_blupiDynamite == 0 && (m_voyageIcon != 252 || m_voyageChannel != 10) && ButtonPressed == Def.ButtonGlygh.PlayAction) - { - ButtonPressed = Def.ButtonGlygh.None; - 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; - tinyPoint2.X = 505; - tinyPoint2.Y = 414; - VoyageInit(m_pixmap.HotSpotToHud(celSwitch), tinyPoint2, 252, 10); - m_blupiAction = 86; - m_blupiPhase = 0; - m_blupiFocus = false; - } - if (m_moveObject[icon].type == 12 && !m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && !m_blupiSuspend && m_blupiFocus && m_blupiAction == 2) - { - end = m_moveObject[icon].posCurrent; - if (m_blupiDir == 1 && m_blupiPos.X > end.X) - { - end.X = m_blupiPos.X - 59; - PlaySound(38, end); - m_blupiActionOuf = 45; - m_blupiTimeOuf = 0; - m_blupiAction = 14; - m_blupiPhase = 0; - } - if (m_blupiDir == 2 && m_blupiPos.X < end.X) - { - end.X = m_blupiPos.X + 55; - PlaySound(38, end); - m_blupiActionOuf = 45; - m_blupiTimeOuf = 0; - m_blupiAction = 14; - m_blupiPhase = 0; - } - if (!TestPushCaisse(icon, end, false)) - { - m_blupiPos.X = blupiPos.X; - } - } - if ((m_moveObject[icon].type == 7 || m_moveObject[icon].type == 21) && m_blupiFocus) - { - if (m_goalPhase == 0) - { - if (m_nbTresor >= m_totalTresor) - { - if (m_moveObject[icon].type == 21) - { - m_bFoundCle = true; - } - ByeByeHelico(); - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(14, m_moveObject[icon].posCurrent); - m_blupiAction = 13; - m_blupiPhase = 0; - m_blupiFocus = false; - m_blupiFront = true; - m_blupiPos.Y = m_moveObject[icon].posCurrent.Y; - } - else - { - PlaySound(13, m_moveObject[icon].posCurrent); - } - m_goalPhase = 50; - } - else - { - m_goalPhase--; - } - } - else - { - m_goalPhase = 0; - } - } - else - { - m_goalPhase = 0; - } - if (m_blupiAction == 14 && m_blupiFocus) - { - icon = CaisseInFront(); - if (icon != -1) - { - end = m_moveObject[icon].posCurrent; - if (m_blupiDir == 1) - { - end.X = m_blupiPos.X - 59; - } - else - { - end.X = m_blupiPos.X + 55; - } - if (!TestPushCaisse(icon, end, false)) - { - m_blupiPos.X = blupiPos.X; - } - } - else - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - } - if (m_blupiAction == 29 && m_blupiFocus) - { - icon = CaisseInFront(); - if (icon != -1) - { - end = m_moveObject[icon].posCurrent; - if (m_blupiDir == 1) - { - end.X = m_blupiPos.X - 59; - } - else - { - end.X = m_blupiPos.X + 55; - } - if (!TestPushCaisse(icon, end, true)) - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - } - else - { - m_blupiAction = 1; - m_blupiPhase = 0; - } - } - if (!m_blupiHelico && !m_blupiOver && !m_blupiBalloon && !m_blupiEcrase && !m_blupiJeep && !m_blupiTank && !m_blupiSkate && !m_blupiNage && !m_blupiSurf && m_blupiFocus) - { - if (m_blupiActionOuf == 44 && m_blupiAction == 1) - { - if (m_blupiTimeOuf > 50) - { - m_blupiAction = m_blupiActionOuf; - m_blupiPhase = 0; - PlaySound(46, m_blupiPos); - } - m_blupiActionOuf = 0; - } - if (m_blupiActionOuf == 45 && m_blupiAction == 1) - { - if (m_blupiTimeOuf > 50) - { - m_blupiAction = m_blupiActionOuf; - m_blupiPhase = 0; - } - m_blupiActionOuf = 0; - } - if (m_blupiAction == 45 && m_blupiPhase == 4) - { - PlaySound(46, m_blupiPos); - } - if (m_blupiActionOuf == 65 && m_blupiAction == 1) - { - if (m_blupiTimeOuf > 10 && m_blupiTimeOuf < 50) - { - m_blupiAction = m_blupiActionOuf; - m_blupiPhase = 0; - } - m_blupiActionOuf = 0; - } - if (m_blupiActionOuf == 47 && m_blupiAction == 1) - { - if (m_blupiTimeOuf > 60) - { - m_blupiAction = m_blupiActionOuf; - m_blupiPhase = 0; - PlaySound(48, m_blupiPos); - } - m_blupiActionOuf = 0; - } - if (m_blupiActionOuf == 48 && m_blupiAction == 1) - { - if (m_blupiTimeOuf < 10) - { - m_blupiAction = m_blupiActionOuf; - m_blupiPhase = 0; - PlaySound(49, m_blupiPos); - } - m_blupiActionOuf = 0; - } - if ((m_blupiActionOuf == 63 || m_blupiActionOuf == 64 || m_blupiActionOuf == 83) && m_blupiAction == 1) - { - if (m_blupiTimeOuf < 20) - { - m_blupiAction = m_blupiActionOuf; - m_blupiPhase = 0; - } - m_blupiActionOuf = 0; - } - } - if (m_blupiAction == 2 && m_blupiActionOuf != 63 && m_blupiActionOuf != 64 && m_blupiActionOuf != 83 && !m_blupiSurf && !m_blupiNage) - { - m_blupiActionOuf = 0; - } - if (m_blupiActionOuf != 0) - { - m_blupiTimeOuf++; - } - if (m_blupiTimeMockery > 0) - { - m_blupiTimeMockery--; - } - if (m_blupiAction == 86 && m_blupiPhase == 18) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (m_blupiAction == 87 && m_blupiPhase == 26) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (m_blupiPos.X - 30 > m_blupiPosHelico.X || m_blupiPos.X + 30 < m_blupiPosHelico.X || m_blupiPos.Y - 30 > m_blupiPosHelico.Y || m_blupiPos.Y + 30 < m_blupiPosHelico.Y) - { - m_blupiPosHelico.X = -1; - } - if (m_blupiTimeFire > 0) - { - m_blupiTimeFire--; - } - if (m_blupiAction == 74 && m_blupiPhase == 128) - { - TinyPoint newpos = default(TinyPoint); - if (SearchTeleporte(m_blupiPos, ref newpos)) - { - m_blupiPos = newpos; - ObjectStart(m_blupiPos, 27, 20); - ObjectStart(m_blupiPos, 27, -20); - } - m_blupiFocus = true; - m_blupiPosHelico = m_blupiPos; - } - if (m_blupiAction == 82 && m_blupiPhase == 10) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (ButtonPressed == Def.ButtonGlygh.PlayAction && m_blupiAction == 1) - { - m_blupiAction = 84; - m_blupiPhase = 0; - PlaySound(27, m_blupiPos); - } - if ((m_blupiAction == 11 && m_blupiPhase == 70) || (m_blupiAction == 75 && m_blupiPhase == 100) || (m_blupiAction == 76 && m_blupiPhase == 70) || (m_blupiAction == 77 && m_blupiPhase == 110) || (m_blupiAction == 78 && m_blupiPhase == 90) || (m_blupiAction == 79 && m_blupiPhase == 90) || (m_blupiAction == 80 && m_blupiPhase == 90) || (m_blupiAction == 81 && m_blupiPhase == 90) || (m_blupiAction == 24 && m_blupiPhase == 90) || (m_blupiAction == 54 && m_blupiPhase == 100) || (m_blupiAction == 57 && m_blupiPhase == 90)) - { - if (m_nbVies > 0) - { - m_blupiAction = 35; - m_blupiIcon = -1; - m_blupiPhase = 0; - if (m_blupiRestart) - { - m_blupiPos = m_blupiValidPos; - } - TinyPoint posDecor = GetPosDecor(m_blupiPos); - celSwitch.X = m_blupiPos.X - posDecor.X - 30; - celSwitch.Y = m_blupiPos.Y - posDecor.Y; - VoyageInit(VoyageGetPosVie(m_nbVies), m_pixmap.HotSpotToHud(celSwitch), 48, 2); - } - else - { - m_nbVies = -1; - m_term = -1; - DoorsLost(); - } - m_blupiFront = false; - } - num2 = ((m_dimDecor.Y != 0) ? 6400 : 480); - if (m_blupiPos.Y >= num2 + 1 && m_blupiPos.Y <= num2 + 40) - { - PlaySound(8, m_blupiPos); - } - if (m_blupiPos.Y > num2 + 1000) - { - m_term = -1; - DoorsLost(); - } - if (m_blupiAction == 13 && m_blupiPhase == 40) - { - if (m_bPrivate) - { - m_term = 1; - } - else if (m_mission == 1) - { - m_term = 199; - } - else if (m_mission == 199) - { - m_term = -2; - } - else if (m_bFoundCle) - { - OpenGoldsWin(); - m_term = 1; - } - else - { - OpenDoorsWin(); - m_term = m_mission / 10 * 10; - } - } - if (m_blupiAction == 30 && m_blupiPhase == 30) - { - icon = IsWorld(m_blupiPos); - if (icon != -1) - { - if (m_mission == 1) - { - m_term = icon * 10; - } - else if (icon == 199) - { - m_term = 1; - } - else - { - m_term = m_mission / 10 * 10 + icon; - } - } - } - if (blupiAction == 63 && m_blupiAction != 63) - { - StopSound(65); - } - if (blupiAction == 64 && m_blupiAction != 64) - { - StopSound(65); - } - if (blupiAction == 83 && m_blupiAction != 83) - { - 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_blupiFifoNb > 0) - { - m_blupiValidPos = m_blupiFifoPos[0]; - } - BlupiAddFifo(m_blupiPos); - } - 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); - num3 = SCROLL_SPEED; - if (num27 > SCROLL_MARGX * 2) - { - num3 += (num27 - SCROLL_MARGX * 2) / 4; - } - if (num28 > SCROLL_MARGY * 2) - { - num3 += (num28 - SCROLL_MARGY * 2) / 4; - } - if (m_scrollPoint.X < end.X) - { - m_scrollPoint.X += num3; - if (m_scrollPoint.X >= end.X) - { - m_scrollPoint.X = end.X; - } - } - if (m_scrollPoint.X > end.X) - { - m_scrollPoint.X -= num3; - if (m_scrollPoint.X <= end.X) - { - m_scrollPoint.X = end.X; - } - } - if (m_scrollPoint.Y < end.Y) - { - m_scrollPoint.Y += num3; - if (m_scrollPoint.Y >= end.Y) - { - m_scrollPoint.Y = end.Y; - } - } - if (m_scrollPoint.Y > end.Y) - { - m_scrollPoint.Y -= num3; - if (m_scrollPoint.Y <= end.Y) - { - m_scrollPoint.Y = end.Y; - } - } - if (m_blupiAction != 75 && m_blupiAction != 76) - { - m_posDecor = GetPosDecor(m_scrollPoint); - } - if (m_time % 4 == 0) - { - PosSound(m_blupiPos); - } - VoyageStep(); - m_blupiLastSpeedX = m_blupiSpeedX; - m_blupiLastSpeedY = m_blupiSpeedY; - m_lastKeyPress = m_keyPress; - } - - private void BlupiDead(int action1, int action2) - { - ByeByeHelico(); - if (action2 == -1) - { - m_blupiAction = action1; - } - else - { - m_blupiAction = ((m_random.Next() % 2 == 0) ? action1 : action2); - } - m_blupiPhase = 0; - m_blupiFocus = false; - m_blupiHelico = false; - m_blupiOver = false; - m_blupiJeep = false; - m_blupiTank = false; - m_blupiSkate = false; - m_blupiNage = false; - m_blupiSurf = false; - m_blupiSuspend = false; - m_blupiJumpAie = false; - m_blupiShield = false; - m_blupiPower = false; - m_blupiCloud = false; - m_blupiHide = false; - m_blupiInvert = false; - m_blupiBalloon = false; - m_blupiEcrase = false; - m_blupiRestart = false; - m_blupiActionOuf = 0; - m_jauges[0].SetHide(true); - m_jauges[1].SetHide(true); - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - TinyPoint pos = default(TinyPoint); - TinyPoint pos2 = default(TinyPoint); - if (m_blupiAction == 75) - { - pos.X = m_blupiPos.X - m_posDecor.X; - pos.Y = m_blupiPos.Y - m_posDecor.Y; - pos2.X = m_blupiPos.X - m_posDecor.X; - pos2.Y = m_blupiPos.Y - m_posDecor.Y - 300; - VoyageInit(m_pixmap.HotSpotToHud(pos), m_pixmap.HotSpotToHud(pos2), 230, 10); - PlaySound(74, m_blupiPos); - } - if (m_blupiAction == 76) - { - pos.X = m_blupiPos.X - m_posDecor.X; - pos.Y = m_blupiPos.Y - m_posDecor.Y; - pos2.X = m_blupiPos.X - m_posDecor.X; - pos2.Y = m_blupiPos.Y - m_posDecor.Y - 2000; - VoyageInit(m_pixmap.HotSpotToHud(pos), m_pixmap.HotSpotToHud(pos2), 40, 10); - PlaySound(74, m_blupiPos); - } - if (m_blupiAction == 77) - { - ObjectStart(m_blupiPos, 41, -70); - ObjectStart(m_blupiPos, 41, 20); - ObjectStart(m_blupiPos, 41, -20); - PlaySound(75, m_blupiPos); - } - } - - private TinyPoint GetPosDecor(TinyPoint pos) - { - TinyPoint result = default(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); - } - if (m_dimDecor.Y == 0) - { - result.Y = 0; - } - 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); - } - return result; - } - - private void BlupiAddFifo(TinyPoint pos) - { - if (m_blupiFifoNb < 10) - { - if (m_blupiFifoNb <= 0 || pos.X != m_blupiFifoPos[m_blupiFifoNb - 1].X || pos.Y != m_blupiFifoPos[m_blupiFifoNb - 1].Y) - { - m_blupiFifoPos[m_blupiFifoNb] = pos; - m_blupiFifoNb++; - } - } - else if (pos.X != m_blupiFifoPos[9].X || pos.Y != m_blupiFifoPos[9].Y) - { - for (int i = 0; i < 9; i++) - { - m_blupiFifoPos[i] = m_blupiFifoPos[i + 1]; - } - m_blupiFifoPos[9] = pos; - } - } - - private bool DecorDetect(TinyRect rect) - { - return DecorDetect(rect, true); - } - - private bool DecorDetect(TinyRect rect, bool bCaisse) - { - m_detectIcon = -1; - if (rect.Left < 0 || rect.Top < 0) - { - return true; - } - int num = ((m_dimDecor.X != 0) ? 6400 : 640); - if (rect.Right > num) - { - return true; - } - if (m_blupiHelico || m_blupiOver || m_blupiBalloon || m_blupiEcrase || m_blupiNage || m_blupiSurf) - { - num = ((m_dimDecor.Y != 0) ? 6400 : 480); - if (rect.Bottom > num) - { - return true; - } - } - int num2 = rect.Left / 16; - 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; - for (int i = num4; i <= num5; i++) - { - for (int j = num2; j <= num3; j++) - { - int num6 = j / 4; - int num7 = i / 4; - if (num6 < 0 || num6 >= 100 || num7 < 0 || num7 >= 100) - { - continue; - } - 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; - } - num6 = j % 4; - num7 = i % 4; - if (Tables.table_decor_quart[icon * 16 + num7 * 4 + num6] != 0) - { - src.Left = j * 16; - src.Right = src.Left + 16; - src.Top = i * 16; - src.Bottom = src.Top + 16; - if (Misc.IntersectRect(out dst, src, rect)) - { - m_detectIcon = icon; - return true; - } - } - } - } - if (!bCaisse) - { - return false; - } - for (int k = 0; k < m_nbRankCaisse; k++) - { - int num8 = m_rankCaisse[k]; - src.Left = m_moveObject[num8].posCurrent.X; - 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)) - { - m_detectIcon = m_moveObject[num8].icon; - return true; - } - } - return false; - } - - private bool TestPath(TinyRect rect, TinyPoint start, ref TinyPoint end) - { - int num = Math.Abs(end.X - start.X); - int num2 = Math.Abs(end.Y - start.Y); - TinyPoint tinyPoint = start; - TinyRect rect2 = default(TinyRect); - if (num > num2) - { - if (end.X > start.X) - { - for (int i = 0; i <= num; i++) - { - int num3 = i * (end.Y - start.Y) / num; - rect2.Left = rect.Left + i; - rect2.Right = rect.Right + i; - rect2.Top = rect.Top + num3; - rect2.Bottom = rect.Bottom + num3; - if (DecorDetect(rect2)) - { - end = tinyPoint; - return false; - } - tinyPoint.X = start.X + i; - tinyPoint.Y = start.Y + num3; - } - } - if (end.X < start.X) - { - for (int i = 0; i >= -num; i--) - { - int num3 = i * (start.Y - end.Y) / num; - rect2.Left = rect.Left + i; - rect2.Right = rect.Right + i; - rect2.Top = rect.Top + num3; - rect2.Bottom = rect.Bottom + num3; - if (DecorDetect(rect2)) - { - end = tinyPoint; - return false; - } - tinyPoint.X = start.X + i; - tinyPoint.Y = start.Y + num3; - } - } - } - else - { - if (end.Y > start.Y) - { - for (int num3 = 0; num3 <= num2; num3++) - { - int i = num3 * (end.X - start.X) / num2; - rect2.Left = rect.Left + i; - rect2.Right = rect.Right + i; - rect2.Top = rect.Top + num3; - rect2.Bottom = rect.Bottom + num3; - if (DecorDetect(rect2)) - { - end = tinyPoint; - return false; - } - tinyPoint.X = start.X + i; - tinyPoint.Y = start.Y + num3; - } - } - if (end.Y < start.Y) - { - for (int num3 = 0; num3 >= -num2; num3--) - { - int i = num3 * (start.X - end.X) / num2; - rect2.Left = rect.Left + i; - rect2.Right = rect.Right + i; - rect2.Top = rect.Top + num3; - rect2.Bottom = rect.Bottom + num3; - if (DecorDetect(rect2)) - { - end = tinyPoint; - return false; - } - tinyPoint.X = start.X + i; - tinyPoint.Y = start.Y + num3; - } - } - } - return true; - } - - private void MoveObjectPollution() - { - bool flag = false; - TinyPoint blupiPos = m_blupiPos; - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = 0; - tinyPoint.Y = 0; - int num = 20; - if (m_blupiAction == 3) - { - return; - } - if (m_blupiHelico) - { - if (m_blupiVitesseY < -5.0) - { - if (m_time % 20 != 0 && m_time % 20 != 2 && m_time % 20 != 5 && m_time % 20 != 8 && m_time % 20 != 10 && m_time % 20 != 11 && m_time % 20 != 16 && m_time % 20 != 18) - { - return; - } - } - else if (m_blupiVitesseX == 0.0) - { - if (m_time % 50 != 0 && m_time % 50 != 12 && m_time % 50 != 30) - { - return; - } - } - else if (m_time % 20 != 0 && m_time % 20 != 3 && m_time % 20 != 5 && m_time % 20 != 11 && m_time % 20 != 15) - { - return; - } - tinyPoint.X = 22; - flag = true; - } - if (m_blupiOver) - { - if (m_blupiSpeedY < 0.0 || ((uint)m_keyPress & (true ? 1u : 0u)) != 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) - { - return; - } - num = 58; - tinyPoint.X = m_random.Next(-10, 10); - tinyPoint.Y = 22; - } - else - { - if (m_time % 50 != 0 && m_time % 50 != 12 && m_time % 50 != 30) - { - return; - } - num = 20; - tinyPoint.X = 30; - } - flag = true; - } - if (m_blupiJeep) - { - if (m_blupiVitesseX == 0.0) - { - if (m_blupiPhase % 50 != 0 && m_blupiPhase % 50 != 12 && m_blupiPhase % 50 != 20 && m_blupiPhase % 50 != 35) - { - return; - } - } - else if (m_blupiPhase % 20 != 0 && m_blupiPhase % 20 != 3 && m_blupiPhase % 20 != 5 && m_blupiPhase % 20 != 11 && m_blupiPhase % 20 != 15) - { - return; - } - tinyPoint.X = 32; - flag = true; - } - if (m_blupiTank) - { - if (m_blupiVitesseX == 0.0) - { - if (m_blupiPhase % 50 != 0 && m_blupiPhase % 50 != 15 && m_blupiPhase % 50 != 28) - { - return; - } - } - else if (m_blupiPhase % 20 != 0 && m_blupiPhase % 20 != 4 && m_blupiPhase % 20 != 12) - { - return; - } - tinyPoint.X = 35; - flag = true; - } - if (!flag) - { - return; - } - if (m_blupiDir == 2) - { - blupiPos.X -= tinyPoint.X - 5; - if (num < 50) - { - num = -num; - } - } - else - { - blupiPos.X += tinyPoint.X; - } - blupiPos.Y += tinyPoint.Y; - ObjectStart(blupiPos, 36, num); - } - - private void MoveObjectPlouf(TinyPoint pos) - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 14) - { - return; - } - } - pos.Y -= 45; - PlaySound(23, pos); - ObjectStart(pos, 14, 0); - } - - private void MoveObjectTiplouf(TinyPoint pos) - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 35) - { - return; - } - } - if (m_blupiDir == 2) - { - pos.X += 5; - } - else - { - pos.X -= 5; - } - pos.Y -= 45; - PlaySound(64, pos); - ObjectStart(pos, 35, 0); - } - - private void MoveObjectBlup(TinyPoint pos) - { - PlaySound(24, pos); - pos.Y -= 20; - int num = 0; - TinyPoint tinyPoint = pos; - while (tinyPoint.Y > 0) - { - int icon = m_decor[(tinyPoint.X + 16) / 64, tinyPoint.Y / 64].icon; - if (icon != 91 && icon != 92) - { - break; - } - num++; - tinyPoint.Y -= 64; - } - num--; - if (num > 0) - { - int num2 = MoveObjectFree(); - if (num2 != -1) - { - m_moveObject[num2].type = 15; - m_moveObject[num2].phase = 0; - m_moveObject[num2].posCurrent.X = pos.X; - m_moveObject[num2].posCurrent.Y = pos.Y; - m_moveObject[num2].posStart = m_moveObject[num2].posCurrent; - m_moveObject[num2].posEnd.X = pos.X; - m_moveObject[num2].posEnd.Y = pos.Y - num * 64; - m_moveObject[num2].timeStopStart = 0; - m_moveObject[num2].stepAdvance = num * 10; - m_moveObject[num2].step = 2; - m_moveObject[num2].time = 0; - MoveObjectStepIcon(num2); - } - } - } - - private int IsWorld(TinyPoint pos) - { - pos.X += 30; - pos.Y += 30; - if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) - { - return -1; - } - int icon = m_decor[pos.X / 64, pos.Y / 64].icon; - if (icon >= 158 && icon <= 165) - { - return icon - 158 + 1; - } - if (icon >= 166 && icon <= 173) - { - return icon - 166 + 1; - } - switch (icon) - { - case 309: - case 310: - return 9; - case 411: - case 412: - case 413: - case 414: - case 415: - return icon - 411 + 10; - default: - if (icon >= 416 && icon <= 420) - { - return icon - 416 + 10; - } - if (icon >= 174 && icon <= 181) - { - return icon - 174 + 1; - } - if (icon == 184) - { - return 199; - } - return -1; - } - } - - private void ActiveSwitch(bool bState, TinyPoint cel) - { - TinyPoint pos = default(TinyPoint); - pos.X = cel.X * 64; - pos.Y = cel.Y * 64; - ModifDecor(pos, bState ? 384 : 385); - PlaySound(bState ? 77 : 76, pos); - 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)) - { - pos.X = cel.X * 64; - pos.Y = cel.Y * 64; - ModifDecor(pos, bState ? 378 : 379); - } - cel.X++; - } - } - - private int GetTypeBarre(TinyPoint pos) - { - TinyPoint pos2 = pos; - pos.X += 30; - pos.Y += 22; - if (pos.Y % 64 > 44) - { - return 0; - } - if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) - { - return 0; - } - int icon = m_decor[pos.X / 64, pos.Y / 64].icon; - if (icon != 138 && icon != 202) - { - return 0; - } - if (pos.Y >= 6336) - { - return 1; - } - icon = m_decor[pos.X / 64, pos.Y / 64 + 1].icon; - if (!IsPassIcon(icon)) - { - return 2; - } - TinyRect rect = BlupiRect(pos2); - rect.Top = pos2.Y + 60 - 2; - rect.Bottom = pos2.Y + 60 - 1; - if (DecorDetect(rect, true)) - { - return 2; - } - return 1; - } - - private bool 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; - } - - private bool IsPiege(TinyPoint pos) - { - pos.X += 30; - pos.Y += 60; - if (pos.X % 64 < 15 || pos.X % 64 > 49) - { - return false; - } - 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 == 373; - } - - private bool IsGoutte(TinyPoint pos, bool bAlways) - { - pos.X += 30; - if (pos.X % 64 < 15 || pos.X % 64 > 49) - { - return false; - } - 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; - if (bAlways) - { - if (icon != 404) - { - return icon == 410; - } - return true; - } - return icon == 404; - } - - private bool IsScie(TinyPoint pos) - { - pos.X += 30; - if (pos.X % 64 < 4 || pos.X % 64 > 60) - { - return false; - } - 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 == 378; - } - - private bool IsSwitch(TinyPoint pos, ref TinyPoint celSwitch) - { - pos.X += 30; - if (pos.X % 64 < 4 || pos.X % 64 > 60) - { - return false; - } - if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) - { - return false; - } - celSwitch.X = pos.X / 64; - celSwitch.Y = pos.Y / 64; - if (m_decor[pos.X / 64, pos.Y / 64].icon != 384) - { - return m_decor[pos.X / 64, pos.Y / 64].icon == 385; - } - return true; - } - - private bool IsEcraseur(TinyPoint pos) - { - if (m_time / 3 % 10 > 2) - { - return false; - } - 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 == 317; - } - - private bool IsBlitz(TinyPoint pos, bool bAlways) - { - pos.X += 30; - if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) - { - return false; - } - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = pos.X / 64; - tinyPoint.Y = pos.Y / 64; - if (m_decor[tinyPoint.X, tinyPoint.Y].icon != 305) - { - return false; - } - if (bAlways) - { - return true; - } - return BlitzActif(tinyPoint.X, tinyPoint.Y); - } - - private bool IsRessort(TinyPoint pos) - { - pos.X += 30; - pos.Y += 60; - 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 == 211; - } - - private bool IsTemp(TinyPoint pos) - { - pos.X += 30; - pos.Y += 60; - 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 == 324; - } - - private bool IsBridge(TinyPoint pos, ref 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) - { - 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) - { - celBridge.X = pos.X / 64; - celBridge.Y = pos.Y / 64; - return true; - } - return false; - } - - private int IsDoor(TinyPoint pos, ref 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) - { - celPorte.X = pos.X / 64; - celPorte.Y = pos.Y / 64; - return m_decor[pos.X / 64, pos.Y / 64].icon; - } - pos.X += num; - } - return -1; - } - - private int IsTeleporte(TinyPoint pos) - { - if (pos.X % 64 > 6) - { - return -1; - } - pos.X += 30; - pos.Y -= 60; - if (pos.X < 0 || pos.X >= 6400 || pos.Y < 0 || pos.Y >= 6400) - { - return -1; - } - 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 -1; - } - - private bool SearchTeleporte(TinyPoint pos, ref TinyPoint newpos) - { - int num = IsTeleporte(pos); - if (num == -1) - { - return false; - } - for (int i = 0; i < 100; i++) - { - for (int j = 0; j < 100; j++) - { - if (num == m_decor[i, j].icon) - { - newpos.X = i * 64; - newpos.Y = j * 64 + 60; - if (newpos.X < pos.X - 40 || newpos.X > pos.X + 40 || newpos.Y < pos.Y - 40 || newpos.Y > pos.Y + 40) - { - return true; - } - } - } - } - return false; - } - - private bool IsNormalJump(TinyPoint pos) - { - pos.X += 32; - pos.Y -= 32; - if (m_blupiDir == 1) - { - pos.X -= 15; - } - else - { - pos.X += 15; - } - for (int i = 0; i < 2; i++) - { - int num = pos.X / 64; - int num2 = pos.Y / 64; - if (num2 < 0) - { - return false; - } - int icon = m_decor[num, num2].icon; - if (!IsPassIcon(icon)) - { - return false; - } - pos.Y -= 64; - } - return true; - } - - private bool 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; - if (icon != 92 && icon2 == 92) - { - return true; - } - return false; - } - - private bool IsDeepWater(TinyPoint pos) - { - int num = (pos.X + 30) / 64; - int num2 = pos.Y / 64; - if (num < 0 || num >= 100 || num2 < 0 || num2 >= 100) - { - return false; - } - int icon = m_decor[num, num2].icon; - if (icon != 91) - { - return icon == 92; - } - return true; - } - - private bool IsOutWater(TinyPoint pos) - { - int icon = m_decor[(pos.X + 30) / 64, (pos.Y + 30) / 64].icon; - if (icon == 91 || icon == 92) - { - return false; - } - return IsPassIcon(icon); - } - - private bool IsPassIcon(int icon) - { - if (icon == 324 && m_time / 4 % 20 >= 18) - { - return true; - } - if (icon >= 0 && icon < MAXQUART) - { - for (int i = 0; i < 16; i++) - { - if (Tables.table_decor_quart[icon * 16 + i] != 0) - { - return false; - } - } - } - return true; - } - - private bool IsBlocIcon(int icon) - { - if (icon < 0 || icon >= MAXQUART) - { - return false; - } - if (icon == 324 && m_time / 4 % 20 < 18) - { - return true; - } - for (int i = 0; i < 16; i++) - { - if (Tables.table_decor_quart[icon * 16 + i] == 0) - { - return false; - } - } - return true; - } - - private void FlushBalleTraj() - { - for (int i = 0; i < 1300; i++) - { - m_balleTraj[i] = 0; - } - } - - private void SetBalleTraj(TinyPoint pos) - { - if (pos.X >= 0 && pos.X < 100 && pos.Y >= 0 && pos.Y < 100) - { - int num = pos.Y * 13; - num += pos.X / 8; - int num2 = pos.X & 7; - m_balleTraj[num] |= 1 << num2; - } - } - - private bool IsBalleTraj(TinyPoint pos) - { - pos.X = (pos.X + 32) / 64; - pos.Y = (pos.Y + 32) / 64; - if (pos.X < 0 || pos.X >= 100 || pos.Y < 0 || pos.Y >= 100) - { - return false; - } - int num = pos.Y * 13; - num += pos.X / 8; - int num2 = pos.X & 7; - return (m_balleTraj[num] & (1 << num2)) != 0; - } - - private void FlushMoveTraj() - { - for (int i = 0; i < 1300; i++) - { - m_moveTraj[i] = 0; - } - } - - private void SetMoveTraj(TinyPoint pos) - { - if (pos.X >= 0 && pos.X < 100 && pos.Y >= 0 && pos.Y < 100) - { - int num = pos.Y * 13; - num += pos.X / 8; - int num2 = pos.X & 7; - m_moveTraj[num] |= 1 << num2; - } - } - - private bool IsMoveTraj(TinyPoint pos) - { - pos.X = (pos.X + 32) / 64; - pos.Y = (pos.Y + 32) / 64; - if (pos.X < 0 || pos.X >= 100 || pos.Y < 0 || pos.Y >= 100) - { - return false; - } - int num = pos.Y * 13; - num += pos.X / 8; - int num2 = pos.X & 7; - return (m_moveTraj[num] & (1 << num2)) != 0; - } - - private int SearchDistRight(TinyPoint pos, TinyPoint dir, int type) - { - int num = 0; - if (type == 36 || type == 39 || type == 41 || type == 42 || type == 93) - { - return 500; - } - 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)) - { - if (type == 23) - { - SetBalleTraj(pos); - } - num += 64; - pos.X += dir.X; - pos.Y += dir.Y; - } - if ((type == 34 || type == 38) && num >= 64) - { - num -= 64; - } - if (type == 23 && num >= 10) - { - num -= 10; - } - return num; - } - - private bool IsVentillo(TinyPoint pos) - { - int num = 0; - bool flag = false; - TinyPoint tinyPoint = default(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; - switch (icon) - { - default: - return false; - case 126: - if (pos.X % 64 <= 16) - { - flag = true; - } - tinyPoint.X = -64; - tinyPoint.Y = 0; - num = 110; - break; - case 127: - case 128: - case 129: - case 130: - case 131: - case 132: - case 133: - case 134: - case 135: - case 136: - case 137: - break; - } - if (icon == 129) - { - if (pos.X % 64 >= 48) - { - flag = true; - } - tinyPoint.X = 64; - tinyPoint.Y = 0; - num = 114; - } - if (icon == 132) - { - if (pos.Y % 64 <= 32) - { - flag = true; - } - tinyPoint.X = 0; - tinyPoint.Y = -64; - num = 118; - } - if (icon == 135) - { - if (pos.Y % 64 >= 48) - { - flag = true; - } - tinyPoint.X = 0; - tinyPoint.Y = 64; - num = 122; - } - if (!flag) - { - return false; - } - ModifDecor(pos, -1); - do - { - pos.X += tinyPoint.X; - pos.Y += tinyPoint.Y; - if (num != m_decor[pos.X / 64, pos.Y / 64].icon) - { - break; - } - ModifDecor(pos, -1); - } - while (pos.X >= 0 && pos.X < 6400 && pos.Y >= 0 && pos.Y < 6400); - return true; - } - - private void NetStopCloud(int rank) - { - } - - private void StartSploutchGlu(TinyPoint pos) - { - TinyPoint pos2 = default(TinyPoint); - pos2.X = pos.X; - pos2.Y = pos.Y; - ObjectStart(pos2, 98, 0); - pos2.X = pos.X + 15; - pos2.Y = pos.Y + 20; - ObjectStart(pos2, 99, 0); - pos2.X = pos.X - 20; - pos2.Y = pos.Y + 18; - ObjectStart(pos2, 99, 0); - pos2.X = pos.X + 23; - pos2.Y = pos.Y - 18; - ObjectStart(pos2, 99, 0); - pos2.X = pos.X - 15; - pos2.Y = pos.Y - 18; - ObjectStart(pos2, 99, 0); - pos2.X = pos.X + 32; - pos2.Y = pos.Y + 10; - ObjectStart(pos2, 100, 0); - pos2.X = pos.X - 28; - pos2.Y = pos.Y + 15; - ObjectStart(pos2, 100, 0); - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(51, pos); - } - - private int ObjectStart(TinyPoint pos, int type, int speed) - { - int num = MoveObjectFree(); - if (num == -1) - { - return -1; - } - m_moveObject[num].type = type; - m_moveObject[num].phase = 0; - m_moveObject[num].posCurrent = pos; - m_moveObject[num].posStart = pos; - m_moveObject[num].posEnd = pos; - MoveObjectStepIcon(num); - if (speed != 0) - { - TinyPoint tinyPoint = pos; - int num2 = speed; - int num3 = 0; - TinyPoint dir = default(TinyPoint); - if (num2 > 50) - { - num2 -= 50; - dir.X = 0; - dir.Y = 1; - num3 = SearchDistRight(tinyPoint, dir, type); - tinyPoint.Y += num3; - } - else if (num2 < -50) - { - num2 += 50; - dir.X = 0; - dir.Y = -1; - num3 = SearchDistRight(tinyPoint, dir, type); - tinyPoint.Y -= num3; - } - else if (num2 > 0) - { - dir.X = 1; - dir.Y = 0; - num3 = SearchDistRight(tinyPoint, dir, type); - tinyPoint.X += num3; - } - else if (num2 < 0) - { - dir.X = -1; - dir.Y = 0; - num3 = SearchDistRight(tinyPoint, dir, type); - tinyPoint.X -= num3; - } - if (num3 == 0) - { - if (type == 23) - { - m_moveObject[num].type = 0; - return num; - } - } - else - { - m_moveObject[num].posEnd = tinyPoint; - m_moveObject[num].timeStopStart = 0; - m_moveObject[num].stepAdvance = Math.Abs(num2 * num3 / 64); - m_moveObject[num].step = 2; - m_moveObject[num].time = 0; - } - } - MoveObjectPriority(num); - return num; - } - - private bool ObjectDelete(TinyPoint pos, int type) - { - int num = MoveObjectSearch(pos, type); - if (num == -1) - { - return false; - } - if (m_moveObject[num].type == 4 || m_moveObject[num].type == 12 || m_moveObject[num].type == 16 || m_moveObject[num].type == 17 || m_moveObject[num].type == 20 || m_moveObject[num].type == 40 || m_moveObject[num].type == 96 || m_moveObject[num].type == 97) - { - int num2 = 17; - double animationSpeed = 1.0; - if (m_moveObject[num].type == 4) - { - num2 = 7; - } - if (m_moveObject[num].type == 17 || m_moveObject[num].type == 20) - { - num2 = 33; - } - if (m_moveObject[num].type == 40) - { - animationSpeed = 0.5; - } - ByeByeAdd(m_moveObject[num].channel, m_moveObject[num].icon, m_moveObject[num].posCurrent, num2, animationSpeed); - } - m_moveObject[num].type = 0; - return true; - } - - private void ModifDecor(TinyPoint pos, int 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; - } - - private void MoveObjectStep() - { - m_blupiVector.X = 0; - m_blupiVector.Y = 0; - m_blupiTransport = -1; - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 0) - { - continue; - } - MoveObjectStepLine(i); - MoveObjectStepIcon(i); - if (m_moveObject[i].type == 4 || m_moveObject[i].type == 33 || m_moveObject[i].type == 32) - { - int num = MovePersoDetect(m_moveObject[i].posCurrent); - if (num != -1) - { - TinyPoint posCurrent = m_moveObject[i].posCurrent; - posCurrent.X -= 34; - posCurrent.Y -= 34; - ObjectStart(posCurrent, 8, 0); - PlaySound(10, m_moveObject[i].posCurrent); - m_decorAction = 1; - m_decorPhase = 0; - posCurrent = m_moveObject[i].posCurrent; - posCurrent.X += 2; - posCurrent.Y += BLUPIOFFY; - ObjectDelete(m_moveObject[i].posCurrent, m_moveObject[i].type); - ObjectStart(posCurrent, 37, 0); - ObjectDelete(m_moveObject[num].posCurrent, m_moveObject[num].type); - } - if (BlupiElectro(m_moveObject[i].posCurrent)) - { - TinyPoint posCurrent = m_moveObject[i].posCurrent; - posCurrent.X += 2; - posCurrent.Y += BLUPIOFFY; - ObjectDelete(m_moveObject[i].posCurrent, m_moveObject[i].type); - ObjectStart(posCurrent, 38, 55); - PlaySound(59, posCurrent); - } - } - } - } - - private void MoveObjectStepLine(int i) - { - TinyPoint tinyPoint = default(TinyPoint); - bool flag = false; - TinyRect tinyRect = default(TinyRect); - if ((m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48) && !m_blupiSuspend) - { - TinyRect src = default(TinyRect); - src.Left = m_blupiPos.X + 20; - src.Right = m_blupiPos.X + 60 - 20; - src.Top = m_blupiPos.Y + 60 - 2; - src.Bottom = m_blupiPos.Y + 60 - 1; - tinyRect.Left = m_moveObject[i].posCurrent.X; - 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); - tinyPoint = m_moveObject[i].posCurrent; - } - TinyPoint end; - if (m_blupiFocus && !m_blupiHide && m_moveObject[i].type == 97) - { - end = m_moveObject[i].posCurrent; - if (end.X < m_blupiPos.X) - { - end.X++; - } - if (end.X > m_blupiPos.X) - { - end.X--; - } - if (end.Y < m_blupiPos.Y) - { - end.Y++; - } - if (end.Y > m_blupiPos.Y) - { - end.Y--; - } - tinyRect.Left = end.X + 10; - 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)) - { - m_moveObject[i].posCurrent = end; - m_moveObject[i].posStart = end; - m_moveObject[i].posEnd = end; - } - else - { - ObjectDelete(m_moveObject[i].posCurrent, m_moveObject[i].type); - end.X -= 34; - end.Y -= 34; - ObjectStart(end, 9, 0); - PlaySound(10, end); - m_decorAction = 1; - m_decorPhase = 0; - } - } - if (m_moveObject[i].posStart.X != m_moveObject[i].posEnd.X || m_moveObject[i].posStart.Y != m_moveObject[i].posEnd.Y) - { - if (m_moveObject[i].step == 1) - { - if (m_moveObject[i].time < m_moveObject[i].timeStopStart) - { - m_moveObject[i].time++; - } - else - { - m_moveObject[i].step = 2; - m_moveObject[i].time = 0; - } - } - else if (m_moveObject[i].step == 2) - { - if (m_moveObject[i].posCurrent.X != m_moveObject[i].posEnd.X || m_moveObject[i].posCurrent.Y != m_moveObject[i].posEnd.Y) - { - m_moveObject[i].time++; - if (m_moveObject[i].stepAdvance != 0) - { - m_moveObject[i].posCurrent.X = (m_moveObject[i].posEnd.X - m_moveObject[i].posStart.X) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart.X; - m_moveObject[i].posCurrent.Y = (m_moveObject[i].posEnd.Y - m_moveObject[i].posStart.Y) * m_moveObject[i].time / m_moveObject[i].stepAdvance + m_moveObject[i].posStart.Y; - } - } - else if (m_moveObject[i].type == 15 || m_moveObject[i].type == 23) - { - m_moveObject[i].type = 0; - } - else if (m_moveObject[i].type == 34) - { - m_moveObject[i].posStart = m_moveObject[i].posCurrent; - m_moveObject[i].posEnd = m_moveObject[i].posCurrent; - m_moveObject[i].step = 3; - m_moveObject[i].time = 0; - } - else - { - m_moveObject[i].step = 3; - m_moveObject[i].time = 0; - } - } - else if (m_moveObject[i].step == 3) - { - if (m_moveObject[i].time < m_moveObject[i].timeStopEnd) - { - m_moveObject[i].time++; - } - else - { - m_moveObject[i].step = 4; - m_moveObject[i].time = 0; - } - } - else if (m_moveObject[i].step == 4) - { - if (m_moveObject[i].posCurrent.X != m_moveObject[i].posStart.X || m_moveObject[i].posCurrent.Y != m_moveObject[i].posStart.Y) - { - m_moveObject[i].time++; - if (m_moveObject[i].stepRecede != 0) - { - m_moveObject[i].posCurrent.X = (m_moveObject[i].posStart.X - m_moveObject[i].posEnd.X) * m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd.X; - m_moveObject[i].posCurrent.Y = (m_moveObject[i].posStart.Y - m_moveObject[i].posEnd.Y) * m_moveObject[i].time / m_moveObject[i].stepRecede + m_moveObject[i].posEnd.Y; - } - } - else - { - m_moveObject[i].step = 1; - m_moveObject[i].time = 0; - } - } - } - if (m_moveObject[i].type == 22 && m_moveObject[i].step == 3) - { - m_moveObject[i].type = 0; - } - end = m_moveObject[i].posCurrent; - if (m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48) - { - end.Y -= 64; - } - end.X = (end.X + 32) / 64; - end.Y = (end.Y + 32) / 64; - SetMoveTraj(end); - if (flag) - { - m_blupiVector.X = m_moveObject[i].posCurrent.X - tinyPoint.X; - m_blupiVector.Y = m_moveObject[i].posCurrent.Y - (m_blupiPos.Y + 60 - BLUPIFLOOR); - if (m_moveObject[i].type == 47) - { - m_blupiVector.X += 2; - } - if (m_moveObject[i].type == 48) - { - m_blupiVector.X -= 2; - } - if (m_blupiTimeNoAsc == 0) - { - m_blupiTransport = i; - } - } - } - - private void MoveObjectStepIcon(int i) - { - if (m_moveObject[i].type == 47) - { - m_moveObject[i].icon = Tables.table_chenille[m_moveObject[i].phase / 1 % 6]; - } - if (m_moveObject[i].type == 48) - { - m_moveObject[i].icon = Tables.table_chenillei[m_moveObject[i].phase / 1 % 6]; - } - if (m_moveObject[i].type == 2) - { - m_moveObject[i].icon = 12 + m_moveObject[i].phase / 2 % 9; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 3) - { - m_moveObject[i].icon = 48 + m_moveObject[i].phase / 2 % 9; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 16) - { - m_moveObject[i].icon = 69 + m_moveObject[i].phase / 1 % 9; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 96) - { - m_moveObject[i].icon = Tables.table_follow1[m_moveObject[i].phase / 1 % 26]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 97) - { - m_moveObject[i].icon = Tables.table_follow2[m_moveObject[i].phase / 1 % 5]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 200) - { - m_moveObject[i].icon = 257 + m_moveObject[i].phase / 1 % 6; - m_moveObject[i].channel = 2; - } - if (m_moveObject[i].type == 201) - { - m_moveObject[i].icon = 257 + m_moveObject[i].phase / 1 % 6; - m_moveObject[i].channel = 11; - } - if (m_moveObject[i].type == 202) - { - m_moveObject[i].icon = 257 + m_moveObject[i].phase / 1 % 6; - m_moveObject[i].channel = 12; - } - if (m_moveObject[i].type == 203) - { - m_moveObject[i].icon = 257 + m_moveObject[i].phase / 1 % 6; - m_moveObject[i].channel = 13; - } - if (m_moveObject[i].type == 55) - { - m_moveObject[i].icon = 252; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 56) - { - m_moveObject[i].icon = Tables.table_dynamitef[m_moveObject[i].phase / 1 % 100]; - m_moveObject[i].channel = 10; - if (m_moveObject[i].phase == 50) - { - DynamiteStart(i, 0, 0); - } - if (m_moveObject[i].phase == 53) - { - DynamiteStart(i, -100, 8); - } - if (m_moveObject[i].phase == 55) - { - DynamiteStart(i, 80, 10); - } - if (m_moveObject[i].phase == 56) - { - DynamiteStart(i, -15, -100); - } - if (m_moveObject[i].phase == 59) - { - DynamiteStart(i, 20, 70); - } - if (m_moveObject[i].phase == 62) - { - DynamiteStart(i, 30, -50); - } - if (m_moveObject[i].phase == 64) - { - DynamiteStart(i, -40, 30); - } - if (m_moveObject[i].phase == 67) - { - DynamiteStart(i, -180, 10); - } - if (m_moveObject[i].phase == 69) - { - DynamiteStart(i, 200, -10); - } - if (m_moveObject[i].phase >= 70) - { - m_moveObject[i].type = 0; - } - } - if (m_moveObject[i].type == 5) - { - if (m_moveObject[i].phase / 3 % 22 < 11) - { - m_moveObject[i].icon = m_moveObject[i].phase / 3 % 11; - } - else - { - m_moveObject[i].icon = 11 - m_moveObject[i].phase / 3 % 11; - } - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 6) - { - m_moveObject[i].icon = 21 + m_moveObject[i].phase / 4 % 8; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 7) - { - m_moveObject[i].icon = 29 + m_moveObject[i].phase / 3 % 8; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 21) - { - m_moveObject[i].icon = Tables.table_cle[m_moveObject[i].phase / 3 % 12]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 49) - { - m_moveObject[i].icon = Tables.table_cle1[m_moveObject[i].phase / 3 % 12]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 50) - { - m_moveObject[i].icon = Tables.table_cle2[m_moveObject[i].phase / 3 % 12]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 51) - { - m_moveObject[i].icon = Tables.table_cle3[m_moveObject[i].phase / 3 % 12]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 24) - { - m_moveObject[i].icon = Tables.table_skate[m_moveObject[i].phase / 1 % 34]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 25) - { - m_moveObject[i].icon = Tables.table_shield[m_moveObject[i].phase / 2 % 16]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 26) - { - m_moveObject[i].icon = Tables.table_power[m_moveObject[i].phase / 2 % 8]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 40) - { - m_moveObject[i].icon = Tables.table_invert[m_moveObject[i].phase / 2 % 20]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 31) - { - m_moveObject[i].icon = Tables.table_charge[m_moveObject[i].phase / 2 % 6]; - m_moveObject[i].channel = 1; - } - if (m_moveObject[i].type == 27) - { - m_moveObject[i].icon = Tables.table_magictrack[m_moveObject[i].phase / 1 % 24]; - m_moveObject[i].channel = 10; - if (m_moveObject[i].phase >= 24) - { - m_moveObject[i].type = 0; - } - } - if (m_moveObject[i].type == 57) - { - m_moveObject[i].icon = Tables.table_shieldtrack[m_moveObject[i].phase / 1 % 20]; - m_moveObject[i].channel = 10; - if (m_moveObject[i].phase >= 20) - { - m_moveObject[i].type = 0; - } - } - if (m_moveObject[i].type == 39) - { - m_moveObject[i].icon = Tables.table_tresortrack[m_moveObject[i].phase / 1 % 11]; - m_moveObject[i].channel = 10; - if (m_moveObject[i].phase >= 11) - { - m_moveObject[i].type = 0; - } - } - if (m_moveObject[i].type == 58 && m_moveObject[i].phase >= 20) - { - m_moveObject[i].type = 0; - } - if (m_moveObject[i].type == 8) - { - if (m_moveObject[i].phase >= Tables.table_explo1.Length) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo1[m_moveObject[i].phase]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 9) - { - if (m_moveObject[i].phase >= 20) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo2[m_moveObject[i].phase % 20]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 10) - { - if (m_moveObject[i].phase >= 20) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo3[m_moveObject[i].phase / 1 % 20]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 11) - { - if (m_moveObject[i].phase >= 9) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo4[m_moveObject[i].phase / 1 % 9]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 90) - { - if (m_moveObject[i].phase >= 12) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo5[m_moveObject[i].phase / 1 % 12]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 91) - { - if (m_moveObject[i].phase >= 6) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo6[m_moveObject[i].phase / 1 % 6]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 92) - { - if (m_moveObject[i].phase >= 128) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo7[m_moveObject[i].phase / 1 % 128]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 93) - { - if (m_moveObject[i].phase >= 5) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_explo8[m_moveObject[i].phase / 1 % 5]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 98) - { - if (m_moveObject[i].phase >= 10) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_sploutch1[m_moveObject[i].phase / 1 % 10]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 99) - { - if (m_moveObject[i].phase >= 13) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_sploutch2[m_moveObject[i].phase / 1 % 13]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 100) - { - if (m_moveObject[i].phase >= 18) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_sploutch3[m_moveObject[i].phase / 1 % 18]; - m_moveObject[i].channel = 9; - } - } - if (m_moveObject[i].type == 53) - { - if (m_moveObject[i].phase >= 90) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_tentacule[m_moveObject[i].phase / 2 % 45]; - m_moveObject[i].channel = 9; - } - } - TinyPoint pos = default(TinyPoint); - if (m_moveObject[i].type == 52) - { - if (m_moveObject[i].phase == 0) - { - PlaySound(72, m_moveObject[i].posStart); - } - if (m_moveObject[i].phase == 137) - { - PlaySound(73, m_moveObject[i].posStart); - } - if (m_moveObject[i].phase >= 157) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_bridge[m_moveObject[i].phase / 1 % 157]; - 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; - } - } - if (m_moveObject[i].type == 36) - { - if (m_moveObject[i].phase >= 16) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_pollution[m_moveObject[i].phase / 2 % 8]; - m_moveObject[i].channel = 10; - } - } - if (m_moveObject[i].type == 41) - { - if (m_moveObject[i].phase >= 16) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_invertstart[m_moveObject[i].phase / 2 % 8]; - m_moveObject[i].channel = 10; - } - } - if (m_moveObject[i].type == 42) - { - if (m_moveObject[i].phase >= 16) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_invertstop[m_moveObject[i].phase / 2 % 8]; - m_moveObject[i].channel = 10; - } - } - if (m_moveObject[i].type == 14) - { - if (m_moveObject[i].phase >= 14) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_plouf[m_moveObject[i].phase / 2 % 7]; - m_moveObject[i].channel = 1; - } - } - if (m_moveObject[i].type == 35) - { - if (m_moveObject[i].phase >= 6) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_tiplouf[m_moveObject[i].phase / 2 % 7]; - m_moveObject[i].channel = 1; - } - } - if (m_moveObject[i].type == 15) - { - m_moveObject[i].icon = Tables.table_blup[m_moveObject[i].phase / 2 % 20]; - m_moveObject[i].channel = 1; - } - if (m_moveObject[i].type == 4) - { - if (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_bulldozer_turn2l[m_moveObject[i].time % 22]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_bulldozer_turn2r[m_moveObject[i].time % 22]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_bulldozer_left[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_bulldozer_right[m_moveObject[i].time % 8]; - } - } - else - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_bulldozer_turn2r[m_moveObject[i].time % 22]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_bulldozer_turn2l[m_moveObject[i].time % 22]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_bulldozer_right[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_bulldozer_left[m_moveObject[i].time % 8]; - } - } - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 17) - { - if (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_poisson_turn2l[m_moveObject[i].time % 48]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_poisson_turn2r[m_moveObject[i].time % 48]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_poisson_left[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_poisson_right[m_moveObject[i].time % 8]; - } - } - else - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_poisson_turn2r[m_moveObject[i].time % 48]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_poisson_turn2l[m_moveObject[i].time % 48]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_poisson_right[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_poisson_left[m_moveObject[i].time % 8]; - } - } - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 20) - { - if (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_oiseau_turn2l[m_moveObject[i].time % 10]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_oiseau_turn2r[m_moveObject[i].time % 10]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_oiseau_left[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_oiseau_right[m_moveObject[i].time % 8]; - } - } - else - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_oiseau_turn2r[m_moveObject[i].time % 10]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_oiseau_turn2l[m_moveObject[i].time % 10]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_oiseau_right[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_oiseau_left[m_moveObject[i].time % 8]; - } - } - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 44) - { - if (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_guepe_turn2l[m_moveObject[i].time % 5]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_guepe_turn2r[m_moveObject[i].time % 5]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_guepe_left[m_moveObject[i].time % 6]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_guepe_right[m_moveObject[i].time % 6]; - } - } - else - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_guepe_turn2r[m_moveObject[i].time % 5]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_guepe_turn2l[m_moveObject[i].time % 5]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_guepe_right[m_moveObject[i].time % 6]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_guepe_left[m_moveObject[i].time % 6]; - } - } - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 54) - { - if (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_creature_turn2[m_moveObject[i].time % 152]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_creature_turn2[m_moveObject[i].time % 152]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_creature_left[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_creature_right[m_moveObject[i].time % 8]; - } - } - else - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_creature_turn2[m_moveObject[i].time % 152]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_creature_turn2[m_moveObject[i].time % 152]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_creature_right[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_creature_left[m_moveObject[i].time % 8]; - } - } - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 32) - { - if (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_blupih_turn2l[m_moveObject[i].time % 26]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_blupih_turn2r[m_moveObject[i].time % 26]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_blupih_left[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_blupih_right[m_moveObject[i].time % 8]; - } - } - else - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_blupih_turn2r[m_moveObject[i].time % 26]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_blupih_turn2l[m_moveObject[i].time % 26]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_blupih_right[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_blupih_left[m_moveObject[i].time % 8]; - } - } - if ((m_moveObject[i].step == 1 || m_moveObject[i].step == 3) && m_moveObject[i].time == 21) - { - pos.X = m_moveObject[i].posCurrent.X; - pos.Y = m_moveObject[i].posCurrent.Y + 40; - if (ObjectStart(pos, 23, 55) != -1) - { - PlaySound(52, pos); - } - } - } - if (m_moveObject[i].type == 33) - { - if (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_blupit_turn2l[m_moveObject[i].time % 24]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_blupit_turn2r[m_moveObject[i].time % 24]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_blupit_left[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_blupit_right[m_moveObject[i].time % 8]; - } - } - else - { - if (m_moveObject[i].step == 1) - { - m_moveObject[i].icon = Tables.table_blupit_turn2r[m_moveObject[i].time % 24]; - } - if (m_moveObject[i].step == 3) - { - m_moveObject[i].icon = Tables.table_blupit_turn2l[m_moveObject[i].time % 24]; - } - if (m_moveObject[i].step == 2) - { - m_moveObject[i].icon = Tables.table_blupit_right[m_moveObject[i].time % 8]; - } - if (m_moveObject[i].step == 4) - { - m_moveObject[i].icon = Tables.table_blupit_left[m_moveObject[i].time % 8]; - } - } - if ((m_moveObject[i].step == 1 || m_moveObject[i].step == 3) && m_moveObject[i].time == 3) - { - int speed; - if ((m_moveObject[i].posStart.X < m_moveObject[i].posEnd.X && m_moveObject[i].step == 1) || (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X && m_moveObject[i].step == 3)) - { - pos.X = m_moveObject[i].posCurrent.X - 30; - pos.Y = m_moveObject[i].posCurrent.Y + BLUPIOFFY; - speed = -5; - } - else - { - pos.X = m_moveObject[i].posCurrent.X + 30; - pos.Y = m_moveObject[i].posCurrent.Y + BLUPIOFFY; - speed = 5; - } - if (ObjectStart(pos, 23, speed) != -1) - { - PlaySound(52, pos); - } - } - if ((m_moveObject[i].step == 1 || m_moveObject[i].step == 3) && m_moveObject[i].time == 21) - { - int speed; - if ((m_moveObject[i].posStart.X < m_moveObject[i].posEnd.X && m_moveObject[i].step == 1) || (m_moveObject[i].posStart.X > m_moveObject[i].posEnd.X && m_moveObject[i].step == 3)) - { - pos.X = m_moveObject[i].posCurrent.X + 30; - pos.Y = m_moveObject[i].posCurrent.Y + BLUPIOFFY; - speed = 5; - } - else - { - pos.X = m_moveObject[i].posCurrent.X - 30; - pos.Y = m_moveObject[i].posCurrent.Y + BLUPIOFFY; - speed = -5; - } - if (ObjectStart(pos, 23, speed) != -1) - { - PlaySound(52, pos); - } - } - } - if (m_moveObject[i].type == 34) - { - m_moveObject[i].icon = Tables.table_glu[m_moveObject[i].phase / 1 % 25]; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 37) - { - if (m_moveObject[i].phase >= 70) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_clear[m_moveObject[i].phase / 1 % 70]; - m_moveObject[i].channel = 10; - } - } - if (m_moveObject[i].type == 38) - { - if (m_moveObject[i].phase >= 90) - { - m_moveObject[i].type = 0; - } - else - { - m_moveObject[i].icon = Tables.table_electro[m_moveObject[i].phase / 1 % 90]; - if (m_moveObject[i].phase < 30) - { - m_moveObject[i].channel = 12; - } - else - { - m_moveObject[i].channel = 10; - } - } - } - if (m_moveObject[i].type == 13) - { - m_moveObject[i].icon = 68; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 46) - { - m_moveObject[i].icon = 208; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 19) - { - m_moveObject[i].icon = 89; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 28) - { - m_moveObject[i].icon = 167; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 23) - { - m_moveObject[i].icon = 176; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 29) - { - m_moveObject[i].icon = 177; - m_moveObject[i].channel = 10; - } - if (m_moveObject[i].type == 30) - { - m_moveObject[i].icon = 178; - m_moveObject[i].channel = 10; - } - m_moveObject[i].phase++; - if (m_moveObject[i].phase > 32700) - { - m_moveObject[i].phase = 0; - } - } - - private void DynamiteStart(int i, int dx, int dy) - { - TinyPoint posStart = m_moveObject[i].posStart; - posStart.X -= 34; - posStart.Y -= 34; - posStart.X += dx; - posStart.Y -= dy; - ObjectStart(posStart, 8, 0); - if (dx == 0 && dy == 0) - { - PlaySound(10, posStart); - m_decorAction = 1; - m_decorPhase = 0; - } - TinyRect src = default(TinyRect); - src.Left = posStart.X; - src.Right = posStart.X + 128; - src.Top = posStart.Y; - src.Bottom = posStart.Y + 128; - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.Y = posStart.Y / 64; - TinyPoint pos = default(TinyPoint); - for (int j = 0; j < 2; j++) - { - tinyPoint.X = posStart.X / 64; - for (int k = 0; k < 2; k++) - { - if (tinyPoint.X >= 0 && tinyPoint.X < 100 && tinyPoint.Y >= 0 && tinyPoint.Y < 100) - { - int icon = m_decor[tinyPoint.X, tinyPoint.Y].icon; - if (icon == 378 || icon == 379 || icon == 404 || icon == 410) - { - pos.X = tinyPoint.X * 64; - pos.Y = tinyPoint.Y * 64; - ModifDecor(pos, -1); - } - } - tinyPoint.X++; - } - tinyPoint.Y++; - } - TinyRect src2 = default(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) - { - src2.Left = m_moveObject[i].posCurrent.X; - 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)) - { - if (m_moveObject[i].type == 12) - { - SearchLinkCaisse(i, true); - for (int l = 0; l < m_nbLinkCaisse; l++) - { - int channel = m_moveObject[m_linkCaisse[l]].channel; - int icon2 = m_moveObject[m_linkCaisse[l]].icon; - TinyPoint posCurrent = m_moveObject[m_linkCaisse[l]].posCurrent; - double num = m_random.Next(7, 23); - if (m_random.Next(0, 100) % 2 == 0) - { - num = 0.0 - num; - } - ByeByeAdd(channel, icon2, posCurrent, num, 1.0); - m_moveObject[m_linkCaisse[l]].type = 0; - } - ObjectDelete(m_moveObject[i].posCurrent, m_moveObject[i].type); - UpdateCaisse(); - } - else - { - ObjectDelete(m_moveObject[i].posCurrent, m_moveObject[i].type); - } - } - } - } - if (m_blupiFocus && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiPos.X > posStart.X - 30 && m_blupiPos.X < posStart.X + 30 + 64 && m_blupiPos.Y > posStart.Y - 30 && m_blupiPos.Y < posStart.Y + 30 + 64) - { - BlupiDead(11, -1); - m_blupiAir = true; - } - } - - private int AscenseurDetect(TinyRect rect, TinyPoint oldpos, TinyPoint newpos) - { - if (m_blupiTimeNoAsc != 0) - { - return -1; - } - int num = newpos.Y - oldpos.Y; - int num2 = ((num >= 0) ? 30 : (-30)); - num = Math.Abs(num); - TinyRect src = default(TinyRect); - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type != 1 && m_moveObject[i].type != 47 && m_moveObject[i].type != 48) - { - continue; - } - src.Left = m_moveObject[i].posCurrent.X; - 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; - if (num < 30) - { - if (Misc.IntersectRect(out dst, src, rect)) - { - return i; - } - continue; - } - TinyRect src2 = rect; - src2.Top -= num / 30 * num2; - src2.Bottom -= num / 30 * num2; - for (int j = 0; j <= num / 30; j++) - { - if (Misc.IntersectRect(out dst, src, src2)) - { - return i; - } - src2.Top += num2; - src2.Bottom += num2; - } - } - 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; - } - } - } - - private bool AscenseurShift(int i) - { - if (i == -1) - { - return false; - } - if (m_moveObject[i].icon >= 311) - { - return m_moveObject[i].icon <= 316; - } - return false; - } - - private void AscenseurSynchro(int i) - { - for (i = 0; i < MAXMOVEOBJECT; i++) - { - m_moveObject[i].posCurrent = m_moveObject[i].posStart; - m_moveObject[i].step = 1; - m_moveObject[i].time = 0; - m_moveObject[i].phase = 0; - } - } - - private void UpdateCaisse() - { - m_nbRankCaisse = 0; - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 12) - { - m_rankCaisse[m_nbRankCaisse++] = i; - } - } - } - - private bool TestPushCaisse(int i, TinyPoint pos, bool bPop) - { - TinyPoint move = default(TinyPoint); - move.X = pos.X - m_moveObject[i].posCurrent.X; - move.Y = 0; - SearchLinkCaisse(i, bPop); - int y = m_moveObject[i].posCurrent.Y; - for (int j = 0; j < m_nbLinkCaisse; j++) - { - i = m_linkCaisse[j]; - if (!TestPushOneCaisse(i, move, y)) - { - return false; - } - } - for (int j = 0; j < m_nbLinkCaisse; j++) - { - i = m_linkCaisse[j]; - m_moveObject[i].posCurrent.X += move.X; - m_moveObject[i].posStart.X += move.X; - m_moveObject[i].posEnd.X += move.X; - } - return true; - } - - private bool TestPushOneCaisse(int i, TinyPoint move, int b) - { - TinyRect rect = default(TinyRect); - int num = (rect.Left = m_moveObject[i].posCurrent.X + move.X); - rect.Right = num + 64; - rect.Top = m_moveObject[i].posCurrent.Y; - rect.Bottom = m_moveObject[i].posCurrent.Y + 64; - if (DecorDetect(rect, false)) - { - return false; - } - if (m_moveObject[i].posCurrent.Y != b) - { - return true; - } - rect.Left = num; - rect.Right = num + 20; - rect.Top = m_moveObject[i].posCurrent.Y + 64; - rect.Bottom = m_moveObject[i].posCurrent.Y + 64 + 2; - if (!DecorDetect(rect)) - { - return false; - } - rect.Left = num + 64 - 20; - rect.Right = num + 64; - rect.Top = m_moveObject[i].posCurrent.Y + 64; - rect.Bottom = m_moveObject[i].posCurrent.Y + 64 + 2; - if (!DecorDetect(rect)) - { - return false; - } - return true; - } - - private void SearchLinkCaisse(int rank, bool bPop) - { - m_nbLinkCaisse = 0; - AddLinkCaisse(rank); - TinyPoint posCurrent = m_moveObject[rank].posCurrent; - bool flag; - TinyRect src = default(TinyRect); - TinyRect src2 = default(TinyRect); - do - { - flag = false; - for (int i = 0; i < m_nbLinkCaisse; i++) - { - int num = m_linkCaisse[i]; - if (m_moveObject[num].posCurrent.Y > posCurrent.Y || (bPop && (m_moveObject[num].posCurrent.X < posCurrent.X - 32 || m_moveObject[num].posCurrent.X > posCurrent.X + 32))) - { - continue; - } - src.Left = m_moveObject[num].posCurrent.X - 1; - src.Top = m_moveObject[num].posCurrent.Y - 1; - src.Right = src.Left + 64 + 1; - src.Bottom = src.Top + 64 + 1; - for (int j = 0; j < m_nbRankCaisse; j++) - { - int num2 = m_rankCaisse[j]; - if (num2 != num && m_moveObject[num2].posCurrent.Y <= posCurrent.Y && (!bPop || (m_moveObject[num2].posCurrent.X >= posCurrent.X - 32 && m_moveObject[num2].posCurrent.X <= posCurrent.X + 32))) - { - src2.Left = m_moveObject[num2].posCurrent.X - 1; - 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)) - { - flag = true; - } - } - } - } - } - while (flag); - } - - private bool AddLinkCaisse(int rank) - { - for (int i = 0; i < m_nbLinkCaisse; i++) - { - if (m_linkCaisse[i] == rank) - { - return false; - } - } - m_linkCaisse[m_nbLinkCaisse] = rank; - m_nbLinkCaisse++; - return true; - } - - private int CaisseInFront() - { - TinyPoint tinyPoint = default(TinyPoint); - if (m_blupiDir == 1) - { - tinyPoint.X = m_blupiPos.X + 16 - 32; - tinyPoint.Y = m_blupiPos.Y; - } - else - { - tinyPoint.X = m_blupiPos.X + 60 - 16 + 32; - tinyPoint.Y = m_blupiPos.Y; - } - for (int i = 0; i < m_nbRankCaisse; i++) - { - int num = m_rankCaisse[i]; - if (tinyPoint.X > m_moveObject[num].posCurrent.X && tinyPoint.X < m_moveObject[num].posCurrent.X + 64 && tinyPoint.Y > m_moveObject[num].posCurrent.Y && tinyPoint.Y < m_moveObject[num].posCurrent.Y + 64) - { - return num; - } - } - return -1; - } - - private int CaisseGetMove(int max) - { - max -= (m_nbLinkCaisse - 1) / 2; - if (max < 1) - { - max = 1; - } - if (m_blupiPower) - { - max *= 2; - } - if (m_blupiPhase < 20) - { - max = max * m_blupiPhase / 20; - if (max == 0) - { - max++; - } - } - return max; - } - - private int MockeryDetect(TinyPoint pos) - { - if (m_blupiTimeMockery > 0) - { - return 0; - } - if (m_blupiAir) - { - TinyPoint tinyPoint = default(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; - if (icon == 68 || icon == 317) - { - return 64; - } - } - 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; - if (icon == 68 || icon == 317) - { - return 64; - } - } - } - TinyRect src = default(TinyRect); - src.Left = pos.X; - src.Right = pos.X + 60; - src.Top = pos.Y + 11; - src.Bottom = pos.Y + 60; - if (m_blupiAir) - { - src.Bottom += 90; - } - TinyRect src2 = default(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) - { - continue; - } - src2.Left = m_moveObject[i].posCurrent.X; - 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)) - { - continue; - } - if (m_moveObject[i].type == 54) - { - return 83; - } - if (m_blupiDir == 2) - { - if (pos.X < src2.Left) - { - if (m_moveObject[i].type == 2) - { - return 0; - } - return 63; - } - return 64; - } - if (pos.X < src2.Left) - { - return 64; - } - if (m_moveObject[i].type == 2) - { - return 0; - } - return 63; - } - return 0; - } - - private bool BlupiElectro(TinyPoint pos) - { - if (!m_blupiCloud) - { - return false; - } - TinyRect src = default(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); - 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; - } - - private void MoveObjectFollow(TinyPoint pos) - { - if (m_blupiHide) - { - return; - } - TinyRect src = BlupiRect(pos); - src.Left = pos.X + 16; - src.Right = pos.X + 60 - 16; - TinyRect src2 = default(TinyRect); - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 96) - { - src2.Left = m_moveObject[i].posCurrent.X - 100; - 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)) - { - m_moveObject[i].type = 97; - PlaySound(92, m_moveObject[i].posCurrent); - } - } - } - } - - private int MoveObjectDetect(TinyPoint pos, out bool bNear) - { - TinyRect src = BlupiRect(pos); - src.Left = pos.X + 16; - src.Right = pos.X + 60 - 16; - TinyRect src2 = default(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); - 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)) - { - continue; - } - src3.Left = m_moveObject[i].posCurrent.X + 16; - src3.Right = m_moveObject[i].posCurrent.X + 60 - 16; - src3.Top = m_moveObject[i].posCurrent.Y + 36; - src3.Bottom = m_moveObject[i].posCurrent.Y + 60; - if (m_moveObject[i].type == 3) - { - if (m_blupiAction == 6) - { - continue; - } - src3.Top = m_moveObject[i].posCurrent.Y; - src3.Bottom = m_moveObject[i].posCurrent.Y + 60 - 36; - } - if (m_moveObject[i].type == 12) - { - src3.Left = m_moveObject[i].posCurrent.X - 16; - src3.Right = m_moveObject[i].posCurrent.X + 64 + 16; - src3.Top = m_moveObject[i].posCurrent.Y; - src3.Bottom = m_moveObject[i].posCurrent.Y + 64; - if (m_blupiDir == 1) - { - src3.Left += 20; - } - else - { - src3.Right -= 20; - } - } - if (m_moveObject[i].type == 17 || m_moveObject[i].type == 20 || m_moveObject[i].type == 44 || m_moveObject[i].type == 54) - { - src3.Top = m_moveObject[i].posCurrent.Y + 16; - src3.Bottom = m_moveObject[i].posCurrent.Y + 60 - 16; - } - if (m_moveObject[i].type == 23) - { - src3.Left = m_moveObject[i].posCurrent.X + 24; - src3.Right = m_moveObject[i].posCurrent.X + 64 - 24; - 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)) - { - bNear = true; - return i; - } - if (m_moveObject[i].type == 2 && Misc.IntersectRect(out dst, src3, src2)) - { - bNear = false; - return i; - } - } - bNear = false; - return -1; - } - - private int MoveAscenseurDetect(TinyPoint pos, int height) - { - if (m_blupiTimeNoAsc != 0) - { - return -1; - } - TinyRect src = default(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); - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 1 || m_moveObject[i].type == 47 || m_moveObject[i].type == 48) - { - src2.Left = m_moveObject[i].posCurrent.X; - 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)) - { - return i; - } - } - } - return -1; - } - - private int MoveChargeDetect(TinyPoint pos) - { - TinyRect src = default(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); - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 31) - { - src2.Left = m_moveObject[i].posCurrent.X - 10; - 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)) - { - return i; - } - } - } - return -1; - } - - private int MovePersoDetect(TinyPoint pos) - { - TinyRect src = default(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); - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type >= 200 && m_moveObject[i].type <= 203) - { - src2.Left = m_moveObject[i].posCurrent.X + 16; - 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)) - { - return i; - } - } - } - return -1; - } - - private int MoveObjectDelete(TinyPoint cel) - { - int result = -1; - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type != 0) - { - if (cel.X == m_moveObject[i].posStart.X / 64 && cel.Y == m_moveObject[i].posStart.Y / 64) - { - result = m_moveObject[i].type; - m_moveObject[i].type = 0; - } - else if (cel.X == m_moveObject[i].posEnd.X / 64 && cel.Y == m_moveObject[i].posEnd.Y / 64) - { - result = m_moveObject[i].type; - m_moveObject[i].type = 0; - } - } - } - return result; - } - - private int MoveObjectFree() - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 0) - { - m_moveObject[i].type = 0; - return i; - } - } - return -1; - } - - private int SortGetType(int type) - { - switch (type) - { - case 2: - case 3: - case 96: - case 97: - return 1; - case 12: - return 2; - default: - return 3; - } - } - - private void MoveObjectSort() - { - MoveObject dst = default(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]); - } - } - for (int i = num; i < MAXMOVEOBJECT; i++) - { - m_moveObject[i].type = 0; - } - if (num <= 1) - { - return; - } - bool flag; - do - { - flag = false; - for (int i = 0; i < num - 1; i++) - { - 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); - flag = true; - } - } - } - while (flag); - UpdateCaisse(); - m_nbLinkCaisse = 0; - } - - private void MoveObjectPriority(int i) - { - MoveObject dst = default(MoveObject); - if (i == 0 || m_moveObject[i].type != 23) - { - return; - } - for (int j = 0; j < MAXMOVEOBJECT; j++) - { - if (m_moveObject[j].type == 23) - { - continue; - } - if (j <= i) - { - MoveObjectCopy(ref dst, m_moveObject[i]); - MoveObjectCopy(ref m_moveObject[i], m_moveObject[j]); - MoveObjectCopy(ref m_moveObject[j], dst); - if (m_moveObject[i].type == 12 || m_moveObject[j].type == 12) - { - UpdateCaisse(); - } - } - break; - } - } - - private int MoveObjectSearch(TinyPoint pos) - { - return MoveObjectSearch(pos, -1); - } - - private int MoveObjectSearch(TinyPoint pos, int type) - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 0 || (type != -1 && m_moveObject[i].type != type)) - { - continue; - } - if (m_moveObject[i].type == 23 && m_moveObject[i].posStart.X != m_moveObject[i].posEnd.X) - { - if (m_moveObject[i].posCurrent.X >= pos.X - 100 && m_moveObject[i].posCurrent.X <= pos.X + 100 && m_moveObject[i].posCurrent.Y == pos.Y) - { - return i; - } - } - else if (m_moveObject[i].type == 23 && m_moveObject[i].posStart.Y != m_moveObject[i].posEnd.Y) - { - if (m_moveObject[i].posCurrent.Y >= pos.Y - 100 && m_moveObject[i].posCurrent.Y <= pos.Y + 100 && m_moveObject[i].posCurrent.X == pos.X) - { - return i; - } - } - else if (m_moveObject[i].posCurrent.X == pos.X && m_moveObject[i].posCurrent.Y == pos.Y) - { - return i; - } - } - return -1; - } - - private void ByeByeHelico() - { - if (m_blupiHelico) - { - ByeByeAdd(10, 68, m_blupiPos, 7.0, 0.5); - } - } - - private void ByeByeAdd(int channel, int icon, TinyPoint pos, double rotationSpeed, double animationSpeed) - { - ByeByeObject byeByeObject = new ByeByeObject(); - byeByeObject.channel = channel; - byeByeObject.icon = icon; - byeByeObject.posX = pos.X; - byeByeObject.posY = pos.Y; - byeByeObject.rotation = 0.0; - byeByeObject.phase = 0.0; - byeByeObject.rotationSpeed = rotationSpeed; - byeByeObject.animationSpeed = animationSpeed; - ByeByeObject byeByeObject2 = byeByeObject; - int num = m_random.Next(0, 10); - if (m_random.Next(0, 1000) % 2 == 0) - { - byeByeObject2.speedX = num + 10; - } - else - { - byeByeObject2.speedX = -(num + 10); - } - byeByeObjects.Add(byeByeObject2); - } - - private void ByeByeStep() - { - int num = 0; - while (num < byeByeObjects.Count) - { - ByeByeObject byeByeObject = byeByeObjects[num]; - double num2 = 10.0 - byeByeObject.phase; - if (num2 > 0.0) - { - 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.posX += byeByeObject.speedX * byeByeObject.animationSpeed; - if (byeByeObject.speedX > 0.0) - { - byeByeObject.speedX -= byeByeObject.animationSpeed; - } - if (byeByeObject.speedX < 0.0) - { - byeByeObject.speedX += byeByeObject.animationSpeed; - } - byeByeObject.rotation += byeByeObject.rotationSpeed; - byeByeObject.phase += byeByeObject.animationSpeed; - if (byeByeObject.channel == 10 && byeByeObject.icon >= 187 && byeByeObject.icon <= 194) - { - byeByeObject.icon = Tables.table_invert[(int)byeByeObject.phase / 2 % 20]; - } - if (byeByeObject.phase > 30.0) - { - byeByeObjects.RemoveAt(num); - } - else - { - num++; - } - } - } - - private void ByeByeDraw(TinyPoint posDecor) - { - foreach (ByeByeObject byeByeObject in byeByeObjects) - { - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = m_drawBounds.Left + (int)byeByeObject.posX - posDecor.X; - tinyPoint.Y = m_drawBounds.Top + (int)byeByeObject.posY - posDecor.Y; - TinyPoint pos = tinyPoint; - m_pixmap.QuickIcon(byeByeObject.channel, byeByeObject.icon, pos, 1.0, byeByeObject.rotation); - } - } - - private TinyPoint VoyageGetPosVie(int nbVies) - { - TinyPoint result = default(TinyPoint); - result.X = 210 + 16 * nbVies; - result.Y = 417; - return result; - } - - private void VoyageInit(TinyPoint start, TinyPoint end, int icon, int channel) - { - if (m_voyageIcon != -1) - { - m_voyagePhase = m_voyageTotal; - VoyageStep(); - } - m_voyageStart = start; - 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); - m_voyagePhase = 0; - m_voyageTotal = (num + num2) / 10; - if (m_voyageIcon == 48 && m_voyageChannel == 2) - { - m_voyageTotal = 40; - m_nbVies--; - m_sound.PlayImage(9, end, -1, false); - } - if (m_voyageIcon == 21 && m_voyageChannel == 10) - { - m_sound.PlayImage(12, start, -1, false); - } - if (m_voyageIcon == 6 && m_voyageChannel == 10) - { - if (m_nbTresor == m_totalTresor - 1) - { - m_sound.PlayImage(19, start, -1, false); - } - else - { - m_sound.PlayImage(11, start, -1, false); - } - } - if (m_voyageIcon == 215 && m_voyageChannel == 10) - { - m_sound.PlayImage(11, start, -1, false); - } - if (m_voyageIcon == 222 && m_voyageChannel == 10) - { - m_sound.PlayImage(11, start, -1, false); - } - if (m_voyageIcon == 229 && m_voyageChannel == 10) - { - m_sound.PlayImage(11, start, -1, false); - } - if (m_voyageIcon == 108 && m_voyageChannel == 4) - { - m_sound.PlayImage(60, start, -1, false); - } - if (m_voyageIcon == 252 && m_voyageChannel == 10) - { - m_sound.PlayImage(60, start, -1, false); - } - if (m_voyageIcon == 177 && m_voyageChannel == 10) - { - m_sound.PlayImage(54, start, -1, false); - } - if (m_voyageIcon == 230 && m_voyageChannel == 10) - { - m_voyageTotal = 100; - } - if (m_voyageIcon == 40 && m_voyageChannel == 10) - { - m_voyageTotal = 50; - } - } - - private void VoyageStep() - { - if (m_voyageIcon == -1) - { - return; - } - if (m_voyagePhase < m_voyageTotal) - { - if (m_time % 2 == 0 && m_voyageIcon >= 230 && m_voyageIcon <= 241 && m_voyageChannel == 10) - { - m_voyageIcon++; - if (m_voyageIcon > 241) - { - m_voyageIcon = 230; - } - } - } - else - { - if (m_voyageIcon == 48 && m_voyageChannel == 2) - { - m_blupiAction = 1; - m_blupiPhase = 0; - m_blupiFocus = true; - } - if (m_voyageIcon == 21 && m_voyageChannel == 10) - { - if (m_nbVies < 10) - { - m_nbVies++; - } - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - if (m_voyageIcon == 6 && m_voyageChannel == 10) - { - m_nbTresor++; - OpenDoorsTresor(); - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - if (m_voyageIcon == 215 && m_voyageChannel == 10) - { - m_blupiCle |= 1; - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - if (m_voyageIcon == 222 && m_voyageChannel == 10) - { - m_blupiCle |= 2; - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - if (m_voyageIcon == 229 && m_voyageChannel == 10) - { - m_blupiCle |= 4; - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - if (m_voyageIcon == 108 && m_voyageChannel == 4) - { - m_blupiPerso++; - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - if (m_voyageIcon == 252 && m_voyageChannel == 10) - { - m_blupiDynamite++; - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - if (m_voyageIcon == 177 && m_voyageChannel == 10) - { - m_sound.PlayImage(3, m_voyageEnd, -1, false); - } - m_voyageIcon = -1; - } - m_voyagePhase++; - } - - private void VoyageDraw() - { - if (m_voyageIcon == -1 || m_voyageTotal == 0) - { - return; - } - int num = m_voyagePhase; - if (m_voyageIcon == 40 && m_voyageChannel == 10) - { - num -= 30; - if (num < 0) - { - num = 0; - } - } - TinyPoint pos = default(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) - { - m_pixmap.HudIcon(m_voyageChannel, m_voyageIcon, pos); - } - if (m_voyageIcon == 40 && m_voyageChannel == 10) - { - int[] array = new int[7] { -8, -6, -4, 0, 4, 6, 8 }; - pos.X -= 34; - pos.X += m_posDecor.X; - pos.Y += m_posDecor.Y; - int num2 = array[m_random.Next(0, 6)]; - int num3 = m_random.Next(-10, 10); - if (num == 0) - { - num2 /= 2; - num3 *= 4; - } - pos.Y += num3; - ObjectStart(pos, 93, num2); - } - } - - private bool 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; - return IsPassIcon(icon); - } - - private bool 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); - if (x < 0 || x >= num || y < 0 || y >= num2) - { - return true; - } - int icon = m_decor[x + dx, y + dy].icon; - if (icon < 386 || icon > 397) - { - switch (icon) - { - case 245: - case 400: - break; - case 250: - case 251: - case 252: - case 253: - case 254: - case 255: - case 256: - case 257: - case 258: - case 259: - case 260: - icon = m_decor[x, y].icon; - if (icon >= 250) - { - return icon <= 260; - } - return false; - default: - icon = m_decor[x, y].icon; - switch (icon) - { - case -1: - return false; - case 32: - case 33: - case 34: - return false; - case 68: - case 92: - if (dy == -1) - { - return false; - } - return true; - case 317: - if (dy == 1) - { - return false; - } - return true; - case 19: - case 21: - case 25: - case 26: - case 28: - if (dy == 1) - { - return false; - } - return true; - case 27: - if (dx != 0) - { - return false; - } - return true; - case 45: - case 46: - case 47: - if (dy == 1) - { - return false; - } - return true; - default: - switch (icon) - { - case 15: - case 16: - case 75: - case 89: - case 90: - case 155: - if (dx == -1 || dy == 1) - { - return false; - } - return true; - case 17: - case 18: - case 74: - case 87: - case 88: - case 154: - if (dx == 1 || dy == 1) - { - return false; - } - return true; - case 76: - case 77: - case 199: - case 200: - if (dx != 0) - { - return false; - } - return true; - case 110: - case 111: - case 112: - case 113: - case 114: - case 115: - case 116: - case 117: - case 118: - case 119: - case 120: - case 121: - case 122: - case 123: - case 124: - case 125: - return false; - default: - switch (icon) - { - case 126: - if (dx == 1) - { - return true; - } - return false; - case 129: - if (dx == -1) - { - return true; - } - return false; - case 132: - if (dy == 1) - { - return true; - } - return false; - case 135: - if (dy == -1) - { - return true; - } - return false; - case 139: - case 140: - case 141: - case 142: - case 143: - return false; - default: - switch (icon) - { - case 138: - if (dy == -1) - { - return true; - } - return false; - case 202: - return false; - case 107: - case 108: - case 109: - case 157: - if (dx != 0) - { - return true; - } - return false; - default: - switch (icon) - { - case 309: - case 310: - case 410: - case 411: - case 412: - case 413: - case 414: - case 415: - case 416: - case 417: - case 418: - case 419: - case 420: - break; - default: - switch (icon) - { - case 182: - case 183: - if (dy != 0) - { - return true; - } - return false; - case 334: - case 335: - case 336: - if (dy != 0) - { - return true; - } - return false; - default: - if (icon >= 250 && icon <= 260) - { - return false; - } - if (icon >= 264 && icon <= 282) - { - return false; - } - switch (icon) - { - case 378: - return false; - case 404: - case 410: - return false; - case 421: - case 422: - case 423: - case 424: - case 425: - case 426: - case 427: - case 428: - case 429: - case 430: - case 431: - case 432: - case 433: - case 434: - case 435: - case 436: - case 437: - case 438: - case 439: - case 440: - if (dy != 0) - { - return true; - } - return false; - default: - return true; - } - } - } - break; - case 158: - case 159: - case 160: - case 161: - case 162: - case 163: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 172: - case 173: - case 174: - case 175: - case 176: - case 177: - case 178: - case 179: - case 180: - case 181: - break; - } - if (dy == 1) - { - return true; - } - return false; - } - } - } - } - } - icon = m_decor[x, y].icon; - if ((icon < 386 || icon > 397) && icon != 400) - { - return icon == 245; - } - return true; - } - - private bool IsFromage(int x, int y) - { - if (x < 0 || x >= 100 || y < 0 || y >= 100) - { - return false; - } - int icon = m_decor[x, y].icon; - if (icon >= 246 && icon <= 249) - { - return true; - } - if (icon == 339) - { - return true; - } - return false; - } - - private bool IsGrotte(int x, int y) - { - if (x < 0 || x >= 100 || y < 0 || y >= 100) - { - return false; - } - switch (m_decor[x, y].icon) - { - case 284: - case 301: - return true; - case 337: - return true; - default: - return false; - } - } - - private void AdaptMidBorder(int x, int y) - { - if (x < 0 || x >= 100 || y < 0 || y >= 100) - { - return; - } - int num = 15; - if (!IsRightBorder(x, y + 1, 0, -1)) - { - num &= -2; - } - if (!IsRightBorder(x, y - 1, 0, 1)) - { - num &= -3; - } - if (!IsRightBorder(x + 1, y, -1, 0)) - { - num &= -5; - } - if (!IsRightBorder(x - 1, y, 1, 0)) - { - num &= -9; - } - int num2 = m_decor[x, y].icon; - if (num2 == 156) - { - num2 = 35; - } - if (num2 == 252 || num2 == 253) - { - num2 = 251; - } - if (num2 == 255) - { - num2 = 254; - } - if (num2 == 362) - { - num2 = 347; - } - if (num2 == 363) - { - num2 = 348; - } - if (num2 >= 341 && num2 <= 346) - { - num2 = 341; - } - for (int i = 0; i < 144; i++) - { - if (num2 == Tables.table_adapt_decor[i]) - { - num2 = Tables.table_adapt_decor[i / 16 * 16 + num]; - if (num2 == 35 && m_random.Next() % 2 == 0) - { - num2 = 156; - } - if (num2 == 251) - { - num2 = m_random.Next(251, 253); - } - if (num2 == 254 && m_random.Next() % 2 == 0) - { - num2 = 255; - } - if (num2 == 347 && m_random.Next() % 2 == 0) - { - num2 = 362; - } - if (num2 == 348 && m_random.Next() % 2 == 0) - { - num2 = 363; - } - if (num2 == 341) - { - num2 = m_random.Next(341, 346); - } - m_decor[x, y].icon = num2; - return; - } - } - switch (m_decor[x, y].icon) - { - case -1: - case 264: - case 265: - case 266: - case 267: - case 268: - case 269: - case 270: - case 271: - case 272: - case 273: - case 274: - case 275: - case 276: - case 277: - case 278: - case 279: - case 280: - case 281: - case 282: - num = 15; - if (!IsFromage(x, y + 1)) - { - num &= -2; - } - if (!IsFromage(x, y - 1)) - { - num &= -3; - } - if (!IsFromage(x + 1, y)) - { - num &= -5; - } - if (!IsFromage(x - 1, y)) - { - num &= -9; - } - num2 = Tables.table_adapt_fromage[num]; - if (num2 == 268 && m_random.Next() % 2 == 0) - { - num2 = 279; - } - if (num2 == 269 && m_random.Next() % 2 == 0) - { - num2 = 280; - } - if (num2 == 264 && m_random.Next() % 2 == 0) - { - num2 = 281; - } - if (num2 == 265 && m_random.Next() % 2 == 0) - { - num2 = 282; - } - m_decor[x, y].icon = num2; - break; - } - switch (m_decor[x, y].icon) - { - case -1: - case 285: - case 286: - case 287: - case 288: - case 289: - case 290: - case 291: - case 292: - case 293: - case 294: - case 295: - case 296: - case 297: - case 298: - case 299: - case 300: - case 302: - case 303: - num = 15; - if (!IsGrotte(x, y + 1)) - { - num &= -2; - } - if (!IsGrotte(x, y - 1)) - { - num &= -3; - } - if (!IsGrotte(x + 1, y)) - { - num &= -5; - } - if (!IsGrotte(x - 1, y)) - { - num &= -9; - } - num2 = Tables.table_adapt_fromage[num + 16]; - if (num2 == 289 && m_random.Next() % 2 == 0) - { - num2 = 300; - } - if (num2 == 285 && m_random.Next() % 2 == 0) - { - num2 = 302; - } - if (num2 == 286 && m_random.Next() % 2 == 0) - { - num2 = 303; - } - m_decor[x, y].icon = num2; - break; - } - } - - private void AdaptBorder(TinyPoint cel) - { - AdaptMidBorder(cel.X, cel.Y); - AdaptMidBorder(cel.X + 1, cel.Y); - 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; - if (icon != -1 && !IsPassIcon(icon)) - { - MoveObjectDelete(cel); - } - icon = m_decor[cel.X, cel.Y].icon; - if (icon == 304) - { - for (int i = 0; i < 4; i++) - { - cel.Y++; - if (cel.Y >= 100) - { - break; - } - icon = m_decor[cel.X, cel.Y].icon; - if (icon != -1) - { - break; - } - m_decor[cel.X, cel.Y].icon = 305; - } - } - if (icon != -1) - { - return; - } - for (int i = 0; i < 4; i++) - { - cel.Y++; - if (cel.Y >= 100) - { - break; - } - icon = m_decor[cel.X, cel.Y].icon; - if (icon != 305) - { - break; - } - m_decor[cel.X, cel.Y].icon = -1; - } - } - - public void CurrentDelete() - { - Worlds.DeleteCurrentGame(); - } - - public bool CurrentWrite() - { - Worlds.WriteClear(); - Worlds.WriteSection("DescFile"); - Worlds.WriteIntField("_version_", 1); - Worlds.WritePointField("_posDecor_", m_posDecor); - Worlds.WritePointField("_dimDecor_", m_dimDecor); - Worlds.WriteIntField("_term_", m_term); - Worlds.WriteIntField("_music_", m_music); - Worlds.WriteIntField("_region_", m_region); - Worlds.WriteIntField("_time_", m_time); - Worlds.WritePointField("_blupiPos_", m_blupiPos); - Worlds.WritePointField("_blupiValidPos_", m_blupiValidPos); - Worlds.WriteIntField("_blupiAction_", m_blupiAction); - Worlds.WriteIntField("_blupiDir_", m_blupiDir); - Worlds.WriteIntField("_blupiPhase_", m_blupiPhase); - Worlds.WriteDoubleField("_blupiVitesseX_", m_blupiVitesseX); - Worlds.WriteDoubleField("_blupiVitesseY_", m_blupiVitesseY); - Worlds.WriteIntField("_blupiIcon_", m_blupiIcon); - Worlds.WriteIntField("_blupiSec_", m_blupiSec); - Worlds.WriteIntField("_blupiChannel_", m_blupiChannel); - Worlds.WritePointField("_blupiVector_", m_blupiVector); - Worlds.WriteIntField("_blupiTransport_", m_blupiTransport); - Worlds.WriteBoolField("_blupiFocus_", m_blupiFocus); - Worlds.WriteBoolField("_blupiAir_", m_blupiAir); - Worlds.WriteBoolField("_blupiHelico_", m_blupiHelico); - Worlds.WriteBoolField("_blupiOver_", m_blupiOver); - Worlds.WriteBoolField("_blupiJeep_", m_blupiJeep); - Worlds.WriteBoolField("_blupiTank_", m_blupiTank); - Worlds.WriteBoolField("_blupiSkate_", m_blupiSkate); - Worlds.WriteBoolField("_blupiNage_", m_blupiNage); - Worlds.WriteBoolField("_blupiSurf_", m_blupiSurf); - Worlds.WriteBoolField("_blupiVent_", m_blupiVent); - Worlds.WriteBoolField("_blupiSuspend_", m_blupiSuspend); - Worlds.WriteBoolField("_blupiJumpAie_", m_blupiJumpAie); - Worlds.WriteBoolField("_blupiShield_", m_blupiShield); - Worlds.WriteBoolField("_blupiPower_", m_blupiPower); - Worlds.WriteBoolField("_blupiCloud_", m_blupiCloud); - Worlds.WriteBoolField("_blupiHide_", m_blupiHide); - Worlds.WriteBoolField("_blupiInvert_", m_blupiInvert); - Worlds.WriteBoolField("_blupiBalloon_", m_blupiBalloon); - Worlds.WriteBoolField("_blupiEcrase_", m_blupiEcrase); - Worlds.WriteBoolField("_blupiMotorHigh_", m_blupiMotorHigh); - Worlds.WritePointField("_blupiPosHelico_", m_blupiPosHelico); - Worlds.WritePointField("_blupiPosMagic_", m_blupiPosMagic); - Worlds.WriteBoolField("_blupiRestart_", m_blupiRestart); - Worlds.WriteBoolField("_blupiFront_", m_blupiFront); - Worlds.WriteIntField("_blupiBullet_", m_blupiBullet); - Worlds.WriteIntField("_blupiCle_", m_blupiCle); - Worlds.WriteIntField("_blupiPerso_", m_blupiPerso); - Worlds.WriteIntField("_blupiDynamite_", m_blupiDynamite); - Worlds.WriteIntField("_blupiNoBarre_", m_blupiNoBarre); - Worlds.WriteIntField("_blupiTimeShield_", m_blupiTimeShield); - Worlds.WriteIntField("_blupiTimeFire_", m_blupiTimeFire); - Worlds.WriteIntField("_blupiTimeNoAsc_", m_blupiTimeNoAsc); - Worlds.WriteIntField("_blupiTimeOuf_", m_blupiTimeOuf); - Worlds.WriteIntField("_blupiActionOuf_", m_blupiActionOuf); - Worlds.WriteIntField("_blupiFifoNb_", m_blupiFifoNb); - Worlds.WritePointField("_blupiStartPos_", m_blupiStartPos); - Worlds.WriteIntField("_blupiStartDir_", m_blupiStartDir); - Worlds.WriteIntField("_blupiLevel_", m_blupiLevel); - Worlds.WriteBoolField("_bFoundCle_", m_bFoundCle); - Worlds.WriteBoolField("_bPrivate_", m_bPrivate); - Worlds.WriteBoolField("_bCheatDoors_", m_bCheatDoors); - Worlds.WriteBoolField("_bSuperBlupi_", m_bSuperBlupi); - Worlds.WriteBoolField("_bDrawSecret_", m_bDrawSecret); - Worlds.WriteIntField("_mission_", m_mission); - Worlds.WriteIntField("_nbVies_", m_nbVies); - Worlds.WriteIntField("_nbTresor_", m_nbTresor); - Worlds.WriteIntField("_totalTresor_", m_totalTresor); - Worlds.WriteIntField("_goalPhase_", m_goalPhase); - Worlds.WritePointField("_scrollPoint_", m_scrollPoint); - Worlds.WritePointField("_scrollAdd_", m_scrollAdd); - Worlds.WriteIntField("_voyageIcon_", m_voyageIcon); - Worlds.WriteIntField("_voyageChannel_", m_voyageChannel); - Worlds.WriteIntField("_voyagePhase_", m_voyagePhase); - Worlds.WriteIntField("_voyageTotal_", m_voyageTotal); - Worlds.WritePointField("_voyageStart_", m_voyageStart); - Worlds.WritePointField("_voyageEnd_", m_voyageEnd); - Worlds.WriteIntField("_decorAction_", m_decorAction); - Worlds.WriteIntField("_decorPhase_", m_decorPhase); - Worlds.WriteIntField("_nbRankCaisse_", m_nbRankCaisse); - Worlds.WriteIntField("_nbLinkCaisse_", m_nbLinkCaisse); - Worlds.WritePointField("_sucettePos_", m_sucettePos); - Worlds.WriteIntField("_sucetteType_", m_sucetteType); - Worlds.WriteIntArrayField("_RankCaisse_", m_rankCaisse); - Worlds.WriteIntArrayField("_LinkCaisse_", m_linkCaisse); - Worlds.WriteIntArrayField("_BalleTraj_", m_balleTraj); - Worlds.WriteIntArrayField("_MoveTraj_", m_moveTraj); - Worlds.WriteIntArrayField("_Doors_", m_doors); - Worlds.WriteEndSection(); - Worlds.WriteSection("Decor"); - Worlds.WriteEndSection(); - for (int i = 0; i < 100; i++) - { - int[] array = new int[100]; - for (int j = 0; j < 100; j++) - { - array[j] = m_decor[i, j].icon; - } - Worlds.WriteDecorField(array); - } - Worlds.WriteSection("BigDecor"); - Worlds.WriteEndSection(); - for (int k = 0; k < 100; k++) - { - int[] array2 = new int[100]; - for (int l = 0; l < 100; l++) - { - array2[l] = m_bigDecor[k, l].icon; - } - Worlds.WriteDecorField(array2); - } - for (int m = 0; m < MAXMOVEOBJECT; m++) - { - if (m_moveObject[m].type != 0) - { - Worlds.WriteSection("MoveObject"); - Worlds.WriteIntField("index", m); - Worlds.WriteIntField("type", m_moveObject[m].type); - Worlds.WriteIntField("stepAdvance", m_moveObject[m].stepAdvance); - Worlds.WriteIntField("stepRecede", m_moveObject[m].stepRecede); - Worlds.WriteIntField("timeStopStart", m_moveObject[m].timeStopStart); - Worlds.WriteIntField("timeStopEnd", m_moveObject[m].timeStopEnd); - Worlds.WritePointField("posStart", m_moveObject[m].posStart); - Worlds.WritePointField("posEnd", m_moveObject[m].posEnd); - Worlds.WritePointField("posCurrent", m_moveObject[m].posCurrent); - Worlds.WriteIntField("step", m_moveObject[m].step); - Worlds.WriteIntField("time", m_moveObject[m].time); - Worlds.WriteIntField("phase", m_moveObject[m].phase); - Worlds.WriteIntField("channel", m_moveObject[m].channel); - Worlds.WriteIntField("icon", m_moveObject[m].icon); - Worlds.WriteEndSection(); - } - } - for (int n = 0; n < 2; n++) - { - Worlds.WriteSection("Jauge"); - Worlds.WriteBoolField("hide", m_jauges[n].GetHide()); - Worlds.WriteIntField("mode", m_jauges[n].GetMode()); - Worlds.WriteIntField("level", m_jauges[n].GetLevel()); - Worlds.WriteEndSection(); - } - Worlds.WriteCurrentGame(Worlds.GetWriteString()); - return true; - } - - public bool CurrentRead() - { - string text = Worlds.ReadCurrentGame(); - if (string.IsNullOrEmpty(text)) - { - return false; - } - InitDecor(); - 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_"); - m_term = Worlds.GetIntField(lines, "DescFile", 0, "_term_"); - m_music = Worlds.GetIntField(lines, "DescFile", 0, "_music_"); - m_region = Worlds.GetIntField(lines, "DescFile", 0, "_region_"); - m_time = Worlds.GetIntField(lines, "DescFile", 0, "_time_"); - m_blupiPos = Worlds.GetPointField(lines, "DescFile", 0, "_blupiPos_"); - m_blupiValidPos = Worlds.GetPointField(lines, "DescFile", 0, "_blupiValidPos_"); - m_blupiAction = Worlds.GetIntField(lines, "DescFile", 0, "_blupiAction_"); - m_blupiDir = Worlds.GetIntField(lines, "DescFile", 0, "_blupiDir_"); - m_blupiPhase = Worlds.GetIntField(lines, "DescFile", 0, "_blupiPhase_"); - m_blupiVitesseX = Worlds.GetDoubleField(lines, "DescFile", 0, "_blupiVitesseX_"); - m_blupiVitesseY = Worlds.GetDoubleField(lines, "DescFile", 0, "_blupiVitesseY_"); - m_blupiIcon = Worlds.GetIntField(lines, "DescFile", 0, "_blupiIcon_"); - m_blupiSec = Worlds.GetIntField(lines, "DescFile", 0, "_blupiSec_"); - m_blupiChannel = Worlds.GetIntField(lines, "DescFile", 0, "_blupiChannel_"); - m_blupiVector = Worlds.GetPointField(lines, "DescFile", 0, "_blupiVector_"); - m_blupiTransport = Worlds.GetIntField(lines, "DescFile", 0, "_blupiTransport_"); - m_blupiFocus = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiFocus_"); - m_blupiAir = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiAir_"); - m_blupiHelico = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiHelico_"); - m_blupiOver = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiOver_"); - m_blupiJeep = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiJeep_"); - m_blupiTank = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiTank_"); - m_blupiSkate = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiSkate_"); - m_blupiNage = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiNage_"); - m_blupiSurf = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiSurf_"); - m_blupiVent = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiVent_"); - m_blupiSuspend = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiSuspend_"); - m_blupiJumpAie = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiJumpAie_"); - m_blupiShield = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiShield_"); - m_blupiPower = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiPower_"); - m_blupiCloud = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiCloud_"); - m_blupiHide = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiHide_"); - m_blupiInvert = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiInvert_"); - m_blupiBalloon = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiBalloon_"); - m_blupiEcrase = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiEcrase_"); - m_blupiMotorHigh = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiMotorHigh_"); - m_blupiPosHelico = Worlds.GetPointField(lines, "DescFile", 0, "_blupiPosHelico_"); - m_blupiPosMagic = Worlds.GetPointField(lines, "DescFile", 0, "_blupiPosMagic_"); - m_blupiRestart = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiRestart_"); - m_blupiFront = Worlds.GetBoolField(lines, "DescFile", 0, "_blupiFront_"); - m_blupiBullet = Worlds.GetIntField(lines, "DescFile", 0, "_blupiBullet_"); - m_blupiCle = Worlds.GetIntField(lines, "DescFile", 0, "_blupiCle_"); - m_blupiPerso = Worlds.GetIntField(lines, "DescFile", 0, "_blupiPerso_"); - m_blupiDynamite = Worlds.GetIntField(lines, "DescFile", 0, "_blupiDynamite_"); - m_blupiNoBarre = Worlds.GetIntField(lines, "DescFile", 0, "_blupiNoBarre_"); - m_blupiTimeShield = Worlds.GetIntField(lines, "DescFile", 0, "_blupiTimeShield_"); - m_blupiTimeFire = Worlds.GetIntField(lines, "DescFile", 0, "_blupiTimeFire_"); - m_blupiTimeNoAsc = Worlds.GetIntField(lines, "DescFile", 0, "_blupiTimeNoAsc_"); - m_blupiTimeOuf = Worlds.GetIntField(lines, "DescFile", 0, "_blupiTimeOuf_"); - m_blupiActionOuf = Worlds.GetIntField(lines, "DescFile", 0, "_blupiActionOuf_"); - m_blupiFifoNb = Worlds.GetIntField(lines, "DescFile", 0, "_blupiFifoNb_"); - m_blupiStartPos = Worlds.GetPointField(lines, "DescFile", 0, "_blupiStartPos_"); - m_blupiStartDir = Worlds.GetIntField(lines, "DescFile", 0, "_blupiStartDir_"); - m_blupiLevel = Worlds.GetIntField(lines, "DescFile", 0, "_blupiLevel_"); - m_bFoundCle = Worlds.GetBoolField(lines, "DescFile", 0, "_bFoundCle_"); - m_bPrivate = Worlds.GetBoolField(lines, "DescFile", 0, "_bPrivate_"); - m_bCheatDoors = Worlds.GetBoolField(lines, "DescFile", 0, "_bCheatDoors_"); - m_bSuperBlupi = Worlds.GetBoolField(lines, "DescFile", 0, "_bSuperBlupi_"); - m_bDrawSecret = Worlds.GetBoolField(lines, "DescFile", 0, "_bDrawSecret_"); - m_mission = Worlds.GetIntField(lines, "DescFile", 0, "_mission_"); - m_nbVies = Worlds.GetIntField(lines, "DescFile", 0, "_nbVies_"); - m_nbTresor = Worlds.GetIntField(lines, "DescFile", 0, "_nbTresor_"); - m_totalTresor = Worlds.GetIntField(lines, "DescFile", 0, "_totalTresor_"); - m_goalPhase = Worlds.GetIntField(lines, "DescFile", 0, "_goalPhase_"); - m_scrollPoint = Worlds.GetPointField(lines, "DescFile", 0, "_scrollPoint_"); - m_scrollAdd = Worlds.GetPointField(lines, "DescFile", 0, "_scrollAdd_"); - m_voyageIcon = Worlds.GetIntField(lines, "DescFile", 0, "_voyageIcon_"); - m_voyageChannel = Worlds.GetIntField(lines, "DescFile", 0, "_voyageChannel_"); - m_voyagePhase = Worlds.GetIntField(lines, "DescFile", 0, "_voyagePhase_"); - m_voyageTotal = Worlds.GetIntField(lines, "DescFile", 0, "_voyageTotal_"); - m_voyageStart = Worlds.GetPointField(lines, "DescFile", 0, "_voyageStart_"); - m_voyageEnd = Worlds.GetPointField(lines, "DescFile", 0, "_voyageEnd_"); - m_decorAction = Worlds.GetIntField(lines, "DescFile", 0, "_decorAction_"); - m_decorPhase = Worlds.GetIntField(lines, "DescFile", 0, "_decorPhase_"); - m_nbRankCaisse = Worlds.GetIntField(lines, "DescFile", 0, "_nbRankCaisse_"); - m_nbLinkCaisse = Worlds.GetIntField(lines, "DescFile", 0, "_nbLinkCaisse_"); - m_sucettePos = Worlds.GetPointField(lines, "DescFile", 0, "_sucettePos_"); - m_sucetteType = Worlds.GetIntField(lines, "DescFile", 0, "_sucetteType_"); - Worlds.GetIntArrayField(lines, "DescFile", 0, "_RankCaisse_", m_rankCaisse); - Worlds.GetIntArrayField(lines, "DescFile", 0, "_LinkCaisse_", m_linkCaisse); - Worlds.GetIntArrayField(lines, "DescFile", 0, "_BalleTraj_", m_balleTraj); - Worlds.GetIntArrayField(lines, "DescFile", 0, "_MoveTraj_", m_moveTraj); - Worlds.GetIntArrayField(lines, "DescFile", 0, "_Doors_", m_doors); - for (int i = 0; i < 100; i++) - { - for (int j = 0; j < 100; j++) - { - m_decor[j, i].icon = Worlds.GetDecorField(lines, "Decor", j, i) ?? (-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); - } - } - for (int m = 0; m < MAXMOVEOBJECT; m++) - { - m_moveObject[m].type = 0; - } - for (int n = 0; n < MAXMOVEOBJECT; n++) - { - int intField = Worlds.GetIntField(lines, "MoveObject", n, "type"); - if (intField == 0) - { - break; - } - int intField2 = Worlds.GetIntField(lines, "MoveObject", n, "index"); - m_moveObject[intField2].type = intField; - m_moveObject[intField2].stepAdvance = Worlds.GetIntField(lines, "MoveObject", n, "stepAdvance"); - m_moveObject[intField2].stepRecede = Worlds.GetIntField(lines, "MoveObject", n, "stepRecede"); - m_moveObject[intField2].timeStopStart = Worlds.GetIntField(lines, "MoveObject", n, "timeStopStart"); - m_moveObject[intField2].timeStopEnd = Worlds.GetIntField(lines, "MoveObject", n, "timeStopEnd"); - m_moveObject[intField2].posStart = Worlds.GetPointField(lines, "MoveObject", n, "posStart"); - m_moveObject[intField2].posEnd = Worlds.GetPointField(lines, "MoveObject", n, "posEnd"); - m_moveObject[intField2].posCurrent = Worlds.GetPointField(lines, "MoveObject", n, "posCurrent"); - m_moveObject[intField2].step = Worlds.GetIntField(lines, "MoveObject", n, "step"); - m_moveObject[intField2].time = Worlds.GetIntField(lines, "MoveObject", n, "time"); - m_moveObject[intField2].phase = Worlds.GetIntField(lines, "MoveObject", n, "phase"); - m_moveObject[intField2].channel = Worlds.GetIntField(lines, "MoveObject", n, "channel"); - m_moveObject[intField2].icon = Worlds.GetIntField(lines, "MoveObject", n, "icon"); - } - for (int num = 0; num < 2; num++) - { - m_jauges[num].SetHide(Worlds.GetBoolField(lines, "Jauge", num, "hide")); - m_jauges[num].SetMode(Worlds.GetIntField(lines, "Jauge", num, "mode")); - m_jauges[num].SetLevel(Worlds.GetIntField(lines, "Jauge", num, "level")); - } - return true; - } - - public bool Read(int gamer, int rank, bool bUser) - { - InitDecor(); - string[] array = Worlds.ReadWorld(gamer, rank); - if (array == null) - { - return false; - } - m_posDecor = Worlds.GetPointField(array, "DescFile", 0, "posDecor"); - m_dimDecor = Worlds.GetPointField(array, "DescFile", 0, "dimDecor"); - m_music = Worlds.GetIntField(array, "DescFile", 0, "music"); - m_region = Worlds.GetIntField(array, "DescFile", 0, "region"); - m_blupiStartPos = Worlds.GetPointField(array, "DescFile", 0, "blupiPos"); - m_blupiStartDir = Worlds.GetIntField(array, "DescFile", 0, "blupiDir"); - for (int i = 0; i < 100; i++) - { - for (int j = 0; j < 100; j++) - { - m_decor[j, i].icon = Worlds.GetDecorField(array, "Decor", j, i) ?? (-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); - } - } - for (int m = 0; m < MAXMOVEOBJECT; m++) - { - m_moveObject[m].type = 0; - } - for (int n = 0; n < MAXMOVEOBJECT; n++) - { - int intField = Worlds.GetIntField(array, "MoveObject", n, "type"); - if (intField == 0) - { - break; - } - m_moveObject[n].type = intField; - m_moveObject[n].stepAdvance = Worlds.GetIntField(array, "MoveObject", n, "stepAdvance"); - m_moveObject[n].stepRecede = Worlds.GetIntField(array, "MoveObject", n, "stepRecede"); - m_moveObject[n].timeStopStart = Worlds.GetIntField(array, "MoveObject", n, "timeStopStart"); - m_moveObject[n].timeStopEnd = Worlds.GetIntField(array, "MoveObject", n, "timeStopEnd"); - m_moveObject[n].posStart = Worlds.GetPointField(array, "MoveObject", n, "posStart"); - m_moveObject[n].posEnd = Worlds.GetPointField(array, "MoveObject", n, "posEnd"); - m_moveObject[n].posCurrent = Worlds.GetPointField(array, "MoveObject", n, "posCurrent"); - m_moveObject[n].step = Worlds.GetIntField(array, "MoveObject", n, "step"); - m_moveObject[n].time = Worlds.GetIntField(array, "MoveObject", n, "time"); - m_moveObject[n].phase = Worlds.GetIntField(array, "MoveObject", n, "phase"); - m_moveObject[n].channel = Worlds.GetIntField(array, "MoveObject", n, "channel"); - m_moveObject[n].icon = Worlds.GetIntField(array, "MoveObject", n, "icon"); - if (m_moveObject[n].type == 54) - { - m_moveObject[n].timeStopStart = 152; - m_moveObject[n].timeStopEnd = 152; - } - } - return true; - } - - private bool Delete(int gamer, int rank, bool bUser) - { - return true; - } - - private bool FileExist(int gamer, int rank, bool bUser) - { - return false; - } - - private bool SearchWorld(int world, ref TinyPoint blupi, ref int dir) - { - if (world < 0 || world > 12) - { - return false; - } - int num = Tables.world_terminal[world * 2]; - int num2 = Tables.world_terminal[world * 2 + 1]; - for (int i = 0; i < 100; i++) - { - for (int j = 0; j < 100; j++) - { - int icon = m_decor[i, j].icon; - if (icon == num || icon == num2) - { - 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)) - { - blupi.X = (i + 1) * 64 + 2; - blupi.Y = j * 64 + BLUPIOFFY; - dir = 1; - return true; - } - } - } - } - return false; - } - - private bool SearchDoor(int n, ref TinyPoint cel, ref TinyPoint blupi) - { - for (int i = 0; i < 100; i++) - { - for (int j = 0; j < 100; j++) - { - 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) - { - cel.X = i - 1; - cel.Y = j; - blupi.X = (i - 2) * 64 + 2; - blupi.Y = j * 64 + BLUPIOFFY; - return true; - } - if (i > 1 && m_decor[i - 2, j].icon == 182) - { - cel.X = i - 2; - cel.Y = j; - blupi.X = (i - 3) * 64 + 2; - blupi.Y = j * 64 + BLUPIOFFY; - return true; - } - if (i < 99 && m_decor[i + 1, j].icon == 182) - { - cel.X = i + 1; - cel.Y = j; - blupi.X = (i + 2) * 64 + 2; - blupi.Y = j * 64 + BLUPIOFFY; - return true; - } - if (i < 98 && m_decor[i + 2, j].icon == 182) - { - cel.X = i + 2; - cel.Y = j; - blupi.X = (i + 3) * 64 + 2; - blupi.Y = j * 64 + BLUPIOFFY; - return true; - } - } - } - } - return false; - } - - private bool SearchGold(int n, ref TinyPoint cel) - { - for (int num = 99; num >= 0; num--) - { - for (int num2 = 99; num2 >= 0; num2--) - { - if (m_decor[num2, num].icon == 183) - { - cel.X = num2; - cel.Y = num; - return true; - } - } - } - return false; - } - - public void MainSwitchInitialize(int lastWorld) - { - if (m_mission == 1) - { - TinyPoint blupi = default(TinyPoint); - int dir = 0; - if (SearchWorld(lastWorld, ref blupi, ref dir)) - { - m_blupiStartPos = blupi; - m_blupiStartDir = dir; - } - } - } - - public void AdaptDoors(bool bPrivate) - { - TinyPoint cel = default(TinyPoint); - TinyPoint blupi = default(TinyPoint); - m_bPrivate = bPrivate; - if (m_bPrivate) - { - return; - } - if (m_mission == 1) - { - for (int i = 0; i < 20; i++) - { - if (SearchGold(i, ref cel) && (m_doors[180 + i] == 1 || m_bCheatDoors)) - { - m_decor[cel.X, cel.Y].icon = -1; - int num = MoveObjectFree(); - m_moveObject[num].type = 22; - m_moveObject[num].stepAdvance = 50; - m_moveObject[num].stepRecede = 1; - m_moveObject[num].timeStopStart = 0; - m_moveObject[num].timeStopEnd = 0; - m_moveObject[num].posStart.X = 64 * cel.X; - m_moveObject[num].posStart.Y = 64 * cel.Y; - m_moveObject[num].posEnd.X = 64 * cel.X; - m_moveObject[num].posEnd.Y = 64 * (cel.Y - 1); - m_moveObject[num].posCurrent = m_moveObject[num].posStart; - m_moveObject[num].step = 1; - m_moveObject[num].time = 0; - m_moveObject[num].phase = 0; - m_moveObject[num].channel = 1; - m_moveObject[num].icon = 183; - PlaySound(33, m_moveObject[num].posStart); - } - } - for (int j = 0; j < 100; j++) - { - for (int k = 0; k < 100; k++) - { - 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; - } - if (icon == 309 && (m_doors[189] == 1 || m_bCheatDoors)) - { - 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; - } - } - } - } - else - { - if (m_mission % 10 != 0) - { - return; - } - for (int i = 0; i < 10; i++) - { - if (SearchDoor(i, ref cel, ref blupi) && (m_doors[m_mission + i] == 1 || m_bCheatDoors)) - { - OpenDoor(cel); - m_blupiStartPos = blupi; - if (blupi.X < cel.X * 64) - { - m_blupiStartDir = 2; - } - else - { - m_blupiStartDir = 1; - } - } - } - } - } - - private void OpenDoorsTresor() - { - TinyPoint cel = default(TinyPoint); - for (int i = 0; i < 100; i++) - { - for (int j = 0; j < 100; j++) - { - int icon = m_decor[i, j].icon; - if (icon >= 421 && icon <= 421 + m_nbTresor - 1) - { - cel.X = i; - cel.Y = j; - OpenDoor(cel); - } - } - } - } - - private void OpenDoor(TinyPoint cel) - { - 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; - m_moveObject[num].stepRecede = 1; - m_moveObject[num].timeStopStart = 0; - m_moveObject[num].timeStopEnd = 0; - m_moveObject[num].posStart.X = 64 * cel.X; - m_moveObject[num].posStart.Y = 64 * cel.Y; - m_moveObject[num].posEnd.X = 64 * cel.X; - m_moveObject[num].posEnd.Y = 64 * (cel.Y - 1); - m_moveObject[num].posCurrent = m_moveObject[num].posStart; - m_moveObject[num].step = 1; - m_moveObject[num].time = 0; - m_moveObject[num].phase = 0; - m_moveObject[num].channel = 1; - m_moveObject[num].icon = icon; - PlaySound(33, m_moveObject[num].posStart); - } - - private void OpenDoorsWin() - { - m_doors[m_mission + 1] = 1; - } - - private void OpenGoldsWin() - { - m_doors[180 + m_mission / 10] = 1; - } - - private void DoorsLost() - { - m_nbVies = 3; - } - } - -} \ No newline at end of file diff --git a/Def.cs b/Def.cs deleted file mode 100644 index b2bf44f..0000000 --- a/Def.cs +++ /dev/null @@ -1,705 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.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; - } - } - } - -} \ No newline at end of file diff --git a/Game1.cs b/Game1.cs deleted file mode 100644 index b92d5a1..0000000 --- a/Game1.cs +++ /dev/null @@ -1,993 +0,0 @@ -// 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; - -namespace WindowsPhoneSpeedyBlupi -{ - public class Game1 : Game - { - private static readonly double[] waitTable = new double[24] - { - 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] - { - Def.ButtonGlygh.Cheat12, - Def.ButtonGlygh.Cheat22, - Def.ButtonGlygh.Cheat32, - Def.ButtonGlygh.Cheat12, - Def.ButtonGlygh.Cheat11, - Def.ButtonGlygh.Cheat21, - Def.ButtonGlygh.Cheat22, - Def.ButtonGlygh.Cheat21, - Def.ButtonGlygh.Cheat31, - Def.ButtonGlygh.Cheat32 - }; - - private readonly GraphicsDeviceManager graphics; - - private readonly Pixmap pixmap; - - private readonly Sound sound; - - private readonly Decor decor; - - private readonly InputPad inputPad; - - private readonly GameData gameData; - - private Def.Phase phase; - - private TimeSpan startTime; - - private int missionToStart1; - - private int missionToStart2; - - private int mission; - - private int cheatGesteIndex; - - private int continueMission; - - private Jauge waitJauge; - - private double waitProgress; - - private bool isTrialMode; - - private bool simulateTrialMode; - - private bool playSetup; - - private int phaseTime; - - private Def.Phase fadeOutPhase; - - private int fadeOutMission; - - public bool IsRankingMode - { - get - { - return false; - } - } - - public bool IsTrialMode - { - get - { - if (!simulateTrialMode) - { - return isTrialMode; - } - return true; - } - } - - public Game1() - { - Console.WriteLine(1); - Exiting += OnExiting; - Deactivated += OnDeactivated; - Activated += OnActivated; - Console.WriteLine(2); - //if (!TouchPanel.GetCapabilities().IsConnected) - { - - Console.WriteLine(1); - //this.IsMouseVisible = true; - //Mouse.SetCursor(MouseCursor.Arrow); - } - Console.WriteLine(3); - graphics = new GraphicsDeviceManager(this); - graphics.IsFullScreen = false; - base.Content.RootDirectory = "Content"; - base.TargetElapsedTime = TimeSpan.FromTicks(500000L); - base.InactiveSleepTime = TimeSpan.FromSeconds(1.0); - Console.WriteLine(4); - missionToStart1 = -1; - missionToStart2 = -1; - gameData = new GameData(); - pixmap = new Pixmap(this, graphics); - sound = new Sound(this, gameData); - decor = new Decor(); - decor.Create(sound, pixmap, gameData); - TinyPoint pos = new TinyPoint - { - X = 196, - Y = 426 - }; - waitJauge = new Jauge(); - waitJauge.Create(pixmap, sound, pos, 3, false); - waitJauge.SetHide(false); - waitJauge.Zoom = 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(); - } - - protected override void LoadContent() - { - pixmap.BackgroundCache("wait"); - } - - protected override void UnloadContent() - { - } - - protected void OnDeactivated(object sender, EventArgs args) - { - if (phase == Def.Phase.Play) - { - decor.CurrentWrite(); - } - else - { - decor.CurrentDelete(); - } - } - - protected void OnActivated(object sender, EventArgs args) - { - continueMission = 1; - } - - protected void OnExiting(object sender, EventArgs args) - { - decor.CurrentDelete(); - } - - protected override void Update(GameTime gameTime) - { - if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) - { - if (phase == Def.Phase.Play) - { - SetPhase(Def.Phase.Pause); - } - else if (phase == Def.Phase.PlaySetup) - { - SetPhase(Def.Phase.Play, -1); - } - else if (phase != Def.Phase.Init) - { - SetPhase(Def.Phase.Init); - } - else - { - Exit(); - } - return; - } - phaseTime++; - if (fadeOutPhase != 0) - { - if (phaseTime >= 20) - { - SetPhase(fadeOutPhase); - } - return; - } - if (missionToStart2 != -1) - { - SetPhase(Def.Phase.Play, missionToStart2); - return; - } - if (phase == Def.Phase.First) - { - startTime = gameTime.TotalGameTime; - pixmap.LoadContent(); - sound.LoadContent(); - gameData.Read(); - inputPad.PixmapOrigin = pixmap.Origin; - SetPhase(Def.Phase.Wait); - return; - } - if (phase == Def.Phase.Wait) - { - if (continueMission == 2) - { - continueMission = 0; - if (decor.CurrentRead()) - { - SetPhase(Def.Phase.Resume); - return; - } - } - long num = gameTime.TotalGameTime.Ticks - startTime.Ticks; - waitProgress = (double)num / 50000000.0; - if (waitProgress > 1.0) - { - SetPhase(Def.Phase.Init); - } - return; - } - inputPad.Update(); - Def.ButtonGlygh buttonPressed = inputPad.ButtonPressed; - if (buttonPressed >= Def.ButtonGlygh.InitGamerA && buttonPressed <= Def.ButtonGlygh.InitGamerC) - { - SetGamer((int)(buttonPressed - 1)); - return; - } - switch (buttonPressed) - { - case Def.ButtonGlygh.InitSetup: - SetPhase(Def.Phase.MainSetup); - return; - case Def.ButtonGlygh.PauseSetup: - SetPhase(Def.Phase.PlaySetup); - return; - case Def.ButtonGlygh.SetupSounds: - gameData.Sounds = !gameData.Sounds; - gameData.Write(); - return; - case Def.ButtonGlygh.SetupJump: - gameData.JumpRight = !gameData.JumpRight; - gameData.Write(); - return; - case Def.ButtonGlygh.SetupZoom: - gameData.AutoZoom = !gameData.AutoZoom; - gameData.Write(); - return; - case Def.ButtonGlygh.SetupAccel: - gameData.AccelActive = !gameData.AccelActive; - gameData.Write(); - return; - case Def.ButtonGlygh.SetupReset: - gameData.Reset(); - gameData.Write(); - return; - case Def.ButtonGlygh.SetupReturn: - if (playSetup) - { - SetPhase(Def.Phase.Play, -1); - } - else - { - SetPhase(Def.Phase.Init); - } - return; - case Def.ButtonGlygh.InitPlay: - SetPhase(Def.Phase.Play, 1); - return; - case Def.ButtonGlygh.PlayPause: - SetPhase(Def.Phase.Pause); - return; - case Def.ButtonGlygh.WinLostReturn: - case Def.ButtonGlygh.PauseMenu: - case Def.ButtonGlygh.ResumeMenu: - SetPhase(Def.Phase.Init); - break; - } - switch (buttonPressed) - { - case Def.ButtonGlygh.ResumeContinue: - ContinueMission(); - return; - case Def.ButtonGlygh.InitBuy: - case Def.ButtonGlygh.TrialBuy: - MarketPlace.Show(PlayerIndex.One); - SetPhase(Def.Phase.Init); - return; - case Def.ButtonGlygh.InitRanking: - SetPhase(Def.Phase.Ranking); - return; - case Def.ButtonGlygh.TrialCancel: - case Def.ButtonGlygh.RankingContinue: - SetPhase(Def.Phase.Init); - return; - case Def.ButtonGlygh.PauseBack: - MissionBack(); - return; - case Def.ButtonGlygh.PauseRestart: - SetPhase(Def.Phase.Play, mission); - return; - case Def.ButtonGlygh.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: - if (buttonPressed == cheatGeste[cheatGesteIndex]) - { - cheatGesteIndex++; - if (cheatGesteIndex == cheatGeste.Length) - { - cheatGesteIndex = 0; - inputPad.ShowCheatMenu = true; - } - } - else - { - cheatGesteIndex = 0; - } - break; - default: - if (buttonPressed != 0) - { - cheatGesteIndex = 0; - } - break; - } - if (buttonPressed >= Def.ButtonGlygh.Cheat1 && buttonPressed <= Def.ButtonGlygh.Cheat9) - { - CheatAction(buttonPressed); - } - if (phase == Def.Phase.Play) - { - decor.ButtonPressed = buttonPressed; - decor.MoveStep(); - int num2 = decor.IsTerminated(); - if (num2 == -1) - { - MemorizeGamerProgress(); - SetPhase(Def.Phase.Lost); - } - else if (num2 == -2) - { - MemorizeGamerProgress(); - SetPhase(Def.Phase.Win); - } - else if (num2 >= 1) - { - MemorizeGamerProgress(); - StartMission(num2); - } - } - base.Update(gameTime); - } - - private void MissionBack() - { - int num = mission; - if (num == 1) - { - SetPhase(Def.Phase.Init); - return; - } - num = ((num % 10 == 0) ? 1 : (num / 10 * 10)); - SetPhase(Def.Phase.Play, num); - } - - private void StartMission(int mission) - { - if (mission > 20 && mission % 10 > 1 && IsTrialMode) - { - SetPhase(Def.Phase.Trial); - return; - } - this.mission = mission; - if (this.mission != 1) - { - gameData.LastWorld = this.mission / 10; - } - decor.Read(0, this.mission, false); - decor.LoadImages(); - decor.SetMission(this.mission); - decor.SetNbVies(gameData.NbVies); - decor.InitializeDoors(gameData); - decor.AdaptDoors(false); - decor.MainSwitchInitialize(gameData.LastWorld); - decor.PlayPrepare(false); - decor.StartSound(); - inputPad.StartMission(this.mission); - } - - private void ContinueMission() - { - SetPhase(Def.Phase.Play, -2); - mission = decor.GetMission(); - if (mission != 1) - { - gameData.LastWorld = mission / 10; - } - decor.LoadImages(); - decor.StartSound(); - inputPad.StartMission(mission); - } - - private void CheatAction(Def.ButtonGlygh glyph) - { - switch (glyph) - { - case Def.ButtonGlygh.Cheat1: - decor.CheatAction(Tables.CheatCodes.OpenDoors); - break; - case Def.ButtonGlygh.Cheat2: - decor.CheatAction(Tables.CheatCodes.SuperBlupi); - break; - case Def.ButtonGlygh.Cheat3: - decor.CheatAction(Tables.CheatCodes.ShowSecret); - break; - case Def.ButtonGlygh.Cheat4: - decor.CheatAction(Tables.CheatCodes.LayEgg); - break; - case Def.ButtonGlygh.Cheat5: - gameData.Reset(); - break; - case Def.ButtonGlygh.Cheat6: - simulateTrialMode = !simulateTrialMode; - break; - case Def.ButtonGlygh.Cheat7: - decor.CheatAction(Tables.CheatCodes.CleanAll); - break; - case Def.ButtonGlygh.Cheat8: - decor.CheatAction(Tables.CheatCodes.AllTreasure); - break; - case Def.ButtonGlygh.Cheat9: - decor.CheatAction(Tables.CheatCodes.EndGoal); - break; - } - } - - protected override void Draw(GameTime gameTime) - { - if (continueMission == 1) - { - continueMission = 2; - } - if (phase == Def.Phase.Wait || phase == Def.Phase.Init || phase == Def.Phase.Pause || phase == Def.Phase.Resume || phase == Def.Phase.Lost || phase == Def.Phase.Win || phase == Def.Phase.MainSetup || phase == Def.Phase.PlaySetup || phase == Def.Phase.Trial || phase == Def.Phase.Ranking) - { - pixmap.DrawBackground(); - if (fadeOutPhase == Def.Phase.None && missionToStart1 != -1) - { - missionToStart2 = missionToStart1; - missionToStart1 = -1; - } - else - { - DrawBackgroundFade(); - if (fadeOutPhase == Def.Phase.None) - { - DrawButtonsBackground(); - inputPad.Draw(); - DrawButtonsText(); - } - } - } - else if (phase == Def.Phase.Play) - { - decor.Build(); - inputPad.Draw(); - } - if (phase == Def.Phase.Wait) - { - DrawWaitProgress(); - } - base.Draw(gameTime); - } - - private void DrawBackgroundFade() - { - if (phase == Def.Phase.Init) - { - 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.Left = (int)(720.0 - 640.0 * num); - tinyRect.Right = (int)(1360.0 - 640.0 * num); - tinyRect.Top = 0; - tinyRect.Bottom = 160; - rect = tinyRect; - opacity = num * num; - } - else - { - num = ((fadeOutPhase != 0) ? (1.0 - num * 2.0) : (1.0 - (1.0 - num) * (1.0 - num))); - TinyRect tinyRect2 = default(TinyRect); - tinyRect2.Left = 80; - tinyRect2.Right = 720; - tinyRect2.Top = (int)(-160.0 + num * 160.0); - tinyRect2.Bottom = (int)(0.0 + num * 160.0); - rect = tinyRect2; - opacity = 1.0; - } - pixmap.DrawIcon(15, 0, rect, opacity, false); - } - if (phase == Def.Phase.Init) - { - double num = Math.Min((double)phaseTime / 20.0, 1.0); - double opacity; - if (fadeOutPhase == Def.Phase.MainSetup) - { - opacity = (1.0 - num) * (1.0 - num); - num = 1.0; - } - else if (fadeOutPhase == Def.Phase.None) - { - num = 0.5 + num / 2.0; - opacity = Math.Min(num * num, 1.0); - } - else - { - opacity = 1.0 - num; - num = 1.0 + num * 10.0; - } - TinyRect tinyRect3 = default(TinyRect); - tinyRect3.Left = (int)(468.0 - 205.0 * num); - tinyRect3.Right = (int)(468.0 + 205.0 * num); - tinyRect3.Top = (int)(280.0 - 190.0 * num); - tinyRect3.Bottom = (int)(280.0 + 190.0 * num); - TinyRect rect = tinyRect3; - pixmap.DrawIcon(16, 0, rect, opacity, 0.0, false); - } - if (phase == Def.Phase.Pause || phase == Def.Phase.Resume) - { - if (fadeOutPhase == Def.Phase.Play) - { - 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); - tinyRect4.Left = (int)(418.0 - 205.0 * num); - tinyRect4.Right = (int)(418.0 + 205.0 * num); - tinyRect4.Top = (int)(190.0 - 190.0 * num); - tinyRect4.Bottom = (int)(190.0 + 190.0 * num); - TinyRect rect = tinyRect4; - pixmap.DrawIcon(16, 0, rect, opacity, 0.0, false); - } - else if (fadeOutPhase == Def.Phase.PlaySetup) - { - double num = Math.Min((double)phaseTime / 20.0, 1.0); - num *= num; - TinyRect tinyRect5 = default(TinyRect); - tinyRect5.Left = (int)(213.0 + 800.0 * num); - tinyRect5.Right = (int)(623.0 + 800.0 * num); - tinyRect5.Top = 0; - tinyRect5.Bottom = 0; - TinyRect rect = tinyRect5; - pixmap.DrawIcon(16, 0, rect, 1.0, 0.0, false); - } - else - { - double num; - if (fadeOutPhase == Def.Phase.None) - { - num = Math.Min((double)phaseTime / 15.0, 1.0); - } - else - { - num = Math.Min((double)phaseTime / 15.0, 1.0); - num = 1.0 - num; - } - TinyRect tinyRect6 = default(TinyRect); - tinyRect6.Left = (int)(418.0 - 205.0 * num); - tinyRect6.Right = (int)(418.0 + 205.0 * num); - tinyRect6.Top = (int)(190.0 - 190.0 * num); - tinyRect6.Bottom = (int)(190.0 + 190.0 * num); - TinyRect rect = tinyRect6; - double rotation = 0.0; - if (num < 1.0) - { - rotation = (1.0 - num) * (1.0 - num) * 360.0 * 1.0; - } - if (rect.Width > 0 && rect.Height > 0) - { - pixmap.DrawIcon(16, 0, rect, 1.0, rotation, false); - } - } - } - if (phase == Def.Phase.MainSetup || phase == Def.Phase.PlaySetup) - { - double num = Math.Min((double)phaseTime / 20.0, 1.0); - num = 1.0 - (1.0 - num) * (1.0 - num); - double num2; - if (phaseTime < 20) - { - num2 = (double)phaseTime / 20.0; - num2 = 1.0 - (1.0 - num2) * (1.0 - num2); - } - else - { - num2 = 1.0 + ((double)phaseTime - 20.0) / 400.0; - } - if (fadeOutPhase != 0) - { - num = 1.0 - num; - num2 = 1.0 - num2; - } - TinyRect tinyRect7 = default(TinyRect); - tinyRect7.Left = (int)(720.0 - 640.0 * num); - tinyRect7.Right = (int)(1360.0 - 640.0 * num); - tinyRect7.Top = 0; - tinyRect7.Bottom = 160; - TinyRect rect = tinyRect7; - pixmap.DrawIcon(15, 0, rect, num * num, false); - TinyRect tinyRect8 = default(TinyRect); - tinyRect8.Left = 487; - tinyRect8.Right = 713; - tinyRect8.Top = 148; - tinyRect8.Bottom = 374; - TinyRect rect2 = tinyRect8; - TinyRect tinyRect9 = default(TinyRect); - tinyRect9.Left = 118; - tinyRect9.Right = 570; - tinyRect9.Top = 268; - tinyRect9.Bottom = 720; - TinyRect rect3 = tinyRect9; - double opacity = 0.5 - num * 0.4; - double rotation = (0.0 - num2) * 100.0 * 2.5; - pixmap.DrawIcon(17, 0, rect2, opacity, rotation, false); - pixmap.DrawIcon(17, 0, rect3, opacity, (0.0 - rotation) * 0.5, false); - } - if (phase == Def.Phase.Lost) - { - double num = Math.Min((double)phaseTime / 100.0, 1.0); - TinyRect tinyRect10 = default(TinyRect); - tinyRect10.Left = (int)(418.0 - 205.0 * num); - tinyRect10.Right = (int)(418.0 + 205.0 * num); - tinyRect10.Top = (int)(238.0 - 190.0 * num); - tinyRect10.Bottom = (int)(238.0 + 190.0 * num); - TinyRect rect = tinyRect10; - double rotation = 0.0; - if (num < 1.0) - { - rotation = (1.0 - num) * (1.0 - num) * 360.0 * 6.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); - tinyRect11.Left = (int)(418.0 - 205.0 * num); - tinyRect11.Right = (int)(418.0 + 205.0 * num); - tinyRect11.Top = (int)(238.0 - 190.0 * num); - tinyRect11.Bottom = (int)(238.0 + 190.0 * num); - TinyRect rect = tinyRect11; - pixmap.DrawIcon(16, 0, rect, 1.0, 0.0, false); - } - } - - private void DrawButtonsBackground() - { - if (phase == Def.Phase.Init) - { - TinyRect drawBounds = pixmap.DrawBounds; - int width = drawBounds.Width; - int height = drawBounds.Height; - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = 10; - tinyRect.Right = 260; - tinyRect.Top = height - 325; - tinyRect.Bottom = height - 10; - TinyRect rect = tinyRect; - pixmap.DrawIcon(14, 15, rect, 0.3, false); - TinyRect tinyRect2 = default(TinyRect); - tinyRect2.Left = width - 170; - tinyRect2.Right = width - 10; - tinyRect2.Top = height - ((IsTrialMode || IsRankingMode) ? 325 : 195); - tinyRect2.Bottom = height - 10; - rect = tinyRect2; - pixmap.DrawIcon(14, 15, rect, 0.3, false); - } - } - - private void DrawButtonsText() - { - if (phase == Def.Phase.Init) - { - DrawButtonGamerText(Def.ButtonGlygh.InitGamerA, 0); - DrawButtonGamerText(Def.ButtonGlygh.InitGamerB, 1); - DrawButtonGamerText(Def.ButtonGlygh.InitGamerC, 2); - DrawTextUnderButton(Def.ButtonGlygh.InitPlay, MyResource.TX_BUTTON_PLAY); - DrawTextRightButton(Def.ButtonGlygh.InitSetup, MyResource.TX_BUTTON_SETUP); - if (IsTrialMode) - { - DrawTextUnderButton(Def.ButtonGlygh.InitBuy, MyResource.TX_BUTTON_BUY); - } - if (IsRankingMode) - { - DrawTextUnderButton(Def.ButtonGlygh.InitRanking, MyResource.TX_BUTTON_RANKING); - } - } - if (phase == Def.Phase.Pause) - { - DrawTextUnderButton(Def.ButtonGlygh.PauseMenu, MyResource.TX_BUTTON_MENU); - if (mission != 1) - { - DrawTextUnderButton(Def.ButtonGlygh.PauseBack, MyResource.TX_BUTTON_BACK); - } - DrawTextUnderButton(Def.ButtonGlygh.PauseSetup, MyResource.TX_BUTTON_SETUP); - if (mission != 1 && mission % 10 != 0) - { - DrawTextUnderButton(Def.ButtonGlygh.PauseRestart, MyResource.TX_BUTTON_RESTART); - } - DrawTextUnderButton(Def.ButtonGlygh.PauseContinue, MyResource.TX_BUTTON_CONTINUE); - } - if (phase == Def.Phase.Resume) - { - DrawTextUnderButton(Def.ButtonGlygh.ResumeMenu, MyResource.TX_BUTTON_MENU); - DrawTextUnderButton(Def.ButtonGlygh.ResumeContinue, MyResource.TX_BUTTON_CONTINUE); - } - if (phase == Def.Phase.MainSetup || phase == Def.Phase.PlaySetup) - { - DrawTextRightButton(Def.ButtonGlygh.SetupSounds, MyResource.TX_BUTTON_SETUP_SOUNDS); - DrawTextRightButton(Def.ButtonGlygh.SetupJump, MyResource.TX_BUTTON_SETUP_JUMP); - DrawTextRightButton(Def.ButtonGlygh.SetupZoom, MyResource.TX_BUTTON_SETUP_ZOOM); - 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)); - DrawTextRightButton(Def.ButtonGlygh.SetupReset, text); - } - } - if (phase == Def.Phase.Trial) - { - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = 360; - tinyPoint.Y = 50; - TinyPoint pos = tinyPoint; - Text.DrawText(pixmap, pos, MyResource.LoadString(MyResource.TX_TRIAL1), 0.9); - pos.Y += 40; - Text.DrawText(pixmap, pos, MyResource.LoadString(MyResource.TX_TRIAL2), 0.7); - pos.Y += 25; - Text.DrawText(pixmap, pos, MyResource.LoadString(MyResource.TX_TRIAL3), 0.7); - pos.Y += 25; - Text.DrawText(pixmap, pos, MyResource.LoadString(MyResource.TX_TRIAL4), 0.7); - pos.Y += 25; - Text.DrawText(pixmap, pos, MyResource.LoadString(MyResource.TX_TRIAL5), 0.7); - pos.Y += 25; - Text.DrawText(pixmap, pos, MyResource.LoadString(MyResource.TX_TRIAL6), 0.7); - DrawTextUnderButton(Def.ButtonGlygh.TrialBuy, MyResource.TX_BUTTON_BUY); - DrawTextUnderButton(Def.ButtonGlygh.TrialCancel, MyResource.TX_BUTTON_BACK); - } - if (phase == Def.Phase.Ranking) - { - DrawTextUnderButton(Def.ButtonGlygh.RankingContinue, MyResource.TX_BUTTON_BACK); - } - } - - 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; - TinyPoint pos = tinyPoint; - string text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_TITLE), new string((char)(65 + gamer), 1)); - Text.DrawText(pixmap, pos, text, 0.7); - TinyPoint tinyPoint2 = default(TinyPoint); - tinyPoint2.X = buttonRect.Right + 5 - pixmap.Origin.X; - tinyPoint2.Y = buttonRect.Top + 25 - pixmap.Origin.Y; - 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; - 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; - pos = tinyPoint4; - text = string.Format(MyResource.LoadString(MyResource.TX_GAMER_LIFES), nbVies); - Text.DrawText(pixmap, pos, text, 0.45); - } - - private void DrawTextRightButton(Def.ButtonGlygh glyph, int res) - { - DrawTextRightButton(glyph, MyResource.LoadString(res)); - } - - private void DrawTextRightButton(Def.ButtonGlygh glyph, string text) - { - TinyRect buttonRect = inputPad.GetButtonRect(glyph); - 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 pos = tinyPoint; - Text.DrawText(pixmap, pos, array[0], 0.7); - pos.Y += 24; - Text.DrawText(pixmap, pos, array[1], 0.7); - } - 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 pos2 = tinyPoint2; - Text.DrawText(pixmap, pos2, text, 0.7); - } - } - - 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 pos = tinyPoint; - string text = MyResource.LoadString(res); - Text.DrawTextCenter(pixmap, pos, text, 0.7); - } - - private void DrawWaitProgress() - { - if (continueMission != 0) - { - return; - } - for (int i = 0; i < waitTable.Length; i++) - { - if (waitProgress <= waitTable[i * 2]) - { - waitJauge.SetLevel((int)waitTable[i * 2 + 1]); - break; - } - } - waitJauge.Draw(); - } - - private void DrawDebug() - { - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = 10; - tinyPoint.Y = 20; - TinyPoint pos = tinyPoint; - Text.DrawText(pixmap, pos, inputPad.TotalTouch.ToString(), 1.0); - } - - private void SetGamer(int gamer) - { - gameData.SelectedGamer = gamer; - gameData.Write(); - } - - private void SetPhase(Def.Phase phase) - { - SetPhase(phase, 0); - } - - private void SetPhase(Def.Phase phase, int mission) - { - if (mission != -2) - { - if (missionToStart2 == -1) - { - if ((this.phase == Def.Phase.Init || this.phase == Def.Phase.MainSetup || this.phase == Def.Phase.PlaySetup || this.phase == Def.Phase.Pause || this.phase == Def.Phase.Resume) && fadeOutPhase == Def.Phase.None) - { - fadeOutPhase = phase; - fadeOutMission = mission; - phaseTime = 0; - return; - } - if (phase == Def.Phase.Play) - { - fadeOutPhase = Def.Phase.None; - if (fadeOutMission != -1) - { - missionToStart1 = fadeOutMission; - return; - } - mission = fadeOutMission; - decor.LoadImages(); - } - } - else - { - mission = missionToStart2; - } - } - this.phase = phase; - fadeOutPhase = Def.Phase.None; - inputPad.Phase = this.phase; - playSetup = this.phase == Def.Phase.PlaySetup; - isTrialMode = TrialMode.IsTrialModeEnabled(); - phaseTime = 0; - missionToStart2 = -1; - decor.StopSound(); - switch (this.phase) - { - case Def.Phase.Init: - pixmap.BackgroundCache("init"); - break; - case Def.Phase.Pause: - case Def.Phase.Resume: - pixmap.BackgroundCache("pause"); - break; - case Def.Phase.Lost: - pixmap.BackgroundCache("lost"); - break; - case Def.Phase.Win: - pixmap.BackgroundCache("win"); - break; - case Def.Phase.MainSetup: - case Def.Phase.PlaySetup: - pixmap.BackgroundCache("setup"); - break; - case Def.Phase.Trial: - pixmap.BackgroundCache("trial"); - break; - case Def.Phase.Ranking: - pixmap.BackgroundCache("pause"); - break; - case Def.Phase.Play: - decor.DrawBounds = pixmap.DrawBounds; - break; - } - if (this.phase == Def.Phase.Play && mission > 0) - { - StartMission(mission); - } - } - - private void MemorizeGamerProgress() - { - gameData.NbVies = decor.GetNbVies(); - decor.MemorizeDoors(gameData); - gameData.Write(); - } - //public void SetFullScreen(bool isFullScreen) - //{ - // this.graphics.IsFullScreen = isFullScreen; - // graphics.ToggleFullScreen(); - //} - public void ToggleFullScreen() - { - this.graphics.ToggleFullScreen(); - } - public bool IsFullScreen() { return this.graphics.IsFullScreen; } - public GraphicsDeviceManager getGraphics() - { - return graphics; - } - } -} \ No newline at end of file diff --git a/GameData.cs b/GameData.cs deleted file mode 100644 index d6ad1ee..0000000 --- a/GameData.cs +++ /dev/null @@ -1,220 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.GameData -using System; -using WindowsPhoneSpeedyBlupi; - -namespace WindowsPhoneSpeedyBlupi -{ - - public class GameData - { - private static readonly int HeaderLength = 10; - - private static readonly int DoorsLength = 200; - - private static readonly int GamerLength = 10 + DoorsLength; - - private static readonly int MaxGamer = 3; - - private static readonly int TotalLength = HeaderLength + GamerLength * MaxGamer; - - private readonly byte[] data; - - public int SelectedGamer - { - get - { - return data[2]; - } - set - { - data[2] = (byte)value; - } - } - - public bool Sounds - { - get - { - return data[3] == 1; - } - set - { - data[3] = (byte)(value ? 1u : 0u); - } - } - - public bool JumpRight - { - get - { - return data[4] == 1; - } - set - { - data[4] = (byte)(value ? 1u : 0u); - } - } - - public bool AutoZoom - { - get - { - return data[5] == 1; - } - set - { - data[5] = (byte)(value ? 1u : 0u); - } - } - - public bool AccelActive - { - get - { - return data[6] == 1; - } - set - { - data[6] = (byte)(value ? 1u : 0u); - } - } - - 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 int NbVies - { - get - { - return data[GamerOffset]; - } - set - { - data[GamerOffset] = (byte)value; - } - } - - public int LastWorld - { - get - { - return data[GamerOffset + 1]; - } - set - { - data[GamerOffset + 1] = (byte)value; - } - } - - private int GamerOffset - { - get - { - return GetGamerOffset(SelectedGamer); - } - } - - public GameData() - { - data = new byte[TotalLength]; - Initialize(); - } - - public void Read() - { - Worlds.ReadGameData(data); - } - - public void Write() - { - Worlds.WriteGameData(data); - } - - public void Reset() - { - Initialize(SelectedGamer); - } - - public void GetDoors(int[] doors) - { - for (int i = 0; i < DoorsLength; i++) - { - doors[i] = data[GamerOffset + 10 + i]; - } - } - - public void SetDoors(int[] doors) - { - for (int i = 0; i < DoorsLength; i++) - { - data[GamerOffset + 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) - { - secondaryDoors++; - } - } - mainDoors = 0; - for (int j = 180; j < 200; j++) - { - if (data[GetGamerOffset(gamer) + 10 + j] == 1) - { - mainDoors++; - } - } - } - - private void Initialize() - { - data[0] = 1; - data[1] = 1; - data[2] = 0; - data[3] = 1; - data[4] = 1; - data[5] = 1; - data[6] = 0; - data[7] = 50; - SelectedGamer = 0; - for (int i = 0; i < MaxGamer; i++) - { - Initialize(i); - } - } - - private void Initialize(int gamer) - { - data[GetGamerOffset(gamer)] = 3; - data[GetGamerOffset(gamer) + 1] = 1; - for (int i = 0; i < DoorsLength; i++) - { - data[GetGamerOffset(gamer) + 10 + i] = 0; - } - } - - private int GetGamerOffset(int gamer) - { - return HeaderLength + GamerLength * gamer; - } - } - -} \ No newline at end of file diff --git a/InputPad.cs b/InputPad.cs deleted file mode 100644 index 9c8451e..0000000 --- a/InputPad.cs +++ /dev/null @@ -1,1041 +0,0 @@ -// 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; - -namespace WindowsPhoneSpeedyBlupi -{ - public class InputPad - { - private static readonly int padSize = 140; - - private readonly Game1 game1; - - private readonly Decor decor; - - private readonly Pixmap pixmap; - - private readonly Sound sound; - - private readonly GameData gameData; - - private readonly List pressedGlyphs; - - private readonly Accelerometer accelSensor; - - private readonly Slider accelSlider; - - private bool padPressed; - - private bool showCheatMenu; - - private TinyPoint padTouchPos; - - private Def.ButtonGlygh lastButtonDown; - - private Def.ButtonGlygh buttonPressed; - - private int touchCount; - - private bool accelStarted; - - private bool accelActive; - - private double accelSpeedX; - - private bool accelLastState; - - private bool accelWaitZero; - - private int mission; - - public Def.Phase Phase { get; set; } - - public int SelectedGamer { get; set; } - - public TinyPoint PixmapOrigin { get; set; } - - public int TotalTouch - { - get - { - return touchCount; - } - } - - public Def.ButtonGlygh ButtonPressed - { - get - { - Def.ButtonGlygh result = buttonPressed; - buttonPressed = Def.ButtonGlygh.None; - return result; - } - } - - public bool ShowCheatMenu - { - get - { - return showCheatMenu; - } - set - { - showCheatMenu = value; - } - } - - private IEnumerable ButtonGlyphs - { - get - { - 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) - { - yield return Def.ButtonGlygh.InitBuy; - } - if (game1.IsRankingMode) - { - yield return Def.ButtonGlygh.InitRanking; - } - break; - case Def.Phase.Play: - yield return Def.ButtonGlygh.PlayPause; - yield return Def.ButtonGlygh.PlayAction; - yield return Def.ButtonGlygh.PlayJump; - if (accelStarted) - { - yield return 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; - break; - case Def.Phase.Pause: - yield return Def.ButtonGlygh.PauseMenu; - if (mission != 1) - { - yield return Def.ButtonGlygh.PauseBack; - } - yield return Def.ButtonGlygh.PauseSetup; - if (mission != 1 && mission % 10 != 0) - { - yield return Def.ButtonGlygh.PauseRestart; - } - yield return Def.ButtonGlygh.PauseContinue; - break; - case Def.Phase.Resume: - yield return Def.ButtonGlygh.ResumeMenu; - yield return Def.ButtonGlygh.ResumeContinue; - break; - case Def.Phase.Lost: - case Def.Phase.Win: - yield return Def.ButtonGlygh.WinLostReturn; - break; - case Def.Phase.Trial: - yield return Def.ButtonGlygh.TrialBuy; - yield return 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; - 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; - break; - case Def.Phase.Ranking: - yield return 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; - } - } - } - - private TinyPoint PadCenter - { - get - { - TinyRect drawBounds = pixmap.DrawBounds; - if (gameData.JumpRight) - { - TinyPoint result = default(TinyPoint); - result.X = 100; - result.Y = drawBounds.Height - 100; - return result; - } - TinyPoint result2 = default(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) - { - //IL_0037: Unknown result type (might be due to invalid IL or missing references) - //IL_0041: Expected O, but got Unknown - this.game1 = game1; - this.decor = decor; - this.pixmap = pixmap; - this.sound = sound; - this.gameData = gameData; - pressedGlyphs = new List(); - accelSensor = AccelerometerFactory.Create(); - accelSensor.CurrentValueChanged += HandleAccelSensorCurrentValueChanged; - accelSlider = new Slider - { - TopLeftCorner = new TinyPoint - { - X = 320, - Y = 400 - }, - Value = this.gameData.AccelSensitivity - }; - lastButtonDown = Def.ButtonGlygh.None; - buttonPressed = Def.ButtonGlygh.None; - } - - public void StartMission(int mission) - { - this.mission = mission; - accelWaitZero = true; - } - - private TinyPoint createTinyPoint(int x, int y) - { - TinyPoint tinyPoint = new TinyPoint(); - tinyPoint.X = x; - tinyPoint.Y = y; - return tinyPoint; - } - public void Update() - { - pressedGlyphs.Clear(); - if (accelActive != gameData.AccelActive) - { - accelActive = gameData.AccelActive; - if (accelActive) - { - StartAccel(); - } - else - { - StopAccel(); - } - } - double horizontalChange = 0.0; - double verticalChange = 0.0; - int num3 = 0; - padPressed = false; - Def.ButtonGlygh buttonGlygh = Def.ButtonGlygh.None; - //TouchCollection touches = TouchPanel.GetState(); - //touchCount = touches.Count; - List touchesOrClicks = new List(); - //foreach (TouchLocation item in touches) - //{ - // if (item.State == TouchLocationState.Pressed || item.State == TouchLocationState.Moved) - // { - // TinyPoint tinyPoint = default(TinyPoint); - // tinyPoint.X = (int)item.Position.X; - // tinyPoint.Y = (int)item.Position.Y; - // touchesOrClicks.Add(tinyPoint); - // } - //} - - MouseState mouseState = Mouse.GetState(); - if (mouseState.LeftButton == ButtonState.Pressed) - { - touchCount++; - TinyPoint click = new TinyPoint(); - click.X = mouseState.X; - click.Y = mouseState.Y; - touchesOrClicks.Add(click); - } - - - - - - - - float screenWidth = game1.getGraphics().GraphicsDevice.Viewport.Width; - float screenHeight = game1.getGraphics().GraphicsDevice.Viewport.Height; - float screenRatio = screenWidth / screenHeight; - - //if (Def.PLATFORM == Platform.Android && screenRatio > 1.3333333333333333) - { - for (int i = 0; i < touchesOrClicks.Count; i++) - { - - var touchOrClick = touchesOrClicks[i]; - if (touchOrClick.X == -1) continue; - - float originalX = touchOrClick.X; - float originalY = touchOrClick.Y; - - float widthHeightRatio = screenWidth / screenHeight; - float heightRatio = 480 / screenHeight; - float widthRatio = 640 / screenWidth; - //if (Def.DETAILED_DEBUGGING) - //{ - // Debug.WriteLine("-----"); - // Debug.WriteLine("originalX=" + originalX); - // Debug.WriteLine("originalY=" + originalY); - // Debug.WriteLine("heightRatio=" + heightRatio); - // Debug.WriteLine("widthRatio=" + widthRatio); - // Debug.WriteLine("widthHeightRatio=" + widthHeightRatio); - //} - if (screenHeight > 480) - { - touchOrClick.X = (int)(originalX * heightRatio); - touchOrClick.Y = (int)(originalY * heightRatio); - touchesOrClicks[i] = touchOrClick; - } - - //if (Def.DETAILED_DEBUGGING) Debug.WriteLine("new X" + touchOrClick.X); - //if (Def.DETAILED_DEBUGGING) Debug.WriteLine("new Y" + touchOrClick.Y); - } - } - - - - - - - - KeyboardState newState = Keyboard.GetState(); - { - if (newState.IsKeyDown(Keys.LeftControl)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.LeftControl))); - if (newState.IsKeyDown(Keys.Up)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.Up))); - if (newState.IsKeyDown(Keys.Right)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.Right))); - if (newState.IsKeyDown(Keys.Down)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.Down))); - if (newState.IsKeyDown(Keys.Left)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.Left))); - if (newState.IsKeyDown(Keys.Space)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.Space))); - } - if (newState.IsKeyDown(Keys.F11)) - { - game1.ToggleFullScreen (); - Debug.WriteLine("F11 was pressed."); - } - - Boolean keyPressedUp = false; - Boolean keyPressedDown = false; - Boolean keyPressedLeft = false; - Boolean keyPressedRight = false; - foreach (TinyPoint touchOrClick in touchesOrClicks) - { - Boolean keyboardPressed = false; - if (touchOrClick.X == -1) - { - keyboardPressed = true; - } - KeyboardPress keyboardPress = keyboardPressed ? Misc.intToKeyboardPress(touchOrClick.Y) : KeyboardPress.None; - keyPressedUp = keyboardPress == KeyboardPress.Up ? true : keyPressedUp; - keyPressedDown = keyboardPress == KeyboardPress.Down ? true : keyPressedDown; - keyPressedLeft = keyboardPress == KeyboardPress.Left ? true : keyPressedLeft; - keyPressedRight = keyboardPress == KeyboardPress.Right ? true : keyPressedRight; - - { - TinyPoint tinyPoint2 = keyboardPressed ? createTinyPoint(1, 1) : touchOrClick; - if (!accelStarted && Misc.IsInside(GetPadBounds(PadCenter, padSize), tinyPoint2)) - { - padPressed = true; - padTouchPos = tinyPoint2; - } - if (keyboardPress == KeyboardPress.Up || keyboardPress == KeyboardPress.Right || keyboardPress == KeyboardPress.Down || keyboardPress == KeyboardPress.Left) - { - padPressed = true; - } - Debug.WriteLine("padPressed=" + padPressed); - Def.ButtonGlygh buttonGlygh2 = ButtonDetect(tinyPoint2); - Debug.WriteLine("buttonGlyph2 =" + buttonGlygh2); - if (buttonGlygh2 != 0) - { - pressedGlyphs.Add(buttonGlygh2); - } - if (keyboardPressed) - { - switch (keyboardPress) - { - case KeyboardPress.LeftControl: buttonGlygh2 = Def.ButtonGlygh.PlayJump; pressedGlyphs.Add(buttonGlygh2); break; - case KeyboardPress.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; - } - switch (buttonGlygh2) - { - case Def.ButtonGlygh.PlayJump: - Debug.WriteLine("Jumping detected"); - accelWaitZero = false; - num3 |= 1; - break; - case Def.ButtonGlygh.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: - accelWaitZero = false; - buttonGlygh = buttonGlygh2; - showCheatMenu = false; - break; - } - } - } - 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) - { - TinyPoint tinyPoint3 = default(TinyPoint); - tinyPoint3.X = 320; - tinyPoint3.Y = 240; - TinyPoint pos = tinyPoint3; - sound.PlayImage(0, pos); - } - if (buttonGlygh == Def.ButtonGlygh.None && lastButtonDown != 0) - { - buttonPressed = lastButtonDown; - } - lastButtonDown = buttonGlygh; - if (padPressed) - { - 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); - Debug.WriteLine("keyPressedDown=" + keyPressedDown); - Debug.WriteLine("keyPressedLeft=" + keyPressedLeft); - Debug.WriteLine(" keyPressedRight=" + keyPressedRight); - { - 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; - } - 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; - } - 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; - } - 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; - } - } - double horizontalPosition = padTouchPos.X - PadCenter.X; - double verticalPosition = padTouchPos.Y - PadCenter.Y; - - if (horizontalPosition > 20.0) - { - horizontalChange += 1.0; - Debug.WriteLine(" horizontalChange += 1.0;"); - } - if (horizontalPosition < -20.0) - { - horizontalChange -= 1.0; - Debug.WriteLine(" horizontalChange -= 1.0;"); - - } - if (verticalPosition > 20.0) - { - verticalChange += 1.0; - Debug.WriteLine(" verticalPosition += 1.0;"); - - } - if (verticalPosition < -20.0) - { - verticalChange -= 1.0; - Debug.WriteLine(" verticalPosition -= 1.0;"); - } - - } - if (accelStarted) - { - horizontalChange = accelSpeedX; - verticalChange = 0.0; - if (((uint)num3 & 4u) != 0) - { - verticalChange = 1.0; - } - } - decor.SetSpeedX(horizontalChange); - decor.SetSpeedY(verticalChange); - decor.KeyChange(num3); - } - - private Def.ButtonGlygh ButtonDetect(TinyPoint pos) - { - foreach (Def.ButtonGlygh item in ButtonGlyphs.Reverse()) - { - int value = 0; - if (item == Def.ButtonGlygh.PlayJump || item == Def.ButtonGlygh.PlayAction || item == Def.ButtonGlygh.PlayDown || item == Def.ButtonGlygh.PlayPause) - { - value = 20; - } - TinyRect rect = Misc.Inflate(GetButtonRect(item), value); - if (Misc.IsInside(rect, pos)) - { - return item; - } - } - return Def.ButtonGlygh.None; - } - - public void Draw() - { - 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, 1, GetPadBounds(center, padSize / 2), 1.0, false); - } - foreach (Def.ButtonGlygh buttonGlyph in ButtonGlyphs) - { - bool pressed = pressedGlyphs.Contains(buttonGlyph); - bool selected = false; - if (buttonGlyph >= Def.ButtonGlygh.InitGamerA && buttonGlyph <= Def.ButtonGlygh.InitGamerC) - { - int num = (int)(buttonGlyph - 1); - selected = num == gameData.SelectedGamer; - } - if (buttonGlyph == Def.ButtonGlygh.SetupSounds) - { - selected = gameData.Sounds; - } - if (buttonGlyph == Def.ButtonGlygh.SetupJump) - { - selected = gameData.JumpRight; - } - if (buttonGlyph == Def.ButtonGlygh.SetupZoom) - { - selected = gameData.AutoZoom; - } - if (buttonGlyph == Def.ButtonGlygh.SetupAccel) - { - selected = gameData.AccelActive; - } - pixmap.DrawInputButton(GetButtonRect(buttonGlyph), buttonGlyph, pressed, selected); - } - if ((Phase == Def.Phase.MainSetup || Phase == Def.Phase.PlaySetup) && gameData.AccelActive) - { - accelSlider.Draw(pixmap); - } - } - - private TinyRect GetPadBounds(TinyPoint center, int radius) - { - TinyRect result = default(TinyRect); - result.Left = center.X - radius; - result.Right = center.X + radius; - result.Top = center.Y - radius; - result.Bottom = center.Y + radius; - return result; - } - - public TinyRect GetButtonRect(Def.ButtonGlygh glyph) - { - 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) - { - int num6 = (int)(glyph - 35); - TinyRect result = default(TinyRect); - result.Left = 80 * num6; - result.Right = 80 * (num6 + 1); - result.Top = 0; - result.Bottom = 80; - return result; - } - switch (glyph) - { - case Def.ButtonGlygh.InitGamerA: - { - TinyRect result19 = default(TinyRect); - result19.Left = (int)(20.0 + num4 * 0.0); - result19.Right = (int)(20.0 + num4 * 0.5); - result19.Top = (int)(num2 - 20.0 - num4 * 2.1); - result19.Bottom = (int)(num2 - 20.0 - num4 * 1.6); - return result19; - } - case Def.ButtonGlygh.InitGamerB: - { - TinyRect result18 = default(TinyRect); - result18.Left = (int)(20.0 + num4 * 0.0); - result18.Right = (int)(20.0 + num4 * 0.5); - result18.Top = (int)(num2 - 20.0 - num4 * 1.6); - result18.Bottom = (int)(num2 - 20.0 - num4 * 1.1); - return result18; - } - case Def.ButtonGlygh.InitGamerC: - { - TinyRect result15 = default(TinyRect); - result15.Left = (int)(20.0 + num4 * 0.0); - result15.Right = (int)(20.0 + num4 * 0.5); - result15.Top = (int)(num2 - 20.0 - num4 * 1.1); - result15.Bottom = (int)(num2 - 20.0 - num4 * 0.6); - return result15; - } - case Def.ButtonGlygh.InitSetup: - { - TinyRect result14 = default(TinyRect); - result14.Left = (int)(20.0 + num4 * 0.0); - result14.Right = (int)(20.0 + num4 * 0.5); - result14.Top = (int)(num2 - 20.0 - num4 * 0.5); - result14.Bottom = (int)(num2 - 20.0 - num4 * 0.0); - return result14; - } - case Def.ButtonGlygh.InitPlay: - { - TinyRect result11 = default(TinyRect); - result11.Left = (int)(num - 20.0 - num4 * 1.0); - result11.Right = (int)(num - 20.0 - num4 * 0.0); - result11.Top = (int)(num2 - 40.0 - num4 * 1.0); - result11.Bottom = (int)(num2 - 40.0 - num4 * 0.0); - return result11; - } - case Def.ButtonGlygh.InitBuy: - case Def.ButtonGlygh.InitRanking: - { - TinyRect result10 = default(TinyRect); - result10.Left = (int)(num - 20.0 - num4 * 0.75); - result10.Right = (int)(num - 20.0 - num4 * 0.25); - result10.Top = (int)(num2 - 20.0 - num4 * 2.1); - result10.Bottom = (int)(num2 - 20.0 - num4 * 1.6); - return result10; - } - case Def.ButtonGlygh.PauseMenu: - { - TinyRect result37 = default(TinyRect); - result37.Left = (int)((double)PixmapOrigin.X + num4 * -0.21); - result37.Right = (int)((double)PixmapOrigin.X + num4 * 0.79); - result37.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2); - result37.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2); - return result37; - } - case Def.ButtonGlygh.PauseBack: - { - TinyRect result36 = default(TinyRect); - result36.Left = (int)((double)PixmapOrigin.X + num4 * 0.79); - result36.Right = (int)((double)PixmapOrigin.X + num4 * 1.79); - result36.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2); - result36.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2); - return result36; - } - case Def.ButtonGlygh.PauseSetup: - { - TinyRect result35 = default(TinyRect); - result35.Left = (int)((double)PixmapOrigin.X + num4 * 1.79); - result35.Right = (int)((double)PixmapOrigin.X + num4 * 2.79); - result35.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2); - result35.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2); - return result35; - } - case Def.ButtonGlygh.PauseRestart: - { - TinyRect result34 = default(TinyRect); - result34.Left = (int)((double)PixmapOrigin.X + num4 * 2.79); - result34.Right = (int)((double)PixmapOrigin.X + num4 * 3.79); - result34.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2); - result34.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2); - return result34; - } - case Def.ButtonGlygh.PauseContinue: - { - TinyRect result33 = default(TinyRect); - result33.Left = (int)((double)PixmapOrigin.X + num4 * 3.79); - result33.Right = (int)((double)PixmapOrigin.X + num4 * 4.79); - result33.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2); - result33.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2); - return result33; - } - case Def.ButtonGlygh.ResumeMenu: - { - TinyRect result32 = default(TinyRect); - result32.Left = (int)((double)PixmapOrigin.X + num4 * 1.29); - result32.Right = (int)((double)PixmapOrigin.X + num4 * 2.29); - result32.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2); - result32.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2); - return result32; - } - case Def.ButtonGlygh.ResumeContinue: - { - TinyRect result31 = default(TinyRect); - result31.Left = (int)((double)PixmapOrigin.X + num4 * 2.29); - result31.Right = (int)((double)PixmapOrigin.X + num4 * 3.29); - result31.Top = (int)((double)PixmapOrigin.Y + num4 * 2.2); - result31.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.2); - return result31; - } - case Def.ButtonGlygh.WinLostReturn: - { - TinyRect result30 = default(TinyRect); - result30.Left = (int)((double)PixmapOrigin.X + num - num3 * 2.2); - result30.Right = (int)((double)PixmapOrigin.X + num - num3 * 1.2); - result30.Top = (int)((double)PixmapOrigin.Y + num3 * 0.2); - result30.Bottom = (int)((double)PixmapOrigin.Y + num3 * 1.2); - return result30; - } - case Def.ButtonGlygh.TrialBuy: - { - TinyRect result29 = default(TinyRect); - result29.Left = (int)((double)PixmapOrigin.X + num4 * 2.5); - result29.Right = (int)((double)PixmapOrigin.X + num4 * 3.5); - result29.Top = (int)((double)PixmapOrigin.Y + num4 * 2.1); - result29.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.1); - return result29; - } - case Def.ButtonGlygh.TrialCancel: - { - TinyRect result28 = default(TinyRect); - result28.Left = (int)((double)PixmapOrigin.X + num4 * 3.5); - result28.Right = (int)((double)PixmapOrigin.X + num4 * 4.5); - result28.Top = (int)((double)PixmapOrigin.Y + num4 * 2.1); - result28.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.1); - return result28; - } - case Def.ButtonGlygh.RankingContinue: - { - TinyRect result27 = default(TinyRect); - result27.Left = (int)((double)PixmapOrigin.X + num4 * 3.5); - result27.Right = (int)((double)PixmapOrigin.X + num4 * 4.5); - result27.Top = (int)((double)PixmapOrigin.Y + num4 * 2.1); - result27.Bottom = (int)((double)PixmapOrigin.Y + num4 * 3.1); - return result27; - } - case Def.ButtonGlygh.SetupSounds: - { - TinyRect result26 = default(TinyRect); - result26.Left = (int)(20.0 + num4 * 0.0); - result26.Right = (int)(20.0 + num4 * 0.5); - result26.Top = (int)(num2 - 20.0 - num4 * 2.0); - result26.Bottom = (int)(num2 - 20.0 - num4 * 1.5); - return result26; - } - case Def.ButtonGlygh.SetupJump: - { - TinyRect result25 = default(TinyRect); - result25.Left = (int)(20.0 + num4 * 0.0); - result25.Right = (int)(20.0 + num4 * 0.5); - result25.Top = (int)(num2 - 20.0 - num4 * 1.5); - result25.Bottom = (int)(num2 - 20.0 - num4 * 1.0); - return result25; - } - case Def.ButtonGlygh.SetupZoom: - { - TinyRect result24 = default(TinyRect); - result24.Left = (int)(20.0 + num4 * 0.0); - result24.Right = (int)(20.0 + num4 * 0.5); - result24.Top = (int)(num2 - 20.0 - num4 * 1.0); - result24.Bottom = (int)(num2 - 20.0 - num4 * 0.5); - return result24; - } - case Def.ButtonGlygh.SetupAccel: - { - TinyRect result23 = default(TinyRect); - result23.Left = (int)(20.0 + num4 * 0.0); - result23.Right = (int)(20.0 + num4 * 0.5); - result23.Top = (int)(num2 - 20.0 - num4 * 0.5); - result23.Bottom = (int)(num2 - 20.0 - num4 * 0.0); - return result23; - } - case Def.ButtonGlygh.SetupReset: - { - TinyRect result22 = default(TinyRect); - result22.Left = (int)(450.0 + num4 * 0.0); - result22.Right = (int)(450.0 + num4 * 0.5); - result22.Top = (int)(num2 - 20.0 - num4 * 2.0); - result22.Bottom = (int)(num2 - 20.0 - num4 * 1.5); - return result22; - } - case Def.ButtonGlygh.SetupReturn: - { - TinyRect result21 = default(TinyRect); - result21.Left = (int)(num - 20.0 - num4 * 0.8); - result21.Right = (int)(num - 20.0 - num4 * 0.0); - result21.Top = (int)(num2 - 20.0 - num4 * 0.8); - result21.Bottom = (int)(num2 - 20.0 - num4 * 0.0); - return result21; - } - case Def.ButtonGlygh.PlayPause: - { - TinyRect result20 = default(TinyRect); - result20.Left = (int)(num - num3 * 0.7); - result20.Right = (int)(num - num3 * 0.2); - result20.Top = (int)(num3 * 0.2); - result20.Bottom = (int)(num3 * 0.7); - return result20; - } - case Def.ButtonGlygh.PlayAction: - { - if (gameData.JumpRight) - { - TinyRect result16 = default(TinyRect); - result16.Left = (int)((double)drawBounds.Width - num3 * 1.2); - result16.Right = (int)((double)drawBounds.Width - num3 * 0.2); - result16.Top = (int)(num2 - num3 * 2.6); - result16.Bottom = (int)(num2 - num3 * 1.6); - return result16; - } - TinyRect result17 = default(TinyRect); - result17.Left = (int)(num3 * 0.2); - result17.Right = (int)(num3 * 1.2); - result17.Top = (int)(num2 - num3 * 2.6); - result17.Bottom = (int)(num2 - num3 * 1.6); - return result17; - } - case Def.ButtonGlygh.PlayJump: - { - if (gameData.JumpRight) - { - TinyRect result12 = default(TinyRect); - result12.Left = (int)((double)drawBounds.Width - num3 * 1.2); - result12.Right = (int)((double)drawBounds.Width - num3 * 0.2); - result12.Top = (int)(num2 - num3 * 1.2); - result12.Bottom = (int)(num2 - num3 * 0.2); - return result12; - } - TinyRect result13 = default(TinyRect); - result13.Left = (int)(num3 * 0.2); - result13.Right = (int)(num3 * 1.2); - result13.Top = (int)(num2 - num3 * 1.2); - result13.Bottom = (int)(num2 - num3 * 0.2); - return result13; - } - case Def.ButtonGlygh.PlayDown: - { - if (gameData.JumpRight) - { - TinyRect result8 = default(TinyRect); - result8.Left = (int)(num3 * 0.2); - result8.Right = (int)(num3 * 1.2); - result8.Top = (int)(num2 - num3 * 1.2); - result8.Bottom = (int)(num2 - num3 * 0.2); - return result8; - } - TinyRect result9 = default(TinyRect); - result9.Left = (int)((double)drawBounds.Width - num3 * 1.2); - result9.Right = (int)((double)drawBounds.Width - num3 * 0.2); - result9.Top = (int)(num2 - num3 * 1.2); - result9.Bottom = (int)(num2 - num3 * 0.2); - return result9; - } - case Def.ButtonGlygh.Cheat11: - { - TinyRect result7 = default(TinyRect); - result7.Left = (int)(num5 * 0.0); - result7.Right = (int)(num5 * 1.0); - result7.Top = (int)(num5 * 0.0); - result7.Bottom = (int)(num5 * 1.0); - return result7; - } - case Def.ButtonGlygh.Cheat12: - { - TinyRect result6 = default(TinyRect); - result6.Left = (int)(num5 * 0.0); - result6.Right = (int)(num5 * 1.0); - result6.Top = (int)(num5 * 1.0); - result6.Bottom = (int)(num5 * 2.0); - return result6; - } - case Def.ButtonGlygh.Cheat21: - { - TinyRect result5 = default(TinyRect); - result5.Left = (int)(num5 * 1.0); - result5.Right = (int)(num5 * 2.0); - result5.Top = (int)(num5 * 0.0); - result5.Bottom = (int)(num5 * 1.0); - return result5; - } - case Def.ButtonGlygh.Cheat22: - { - TinyRect result4 = default(TinyRect); - result4.Left = (int)(num5 * 1.0); - result4.Right = (int)(num5 * 2.0); - result4.Top = (int)(num5 * 1.0); - result4.Bottom = (int)(num5 * 2.0); - return result4; - } - case Def.ButtonGlygh.Cheat31: - { - TinyRect result3 = default(TinyRect); - result3.Left = (int)(num5 * 2.0); - result3.Right = (int)(num5 * 3.0); - result3.Top = (int)(num5 * 0.0); - result3.Bottom = (int)(num5 * 1.0); - return result3; - } - case Def.ButtonGlygh.Cheat32: - { - TinyRect result2 = default(TinyRect); - result2.Left = (int)(num5 * 2.0); - result2.Right = (int)(num5 * 3.0); - result2.Top = (int)(num5 * 1.0); - result2.Bottom = (int)(num5 * 2.0); - return result2; - } - default: - return default(TinyRect); - } - } - - private void StartAccel() - { - try - { - accelSensor.Start(); - accelStarted = true; - } - catch (AccelerometerFailedException) - { - accelStarted = false; - } - catch (UnauthorizedAccessException) - { - accelStarted = false; - } - } - - private void StopAccel() - { - if (accelStarted) - { - try - { - accelSensor.Stop(); - } - catch (AccelerometerFailedException) - { - } - accelStarted = false; - } - } - - - 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 num2 = (accelLastState ? (num * 0.6f) : num); - if (y > num2) - { - 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); - } - else - { - accelSpeedX = 0.0; - } - accelLastState = accelSpeedX != 0.0; - if (accelWaitZero) - { - if (accelSpeedX == 0.0) - { - accelWaitZero = false; - } - else - { - accelSpeedX = 0.0; - } - } - } - } - -} \ No newline at end of file diff --git a/Jauge.cs b/Jauge.cs deleted file mode 100644 index c479539..0000000 --- a/Jauge.cs +++ /dev/null @@ -1,159 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Jauge -using Microsoft.Xna.Framework.Media; -using WindowsPhoneSpeedyBlupi; - -namespace WindowsPhoneSpeedyBlupi -{ - public class Jauge - { - private Pixmap m_pixmap; - - private Sound m_sound; - - private bool m_bHide; - - private TinyPoint m_pos; - - private TinyPoint m_dim; - - private int m_mode; - - private int m_level; - - private bool m_bMinimizeRedraw; - - private bool m_bRedraw; - - private double m_zoom; - - public double Zoom - { - get - { - return m_zoom; - } - set - { - m_zoom = value; - } - } - - public Jauge() - { - m_mode = 0; - m_bHide = true; - m_bMinimizeRedraw = false; - m_bRedraw = false; - m_zoom = 1.0; - } - - public bool Create(Pixmap pixmap, Sound sound, TinyPoint pos, int mode, bool bMinimizeRedraw) - { - m_pixmap = pixmap; - m_sound = sound; - m_mode = mode; - m_bMinimizeRedraw = bMinimizeRedraw; - m_bHide = true; - m_pos = pos; - m_dim.X = 124; - m_dim.Y = 22; - m_level = 0; - m_bRedraw = true; - return true; - } - - public void Draw() - { - TinyRect rect = default(TinyRect); - if (m_bMinimizeRedraw && !m_bRedraw) - { - return; - } - m_bRedraw = false; - if (!m_bHide) - { - int num = m_level * 114 / 100; - rect.Left = 0; - rect.Right = 124; - rect.Top = 0; - rect.Bottom = 22; - m_pixmap.DrawPart(5, m_pos, rect, m_zoom); - if (num > 0) - { - rect.Left = 0; - rect.Right = 6 + num; - rect.Top = 22 * m_mode; - rect.Bottom = 22 * (m_mode + 1); - m_pixmap.DrawPart(5, m_pos, rect, m_zoom); - } - } - } - - public void Redraw() - { - m_bRedraw = true; - } - - public int GetLevel() - { - return m_level; - } - - public void SetLevel(int level) - { - if (level < 0) - { - level = 0; - } - if (level > 100) - { - level = 100; - } - if (m_level != level) - { - m_bRedraw = true; - } - m_level = level; - } - - public int GetMode() - { - return m_mode; - } - - public void SetMode(int mode) - { - if (m_mode != mode) - { - m_bRedraw = true; - } - m_mode = mode; - } - - public bool GetHide() - { - return m_bHide; - } - - public void SetHide(bool bHide) - { - if (m_bHide != bHide) - { - m_bRedraw = true; - } - m_bHide = bHide; - } - - public TinyPoint GetPos() - { - return m_pos; - } - - public void SetRedraw() - { - m_bRedraw = true; - } - } - -} \ No newline at end of file diff --git a/MarketPlace.cs b/MarketPlace.cs deleted file mode 100644 index bdf362e..0000000 --- a/MarketPlace.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Xna.Framework; - -namespace WindowsPhoneSpeedyBlupi -{ - public class MarketPlace - { - public static void Show(PlayerIndex playerIndex) - { - //Guide.ShowMarketplace(PlayerIndex.One); - Debug.Write("The Market Place should be shown."); - } - } -} diff --git a/Misc.cs b/Misc.cs deleted file mode 100644 index d8ca51b..0000000 --- a/Misc.cs +++ /dev/null @@ -1,156 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Misc -using System; -using Microsoft.Xna.Framework; -using WindowsPhoneSpeedyBlupi; -using static WindowsPhoneSpeedyBlupi.Def; - - -namespace WindowsPhoneSpeedyBlupi -{ - public static class Misc - { - public static Rectangle RotateAdjust(Rectangle rect, double angle) - { - TinyPoint tinyPoint = default(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); - } - - public static TinyPoint RotatePointRad(double angle, TinyPoint p) - { - return RotatePointRad(default(TinyPoint), angle, p); - } - - public static TinyPoint RotatePointRad(TinyPoint center, double angle, TinyPoint p) - { - TinyPoint tinyPoint = default(TinyPoint); - TinyPoint result = default(TinyPoint); - tinyPoint.X = p.X - center.X; - tinyPoint.Y = p.Y - center.Y; - 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; - result.Y += center.Y; - return result; - } - - public static double DegToRad(double angle) - { - return angle * Math.PI / 180.0; - } - - public static int Approch(int actual, int final, int step) - { - if (actual < final) - { - actual = Math.Min(actual + step, final); - } - else if (actual > final) - { - actual = Math.Max(actual - step, final); - } - return actual; - } - - public static int Speed(double speed, int max) - { - if (speed > 0.0) - { - return Math.Max((int)(speed * (double)max), 1); - } - if (speed < 0.0) - { - return Math.Min((int)(speed * (double)max), -1); - } - return 0; - } - - public static TinyRect Inflate(TinyRect rect, int value) - { - TinyRect result = default(TinyRect); - result.Left = rect.Left - value; - result.Right = rect.Right + value; - result.Top = rect.Top - value; - result.Bottom = rect.Bottom + value; - return result; - } - - public static bool IsInside(TinyRect rect, TinyPoint p) - { - if (p.X >= rect.Left && p.X <= rect.Right && p.Y >= rect.Top) - { - return p.Y <= rect.Bottom; - } - return false; - } - - public static bool IntersectRect(out TinyRect dst, TinyRect src1, TinyRect src2) - { - dst = default(TinyRect); - dst.Left = Math.Max(src1.Left, src2.Left); - dst.Right = Math.Min(src1.Right, src2.Right); - dst.Top = Math.Max(src1.Top, src2.Top); - dst.Bottom = Math.Min(src1.Bottom, src2.Bottom); - return !IsRectEmpty(dst); - } - - public static bool UnionRect(out TinyRect dst, TinyRect src1, TinyRect src2) - { - dst = default(TinyRect); - dst.Left = Math.Min(src1.Left, src2.Left); - dst.Right = Math.Max(src1.Right, src2.Right); - dst.Top = Math.Min(src1.Top, src2.Top); - dst.Bottom = Math.Max(src1.Bottom, src2.Bottom); - return !IsRectEmpty(dst); - } - - private static bool IsRectEmpty(TinyRect rect) - { - if (rect.Left < rect.Right) - { - return rect.Top >= rect.Bottom; - } - return true; - } - - public static KeyboardPress intToKeyboardPress(int i) { - switch (i) - { - case 0: return KeyboardPress.None; - case 1: return KeyboardPress.Up; - case 2: return KeyboardPress.Right; - case 3: return KeyboardPress.Down; - case 4: return KeyboardPress.Left; - case 5: return KeyboardPress.LeftControl; - case 6: return KeyboardPress.Space; - case 7: return KeyboardPress.Escape; - case 8: return KeyboardPress.Pause; - 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); - } - } - } -} \ No newline at end of file diff --git a/MyResource.cs b/MyResource.cs deleted file mode 100644 index 459d4e4..0000000 --- a/MyResource.cs +++ /dev/null @@ -1,776 +0,0 @@ -// 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 - { - public static readonly int TX_BUTTON_PLAY; - - public static readonly int TX_BUTTON_MENU; - - public static readonly int TX_BUTTON_BACK; - - public static readonly int TX_BUTTON_RESTART; - - public static readonly int TX_BUTTON_CONTINUE; - - public static readonly int TX_BUTTON_BUY; - - public static readonly int TX_BUTTON_SETUP; - - public static readonly int TX_BUTTON_SETUP_SOUNDS; - - public static readonly int TX_BUTTON_SETUP_JUMP; - - public static readonly int TX_BUTTON_SETUP_ZOOM; - - public static readonly int TX_BUTTON_SETUP_ACCEL; - - public static readonly int TX_BUTTON_SETUP_RESET; - - public static readonly int TX_BUTTON_RANKING; - - public static readonly int TX_GAMER_TITLE; - - public static readonly int TX_GAMER_MDOORS; - - public static readonly int TX_GAMER_SDOORS; - - public static readonly int TX_GAMER_LIFES; - - public static readonly int TX_TRIAL1; - - public static readonly int TX_TRIAL2; - - public static readonly int TX_TRIAL3; - - public static readonly int TX_TRIAL4; - - public static readonly int TX_TRIAL5; - - public static readonly int TX_TRIAL6; - - public static readonly int TX_TRAINING101; - - public static readonly int TX_TRAINING102; - - public static readonly int TX_TRAINING103; - - public static readonly int TX_TRAINING104; - - public static readonly int TX_TRAINING105; - - public static readonly int TX_TRAINING106; - - public static readonly int TX_TRAINING107; - - public static readonly int TX_TRAINING108; - - public static readonly int TX_TRAINING109; - - public static readonly int TX_TRAINING110; - - public static readonly int TX_TRAINING111; - - public static readonly int TX_TRAINING112; - - public static readonly int TX_TRAINING113; - - public static readonly int TX_TRAINING114; - - public static readonly int TX_TRAINING115; - - public static readonly int TX_TRAINING116; - - public static readonly int TX_TRAINING117; - - public static readonly int TX_TRAINING118; - - public static readonly int TX_TRAINING119; - - public static readonly int TX_TRAINING120; - - public static readonly int TX_TRAINING121; - - public static readonly int TX_TRAINING122; - - public static readonly int TX_TRAINING123; - - public static readonly int TX_TRAINING201; - - public static readonly int TX_TRAINING202; - - public static readonly int TX_TRAINING203; - - public static readonly int TX_TRAINING204; - - public static readonly int TX_TRAINING205; - - public static readonly int TX_TRAINING206; - - public static readonly int TX_TRAINING207; - - public static readonly int TX_TRAINING208; - - public static readonly int TX_TRAINING209; - - public static readonly int TX_TRAINING210; - - public static readonly int TX_TRAINING301; - - public static readonly int TX_TRAINING302; - - public static readonly int TX_TRAINING303; - - public static readonly int TX_TRAINING304; - - public static readonly int TX_TRAINING305; - - public static readonly int TX_TRAINING306; - - public static readonly int TX_TRAINING307; - - public static readonly int TX_TRAINING308; - - public static readonly int TX_TRAINING309; - - public static readonly int TX_TRAINING310; - - public static readonly int TX_TRAINING311; - - public static readonly int TX_TRAINING401; - - public static readonly int TX_TRAINING402; - - public static readonly int TX_TRAINING403; - - public static readonly int TX_TRAINING404; - - public static readonly int TX_TRAINING405; - - public static readonly int TX_TRAINING406; - - public static readonly int TX_TRAINING407; - - public static readonly int TX_TRAINING408; - - public static readonly int TX_TRAINING409; - - public static readonly int TX_TRAINING410; - - public static readonly int TX_TRAINING101a; - - public static readonly int TX_TRAINING102a; - - public static readonly int TX_TRAINING103a; - - public static readonly int TX_TRAINING104a; - - public static readonly int TX_TRAINING105a; - - public static readonly int TX_TRAINING106a; - - public static readonly int TX_TRAINING107a; - - public static readonly int TX_TRAINING108a; - - public static readonly int TX_TRAINING109a; - - public static readonly int TX_TRAINING110a; - - public static readonly int TX_TRAINING111a; - - public static readonly int TX_TRAINING112a; - - public static readonly int TX_TRAINING113a; - - public static readonly int TX_TRAINING114a; - - public static readonly int TX_TRAINING115a; - - public static readonly int TX_TRAINING116a; - - public static readonly int TX_TRAINING117a; - - public static readonly int TX_TRAINING118a; - - public static readonly int TX_TRAINING119a; - - public static readonly int TX_TRAINING120a; - - public static readonly int TX_TRAINING121a; - - public static readonly int TX_TRAINING122a; - - public static readonly int TX_TRAINING123a; - - public static readonly int TX_TRAINING201a; - - public static readonly int TX_TRAINING202a; - - public static readonly int TX_TRAINING203a; - - public static readonly int TX_TRAINING204a; - - public static readonly int TX_TRAINING205a; - - public static readonly int TX_TRAINING206a; - - public static readonly int TX_TRAINING207a; - - public static readonly int TX_TRAINING208a; - - public static readonly int TX_TRAINING209a; - - public static readonly int TX_TRAINING210a; - - public static readonly int TX_TRAINING301a; - - public static readonly int TX_TRAINING302a; - - public static readonly int TX_TRAINING303a; - - public static readonly int TX_TRAINING304a; - - public static readonly int TX_TRAINING305a; - - public static readonly int TX_TRAINING306a; - - public static readonly int TX_TRAINING307a; - - public static readonly int TX_TRAINING308a; - - public static readonly int TX_TRAINING309a; - - public static readonly int TX_TRAINING310a; - - public static readonly int TX_TRAINING311a; - - public static readonly int TX_TRAINING401a; - - public static readonly int TX_TRAINING402a; - - public static readonly int TX_TRAINING403a; - - public static readonly int TX_TRAINING404a; - - public static readonly int TX_TRAINING405a; - - public static readonly int TX_TRAINING406a; - - public static readonly int TX_TRAINING407a; - - public static readonly int TX_TRAINING408a; - - public static readonly int TX_TRAINING409a; - - public static readonly int TX_TRAINING410a; - - private static Dictionary resources; - - public static string LoadString(int res) - { - string value; - if (resources.TryGetValue(res, out value)) - { - return value; - } - return "???"; - } - - static MyResource() - { - TX_BUTTON_PLAY = 100; - TX_BUTTON_MENU = 101; - TX_BUTTON_BACK = 102; - TX_BUTTON_RESTART = 103; - TX_BUTTON_CONTINUE = 104; - TX_BUTTON_BUY = 105; - TX_BUTTON_SETUP = 107; - TX_BUTTON_SETUP_SOUNDS = 108; - TX_BUTTON_SETUP_JUMP = 109; - TX_BUTTON_SETUP_ZOOM = 110; - TX_BUTTON_SETUP_ACCEL = 111; - TX_BUTTON_SETUP_RESET = 112; - TX_BUTTON_RANKING = 113; - TX_GAMER_TITLE = 200; - TX_GAMER_MDOORS = 201; - TX_GAMER_SDOORS = 202; - TX_GAMER_LIFES = 203; - TX_TRIAL1 = 300; - TX_TRIAL2 = 301; - TX_TRIAL3 = 302; - TX_TRIAL4 = 303; - TX_TRIAL5 = 304; - TX_TRIAL6 = 305; - TX_TRAINING101 = 1000; - TX_TRAINING102 = 1001; - TX_TRAINING103 = 1002; - TX_TRAINING104 = 1003; - TX_TRAINING105 = 1004; - TX_TRAINING106 = 1005; - TX_TRAINING107 = 1006; - TX_TRAINING108 = 1007; - TX_TRAINING109 = 1008; - TX_TRAINING110 = 1009; - TX_TRAINING111 = 1010; - TX_TRAINING112 = 1011; - TX_TRAINING113 = 1012; - TX_TRAINING114 = 1013; - TX_TRAINING115 = 1014; - TX_TRAINING116 = 1015; - TX_TRAINING117 = 1016; - TX_TRAINING118 = 1017; - TX_TRAINING119 = 1018; - TX_TRAINING120 = 1019; - TX_TRAINING121 = 1020; - TX_TRAINING122 = 1021; - TX_TRAINING123 = 1022; - TX_TRAINING201 = 2000; - TX_TRAINING202 = 2001; - TX_TRAINING203 = 2002; - TX_TRAINING204 = 2003; - TX_TRAINING205 = 2004; - TX_TRAINING206 = 2005; - TX_TRAINING207 = 2006; - TX_TRAINING208 = 2007; - TX_TRAINING209 = 2008; - TX_TRAINING210 = 2009; - TX_TRAINING301 = 3000; - TX_TRAINING302 = 3001; - TX_TRAINING303 = 3002; - TX_TRAINING304 = 3003; - TX_TRAINING305 = 3004; - TX_TRAINING306 = 3005; - TX_TRAINING307 = 3006; - TX_TRAINING308 = 3007; - TX_TRAINING309 = 3008; - TX_TRAINING310 = 3009; - TX_TRAINING311 = 3010; - TX_TRAINING401 = 4000; - TX_TRAINING402 = 4001; - TX_TRAINING403 = 4002; - TX_TRAINING404 = 4003; - TX_TRAINING405 = 4004; - TX_TRAINING406 = 4005; - TX_TRAINING407 = 4006; - TX_TRAINING408 = 4007; - TX_TRAINING409 = 4008; - TX_TRAINING410 = 4009; - TX_TRAINING101a = 11000; - TX_TRAINING102a = 11001; - TX_TRAINING103a = 11002; - TX_TRAINING104a = 11003; - TX_TRAINING105a = 11004; - TX_TRAINING106a = 11005; - TX_TRAINING107a = 11006; - TX_TRAINING108a = 11007; - TX_TRAINING109a = 11008; - TX_TRAINING110a = 11009; - TX_TRAINING111a = 11010; - TX_TRAINING112a = 11011; - TX_TRAINING113a = 11012; - TX_TRAINING114a = 11013; - TX_TRAINING115a = 11014; - TX_TRAINING116a = 11015; - TX_TRAINING117a = 11016; - TX_TRAINING118a = 11017; - TX_TRAINING119a = 11018; - TX_TRAINING120a = 11019; - TX_TRAINING121a = 11020; - TX_TRAINING122a = 11021; - TX_TRAINING123a = 11022; - TX_TRAINING201a = 12000; - TX_TRAINING202a = 12001; - TX_TRAINING203a = 12002; - TX_TRAINING204a = 12003; - TX_TRAINING205a = 12004; - TX_TRAINING206a = 12005; - TX_TRAINING207a = 12006; - TX_TRAINING208a = 12007; - TX_TRAINING209a = 12008; - TX_TRAINING210a = 12009; - TX_TRAINING301a = 13000; - TX_TRAINING302a = 13001; - TX_TRAINING303a = 13002; - TX_TRAINING304a = 13003; - TX_TRAINING305a = 13004; - TX_TRAINING306a = 13005; - TX_TRAINING307a = 13006; - TX_TRAINING308a = 13007; - TX_TRAINING309a = 13008; - TX_TRAINING310a = 13009; - TX_TRAINING311a = 13010; - TX_TRAINING401a = 14000; - TX_TRAINING402a = 14001; - TX_TRAINING403a = 14002; - TX_TRAINING404a = 14003; - TX_TRAINING405a = 14004; - TX_TRAINING406a = 14005; - TX_TRAINING407a = 14006; - TX_TRAINING408a = 14007; - TX_TRAINING409a = 14008; - TX_TRAINING410a = 14009; - resources = new Dictionary(); - string text = CultureInfo.CurrentCulture.TwoLetterISOLanguageName.ToLower(); - string text2; - if ((text2 = text) != null && text2 == "fr") - { - InitializeFR(); - } - else - { - InitializeEN(); - } - } - - 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, ""); - } - - 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, ""); - } - - 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, ""); - } - } -} \ No newline at end of file diff --git a/Pixmap.cs b/Pixmap.cs deleted file mode 100644 index effd27d..0000000 --- a/Pixmap.cs +++ /dev/null @@ -1,563 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Pixmap -using System; -using System.Diagnostics; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using WindowsPhoneSpeedyBlupi; -using static System.Net.Mime.MediaTypeNames; - -namespace WindowsPhoneSpeedyBlupi -{ - public class Pixmap - { - private readonly Game1 game1; - - private readonly GraphicsDeviceManager graphics; - - private double zoom; - - private double originX; - - private double originY; - - private double hotSpotZoom; - - private double hotSpotX; - - private double hotSpotY; - - private SpriteBatch spriteBatch; - - private Texture2D bitmapText; - - private Texture2D bitmapButton; - - private Texture2D bitmapJauge; - - private Texture2D bitmapBlupi; - - private Texture2D bitmapBlupi1; - - private Texture2D bitmapObject; - - private Texture2D bitmapElement; - - private Texture2D bitmapExplo; - - private Texture2D bitmapPad; - - private Texture2D bitmapSpeedyBlupi; - - private Texture2D bitmapBlupiYoupie; - - private Texture2D bitmapGear; - - private Texture2D bitmapBackground; - - private Vector2 origin; - - private SpriteEffects effect; - - public TinyRect DrawBounds - { - get - { - TinyRect result = default(TinyRect); - double screenWidth = graphics.GraphicsDevice.Viewport.Width; - double screenHeight = graphics.GraphicsDevice.Viewport.Height; - //screenWidth = screenHeight * (640f / 480f); - if (screenWidth != 0.0 && screenHeight != 0.0) - { - double num3; - double num4; - if (screenWidth / screenHeight < 1.3333333333333333) - { - num3 = 640.0; - num4 = 640.0 * (screenHeight / screenWidth); - } - else - { - num3 = 480.0 * (screenWidth / screenHeight); - num4 = 480.0; - } - result.Left = 0; - result.Right = (int)num3; - result.Top = 0; - result.Bottom = (int)num4; - } - return result; - } - } - - public TinyPoint Origin - { - get - { - TinyPoint result = default(TinyPoint); - result.X = (int)originX; - result.Y = (int)originY; - return result; - } - } - - public Pixmap(Game1 game1, GraphicsDeviceManager graphics) - { - this.game1 = game1; - this.graphics = graphics; - origin = new Vector2(0f, 0f); - effect = SpriteEffects.None; - } - - public TinyPoint HotSpotToHud(TinyPoint pos) - { - TinyPoint result = default(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; - } - - public void SetHotSpot(double zoom, double x, double y) - { - hotSpotZoom = zoom; - hotSpotX = x; - hotSpotY = y; - } - - public void DrawInputButton(TinyRect rect, Def.ButtonGlygh glyph, bool pressed, bool selected) - { - switch (glyph) - { - case Def.ButtonGlygh.InitGamerA: - DrawIcon(14, selected ? 16 : 4, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.InitGamerB: - DrawIcon(14, selected ? 17 : 5, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.InitGamerC: - DrawIcon(14, selected ? 18 : 6, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.InitSetup: - case Def.ButtonGlygh.PauseSetup: - DrawIcon(14, 19, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.InitPlay: - DrawIcon(14, 7, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.PauseMenu: - case Def.ButtonGlygh.ResumeMenu: - DrawIcon(14, 11, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.PauseBack: - DrawIcon(14, 8, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.PauseRestart: - DrawIcon(14, 9, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.PauseContinue: - case Def.ButtonGlygh.ResumeContinue: - DrawIcon(14, 10, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.WinLostReturn: - DrawIcon(14, 3, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.InitBuy: - case Def.ButtonGlygh.TrialBuy: - DrawIcon(14, 22, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.InitRanking: - DrawIcon(14, 12, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.TrialCancel: - case Def.ButtonGlygh.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: - DrawIcon(14, selected ? 13 : 21, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.SetupReset: - DrawIcon(14, 20, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.SetupReturn: - DrawIcon(14, 8, rect, pressed ? 0.8 : 1.0, false); - break; - case Def.ButtonGlygh.PlayJump: - DrawIcon(14, 2, rect, pressed ? 0.6 : 1.0, false); - break; - case Def.ButtonGlygh.PlayAction: - DrawIcon(14, 12, rect, pressed ? 0.6 : 1.0, false); - break; - case Def.ButtonGlygh.PlayDown: - DrawIcon(14, 23, rect, pressed ? 0.6 : 1.0, false); - break; - case Def.ButtonGlygh.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: - { - DrawIcon(14, 0, rect, pressed ? 0.6 : 1.0, false); - TinyPoint tinyPoint = default(TinyPoint); - tinyPoint.X = rect.Left + rect.Width / 2 - (int)originX; - tinyPoint.Y = rect.Top + 28; - TinyPoint 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: - 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"); - UpdateGeometry(); - } - - private void UpdateGeometry() - { - double screenWidth = graphics.GraphicsDevice.Viewport.Width; - double screenHeight = graphics.GraphicsDevice.Viewport.Height; - double val = screenWidth / 640.0; - double val2 = screenHeight / 480.0; - zoom = Math.Min(val, val2); - originX = (screenWidth - 640.0 * zoom) / 2.0; - originY = (screenHeight - 480.0 * zoom) / 2.0; - } - - public void BackgroundCache(string name) - { - bitmapBackground = game1.Content.Load("backgrounds/" + name); - } - - public bool Start() - { - graphics.GraphicsDevice.Clear(Color.CornflowerBlue); - return true; - } - - public bool Finish() - { - return true; - } - - public void DrawBackground() - { - 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.X = (int)originX; - tinyPoint.Y = (int)originY; - TinyPoint dest = tinyPoint; - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = 0; - tinyRect.Top = 0; - tinyRect.Right = 640; - tinyRect.Bottom = 480; - TinyRect rect = tinyRect; - DrawPart(3, dest, rect); - } - - public void DrawChar(int rank, TinyPoint pos, double size) - { - pos.X = (int)((double)pos.X + originX); - pos.Y = (int)((double)pos.Y + originY); - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = pos.X; - tinyRect.Top = pos.Y; - tinyRect.Right = pos.X + (int)(32.0 * size); - tinyRect.Bottom = pos.Y + (int)(32.0 * size); - TinyRect rect = tinyRect; - DrawIcon(6, rank, rect, 1.0, false); - } - - public void HudIcon(int channel, int rank, TinyPoint pos) - { - pos.X = (int)((double)pos.X + originX); - pos.Y = (int)((double)pos.Y + originY); - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = pos.X; - tinyRect.Top = pos.Y; - tinyRect.Right = pos.X; - tinyRect.Bottom = pos.Y; - TinyRect rect = tinyRect; - DrawIcon(channel, rank, rect, 1.0, false); - } - - public void QuickIcon(int channel, int rank, TinyPoint pos) - { - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = pos.X; - tinyRect.Top = pos.Y; - tinyRect.Right = pos.X; - tinyRect.Bottom = pos.Y; - TinyRect rect = tinyRect; - DrawIcon(channel, rank, rect, 1.0, true); - } - - public void QuickIcon(int channel, int rank, TinyPoint pos, double opacity, double rotation) - { - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = pos.X; - tinyRect.Top = pos.Y; - tinyRect.Right = pos.X; - tinyRect.Bottom = pos.Y; - TinyRect rect = tinyRect; - DrawIcon(channel, rank, rect, opacity, rotation, true); - } - - public bool 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) - { - Texture2D bitmap = GetBitmap(channel); - if (bitmap == null) - { - return false; - } - if (channel == 5) - { - 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)); - 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) - { - DrawIcon(channel, icon, rect, opacity, 0.0, useHotSpot); - } - - public void DrawIcon(int channel, int icon, TinyRect rect, double opacity, double rotation, bool useHotSpot) - { - if (icon == -1) - { - return; - } - Texture2D bitmap = GetBitmap(channel); - if (bitmap == null) - { - return; - } - int num; - int bitmapGridY; - int iconWidth; - int num2; - int gap; - switch (channel) - { - case 2: - case 11: - case 12: - case 13: - num = 60; - bitmapGridY = 60; - iconWidth = 60; - num2 = 60; - gap = 0; - break; - case 1: - num = 64; - bitmapGridY = 64; - iconWidth = 64; - num2 = 64; - gap = 1; - break; - case 10: - num = 60; - bitmapGridY = 60; - iconWidth = 60; - num2 = 60; - gap = 0; - break; - case 9: - num = 144; - bitmapGridY = 144; - num2 = Tables.table_explo_size[icon]; - iconWidth = Math.Max(num2, 128); - gap = 0; - break; - case 6: - num = 32; - bitmapGridY = 32; - iconWidth = 32; - num2 = 32; - gap = 0; - break; - case 4: - num = 40; - bitmapGridY = 40; - iconWidth = 40; - num2 = 40; - gap = 0; - break; - case 14: - num = 140; - bitmapGridY = 140; - iconWidth = 140; - num2 = 140; - gap = 0; - break; - case 15: - num = 640; - bitmapGridY = 160; - iconWidth = 640; - num2 = 160; - gap = 0; - break; - case 16: - num = 410; - bitmapGridY = 380; - iconWidth = 410; - num2 = 380; - gap = 0; - break; - case 17: - num = 226; - bitmapGridY = 226; - iconWidth = 226; - num2 = 226; - gap = 0; - break; - default: - num = 0; - bitmapGridY = 0; - iconWidth = 0; - num2 = 0; - gap = 0; - break; - } - if (num != 0) - { - Rectangle srcRectangle = GetSrcRectangle(bitmap, num, bitmapGridY, iconWidth, num2, gap, icon); - Rectangle rectangle = GetDstRectangle(rect, iconWidth, num2, useHotSpot); - float num3 = 0f; - if (rotation != 0.0) - { - num3 = (float)Misc.DegToRad(rotation); - rectangle = Misc.RotateAdjust(rectangle, num3); - } - spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend); - spriteBatch.Draw(bitmap, rectangle, srcRectangle, Color.FromNonPremultiplied(255, 255, 255, (int)(255.0 * opacity)), num3, origin, effect, 0f); - spriteBatch.End(); - } - } - - 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 num = icon % (width / bitmapGridX); - int num2 = icon / (width / bitmapGridX); - bitmapGridX += gap; - bitmapGridY += gap; - return new Rectangle(gap + num * bitmapGridX, gap + num2 * bitmapGridY, iconWidth, iconHeight); - } - - private Rectangle GetDstRectangle(TinyRect rect, int iconWidth, int iconHeight, bool useHotSpot) - { - 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); - int num6 = (int)((double)num4 + (double)num2 * zoom); - if (useHotSpot && hotSpotZoom > 1.0) - { - num3 -= (int)hotSpotX; - num4 -= (int)hotSpotY; - num5 -= (int)hotSpotX; - num6 -= (int)hotSpotY; - num3 = (int)((double)num3 * hotSpotZoom); - num4 = (int)((double)num4 * hotSpotZoom); - num5 = (int)((double)num5 * hotSpotZoom); - num6 = (int)((double)num6 * hotSpotZoom); - num3 += (int)hotSpotX; - num4 += (int)hotSpotY; - num5 += (int)hotSpotX; - num6 += (int)hotSpotY; - } - return new Rectangle(num3, num4, num5 - num3, num6 - num4); - } - - private Texture2D GetBitmap(int channel) - { - switch (channel) - { - case 2: - return bitmapBlupi; - case 11: - case 12: - case 13: - return bitmapBlupi1; - case 1: - return bitmapObject; - case 10: - return bitmapElement; - case 9: - return bitmapExplo; - case 6: - return bitmapText; - case 4: - return bitmapButton; - case 5: - return bitmapJauge; - case 14: - return bitmapPad; - case 15: - return bitmapSpeedyBlupi; - case 16: - return bitmapBlupiYoupie; - case 17: - return bitmapGear; - case 3: - return bitmapBackground; - default: - return null; - } - } - } - -} \ No newline at end of file diff --git a/Resource.cs b/Resource.cs deleted file mode 100644 index e9ff8bd..0000000 --- a/Resource.cs +++ /dev/null @@ -1,63 +0,0 @@ -// 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; - -//[DebuggerNonUserCode] -//[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] -//[CompilerGenerated] - -namespace WindowsPhoneSpeedyBlupi -{ - internal class Resource - { - private static ResourceManager resourceMan; - - private static CultureInfo resourceCulture; - - [EditorBrowsable(EditorBrowsableState.Advanced)] - internal static ResourceManager ResourceManager - { - get - { - if (object.ReferenceEquals(resourceMan, null)) - { - ResourceManager resourceManager = new ResourceManager("WindowsPhoneSpeedyBlupi.Resource", typeof(Resource).Assembly); - resourceMan = resourceManager; - } - return resourceMan; - } - } - - [EditorBrowsable(EditorBrowsableState.Advanced)] - internal static CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - - internal static string Title - { - get - { - return ResourceManager.GetString("Title", resourceCulture); - } - } - - internal Resource() - { - } - } - -} \ No newline at end of file diff --git a/Slider.cs b/Slider.cs deleted file mode 100644 index ff6f9b5..0000000 --- a/Slider.cs +++ /dev/null @@ -1,92 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Slider -using System; -using WindowsPhoneSpeedyBlupi; - -namespace WindowsPhoneSpeedyBlupi -{ - public class Slider - { - public TinyPoint TopLeftCorner { get; set; } - - public double Value { get; set; } - - private int PosLeft - { - get - { - return TopLeftCorner.X + 22; - } - } - - private int PosRight - { - get - { - 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 dest = tinyPoint; - TinyRect tinyRect = default(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 num2 = TopLeftCorner.Y + 22; - int num3 = 94; - TinyRect tinyRect2 = default(TinyRect); - tinyRect2.Left = PosLeft + num - num3 / 2; - tinyRect2.Right = PosLeft + num + num3 / 2; - tinyRect2.Top = num2 - num3 / 2; - tinyRect2.Bottom = num2 + num3 / 2; - rect = tinyRect2; - pixmap.DrawIcon(14, 1, rect, 1.0, false); - TinyRect tinyRect3 = default(TinyRect); - tinyRect3.Left = TopLeftCorner.X - 65; - tinyRect3.Right = TopLeftCorner.X - 65 + 60; - tinyRect3.Top = TopLeftCorner.Y - 10; - tinyRect3.Bottom = TopLeftCorner.Y - 10 + 60; - rect = tinyRect3; - pixmap.DrawIcon(10, 37, rect, 1.0, false); - TinyRect tinyRect4 = default(TinyRect); - tinyRect4.Left = TopLeftCorner.X + 248 + 5; - tinyRect4.Right = TopLeftCorner.X + 248 + 5 + 60; - tinyRect4.Top = TopLeftCorner.Y - 10; - tinyRect4.Bottom = TopLeftCorner.Y - 10 + 60; - rect = tinyRect4; - pixmap.DrawIcon(10, 38, rect, 1.0, false); - } - - public bool Move(TinyPoint pos) - { - TinyRect tinyRect = default(TinyRect); - tinyRect.Left = TopLeftCorner.X - 50; - tinyRect.Right = TopLeftCorner.X + 248 + 50; - tinyRect.Top = TopLeftCorner.Y - 50; - tinyRect.Bottom = TopLeftCorner.Y + 44 + 50; - TinyRect 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); - if (Value != val) - { - Value = val; - return true; - } - } - return false; - } - } - -} \ No newline at end of file diff --git a/Sound.cs b/Sound.cs deleted file mode 100644 index 966287e..0000000 --- a/Sound.cs +++ /dev/null @@ -1,260 +0,0 @@ -// 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; - -namespace WindowsPhoneSpeedyBlupi -{ - public class Sound - { - private class Play - { - private readonly SoundEffectInstance sei; - - private readonly int channel; - - public int Channel - { - get - { - return channel; - } - } - - public bool IsFree - { - get - { - return sei.State == SoundState.Stopped; - } - } - - public Play(SoundEffect se, int channel, double volume, double balance, double? pitch, bool isLooped) - { - this.channel = channel; - int num = channel * 2; - if (num >= 0 && num < tableVolumePitch.Length) - { - volume *= tableVolumePitch[num]; - pitch = tableVolumePitch[num + 1]; - } - sei = se.CreateInstance(); - sei.Volume = (float)volume; - sei.Pan = (float)balance; - sei.Pitch = (float)(pitch ?? 0.0); - sei.IsLooped = isLooped; - sei.Play(); - } - - public void Stop() - { - sei.Stop(); - } - } - - private static double[] tableVolumePitch = new double[200] - { - 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, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.1, 1.0, 0.2, 1.0, 0.2, - 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.2, - 1.0, 0.2, 1.0, 0.2, 0.7, 0.2, 1.0, 0.1, 1.0, 0.1, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.4, 1.0, 0.0, 1.0, 0.0, - 1.0, 0.0, 1.0, 0.0, 1.0, 0.2, 1.0, 0.2, 0.7, 0.4, - 1.0, 0.2, 1.0, 0.4, 1.0, 0.2, 0.5, 1.0, 0.5, 1.0, - 1.0, 0.4, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 0.6, 0.4, 0.8, 0.1, - 0.6, 0.5, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.0, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.0, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.0, 1.0, 0.0, 1.0, 0.2, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 0.6, 0.4, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, - 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, - 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; - - private readonly Game1 game1; - - private readonly GameData gameData; - - private readonly List soundEffects; - - private readonly List plays; - - private double volume; - - public Sound(Game1 game1, GameData gameData) - { - this.game1 = game1; - this.gameData = gameData; - soundEffects = new List(); - plays = new List(); - volume = 1.0; - SoundEffect.MasterVolume = 1f; - } - - public void LoadContent() - { - 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); - soundEffects.Add(item); - } - } - } - - public bool Create() - { - return true; - } - - public void SetState(bool bState) - { - } - - public void SetCDAudio(bool bAudio) - { - } - - public bool GetEnable() - { - return true; - } - - public void SetAudioVolume(int volume) - { - this.volume = (double)volume / (double)MAXVOLUME; - } - - public int GetAudioVolume() - { - return (int)(volume * (double)MAXVOLUME); - } - - public void SetMidiVolume(int volume) - { - } - - public int GetMidiVolume() - { - return 0; - } - - public void StopAll() - { - while (plays.Any()) - { - plays[0].Stop(); - plays.RemoveAt(0); - } - } - - public bool PlayImage(int channel, TinyPoint pos) - { - return PlayImage(channel, pos, -1, false); - } - - public bool PlayImage(int channel, TinyPoint pos, int rank, bool bLoop) - { - if (!gameData.Sounds) - { - return true; - } - if (channel >= 0 && channel < soundEffects.Count) - { - if (channel != 10 && plays.Where((Play x) => x.Channel == channel && !x.IsFree).Any()) - { - return true; - } - if (plays.Count >= 10) - { - int num = 0; - while (num < plays.Count) - { - if (plays[num].IsFree) - { - plays.RemoveAt(num); - } - else - { - num++; - } - } - } - Play item = new Play(soundEffects[channel], channel, (float)GetVolume(pos), (float)GetBalance(pos), null, bLoop); - plays.Add(item); - } - return true; - } - - public bool PosImage(int channel, TinyPoint pos) - { - return true; - } - - public bool Stop(int channel) - { - int num = 0; - while (num < plays.Count) - { - if (plays[num].Channel == channel) - { - plays[num].Stop(); - plays.RemoveAt(num); - } - else - { - num++; - } - } - return true; - } - - private double GetVolume(TinyPoint pos) - { - double val = 1.0; - if (pos.X < 0) - { - val = 1.0 + (double)(pos.X / 640) * 2.0; - } - if (pos.X > 640) - { - pos.X -= 640; - val = 1.0 - (double)(pos.X / 640) * 2.0; - } - val = Math.Max(val, 0.0); - val = Math.Min(val, 1.0); - double val2 = 1.0; - if (pos.Y < 0) - { - val2 = 1.0 + (double)(pos.Y / 480) * 3.0; - } - if (pos.Y > 480) - { - 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; - } - - 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); - } - } -} \ No newline at end of file diff --git a/Tables.cs b/Tables.cs deleted file mode 100644 index 622248a..0000000 --- a/Tables.cs +++ /dev/null @@ -1,1715 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Tables -using WindowsPhoneSpeedyBlupi; - -namespace WindowsPhoneSpeedyBlupi -{ - public static class Tables - { - public enum CheatCodes - { - BuildOfficialMissions, - OpenDoors, - CleanAll, - SuperBlupi, - LayEgg, - KillEgg, - Skate, - Copter, - Jeep, - AllTreasure, - EndGoal, - ShowSecret, - RoundShield, - Lollipop, - Bombs, - BirdLime, - Tank, - PowerCharge, - Drink, - Overcraft, - Dynamite, - 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_mirror = new int[335] - { - 4, 3, 2, 1, 0, 11, 12, 13, 14, 15, - 16, 5, 6, 7, 8, 9, 10, 20, 21, 22, - 17, 18, 19, 24, 23, 25, 30, 31, 32, 29, - 26, 27, 28, 36, 37, 38, 33, 34, 35, 40, - 39, 41, 42, 43, 45, 44, 46, 47, 48, 55, - 56, 57, 58, 59, 60, 49, 50, 51, 52, 53, - 54, 66, 67, 68, 69, 70, 61, 62, 63, 64, - 65, 75, 74, 73, 72, 71, 82, 83, 84, 85, - 86, 87, 76, 77, 78, 79, 80, 81, 92, 91, - 90, 89, 88, 99, 100, 101, 102, 103, 104, 93, - 94, 95, 96, 97, 98, 109, 108, 107, 106, 105, - 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, - 110, 127, 128, 129, 130, 131, 132, 121, 122, 123, - 124, 125, 126, 134, 133, 139, 140, 141, 142, 135, - 136, 137, 138, 147, 148, 149, 150, 143, 144, 145, - 146, 155, 154, 153, 152, 151, 159, 160, 161, 156, - 157, 158, 162, 163, 164, 167, 168, 165, 166, 173, - 174, 175, 176, 169, 170, 171, 172, 181, 180, 179, - 178, 177, 188, 189, 190, 191, 192, 193, 182, 183, - 184, 185, 186, 187, 201, 202, 203, 204, 205, 206, - 207, 194, 195, 196, 197, 198, 199, 200, 209, 208, - 216, 217, 218, 219, 220, 221, 210, 211, 212, 213, - 214, 215, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 235, 236, 250, 249, 248, - 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, - 237, 252, 251, 255, 256, 253, 254, 257, 258, 259, - 260, 261, 262, 285, 286, 287, 266, 267, 270, 269, - 268, 271, 272, 273, 275, 274, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 263, 264, 265, 288, 289, - 290, 291, 292, 293, 294, 295, 303, 304, 305, 306, - 307, 308, 309, 296, 297, 298, 299, 300, 301, 302, - 314, 313, 312, 311, 310, 316, 315, 323, 322, 321, - 320, 319, 318, 317, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 334 - }; - - public static int[] table_vitesse_march = new int[4] { 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_surf = new int[6] { 0, 2, 5, 8, 3, 0 }; - - public static short[] table_decor_quart = new short[7056] - { - 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, - 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, - 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, - 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, 0, 1, 1, 1, 0, 0, - 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, - 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 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, - 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, - 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, - 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, 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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, 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, 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, 0, - 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, - 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, 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, 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, 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, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, - 0, 1, 0, 0, 0, 0, 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, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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, 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, 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, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, 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, 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, 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, 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, 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, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 0, 0, 0, 0, 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, 0, 0, - 0, 0, 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, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 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, - 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, - 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, - 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, - 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, - 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, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 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, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 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, 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, 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, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, - 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, - 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_right = new int[8] { 58, 58, 57, 57, 58, 58, 59, 59 }; - - public static int[] table_bulldozer_turn2l = new int[22] - { - 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] - { - 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_right = new int[8] { 79, 79, 78, 78, 79, 79, 80, 80 }; - - public static int[] table_poisson_turn2l = new int[48] - { - 79, 79, 80, 80, 84, 84, 85, 85, 86, 86, - 87, 87, 88, 88, 83, 83, 82, 82, 83, 83, - 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, - 79, 79, 79, 79, 80, 80, 84, 84, 85, 85, - 86, 86, 87, 87, 88, 88, 83, 83 - }; - - public static int[] table_poisson_turn2r = new int[48] - { - 82, 82, 83, 83, 88, 88, 87, 87, 86, 86, - 85, 85, 84, 84, 79, 79, 79, 79, 80, 80, - 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, - 83, 83, 82, 82, 83, 83, 88, 88, 87, 87, - 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_right = new int[8] { 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_turn2r = new int[10] { 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_right = new int[6] { 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_turn2r = new int[5] { 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_right = new int[8] { 247, 248, 249, 250, 251, 250, 249, 248 }; - - public static int[] table_creature_turn2 = new int[152] - { - 244, 244, 244, 244, 244, 244, 244, 244, 243, 243, - 242, 242, 242, 242, 242, 242, 242, 242, 243, 243, - 244, 244, 245, 245, 246, 246, 246, 246, 246, 246, - 246, 246, 245, 245, 244, 244, 243, 243, 242, 242, - 242, 242, 242, 242, 243, 243, 244, 244, 245, 245, - 246, 246, 246, 246, 246, 246, 245, 245, 244, 244, - 243, 243, 242, 242, 242, 242, 243, 243, 244, 244, - 245, 245, 246, 246, 246, 246, 245, 245, 244, 244, - 243, 243, 242, 242, 243, 243, 244, 244, 245, 245, - 246, 246, 245, 245, 244, 244, 243, 243, 242, 242, - 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, - 246, 246, 245, 245, 244, 244, 243, 243, 242, 242, - 242, 242, 242, 242, 243, 243, 244, 244, 245, 245, - 246, 246, 246, 246, 246, 246, 245, 245, 244, 244, - 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, - 244, 244 - }; - - public static int[] table_blupih_left = new int[8] { 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_turn2l = new int[26] - { - 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] - { - 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_right = new int[8] { 238, 238, 237, 237, 238, 238, 239, 239 }; - - public static int[] table_blupit_turn2l = new int[24] - { - 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] - { - 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] - { - 0, 0, 1, 1, 2, 2, 3, 3, 4, 3, - 4, 4, 3, 4, 3, 3, 4, 4, 5, 5, - 4, 5, 6, 5, 6, 6, 5, 5, 6, 7, - 7, 8, 8, 9, 9, 10, 10, 11, 11 - }; - - public static int[] table_explo2 = new int[20] - { - 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] - { - 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_explo5 = new int[12] - { - 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_explo7 = new int[128] - { - 60, 61, -1, 63, 64, 65, 62, 64, 62, 60, - 62, -1, 65, -1, 60, 65, 63, 61, 62, -1, - 64, 65, -1, 62, 64, 61, 62, 63, -1, 65, - 60, -1, 65, -1, 63, 65, -1, 61, 60, 65, - 62, 63, 64, -1, 62, 63, -1, 62, 62, 60, - 62, -1, 65, -1, 60, 65, 64, 61, 62, 63, - -1, 65, 60, -1, 63, 61, 62, -1, 64, 65, - -1, 62, 62, 60, 62, -1, 65, -1, 60, 65, - 60, 61, -1, 63, 64, 65, 62, 64, 63, 61, - 62, -1, 64, 65, -1, 62, 60, 61, -1, 63, - 64, 65, 62, 64, -1, 60, -1, -1, 65, -1, - 60, -1, 63, -1, 62, -1, -1, 65, -1, -1, - -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_sploutch1 = new int[10] { 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 }; - - public static int[] table_sploutch2 = new int[13] - { - -1, -1, -1, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99 - }; - - public static int[] table_sploutch3 = new int[18] - { - -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] - { - 86, 85, 84, 83, 84, 85, 86, -1, 86, 85, - 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, - 74, 73, 72, 71, 70, 70, 70, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, -1 - }; - - public static int[] table_bridge = new int[157] - { - 365, 366, 365, 366, 365, 366, 365, 366, 365, 366, - 365, 366, 365, 366, 365, 366, 367, 367, 368, 368, - 369, 369, 370, 370, 371, 371, 372, 372, -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, -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, - 372, 372, 371, 371, 370, 370, 369, 369, 368, 368, - 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_invertstart = new int[8] { 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_invertpanel = new int[8] { 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_tiplouf = new int[3] { 244, 99, 244 }; - - public static int[] table_blup = new int[20] - { - 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] - { - 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_cle = new int[12] - { - 122, 123, 124, 125, 126, 127, 128, 127, 126, 125, - 124, 123 - }; - - public static int[] table_cle1 = new int[12] - { - 209, 210, 211, 212, 213, 214, 215, 214, 213, 212, - 211, 210 - }; - - public static int[] table_cle2 = new int[12] - { - 220, 221, 222, 221, 220, 219, 218, 217, 216, 217, - 218, 219 - }; - - public static int[] table_cle3 = new int[12] - { - 229, 228, 227, 226, 225, 224, 223, 224, 225, 226, - 227, 228 - }; - - public static int[] table_dynamitef = new int[100] - { - 253, 252, 254, 252, 252, 255, 252, 254, 253, 252, - 253, 254, 255, 252, 255, 253, 252, 254, 252, 255, - 253, 254, 252, 253, 255, 254, 255, 252, 253, 254, - 255, 252, 253, 254, 255, 254, 254, 253, 254, 255, - 253, 252, 255, 254, 255, 253, 252, 254, 253, 255, - 253, 254, 252, 253, 255, 254, 252, 255, 253, 254, - 255, 253, 252, 254, 255, 254, 252, 253, 254, 255, - 253, 254, 255, 254, 255, 253, 252, 254, 253, 255, - 253, 254, 255, 253, 255, 254, 255, 252, 253, 254, - 255, 253, 253, 254, 255, 254, 252, 253, 254, 255 - }; - - public static int[] table_skate = new int[34] - { - 129, 129, 129, 129, 130, 130, 130, 131, 131, 132, - 132, 133, 133, 134, 134, 134, 135, 135, 135, 135, - 134, 134, 134, 133, 133, 132, 132, 131, 131, 131, - 130, 130, 130, 130 - }; - - public static int[] table_glu = new int[25] - { - 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] - { - 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 - }; - - public static int[] table_electro = new int[90] - { - 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 - }; - - public static int[] table_chenille = new int[6] { 311, 312, 313, 314, 315, 316 }; - - public static int[] table_chenillei = new int[6] { 316, 315, 314, 313, 312, 311 }; - - public static int[] table_adapt_decor = new int[144] - { - 153, 147, 148, 146, 40, 151, 150, 144, 39, 152, - 149, 145, 38, 36, 37, 35, 153, 147, 148, 146, - 40, 151, 150, 144, 39, 152, 149, 145, 38, 36, - 37, 156, 75, 75, 155, 155, 75, 75, 155, 155, - 74, 74, 154, 154, 75, 75, 155, 155, 157, 157, - 157, 157, 109, 109, 109, 109, 108, 108, 108, 108, - 107, 107, 107, 107, 202, 202, 138, 138, 202, 202, - 138, 138, 202, 202, 138, 138, 202, 202, 138, 138, - 283, 283, 283, 283, 262, 262, 262, 262, 263, 263, - 263, 263, 261, 261, 261, 261, 361, 359, 360, 352, - 357, 353, 355, 349, 358, 354, 356, 350, 351, 347, - 348, 341, 387, 387, 386, 386, 394, 394, 392, 392, - 395, 395, 393, 393, 397, 397, 396, 396, 251, 254, - 254, 254, 251, 258, 260, 258, 251, 257, 259, 257, - 251, 250, 256, 250 - }; - - public static int[] table_adapt_fromage = new int[32] - { - -1, 265, 264, 268, 267, 273, 271, 275, 266, 272, - 270, 274, 269, 277, 276, 278, -1, 286, 285, 289, - 288, 294, 292, 296, 287, 293, 291, 295, 290, 298, - 297, 299 - }; - - public static int[] table_shield = new int[16] - { - 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] - { - 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_invert = new int[20] - { - 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_magicloop = new int[5] { 152, 153, 154, 155, 156 }; - - public static int[] table_magictrack = new int[24] - { - 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_shieldtrack = new int[20] - { - 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_drinkoffset = new int[3] { 0, 7, 22 }; - - public static int[] table_tresortrack = new int[11] - { - 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_piege1 = new int[16] - { - 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_goutte = new int[48] - { - 410, 409, 410, -1, -1, -1, -1, -1, -1, 410, - 409, 408, 409, 410, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 410, 409, 408, 407, 406, 405, - 404, 405, 406, 407, 408, 409, 410, -1, -1, -1, - -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_scie = new int[6] { 378, 379, 380, 381, 382, 383 }; - - public static int[] table_decor_temp = new int[20] - { - 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_eau2 = new int[6] { 91, 96, 97, 98, 97, 96 }; - - public static int[] table_decor_ventillog = new int[3] { 126, 127, 128 }; - - public static int[] table_decor_ventillod = new int[3] { 129, 130, 131 }; - - public static int[] table_decor_ventilloh = new int[3] { 132, 133, 134 }; - - public static int[] table_decor_ventillob = new int[3] { 135, 136, 137 }; - - public static int[] table_decor_ventg = new int[4] { 110, 111, 112, 113 }; - - public static int[] table_decor_ventd = new int[4] { 114, 115, 116, 117 }; - - public static int[] table_decor_venth = new int[4] { 118, 119, 120, 121 }; - - public static int[] table_decor_ventb = new int[4] { 122, 123, 124, 125 }; - - public static int[] table_marine = new int[11] - { - 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_training1; - - public static int[] table_training2; - - public static int[] table_training3; - - public static int[] table_training4; - - public static int[] table_decor_action; - - public static int[] table_explo_size; - - public static int[] world_terminal; - - static Tables() - { - int[] array = new int[133] - { - 1, 3, 0, 50, -1, 0, 4, 4, 0, 50, - 0, 0, 6, 6, 0, 50, 1, 0, 9, 9, - 0, 50, -1, 0, 12, 14, 0, 50, 1, 0, - 16, 16, 0, 50, -1, 0, 20, 21, 0, 50, - -1, 0, 23, 24, 0, 50, -1, 0, 27, 27, - 0, 50, -1, 0, 28, 28, 0, 50, -1, 0, - 30, 31, 0, 50, -1, 0, 36, 36, 0, 50, - -1, 0, 39, 39, 0, 50, -1, 0, 44, 44, - 0, 50, -1, 0, 46, 46, 0, 50, -1, 0, - 53, 53, 0, 50, -1, 0, 56, 56, 0, 50, - -1, 0, 62, 64, 0, 50, -1, 0, 65, 66, - 0, 50, -1, 0, 69, 74, 0, 50, -1, 0, - 80, 85, 0, 50, 1, 0, 87, 93, 0, 50, - -1, 0, -1 - }; - array[5] = MyResource.TX_TRAINING101; - array[11] = MyResource.TX_TRAINING102; - array[17] = MyResource.TX_TRAINING103; - array[23] = MyResource.TX_TRAINING104; - array[29] = MyResource.TX_TRAINING105; - array[35] = MyResource.TX_TRAINING106; - array[41] = MyResource.TX_TRAINING107; - array[47] = MyResource.TX_TRAINING108; - array[53] = MyResource.TX_TRAINING109; - array[59] = MyResource.TX_TRAINING110; - array[65] = MyResource.TX_TRAINING111; - array[71] = MyResource.TX_TRAINING112; - array[77] = MyResource.TX_TRAINING113; - array[83] = MyResource.TX_TRAINING114; - array[89] = MyResource.TX_TRAINING115; - array[95] = MyResource.TX_TRAINING116; - array[101] = MyResource.TX_TRAINING117; - array[107] = MyResource.TX_TRAINING118; - array[113] = MyResource.TX_TRAINING119; - array[119] = MyResource.TX_TRAINING120; - array[125] = MyResource.TX_TRAINING121; - array[131] = MyResource.TX_TRAINING122; - table_training1 = array; - int[] array2 = new int[31] - { - 9, 15, 0, 100, -1, 0, 16, 16, 0, 100, - -1, 0, 19, 21, 0, 100, -1, 0, 24, 31, - 0, 100, -1, 0, 33, 40, 0, 100, -1, 0, - -1 - }; - array2[5] = MyResource.TX_TRAINING201; - array2[11] = MyResource.TX_TRAINING202; - array2[17] = MyResource.TX_TRAINING203; - array2[23] = MyResource.TX_TRAINING204; - array2[29] = MyResource.TX_TRAINING205; - table_training2 = array2; - int[] array3 = new int[67] - { - 16, 24, 36, 40, -2, 0, 16, 24, 36, 40, - -3, 0, 22, 25, 34, 34, -3, 0, 22, 31, - 34, 37, -2, 0, 32, 43, 34, 34, -2, 0, - 32, 43, 26, 34, -3, 0, 44, 48, 20, 22, - -2, 0, 29, 31, 12, 12, -1, 0, 44, 54, - 20, 22, -3, 0, 63, 65, 20, 22, -1, 0, - 77, 81, 20, 22, -3, 0, -1 - }; - array3[5] = MyResource.TX_TRAINING301; - array3[11] = MyResource.TX_TRAINING302; - array3[17] = MyResource.TX_TRAINING303; - array3[23] = MyResource.TX_TRAINING304; - array3[29] = MyResource.TX_TRAINING305; - array3[35] = MyResource.TX_TRAINING306; - array3[41] = MyResource.TX_TRAINING307; - array3[47] = MyResource.TX_TRAINING308; - array3[53] = MyResource.TX_TRAINING309; - array3[59] = MyResource.TX_TRAINING310; - array3[65] = MyResource.TX_TRAINING311; - table_training3 = array3; - int[] array4 = new int[31] - { - 7, 14, 0, 100, -4, 0, 7, 19, 0, 100, - -5, 0, 20, 22, 0, 100, -4, 0, 20, 22, - 0, 100, -5, 0, 27, 28, 42, 100, -1, 0, - -1 - }; - array4[5] = MyResource.TX_TRAINING401; - array4[11] = MyResource.TX_TRAINING402; - array4[17] = MyResource.TX_TRAINING403; - array4[23] = MyResource.TX_TRAINING404; - array4[29] = MyResource.TX_TRAINING405; - table_training4 = array4; - table_decor_action = new int[519] - { - 1, 32, -4, 4, 4, -3, -4, 2, 4, 5, - -4, -1, 4, 2, -4, -4, 4, -3, -3, 2, - 3, 2, -3, -5, 3, 4, -3, 5, 3, -2, - -3, 5, 3, 4, -2, -2, 2, 4, -2, -2, - 2, -2, -2, -4, 2, 2, -2, -2, 2, -3, - -1, -3, 1, -2, -1, -1, 1, 2, -1, -2, - 1, -1, -1, 1, 1, 2, 2, 32, -4, 0, - 4, 0, -4, 0, 4, 0, -4, 0, 4, 0, - -4, 0, 4, 0, -3, 0, 3, 0, -3, 0, - 3, 0, -3, 0, 3, 0, -3, 0, 3, 0, - -2, 0, 2, 0, -2, 0, 2, 0, -2, 0, - 2, 0, -2, 0, 2, 0, -1, 0, 1, 0, - -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, - 1, 0, 5, 192, 0, -32, 0, 32, 0, -16, - 0, 6, 0, -8, 0, 8, 0, -4, 0, 4, - 0, -2, 0, 2, -7, 0, -6, 0, -5, 0, - -4, 0, -2, 0, 0, 0, 2, 0, 4, 0, - 5, 0, 6, 0, 7, 0, 7, 0, 6, 0, - 5, 0, 4, 0, 2, 0, 0, 0, -2, 0, - -4, 0, -5, 0, -6, 0, -7, 0, -7, 0, - -6, 0, -5, 0, -4, 0, -2, 0, 0, 0, - 2, 0, 4, 0, 5, 0, 6, 0, 7, 0, - 7, 0, 6, 0, 5, 0, 4, 0, 2, 0, - 0, 0, -2, 0, -4, 0, -5, 0, -6, 0, - -7, 0, -7, 0, -6, 0, -5, 0, -4, 0, - -2, 0, 0, 0, 2, 0, 4, 0, 5, 0, - 6, 0, 7, 0, 7, 0, 6, 0, 5, 0, - 4, 0, 2, 0, 0, 0, -2, 0, -4, 0, - -5, 0, -6, 0, -7, 0, -7, 0, -6, 0, - -5, 0, -4, 0, -2, 0, 0, 0, 2, 0, - 4, 0, 5, 0, 6, 0, 7, 0, 7, 0, - 6, 0, 5, 0, 4, 0, 2, 0, 0, 0, - -2, 0, -4, 0, -5, 0, -6, 0, -7, 0, - -7, 0, -6, 0, -5, 0, -4, 0, -2, 0, - 0, 0, 2, 0, 4, 0, 5, 0, 6, 0, - 7, 0, 7, 0, 6, 0, 5, 0, 4, 0, - 2, 0, 0, 0, -2, 0, -4, 0, -5, 0, - -6, 0, -7, 0, -7, 0, -6, 0, -5, 0, - -4, 0, -2, 0, 0, 0, 2, 0, 4, 0, - 5, 0, 6, 0, 7, 0, 7, 0, 6, 0, - 5, 0, 4, 0, 2, 0, 0, 0, -2, 0, - -4, 0, -5, 0, -6, 0, -7, 0, -7, 0, - -6, 0, -5, 0, -4, 0, -2, 0, 0, 0, - 2, 0, 4, 0, 5, 0, 6, 0, 7, 0, - 7, 0, 6, 0, 5, 0, 4, 0, 2, 0, - 0, 0, -2, 0, -4, 0, -5, 0, -6, 0, - -7, 0, -7, 0, -6, 0, -5, 0, -4, 0, - -2, 0, 0, 0, 2, 0, 4, 0, 5, 0, - 6, 0, 7, 0, 7, 0, 6, 0, 5, 0, - 4, 0, 2, 0, 0, 0, -2, 0, -4, 0, - -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] - { - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 64, 64, 64, 64, 64, 64, 144, 144, 144, 128, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 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] - { - 0, 0, 158, 166, 159, 167, 160, 168, 161, 169, - 162, 170, 163, 171, 164, 172, 165, 173, 309, 310, - 411, 416, 412, 417, 413, 418, 414, 419, 415, 420 - }; - } - } - -} \ No newline at end of file diff --git a/Text.cs b/Text.cs deleted file mode 100644 index 9726691..0000000 --- a/Text.cs +++ /dev/null @@ -1,295 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.Text -using WindowsPhoneSpeedyBlupi; - -namespace WindowsPhoneSpeedyBlupi -{ - public static class Text - { - private static short[] table_char = new short[1536] - { - 0, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 2, 0, 0, -1, 0, 0, 3, 0, - 0, -1, 0, 0, 4, 0, 0, -1, 0, 0, - 5, 0, 0, -1, 0, 0, 6, 0, 0, -1, - 0, 0, 7, 0, 0, -1, 0, 0, 8, 0, - 0, -1, 0, 0, 9, 0, 0, -1, 0, 0, - 10, 0, 0, -1, 0, 0, 11, 0, 0, -1, - 0, 0, 12, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 14, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 32, 0, 0, -1, 0, 0, 33, 0, - 0, -1, 0, 0, 34, 0, 0, -1, 0, 0, - 35, 0, 0, -1, 0, 0, 36, 0, 0, -1, - 0, 0, 37, 0, 0, -1, 0, 0, 38, 0, - 0, -1, 0, 0, 39, 0, 0, -1, 0, 0, - 40, 0, 0, -1, 0, 0, 41, 0, 0, -1, - 0, 0, 42, 0, 0, -1, 0, 0, 43, 0, - 0, -1, 0, 0, 44, 0, 0, -1, 0, 0, - 45, 0, 0, -1, 0, 0, 46, 0, 0, -1, - 0, 0, 47, 0, 0, -1, 0, 0, 48, 0, - 0, -1, 0, 0, 49, 0, 0, -1, 0, 0, - 50, 0, 0, -1, 0, 0, 51, 0, 0, -1, - 0, 0, 52, 0, 0, -1, 0, 0, 53, 0, - 0, -1, 0, 0, 54, 0, 0, -1, 0, 0, - 55, 0, 0, -1, 0, 0, 56, 0, 0, -1, - 0, 0, 57, 0, 0, -1, 0, 0, 58, 0, - 0, -1, 0, 0, 59, 0, 0, -1, 0, 0, - 60, 0, 0, -1, 0, 0, 61, 0, 0, -1, - 0, 0, 62, 0, 0, -1, 0, 0, 63, 0, - 0, -1, 0, 0, 64, 0, 0, -1, 0, 0, - 65, 0, 0, -1, 0, 0, 66, 0, 0, -1, - 0, 0, 67, 0, 0, -1, 0, 0, 68, 0, - 0, -1, 0, 0, 69, 0, 0, -1, 0, 0, - 70, 0, 0, -1, 0, 0, 71, 0, 0, -1, - 0, 0, 72, 0, 0, -1, 0, 0, 73, 0, - 0, -1, 0, 0, 74, 0, 0, -1, 0, 0, - 75, 0, 0, -1, 0, 0, 76, 0, 0, -1, - 0, 0, 77, 0, 0, -1, 0, 0, 78, 0, - 0, -1, 0, 0, 79, 0, 0, -1, 0, 0, - 80, 0, 0, -1, 0, 0, 81, 0, 0, -1, - 0, 0, 82, 0, 0, -1, 0, 0, 83, 0, - 0, -1, 0, 0, 84, 0, 0, -1, 0, 0, - 85, 0, 0, -1, 0, 0, 86, 0, 0, -1, - 0, 0, 87, 0, 0, -1, 0, 0, 88, 0, - 0, -1, 0, 0, 89, 0, 0, -1, 0, 0, - 90, 0, 0, -1, 0, 0, 91, 0, 0, -1, - 0, 0, 92, 0, 0, -1, 0, 0, 93, 0, - 0, -1, 0, 0, 94, 0, 0, -1, 0, 0, - 95, 0, 0, -1, 0, 0, 96, 0, 0, -1, - 0, 0, 97, 0, 0, -1, 0, 0, 98, 0, - 0, -1, 0, 0, 99, 0, 0, -1, 0, 0, - 100, 0, 0, -1, 0, 0, 101, 0, 0, -1, - 0, 0, 102, 0, 0, -1, 0, 0, 103, 0, - 0, -1, 0, 0, 104, 0, 0, -1, 0, 0, - 105, 0, 0, -1, 0, 0, 106, 0, 0, -1, - 0, 0, 107, 0, 0, -1, 0, 0, 108, 0, - 0, -1, 0, 0, 109, 0, 0, -1, 0, 0, - 110, 0, 0, -1, 0, 0, 111, 0, 0, -1, - 0, 0, 112, 0, 0, -1, 0, 0, 113, 0, - 0, -1, 0, 0, 114, 0, 0, -1, 0, 0, - 115, 0, 0, -1, 0, 0, 116, 0, 0, -1, - 0, 0, 117, 0, 0, -1, 0, 0, 118, 0, - 0, -1, 0, 0, 119, 0, 0, -1, 0, 0, - 120, 0, 0, -1, 0, 0, 121, 0, 0, -1, - 0, 0, 122, 0, 0, -1, 0, 0, 123, 0, - 0, -1, 0, 0, 124, 0, 0, -1, 0, 0, - 125, 0, 0, -1, 0, 0, 126, 0, 0, -1, - 0, 0, 127, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 5, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 4, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 16, 0, 0, -1, 0, 0, - 97, 0, 0, 2, 2, 0, 17, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 27, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 29, 0, 0, -1, - 0, 0, 19, 0, 0, -1, 0, 0, 18, 0, - 0, -1, 0, 0, 21, 0, 0, -1, 0, 0, - 20, 0, 0, -1, 0, 0, 1, 0, 0, -1, - 0, 0, 105, 0, 0, 2, -1, 0, 23, 0, - 0, -1, 0, 0, 22, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 110, 0, 0, 126, - -1, 0, 1, 0, 0, -1, 0, 0, 111, 0, - 0, 2, 1, 0, 24, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0, 28, 0, 0, -1, - 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 25, 0, 0, -1, 0, 0, - 117, 0, 0, 2, 2, 0, 26, 0, 0, -1, - 0, 0, 15, 0, 0, -1, 0, 0, 1, 0, - 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, - 1, 0, 0, -1, 0, 0 - }; - - private static short[] table_accents = new short[15] - { - 252, 224, 226, 233, 232, 235, 234, 239, 238, 244, - 249, 251, 228, 246, 231 - }; - - private static short[] table_width = new short[128] - { - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 14, 13, 15, 15, 15, 15, - 15, 15, 11, 12, 14, 13, 13, 15, 15, 14, - 0, 0, 9, 5, 10, 25, 17, 22, 18, 5, - 9, 9, 14, 13, 6, 10, 6, 14, 18, 10, - 14, 14, 17, 16, 16, 17, 15, 16, 5, 6, - 9, 12, 10, 14, 25, 18, 16, 17, 18, 16, - 16, 19, 20, 15, 15, 15, 14, 24, 22, 22, - 15, 24, 16, 18, 15, 19, 18, 29, 20, 18, - 19, 8, 13, 8, 12, 20, 7, 15, 15, 13, - 15, 15, 13, 14, 14, 6, 8, 14, 6, 21, - 16, 14, 14, 13, 12, 14, 11, 13, 13, 19, - 16, 15, 14, 10, 5, 11, 16, 0 - }; - - public static void DrawTextLeft(Pixmap pixmap, TinyPoint pos, string text, double size) - { - if (!string.IsNullOrEmpty(text)) - { - DrawText(pixmap, pos, text, size); - } - } - - public static void DrawText(Pixmap pixmap, TinyPoint pos, string text, double size) - { - if (!string.IsNullOrEmpty(text)) - { - foreach (char car in text) - { - DrawChar(pixmap, ref pos, car, 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) - { - int charWidth = GetCharWidth(c, size); - DrawChar(pixmap, ref pos, c, size); - num += charWidth; - pos.Y = y + num / pente; - } - } - } - - public static void DrawTextCenter(Pixmap pixmap, TinyPoint pos, string text, double size) - { - if (!string.IsNullOrEmpty(text)) - { - TinyPoint pos2 = default(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) - { - if (string.IsNullOrEmpty(text)) - { - return 0; - } - int num = 0; - foreach (char c in text) - { - num += GetCharWidth(c, size); - } - return num; - } - - private static int GetOffset(char c) - { - for (int i = 0; i < 15; i++) - { - if ((short)c == table_accents[i]) - { - return 15 + i; - } - } - if (c < '\0' || c > '\u0080') - { - return 1; - } - return c; - } - - private static void DrawChar(Pixmap pixmap, ref TinyPoint pos, char car, double size) - { - TinyPoint pos2 = default(TinyPoint); - int num = (short)car * 6; - int rank = table_char[num]; - pos2.X = pos.X + table_char[num + 1]; - pos2.Y = pos.Y + table_char[num + 2]; - DrawCharSingle(pixmap, pos2, rank, size); - rank = table_char[num + 3]; - if (rank != -1) - { - pos2.X = pos.X + table_char[num + 4]; - pos2.Y = pos.Y + table_char[num + 5]; - DrawCharSingle(pixmap, pos2, rank, size); - } - pos.X += GetCharWidth(car, size); - } - - private static int GetCharWidth(char c, double size) - { - return (int)((double)(table_width[table_char[(short)c * 6]] + 1) * size); - } - - private static void DrawCharSingle(Pixmap pixmap, TinyPoint pos, int rank, double size) - { - pixmap.DrawChar(rank, pos, size); - } - } - -} \ No newline at end of file diff --git a/TinyPoint.cs b/TinyPoint.cs deleted file mode 100644 index 2c306e6..0000000 --- a/TinyPoint.cs +++ /dev/null @@ -1,18 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.TinyPoint - -namespace WindowsPhoneSpeedyBlupi -{ - public struct TinyPoint - { - public int X; - - public int Y; - - public override string ToString() - { - return string.Format("{0};{1}", X, Y); - } - } - -} \ No newline at end of file diff --git a/TinyRect.cs b/TinyRect.cs deleted file mode 100644 index d3678de..0000000 --- a/TinyRect.cs +++ /dev/null @@ -1,38 +0,0 @@ -// WindowsPhoneSpeedyBlupi, Version=1.0.0.5, Culture=neutral, PublicKeyToken=6db12cd62dbec439 -// WindowsPhoneSpeedyBlupi.TinyRect - -namespace WindowsPhoneSpeedyBlupi -{ - public struct TinyRect - { - public int Left; - - public int Right; - - public int Top; - - 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); - } - } - -} \ No newline at end of file diff --git a/TrialMode.cs b/TrialMode.cs deleted file mode 100644 index b423f70..0000000 --- a/TrialMode.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using 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; - } - - - } - -} \ No newline at end of file diff --git a/Worlds.cs b/Worlds.cs deleted file mode 100644 index 869ba33..0000000 --- a/Worlds.cs +++ /dev/null @@ -1,460 +0,0 @@ -// 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; - -namespace WindowsPhoneSpeedyBlupi -{ - public static class Worlds - { - private static StringBuilder output = new StringBuilder(); - - private static string GameDataFilename - { - get - { - return "SpeedyBlupi"; - } - } - - private static string CurrentGameFilename - { - get - { - return "CurrentGame"; - } - } - - public static string[] ReadWorld(int gamer, int rank) - { - string worldFilename = GetWorldFilename(gamer, rank); - string text = null; - Console.WriteLine("gamer=" + gamer); - Console.WriteLine("rank=" + rank); - //try - //{ - // Stream stream = TitleContainer.OpenStream(worldFilename); - // StreamReader streamReader = new StreamReader(stream); - // text = streamReader.ReadToEnd(); - // stream.Close(); - //} - //catch - //{ - // Debug.Write("Fatal error. Loading world failed: " + worldFilename + "\n"); - // //Environment.Exit(1); - //} - text = WorldTxt.getWorld(rank); - if (text == null) - { - return null; - } - return text.Split('\n'); - } - - private static string GetWorldFilename(int gamer, int rank) - { - return string.Format("worlds/world{0}.txt", rank.ToString("d3")); - } - - public static bool ReadGameData(byte[] data) - { - //IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication(); - //if (userStoreForApplication.FileExists(GameDataFilename)) - //{ - // IsolatedStorageFileStream isolatedStorageFileStream = null; - // try - // { - // isolatedStorageFileStream = userStoreForApplication.OpenFile(GameDataFilename, FileMode.Open); - // } - // catch (IsolatedStorageException) - // { - // return false; - // } - // if (isolatedStorageFileStream != null) - // { - // int count = Math.Min(data.Length, (int)isolatedStorageFileStream.Length); - // isolatedStorageFileStream.Read(data, 0, count); - // isolatedStorageFileStream.Close(); - // return true; - // } - //} - return false; - } - - public static void WriteGameData(byte[] data) - { - //IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication(); - //IsolatedStorageFileStream isolatedStorageFileStream = userStoreForApplication.OpenFile(GameDataFilename, FileMode.Create); - //if (isolatedStorageFileStream != null) - //{ - // isolatedStorageFileStream.Write(data, 0, data.Length); - // isolatedStorageFileStream.Close(); - //} - } - - public static void DeleteCurrentGame() - { - - } - - public static string ReadCurrentGame() - { - //IsolatedStorageFile userStoreForApplication = IsolatedStorageFile.GetUserStoreForApplication(); - //if (userStoreForApplication.FileExists(CurrentGameFilename)) - //{ - // IsolatedStorageFileStream isolatedStorageFileStream = null; - // try - // { - // isolatedStorageFileStream = userStoreForApplication.OpenFile(CurrentGameFilename, FileMode.Open); - // } - // catch (IsolatedStorageException) - // { - // return null; - // } - // if (isolatedStorageFileStream != null) - // { - // byte[] array = new byte[isolatedStorageFileStream.Length]; - // isolatedStorageFileStream.Read(array, 0, array.Length); - // isolatedStorageFileStream.Close(); - // return Encoding.UTF8.GetString(array, 0, array.Length); - // } - //} - return null; - } - - 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.Close(); - //} - } - - public static void GetIntArrayField(string[] lines, string section, int rank, string name, int[] array) - { - foreach (string text in lines) - { - if (!text.StartsWith(section + ":") || rank-- != 0) - { - continue; - } - int num = text.IndexOf(name + "="); - if (num == -1) - { - break; - } - 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++) - { - int result; - if (int.TryParse(array2[j], out result)) - { - array[j] = result; - } - else - { - array[j] = 0; - } - } - } - } - - public static bool GetBoolField(string[] lines, string section, int rank, string name) - { - foreach (string text in lines) - { - if (text.StartsWith(section + ":") && rank-- == 0) - { - int num = text.IndexOf(name + "="); - if (num == -1) - { - return false; - } - 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)) - { - return result; - } - return false; - } - } - return false; - } - - public static int GetIntField(string[] lines, string section, int rank, string name) - { - foreach (string text in lines) - { - if (text.StartsWith(section + ":") && rank-- == 0) - { - int num = text.IndexOf(name + "="); - if (num == -1) - { - return 0; - } - 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; - } - return 0; - } - } - return 0; - } - - public static double GetDoubleField(string[] lines, string section, int rank, string name) - { - foreach (string text in lines) - { - if (text.StartsWith(section + ":") && rank-- == 0) - { - int num = text.IndexOf(name + "="); - if (num == -1) - { - return 0.0; - } - 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; - } - return 0.0; - } - } - return 0.0; - } - - public static TinyPoint GetPointField(string[] lines, string section, int rank, string name) - { - foreach (string text in lines) - { - if (text.StartsWith(section + ":") && rank-- == 0) - { - int num = text.IndexOf(name + "="); - if (num == -1) - { - return default(TinyPoint); - } - num += name.Length + 1; - int num2 = text.IndexOf(";", num); - if (num2 == -1) - { - return default(TinyPoint); - } - int num3 = text.IndexOf(" ", num); - if (num3 == -1) - { - return default(TinyPoint); - } - 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); - } - int result2; - if (!int.TryParse(s2, out result2)) - { - return default(TinyPoint); - } - TinyPoint result3 = default(TinyPoint); - result3.X = result; - result3.Y = result2; - return result3; - } - } - return default(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; - } - return null; - } - } - return null; - } - - public static void GetDoorsField(string[] lines, string section, int[] doors) - { - foreach (string text in lines) - { - if (!text.StartsWith(section + ":")) - { - continue; - } - 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; - } - } - } - } - - public static void WriteClear() - { - output.Clear(); - } - - public static void WriteSection(string section) - { - output.Append(section); - output.Append(": "); - } - - public static void WriteIntArrayField(string name, int[] array) - { - output.Append(name); - output.Append("="); - for (int i = 0; i < array.Length; i++) - { - if (array[i] != 0) - { - output.Append(array[i].ToString(CultureInfo.InvariantCulture)); - } - if (i < array.Length - 1) - { - output.Append(","); - } - } - output.Append(" "); - } - - public static void WriteBoolField(string name, bool n) - { - output.Append(name); - output.Append("="); - output.Append(n.ToString(CultureInfo.InvariantCulture)); - output.Append(" "); - } - - public static void WriteIntField(string name, int n) - { - output.Append(name); - output.Append("="); - output.Append(n.ToString(CultureInfo.InvariantCulture)); - output.Append(" "); - } - - public static void WriteDoubleField(string name, double n) - { - output.Append(name); - output.Append("="); - output.Append(n.ToString(CultureInfo.InvariantCulture)); - output.Append(" "); - } - - 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(" "); - } - - public static void WriteDecorField(int[] line) - { - for (int i = 0; i < line.Length; i++) - { - if (line[i] != -1) - { - output.Append(line[i].ToString(CultureInfo.InvariantCulture)); - } - if (i < line.Length - 1) - { - output.Append(","); - } - } - output.Append("\n"); - } - - public static void WriteDoorsField(int[] doors) - { - for (int i = 0; i < doors.Length; i++) - { - if (doors[i] != 1) - { - output.Append(doors[i].ToString(CultureInfo.InvariantCulture)); - } - if (i < doors.Length - 1) - { - output.Append(","); - } - } - output.Append("\n"); - } - - public static void WriteEndSection() - { - output.Append("\n"); - } - - public static string GetWriteString() - { - return output.ToString(); - } - } -} \ No newline at end of file