コード例 #1
0
        // Loads full tilesheet into an image.
        public BlitImage TilesheetToImage(int tilesheetIndex, int paletteIndex)
        {
            TileSheet         t = (TileSheet)TileSheets [tilesheetIndex];
            CompressedPalette p = (CompressedPalette)Palettes [paletteIndex];

            byte [] data = new byte [16 * 64 * 64 * 4];
            for (int row = 0; row < 64; row++)
            {
                for (int col = 0; col < 16; col++)
                {
                    t.DrawTile(data, 16 * 8, 64 * 8, p, 0, 8 * col, 8 * row,
                               16 * row + col, false, false);
                }
            }
            return(new BlitImage(data, 16 * 8));
        }