Exemplo n.º 1
0
        private void Surface_Paint(object sender, PaintEventArgs e)
        {
            Color warningColor       = maxWarn ? Color.FromArgb(243, 0, 0) : Color.FromArgb(223, 223, 223);
            Color warningColorShadow = maxWarn ? Colors.Black : Color.FromArgb(67, 67, 67);

            e.Graphics.DrawImage(Images.ExtractBitmap(DLLs.Tiles, "taxRateWallpaper").CropImage(new Rectangle(0, 0, 600, 385)),
                                 new Rectangle(11, 38, 600, 385));

            var font1 = new Font("Times New Roman", 18);

            Draw.Text(e.Graphics, $"Government: {Game.GetActiveCiv.Government}", font1, warningColor,
                      new Point(17, 47), false, false, warningColorShadow, 1, 1);
            Draw.Text(e.Graphics, $"Maximum Rate: {maxRate}%", font1, warningColor,
                      new Point(327, 47), false, false, warningColorShadow, 1, 1);

            int totalIncome = Game.GetActiveCiv.Cities.Sum(c => c.Tax);

            Draw.Text(e.Graphics, $"Total Income: {totalIncome}", font1, Color.FromArgb(223, 223, 223),
                      new Point(91, 101), false, false, Color.FromArgb(67, 67, 67), 1, 1);

            int totalCost = Game.GetActiveCiv.Cities.Sum(c => c.Improvements.Sum(i => i.Upkeep));

            Draw.Text(e.Graphics, $"Total Cost: {totalCost}", font1, Color.FromArgb(223, 223, 223),
                      new Point(295, 101), false, false, Color.FromArgb(67, 67, 67), 1, 1);

            int discoveries = 0;    // TODO: determine discoveries

            Draw.Text(e.Graphics, $"Discoveries: {discoveries}", font1, Color.FromArgb(223, 223, 223),
                      new Point(278, 128), true, false, Color.FromArgb(67, 67, 67), 1, 1);

            Draw.Text(e.Graphics, "0%", font1, Color.FromArgb(223, 223, 223),
                      new Point(22, 182), false, false, Color.FromArgb(67, 67, 67), 1, 1);
            Draw.Text(e.Graphics, "0%", font1, Color.FromArgb(223, 223, 223),
                      new Point(22, 243), false, false, Color.FromArgb(67, 67, 67), 1, 1);
            Draw.Text(e.Graphics, "0%", font1, Color.FromArgb(223, 223, 223),
                      new Point(22, 304), false, false, Color.FromArgb(67, 67, 67), 1, 1);

            Draw.Text(e.Graphics, $"Taxes: {taxRate}%", font1,
                      Color.FromArgb(223, 223, 223), new Point(278, 182), true, false, Color.FromArgb(67, 67, 67), 1, 1);
            Draw.Text(e.Graphics, $"Science: {sciRate}%", font1,
                      Color.FromArgb(223, 223, 223), new Point(278, 243), true, false, Color.FromArgb(67, 67, 67), 1, 1);
            Draw.Text(e.Graphics, $"Luxuries: {luxRate}%", font1,
                      Color.FromArgb(223, 223, 223), new Point(278, 304), true, false, Color.FromArgb(67, 67, 67), 1, 1);

            Draw.Text(e.Graphics, "100%", font1, Color.FromArgb(223, 223, 223),
                      new Point(472, 182), false, false, Color.FromArgb(67, 67, 67), 1, 1);
            Draw.Text(e.Graphics, "100%", font1, Color.FromArgb(223, 223, 223),
                      new Point(472, 243), false, false, Color.FromArgb(67, 67, 67), 1, 1);
            Draw.Text(e.Graphics, "100%", font1, Color.FromArgb(223, 223, 223),
                      new Point(472, 304), false, false, Color.FromArgb(67, 67, 67), 1, 1);

            Draw.Text(e.Graphics, "Lock", font1, Color.FromArgb(223, 223, 223),
                      new Point(573, 182), true, false, Color.FromArgb(67, 67, 67), 1, 1);
            Draw.Checkbox(e.Graphics, taxCheckbox.Checked == true, new Point(563, 209));
            Draw.Checkbox(e.Graphics, sciCheckbox.Checked == true, new Point(563, 270));
            Draw.Checkbox(e.Graphics, luxCheckbox.Checked == true, new Point(563, 331));
        }
