Skip to content

Commit

Permalink
Fixing error in chunk importing, blocks are still broken...
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed Apr 19, 2015
1 parent fedcb8b commit 811ca54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SonLVL/MainForm.cs
Expand Up @@ -4230,7 +4230,7 @@ private void ImportImage(Bitmap bmp)
for (int y = 0; y < 2; y++)
for (int x = 0; x < 2; x++)
{
tile = LevelData.BmpToTile(bmp.Clone(new Rectangle((cx * 16) + (bx * 16) + (x * 8), (cy * 16) + (by * 16) + (y * 8), 8, 8), bmp.PixelFormat), out pal);
tile = LevelData.BmpToTile(bmp.Clone(new Rectangle((cx * LevelData.Level.ChunkWidth) + (bx * 16) + (x * 8), (cy * LevelData.Level.ChunkHeight) + (by * 16) + (y * 8), 8, 8), bmp.PixelFormat), out pal);
blk.Tiles[x, y].Palette = (byte)pal;
BitmapBits bits = BitmapBits.FromTile(tile, 0);
match = false;
Expand Down Expand Up @@ -7225,7 +7225,7 @@ private void pasteOverToolStripMenuItem_Click(object sender, EventArgs e)
for (int y = 0; y < 2; y++)
for (int x = 0; x < 2; x++)
{
tile = LevelData.BmpToTile(bmp.Clone(new Rectangle((cx * 16) + (bx * 16) + (x * 8), (cy * 16) + (by * 16) + (y * 8), 8, 8), bmp.PixelFormat), out pal);
tile = LevelData.BmpToTile(bmp.Clone(new Rectangle((cx * LevelData.Level.ChunkWidth) + (bx * 16) + (x * 8), (cy * LevelData.Level.ChunkHeight) + (by * 16) + (y * 8), 8, 8), bmp.PixelFormat), out pal);
blk.Tiles[x, y].Palette = (byte)pal;
BitmapBits bits = BitmapBits.FromTile(tile, 0);
match = false;
Expand Down

0 comments on commit 811ca54

Please sign in to comment.