예제 #1
0
        public Bitmap GetIndexedBitmapNotLz(int img, Color[] pal, int width, int height)
        {
            int length = (height * width) << 1;

            Seek(img);
            byte[] img_data = Br.ReadBytes(length);
            return(ImgFunction.ConvertGBAImageToBitmapIndexed(img_data, pal, width, height));
        }
예제 #2
0
파일: map.cs 프로젝트: tianqihou/tools
 private void LoadBlockTiles()
 {
     byte[] img1 = ImgFunction.LZUncompress(Br, tileset1.tileset - ROM).Item1;
     byte[] img2 = ImgFunction.LZUncompress(Br, tileset2.tileset - ROM).Item1;
     byte[] img  = new byte[img1.Length + img2.Length];
     Buffer.BlockCopy(img1, 0, img, 0, img1.Length);
     Buffer.BlockCopy(img2, 0, img, img1.Length, img2.Length);
     tileset = ImgFunction.ConvertGBAImageToBitmapIndexed(img, map_pals, 128, img.Length * 2 / 128);
 }