Exemplo n.º 2
0
        public void MainMenu()
        {
            sinaiPanel = new PicturePanel(Images.ExtractBitmap(DLLs.Intro, "sinaiPic"));
            layout.Add(sinaiPanel, new Point(160, 76));

            var mainMenuDialog = new Civ2dialog(this, popupBoxList["MAINMENU"]);

            mainMenuDialog.Location = new Point((int)(Screen.PrimaryScreen.Bounds.Width - mainMenuDialog.Width - 156),
                                                (int)(Screen.PrimaryScreen.Bounds.Height - mainMenuDialog.Height - 72));
            mainMenuDialog.ShowModal(this);

            sinaiPanel.Dispose();
            switch (mainMenuDialog.SelectedIndex)
            {
            //New Game
            case 0:
            {
                NewGame.Start(this, false);
                break;
            }

            // Start premade
            case 1:
            {
                LocateStartingFiles("Select Map To Load",
                                    new FileFilter("Save Files (*.mp)", ".mp"), StartPremadeInit);
                break;
            }

            //Customise World
            case 2:
            {
                NewGame.Start(this, true);
                break;
            }

            // Load scenario
            case 3:
            {
                LocateStartingFiles("Select Scenario To Load",
                                    new FileFilter("Save Files (*.scn)", ".scn"), LoadScenarioInit);
                break;
            }

            // Load game
            case 4:
            {
                LocateStartingFiles("Select Game To Load", new FileFilter("Save Files (*.sav)", ".SAV"),
                                    LoadGameInitialization
                                    );
                break;
            }
            }
        }
Exemplo n.º 3
0
        private void Surface_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.AntiAlias = false;

            // Inner wallpaper
            e.Graphics.DrawImage(Images.ExtractBitmap(DLLs.Tiles, "cityStatusWallpaper").CropImage(new Rectangle(0, 0, 600, 400)), new Rectangle(11, 11, 600, 400));

            // Text
            var font1 = new Font("Times New Roman", 14);

            Draw.Text(e.Graphics, "CITY STATUS", font1, Color.FromArgb(223, 223, 223), new Point(300, 24), true, true, Color.FromArgb(67, 67, 67), 2, 1);
            Draw.Text(e.Graphics, $"Holy Empire of the {Game.GetActiveCiv.Adjective}", font1, Color.FromArgb(223, 223, 223),
                      new Point(300, 45), true, true, Color.FromArgb(67, 67, 67), 2, 1);
            Draw.Text(e.Graphics, $"{Game.GetActiveCiv.LeaderTitle} {Game.GetActiveCiv.LeaderName}: {Game.GetGameYearString}", font1, Color.FromArgb(223, 223, 223),
                      new Point(300, 66), true, true, Color.FromArgb(67, 67, 67), 2, 1);

            // Cities
            var drawnCities = Game.GetActiveCiv.Cities.Skip(barVal0).Take(12).ToList();

            for (int i = 0; i < drawnCities.Count; i++)
            {
                var city = drawnCities[i];
                var font = new Font("Times New Roman", 11, FontStyle.Bold);

                // City image
                Draw.City(e.Graphics, city, true, 0, new Point(13 + 64 * ((barVal0 + i + 1) % 2), 78 + 24 * i));

                // City name
                Draw.Text(e.Graphics, city.Name, font, Color.FromArgb(223, 223, 223),
                          new Point(149, 87 + 24 * i), false, false, Color.FromArgb(67, 67, 67), 1, 1);

                // Food
                var offsetX  = 254;
                var foodProd = new FormattedText()
                {
                    Font            = font,
                    Text            = city.FoodProduction.ToString(),
                    ForegroundBrush = new SolidBrush(Color.FromArgb(223, 223, 223))
                };
                var foodProdShadow = new FormattedText()
                {
                    Font            = font,
                    Text            = city.FoodProduction.ToString(),
                    ForegroundBrush = new SolidBrush(Color.FromArgb(67, 67, 67))
                };
                e.Graphics.DrawText(foodProdShadow, new Point(offsetX + 1, 87 + 24 * i + 1));
                e.Graphics.DrawText(foodProd, new Point(offsetX, 87 + 24 * i));
                offsetX += (int)foodProd.Measure().Width + 1;
                e.Graphics.DrawImage(CityImages.FoodBig, new Point(offsetX +  +1, 87 + 24 * i));

                // Production
                var prod = new FormattedText()
                {
                    Font            = font,
                    Text            = city.TotalProduction.ToString(),
                    ForegroundBrush = new SolidBrush(Color.FromArgb(223, 223, 223))
                };
                var prodShadow = new FormattedText()
                {
                    Font            = font,
                    Text            = city.TotalProduction.ToString(),
                    ForegroundBrush = new SolidBrush(Color.FromArgb(67, 67, 67))
                };
                offsetX += 16;
                e.Graphics.DrawText(prodShadow, new Point(offsetX + 1, 87 + 24 * i + 1));
                e.Graphics.DrawText(prod, new Point(offsetX, 87 + 24 * i));
                offsetX += (int)prod.Measure().Width + 1;
                e.Graphics.DrawImage(CityImages.SupportBig, new Point(offsetX, 87 + 24 * i));

                // Trade
                var trade = new FormattedText()
                {
                    Font            = font,
                    Text            = city.Trade.ToString(),
                    ForegroundBrush = new SolidBrush(Color.FromArgb(223, 223, 223))
                };
                var tradeShadow = new FormattedText()
                {
                    Font            = font,
                    Text            = city.Trade.ToString(),
                    ForegroundBrush = new SolidBrush(Color.FromArgb(67, 67, 67))
                };
                offsetX += 16;
                e.Graphics.DrawText(tradeShadow, new Point(offsetX + 1, 87 + 24 * i + 1));
                e.Graphics.DrawText(trade, new Point(offsetX, 87 + 24 * i));
                offsetX += (int)trade.Measure().Width + 1;
                e.Graphics.DrawImage(CityImages.TradeBig, new Point(offsetX, 87 + 24 * i));

                // Item in production
                var item     = drawnCities[i].ItemInProduction;
                var itemText = new FormattedText()
                {
                    Font            = font,
                    Text            = item.GetDescription(),
                    ForegroundBrush = new SolidBrush(item.Type == ItemType.Unit ? Color.FromArgb(255, 223, 79) : Color.FromArgb(223, 223, 223))
                };
                var itemShadowText = new FormattedText()
                {
                    Font            = font,
                    Text            = item.GetDescription(),
                    ForegroundBrush = new SolidBrush(item.Type == ItemType.Unit ? Colors.Black : Color.FromArgb(67, 67, 67))
                };
                offsetX = 374;
                e.Graphics.DrawText(itemShadowText, new Point(offsetX + 1, 87 + 24 * i + 1));
                e.Graphics.DrawText(itemText, new Point(offsetX, 87 + 24 * i));
                offsetX += (int)itemText.Measure().Width + 3;
                var progressText = "(" + city.ShieldsProgress.ToString() + "/" + (10 * item.Cost).ToString() + ")";
                Draw.Text(e.Graphics, progressText, font, Color.FromArgb(191, 191, 191),
                          new Point(offsetX, 87 + 24 * i), false, false, Color.FromArgb(67, 67, 67), 1, 1);
            }
        }
