Esempio n. 1
0
        private void FeebasSeedBox_TextChanged(object sender, EventArgs e)
        {
            Seed = Util.GetHexValue(FeebasSeedBox.Text);

            if (sav is SAV3)
            {
                MarkTiles(Feebas3.GetTiles(Seed));
            }
            else if (sav is SAV4)
            {
                MarkTiles(Feebas4.GetTiles(Seed));
            }
        }
Esempio n. 2
0
        private void MarkTiles(uint[] tiles)
        {
            for (int i = 0; i < tiles.Length && i < 6; i++)
            {
                int x      = 0;
                int y      = 0;
                int width  = 0;
                int height = 0;

                if (sav is SAV3)
                {
                    x      = TileCoordinatesGen3[tiles[i] - 4, 0];
                    y      = TileCoordinatesGen3[tiles[i] - 4, 1];
                    width  = 15;
                    height = 15;

                    Marker[i].Visible = Feebas3.IsAccessible(tiles[i]);

                    // for some reason all the tiles under the bridge in the north of Route 119 are considered to be tile 132 ...
                    if (Feebas3.IsUnderBridge(tiles[i]))
                    {
                        MarkGen3UnderBridgeTiles();
                    }
                }
                else if (sav is SAV4)
                {
                    x      = TileCoordinatesGen4[tiles[i], 0];
                    y      = TileCoordinatesGen4[tiles[i], 1];
                    width  = TileCoordinatesGen4[tiles[i], 2];
                    height = TileCoordinatesGen4[tiles[i], 3];

                    Marker[i].Visible = Feebas4.IsAccessible(tiles[i]);
                }

                Marker[i].BackColor       = Color.Transparent;
                Marker[i].BackgroundImage = Properties.Resources.marker;
                Marker[i].Location        = new Point(x, y);
                Marker[i].Name            = "Marker" + i;
                Marker[i].Size            = new Size(width, height);

                TilePanel.Controls.Add(Marker[i]);
            }
        }