Пример #1
0
        public void save(String name)
        {
            try
            {
                List <Tile> tiles = worldmap.Children;
                int         count = worldmap.Children.Count;
                Bitmap      bg    = new Bitmap(count * 16, 16);

                using (Graphics g = Graphics.FromImage(bg))
                {
                    for (int c = 0; c < count; c++)
                    {
                        Bitmap tmp = Utils.convertMatrixColorPixelToBitmap(tiles[c].Matrix, 16, 16);
                        g.DrawImage(tmp, new Point(c * 16, 0));
                    }
                }

                UtilsFile.exportFile(name + ".txt", worldmap.Matrix_save, this.col_map, this.row_map);

                bg.Save(name + ".png");
                bg.Dispose();
            }
            catch (Exception ex)
            {
            }
        }