Exemplo n.º 4
0
        private void Surface_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.AntiAlias = false;

            // Inner wallpaper
            e.Graphics.DrawImage(Images.ExtractBitmap(DLLs.Tiles, "defenseMinWallpaper").CropImage(new Rectangle(0, 0, 600, 400)),
                                 new Rectangle(11, 11, 600, 400));

            // Text
            var font1     = new Font("Times New Roman", 14);
            var cycleText = showCasualties ? "Casualties" : "Statistics";

            Draw.Text(e.Graphics, $"DEFENSE MINISTER: {cycleText}", font1, Color.FromArgb(223, 223, 223),
                      new Point(300, 24), true, true, Color.FromArgb(67, 67, 67), 2, 1);
            Draw.Text(e.Graphics, $"Holy Empire of the {Game.GetActiveCiv.Adjective}", font1, Color.FromArgb(223, 223, 223),
                      new Point(300, 45), true, true, Color.FromArgb(67, 67, 67), 2, 1);
            Draw.Text(e.Graphics, $"{Game.GetActiveCiv.LeaderTitle} {Game.GetActiveCiv.LeaderName}: {Game.GetGameYearString}",
                      font1, Color.FromArgb(223, 223, 223), new Point(300, 66), true, true, Color.FromArgb(67, 67, 67), 2, 1);

            if (!showCasualties)
            {
                // Unit types
                var drawnUnits = unitStatDefs.Skip(barVal0).Take(12).ToList();
                for (int i = 0; i < drawnUnits.Count; i++)
                {
                    var unitDef = drawnUnits[i];
                    var font    = new Font("Times New Roman", 11, FontStyle.Bold);

                    // Unit image
                    Draw.UnitShield(e.Graphics, unitDef.Type, Game.GetActiveCiv.Id, OrderType.NoOrders, false, 100, 100, 0,
                                    new Point(13 + 64 * ((barVal0 + i + 1) % 2), 78 + 24 * i));
                    Draw.UnitSprite(e.Graphics, unitDef.Type, false, false, 0, new Point(13 + 64 * ((barVal0 + i + 1) % 2), 78 + 24 * i));

                    // Unit name
                    Draw.Text(e.Graphics, unitDef.Name, font, Color.FromArgb(223, 223, 223),
                              new Point(149, 95 + 24 * i), false, false, Color.FromArgb(67, 67, 67), 1, 1);

                    // Stats
                    Draw.Text(e.Graphics, $"{unitDef.Attack}/{unitDef.Defense}/{unitDef.Move / 3}", font, Color.FromArgb(223, 223, 223),
                              new Point(245, 95 + 24 * i), false, false, Color.FromArgb(67, 67, 67), 1, 1);
                    Draw.Text(e.Graphics, $"{unitDef.Hitp / 10}/{unitDef.Firepwr}", font, Color.FromArgb(223, 223, 223),
                              new Point(300, 95 + 24 * i), false, false, Color.FromArgb(67, 67, 67), 1, 1);

                    var unitNo = Game.GetActiveCiv.Units.Where(u => u.Type == unitDef.Type).Count();
                    Draw.Text(e.Graphics, $"{unitNo} active", font, Color.FromArgb(255, 223, 79),
                              new Point(332, 95 + 24 * i), false, false, Colors.Black, 1, 1);

                    var unitInProdNo = Game.GetActiveCiv.Cities.Where(c => c.ItemInProduction.Type == ItemType.Unit &&
                                                                      Game.Rules.UnitTypes[c.ItemInProduction.ImageIndex].Type == unitDef.Type).Count();
                    if (unitInProdNo > 0)
                    {
                        Draw.Text(e.Graphics, $"{unitInProdNo} in prod", font, Color.FromArgb(63, 187, 199),
                                  new Point(393, 95 + 24 * i), false, false, Colors.Black, 1, 1);
                    }

                    // TODO: Add extra flags description
                }
            }
            else
            {
            }
        }
