Beispiel #1
0
 /// <summary>
 /// Creates a bitmap of the copied tiles.
 /// </summary>
 public Bitmap GetImage()
 {
     if (Tiles != null && Pixels == null)
     {
         return(Do.PixelsToImage(Do.TilesetToPixels(Tiles, Width / 16, Height / 16, 0, false), Width, Height));
     }
     if (Tiles == null && Pixels != null)
     {
         return(Do.PixelsToImage(Pixels, Width, Height));
     }
     return(null);
 }
Beispiel #2
0
 //
 public void SetTilesetImage()
 {
     if (Tileset.Tilesets_tiles[Layer] != null)
     {
         int   height          = Layer < 2 ? Tileset.Height : Tileset.HeightL3;
         int[] tileSetPixels   = Do.TilesetToPixels(Tileset.Tilesets_tiles[Layer], 16, height, 0, false);
         int[] priority1Pixels = Do.TilesetToPixels(Tileset.Tilesets_tiles[Layer], 16, height, 0, true);
         tilesetImage   = Do.PixelsToImage(tileSetPixels, 256, height * 16);
         priority1      = Do.PixelsToImage(priority1Pixels, 256, height * 16);
         Picture.Height = height * 16;
     }
     else
     {
         tilesetImage   = null;
         priority1      = null;
         Picture.Height = 0;
     }
     Picture.Invalidate();
 }