Exemplo n.º 5
0
        private void Surface_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.AntiAlias = false;

            // Inner wallpaper
            e.Graphics.DrawImage(Images.ExtractBitmap(DLLs.Tiles, "attitudeAdvWallpaper").CropImage(new Rectangle(0, 0, 600, 400)), new Rectangle(11, 11, 600, 400));

            // Text
            var font1 = new Font("Times New Roman", 14);

            Draw.Text(e.Graphics, "ATTITUDE ADVISOR", font1, Color.FromArgb(223, 223, 223), new Point(300, 24), true, true, Color.FromArgb(67, 67, 67), 2, 1);
            Draw.Text(e.Graphics, $"Holy Empire of the {Game.GetActiveCiv.Adjective}", font1, Color.FromArgb(223, 223, 223),
                      new Point(300, 45), true, true, Color.FromArgb(67, 67, 67), 2, 1);
            Draw.Text(e.Graphics, $"{Game.GetActiveCiv.LeaderTitle} {Game.GetActiveCiv.LeaderName}: {Game.GetGameYearString}", font1, Color.FromArgb(223, 223, 223),
                      new Point(300, 66), true, true, Color.FromArgb(67, 67, 67), 2, 1);


            // Cities
            var drawnCities = Game.GetActiveCiv.Cities.Skip(barVal0).Take(9).ToList();

            for (int i = 0; i < drawnCities.Count; i++)
            {
                var city = drawnCities[i];
                var font = new Font("Times New Roman", 11, FontStyle.Bold);

                // City image
                Draw.City(e.Graphics, city, true, 0, new Point(13 + 64 * ((barVal0 + i + 1) % 2), 78 + 32 * i));

                // City name
                Draw.Text(e.Graphics, city.Name, font, Color.FromArgb(223, 223, 223),
                          new Point(149, 87 + 32 * i), false, false, Color.FromArgb(67, 67, 67), 1, 1);

                // People
                var spacing = city.Size switch
                {
                    int n when(n <= 10) => 28,
                    int n when(n == 11) => 27,
                    int n when(n == 12) => 25,
                    int n when(n == 13) => 23,
                    int n when(n == 14) => 21,
                    int n when(n == 15) => 19,
                    int n when(n == 16) => 18,
                    int n when(n == 17) => 17,
                    int n when(n == 18 || n == 19) => 15,
                    int n when(n == 20) => 14,
                    int n when(n == 21 || n == 22) => 13,
                    int n when(n == 23 || n == 24) => 12,
                    int n when(n == 25 || n == 26) => 11,
                    int n when(n == 27 || n == 28) => 10,
                    int n when(n >= 29 && n <= 31) => 9,
                    int n when(n >= 32 && n <= 35) => 8,
                    int n when(n >= 36 && n <= 40) => 7,
                    int n when(n >= 41 && n <= 47) => 6,
                    int n when(n >= 48 && n <= 56) => 5,
                    int n when(n >= 57 && n <= 70) => 4,
                    int n when(n >= 71 && n <= 93) => 3,
                    int n when(n >= 94) => 2,
                    _ => 28,
                };

                PeopleType[] peoples = city.People;
                var          offsetX = 254;
                int          drawIndex;
                for (int p = 0; p < city.Size; p++)
                {
                    drawIndex = (int)peoples[p];
                    if (p % 2 == 1 && (drawIndex == 0 || drawIndex == 2 || drawIndex == 4 || drawIndex == 6))
                    {
                        drawIndex++;  // Change men/woman appearance
                    }
                    var plpPic = CityImages.PeopleLarge[drawIndex, (int)city.Owner.Epoch];
                    e.Graphics.DrawImage(plpPic, offsetX + 5 + p * spacing, 81 + 32 * i);
                }
            }
        }
Exemplo n.º 6
0
        public CityViewWindow(City city)
        {
            _city = city;
            byte[] cvDLL = File.ReadAllBytes(Utils.GetFilePath("cv.dll"));

            string background;

            if (_city.Owner.Epoch == EpochType.Ancient || _city.Owner.Epoch == EpochType.Industrial)
            {
                if (_city.IsNextToOcean)
                {
                    background = "cityviewBaseoceanempty";
                }
                else if (_city.IsNextToRiver)
                {
                    background = "cityviewBaseriverempty";
                }
                else
                {
                    background = "cityviewBasecontinentempty";
                }
            }
            else if (_city.Owner.Epoch == EpochType.Renaissance)
            {
                if (_city.IsNextToOcean)
                {
                    background = "cityviewBaseoceanroad";
                }
                else if (_city.IsNextToRiver)
                {
                    background = "cityviewBaseriverroad";
                }
                else
                {
                    background = "cityviewBasecontinentroad";
                }
            }
            else    // Modern epoch
            {
                if (_city.IsNextToOcean)
                {
                    background = "cityviewBaseoceanasphaltroad";
                }
                else if (_city.IsNextToRiver)
                {
                    background = "cityviewBaseriverasphaltroad";
                }
                else
                {
                    background = "cityviewBasecontinentasphaltroad";
                }
            }

            if (_city.ImprovementExists(ImprovementType.Superhighways))
            {
                if (_city.IsNextToOcean)
                {
                    background = "cityviewBaseoceanhighway";
                }
                else if (_city.IsNextToRiver)
                {
                    background = "cityviewBaseriverhighway";
                }
                else
                {
                    background = "cityviewBasecontinenthighway";
                }
            }

            // Get tiles
            baseTile          = Images.ExtractBitmap(cvDLL, background);
            improvementsTiles = Images.ExtractBitmap(cvDLL, "cityviewImprovements");
            improvementsTiles = Images.CreateNonIndexedImage(improvementsTiles);
            improvementsTiles.SetTransparent(new Color[] { Color.FromArgb(255, 0, 255), Color.FromArgb(135, 135, 135) });
            wondersTiles = Images.ExtractBitmap(cvDLL, "cityviewWonders");
            wondersTiles = Images.CreateNonIndexedImage(wondersTiles);
            wondersTiles.SetTransparent(new Color[] { Color.FromArgb(255, 0, 255), Color.FromArgb(135, 135, 135) });
            alternTiles = Images.ExtractBitmap(cvDLL, "cityviewAlternative");
            alternTiles = Images.CreateNonIndexedImage(alternTiles);
            alternTiles.SetTransparent(new Color[] { Color.FromArgb(255, 0, 255), Color.FromArgb(135, 135, 135) });

            // Define improvements in order in which they are drawn (left to right, in consequtive rows)
            improvements = new ()
            {
                new CityViewTiles(0, ImprovementType.ManhattanProj, wondersTiles, new Rectangle(160, 116, 158, 114), new Point(4, 0), 2),
                new CityViewTiles(1, ImprovementType.Supermarket, improvementsTiles, new Rectangle(497, 84, 123, 82), new Point(165, 47), 15),
                new CityViewTiles(2, ImprovementType.Aqueduct, improvementsTiles, new Rectangle(1, 1, 123, 82), new Point(267, 10), 2),
                new CityViewTiles(3, ImprovementType.MichChapel, wondersTiles, new Rectangle(319, 116, 158, 114), new Point(401, 10), 5),
                new CityViewTiles(4, ImprovementType.Marketplace, improvementsTiles, new Rectangle(125, 84, 123, 82), new Point(556, 5), 15),
                new CityViewTiles(5, ImprovementType.ResearchLab, improvementsTiles, new Rectangle(373, 84, 123, 82), new Point(653, 1), 14),
                new CityViewTiles(6, ImprovementType.CoperObserv, wondersTiles, new Rectangle(478, 231, 158, 114), new Point(728, 9), 2),
                new CityViewTiles(7, ImprovementType.JSB_Cathedral, wondersTiles, new Rectangle(319, 346, 158, 114), new Point(850, 9), 2),
                new CityViewTiles(8, ImprovementType.Courthouse, improvementsTiles, new Rectangle(125, 1, 123, 82), new Point(980, 7), 1),
                new CityViewTiles(9, ImprovementType.Airport, improvementsTiles, new Rectangle(1, 167, 123, 82), new Point(1116, 7), 0),
                new CityViewTiles(10, ImprovementType.MfgPlant, improvementsTiles, new Rectangle(1, 84, 123, 82), new Point(60, 110), 13),
                new CityViewTiles(11, ImprovementType.RecyclCentre, improvementsTiles, new Rectangle(1, 416, 123, 82), new Point(170, 100), 12),
                new CityViewTiles(12, ImprovementType.SDIdefense, improvementsTiles, new Rectangle(497, 167, 123, 82), new Point(268, 100), 15),
                new CityViewTiles(13, ImprovementType.SAMbattery, improvementsTiles, new Rectangle(125, 250, 123, 82), new Point(370, 100), 13),
                new CityViewTiles(14, ImprovementType.Granary, improvementsTiles, new Rectangle(373, 1, 123, 82), new Point(514, 63), 18),
                new CityViewTiles(15, ImprovementType.Temple, improvementsTiles, new Rectangle(1, 333, 123, 82), new Point(620, 67), 15),
                new CityViewTiles(16, ImprovementType.Pyramids, wondersTiles, new Rectangle(1, 576, 158, 114), new Point(460, 120), 20),
                new CityViewTiles(17, ImprovementType.TradingCompany, wondersTiles, new Rectangle(160, 576, 158, 114), new Point(586, 100), 15),
                new CityViewTiles(18, ImprovementType.Palace, improvementsTiles, new Rectangle(373, 333, 123, 82), new Point(676, 114), 14),
                new CityViewTiles(19, ImprovementType.Cathedral, improvementsTiles, new Rectangle(373, 250, 123, 82), new Point(775, 105), 12),
                new CityViewTiles(20, ImprovementType.Colosseum, improvementsTiles, new Rectangle(249, 167, 123, 82), new Point(870, 100), 13),
                new CityViewTiles(21, ImprovementType.NuclearPlant, improvementsTiles, new Rectangle(249, 84, 123, 82), new Point(960, 114), 15),
                new CityViewTiles(22, ImprovementType.CureCancer, wondersTiles, new Rectangle(478, 576, 158, 114), new Point(1062, 105), 14),
                new CityViewTiles(23, ImprovementType.HangingGardens, wondersTiles, new Rectangle(1, 116, 158, 114), new Point(1162, 100), 12),
                new CityViewTiles(24, ImprovementType.DV_Workshop, wondersTiles, new Rectangle(1, 461, 158, 114), new Point(95, 150), 15),
                new CityViewTiles(25, ImprovementType.DarwinVoyage, wondersTiles, new Rectangle(1, 346, 158, 114), new Point(192, 150), 15),
                new CityViewTiles(26, ImprovementType.Bank, improvementsTiles, new Rectangle(125, 167, 123, 82), new Point(290, 150), 14),
                new CityViewTiles(27, ImprovementType.Barracks, improvementsTiles, new Rectangle(249, 250, 123, 82), new Point(537, 153), 19),
                new CityViewTiles(28, ImprovementType.University, improvementsTiles, new Rectangle(373, 167, 123, 82), new Point(533, 200), 19),
                new CityViewTiles(29, ImprovementType.KR_Crusade, wondersTiles, new Rectangle(478, 461, 158, 114), new Point(658, 156), 4),
                new CityViewTiles(30, ImprovementType.HooverDam, wondersTiles, new Rectangle(319, 1, 158, 114), new Point(780, 156), 2),
                new CityViewTiles(31, ImprovementType.Factory, improvementsTiles, new Rectangle(249, 1, 123, 82), new Point(916, 167), 15),
                new CityViewTiles(32, ImprovementType.WomenSuffrage, wondersTiles, new Rectangle(160, 1, 158, 114), new Point(1036, 175), 0),
                new CityViewTiles(33, ImprovementType.CoastalFort, improvementsTiles, new Rectangle(1, 250, 123, 82), new Point(1160, 213), 14),
                new CityViewTiles(34, ImprovementType.StockExch, improvementsTiles, new Rectangle(125, 416, 123, 82), new Point(0, 213), 2),
                new CityViewTiles(35, ImprovementType.SewerSystem, improvementsTiles, new Rectangle(497, 250, 123, 82), new Point(110, 260), 14),
                new CityViewTiles(36, ImprovementType.SolarPlant, improvementsTiles, new Rectangle(1, 618, 123, 82), new Point(210, 226), 3),
                new CityViewTiles(37, ImprovementType.GreatLibrary, wondersTiles, new Rectangle(478, 1, 158, 114), new Point(332, 226), 2),
                new CityViewTiles(38, ImprovementType.Oracle, wondersTiles, new Rectangle(478, 116, 158, 114), new Point(450, 256), 7),
                new CityViewTiles(39, ImprovementType.ShakespTheat, wondersTiles, new Rectangle(1, 231, 158, 114), new Point(572, 256), 7),
                new CityViewTiles(40, ImprovementType.Library, improvementsTiles, new Rectangle(497, 1, 123, 82), new Point(735, 250), 20),
                new CityViewTiles(41, ImprovementType.MassTransit, improvementsTiles, new Rectangle(125, 618, 123, 82), new Point(845, 259), 15),
                new CityViewTiles(42, ImprovementType.EiffelTower, wondersTiles, new Rectangle(319, 576, 158, 114), new Point(10, 295), 3),
                new CityViewTiles(43, ImprovementType.PowerPlant, improvementsTiles, new Rectangle(125, 333, 123, 82), new Point(167, 287), 3),
                new CityViewTiles(44, ImprovementType.HydroPlant, improvementsTiles, new Rectangle(249, 333, 123, 82), new Point(293, 287), 1),
                new CityViewTiles(45, ImprovementType.IN_College, wondersTiles, new Rectangle(160, 346, 158, 114), new Point(0, 364), 2),
                new CityViewTiles(46, ImprovementType.UnitedNations, wondersTiles, new Rectangle(160, 231, 158, 114), new Point(129, 356), 1),
                new CityViewTiles(47, ImprovementType.MagellExped, wondersTiles, new Rectangle(478, 346, 158, 114), new Point(250, 356), 2),
                new CityViewTiles(48, ImprovementType.MP_Embassy, wondersTiles, new Rectangle(319, 461, 158, 114), new Point(411, 324), 4),
                new CityViewTiles(49, ImprovementType.ApolloProgr, wondersTiles, new Rectangle(1, 1, 158, 114), new Point(533, 324), 1),
                new CityViewTiles(50, ImprovementType.SETIProgr, wondersTiles, new Rectangle(319, 231, 158, 114), new Point(680, 284), 3),
                new CityViewTiles(51, ImprovementType.Nothing, wondersTiles, new Rectangle(0, 0, 0, 0), new Point(928, 273), 12),   // Draw altern. tile where ocean/river is (continental only)
                new CityViewTiles(52, ImprovementType.Nothing, wondersTiles, new Rectangle(0, 0, 0, 0), new Point(1020, 256), 0),   // Draw altern. tile where ocean/river is (continental only)
                new CityViewTiles(53, ImprovementType.Nothing, wondersTiles, new Rectangle(0, 0, 0, 0), new Point(1156, 286), 15),  // Draw altern. tile where ocean/river is (continental only)
                new CityViewTiles(54, ImprovementType.Nothing, wondersTiles, new Rectangle(0, 0, 0, 0), new Point(1043, 328), 2),   // Draw altern. tile where ocean/river is (continental only)
                new CityViewTiles(55, ImprovementType.Nothing, wondersTiles, new Rectangle(0, 0, 0, 0), new Point(1155, 396), 13),  // Draw altern. tile where ocean is (continental & river)
                new CityViewTiles(56, ImprovementType.CityWalls, improvementsTiles, new Rectangle(249, 416, 357, 78), new Point(368, 390), 0),
                new CityViewTiles(57, ImprovementType.OffshorePlat, improvementsTiles, new Rectangle(590, 499, 105, 105), new Point(926, 366), 0),
                new CityViewTiles(58, ImprovementType.Harbour, improvementsTiles, new Rectangle(1, 499, 220, 100), new Point(907, 274), 0),
                new CityViewTiles(59, ImprovementType.PortFacil, improvementsTiles, new Rectangle(222, 499, 367, 118), new Point(907, 296), 0),
                new CityViewTiles(60, ImprovementType.Colossus, wondersTiles, new Rectangle(407, 852, 94, 160), new Point(1070, 319), 0),   // on water
                new CityViewTiles(61, ImprovementType.Colossus, wondersTiles, new Rectangle(502, 852, 94, 160), new Point(1070, 319), 0),   // on land
                new CityViewTiles(62, ImprovementType.Lighthouse, wondersTiles, new Rectangle(253, 852, 76, 133), new Point(1184, 305), 0), // on water
                new CityViewTiles(63, ImprovementType.Lighthouse, wondersTiles, new Rectangle(330, 852, 76, 133), new Point(1184, 305), 0), // on land
                new CityViewTiles(64, ImprovementType.GreatWall, wondersTiles, new Rectangle(1, 691, 304, 160), new Point(0, 0), 0),        // v1
                new CityViewTiles(65, ImprovementType.GreatWall, wondersTiles, new Rectangle(306, 691, 304, 160), new Point(0, 0), 0),      // v2
                new CityViewTiles(66, ImprovementType.StatueLiberty, wondersTiles, new Rectangle(1, 852, 125, 253), new Point(0, 0), 0),    // on sea
                new CityViewTiles(67, ImprovementType.StatueLiberty, wondersTiles, new Rectangle(127, 852, 125, 253), new Point(0, 0), 0),  // on land
            };

            // Locations of alternative tiles (villages, forest) in bitmap
            alternativeTileSrcRect = new List <Rectangle>()
            {
                new Rectangle(1, 1, 158, 114),
                new Rectangle(160, 1, 158, 114),
                new Rectangle(319, 1, 158, 114),
                new Rectangle(478, 1, 158, 114),
                new Rectangle(1, 116, 158, 114),
                new Rectangle(160, 116, 158, 114),
                new Rectangle(319, 116, 158, 114),
                new Rectangle(478, 116, 158, 114),
                new Rectangle(1, 231, 158, 114),
                new Rectangle(160, 231, 158, 114),
                new Rectangle(319, 231, 158, 114),
                new Rectangle(478, 231, 158, 114),
                new Rectangle(1, 346, 123, 82),
                new Rectangle(125, 346, 123, 82),
                new Rectangle(249, 346, 123, 82),
                new Rectangle(373, 346, 123, 82),
                new Rectangle(497, 346, 123, 82),
                new Rectangle(1, 429, 123, 82),
                new Rectangle(125, 429, 123, 82),
                new Rectangle(249, 429, 123, 82),
                new Rectangle(373, 429, 123, 82),
                new Rectangle(497, 429, 123, 82),
                new Rectangle(1, 512, 123, 82),
                new Rectangle(125, 512, 123, 82),
                new Rectangle(249, 512, 123, 82),
                new Rectangle(373, 512, 123, 82),
                new Rectangle(497, 512, 123, 82),
            };

            WindowState   = WindowState.Maximized;
            ShowInTaskbar = false;
            WindowStyle   = WindowStyle.None;
            this.Shown   += (_, _) => drawPanel.Size = this.Size;

            var Layout = new PixelLayout();

            drawPanel = new Drawable()
            {
                BackgroundColor = Colors.Black
            };
            drawPanel.MouseUp += (_, _) => Close();
            drawPanel.Paint   += PaintPanel;
            Layout.Add(drawPanel, new Point(0, 0));
            Content = Layout;
        }